Step-by-step guide for ARMGCC
Setup tool chains
Parent topic:Step-by-step guide for ARMGCC
Install GCC Arm embedded tool chain
Download and install the installer from www.launchpad.net/gcc-arm-embedded.
Parent topic:Step-by-step guide for ARMGCC
Install MinGW
Download the latest mingw-get-setup.exe.
Install the GCC Arm Embedded toolchain. The recommended path is C:/MINGW.
Note: The installation path should not contain a space.
Ensure that the mingw32-base and msys-base are selected under basic setup.
Click “Installation” and “Apply changes”.
|
|
Add paths C:/MINGW/msys/1.0/bin;C:/MINGW/bin to the system environment. If the GCC Arm Embedded tool chain was not installed at the recommended location, the system paths added should reflect this change else the tool chain will not work. An example using the recommended installation locations is shown below.
|
|
Parent topic:Step-by-step guide for ARMGCC
Add new system environment variable ARMGCC_DIR
Create a new system environment variable ARMGCC_DIR. The value of this variable should be the short name of the Arm GCC Embedded tool chain installation path.
|
|
Parent topic:Step-by-step guide for ARMGCC
Install CMake
Download CMake 3.0.1 from www.cmake.org/cmake/resources/software.html.
Install CMake 3.0.1 and ensure that the option “Add CMake to system PATH” is selected.
|
|
Parent topic:Step-by-step guide for ARMGCC
Build the USB demo
Change the directory to the project directory:<install_dir>/boards/twrk22f120m/usb_examples/usb_host_hid_mouse/bm/armgcc.
Run the build_all.bat. The build output is shown in this figure:
|
|
Parent topic:Step-by-step guide for ARMGCC
Run a demo application
This section describes steps to run a demo application using J-Link GDB Server application.
Connect the J-Link debug port to the SWD/JTAG connector of the board.
Open the J-Link GDB Server application and modify your connection settings as shown in this figure.
|
|
**Note:** The target device selection should be MK22FN512xxx12. The target interface should be SWD.
After the connection is estabilished, the screen would resemble the figure below:
|
|
**Note:** The CPU selection should be CPU to: MK22FN512xxx12.
Open the Arm GCC command prompt and change the directory to the output directory of the desired demo. For this example, the directory is:
<install_dir>/boards/twrk22f120m/usb_examples/usb_host_hid_mouse/bm/armgcc/debug.
Run the command “arm-none-eabi-gdb.exe <DEMO_NAME>.elf”. Run these commands:
“target remote localhost: 2331”
“monitor reset”
“monitor halt”
“load”
“monitor reset”
The application is downloaded and connected. Execute the “monitor go” command to start the demo application.
See the example-specific document for more test information.
Parent topic:Step-by-step guide for ARMGCC
Parent topic:Compiling or running the USB stack and examples