Run an example application
This section describes steps to run a demo application using J-Link GDB Server application. To perform this exercise, the following step must be done:
You have a standalone J-Link pod that is connected to the debug interface of your board.
After the J-Link interface is configured and connected, follow these steps to download and run the demo applications:
Connect the development platform to your PC via USB cable between the USB-UART connector and the PC USB connector. If using a standalone J-Link debug pod, also connect it to the SWD/JTAG connector of the board.
Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug serial port number (to determine the COM port number, see How to determine COM port). Configure the terminal with these settings:
115200 baud rate
No parity
8 data bits
1 stop bit
|
|
After GDB server is running, the screen should resemble Figure 2:
|
|
If not already running, open a GCC Arm Embedded tool chain command window. To launch the window, from the Windows operating system Start menu, go to Programs -> GNU Tools Arm Embedded <version> and select GCC Command Prompt.
|
|
Change to the directory that contains the example application output. The output can be found in using one of these paths, depending on the build target selected:
<install_dir>/boards/<board_name>/<example_type>/<application_name>/armgcc/debug
<install_dir>/boards/<board_name>/<example_type>/<application_name>/armgcc/release
For this example, the path is:
<install_dir>/boards/evkmimx8mn/demo_apps/hello_world/armgcc/debug
Run the command of
arm-none-eabi-gdb.exe <application_name>.elf
. For this example, it isarm-none-eabi-gdb.exe hello_world.elf
.|
|
Run these commands:
target remote localhost:2331
monitor reset
monitor halt
load
The application is now downloaded and halted at the reset vector. Execute the
monitor go
command to start the demo application.
The hello_world
application is now running and a banner is displayed on the terminal. If this is not true, check your terminal settings and connections.
|
|
Parent topic:Windows OS host