Configure VS Code settings
Open the workspace and create a folder .vscode in the root directory.
Create a settings.json with the following content and modify the installation paths
{
"cortex-debug.gdbPath": "<arm-none-eabi-gdb.exe path>",
"cortex-debug.armToolchainPath": "<arm-none-eabi-gcc.exe path>",
"cortex-debug.JLinkGDBServerPath": "<JLinkGDBServerCL.exe path>",
"cortex-debug.variableUseNaturalFormat": true,
}
Note: The content can also be copied from /mcuxsdk-examples-tq/templates/settings.json
Create a launch.json with the following content and change the device specification if necessary:
{
"configurations": [
{
"showDevDebugOutput": "both",
"type": "cortex-debug",
"request": "launch",
"name": "Debug J-Link RAM i.MX93",
"cwd": "${workspaceFolder}",
"executable": "${workspaceFolder}/build/hello_world_cm33.elf",
"servertype": "jlink",
"device": "MIMX9332_M33",
"interface": "jtag",
"serverArgs": [
"-endian",
"little",
"-LocalhostOnly",
"-speed",
"4000"
],
"postLaunchCommands": [
"target remote localhost:50000",
"monitor reset",
"monitor halt",
"load"
]
}
]
}
Note: The content can also be copied from /mcusdk-examples-tq/_boards/tqmba93xxca/templates/launch.json
Boot the Board
Connect the Starterkit to the Host as described in the STKa93xxLA Quickstart Guide and open two new terminals with the first and second COM Port devices. The first port will print serial output from the boards Linux and the second port will receive the serial output from Cortex M33.
Run the Demo
In VS Code, swap to the Run and Debug section on the left side and choose “Debug J-Link RAM i.MX93” from the dropdown menu. Then, click the green PLAY button (or press F5).
The program will be loaded onto the board and will start the main function. A “Hello World” text should be printed on the serial console
Boot the Board
Connect the Starterkit to the Host as described in the STKa93xxLA Quickstart Guide and open two new serial terminals with the first and second COM Port device. The first port will print serial output from the boards Linux and the second port will receive the serial output from Cortex M33.
Open the Debugserver
Open another terminal and open the debugserver there. Change the device specification (here: MIMX9332_M33) if necessary.
JLinkGDBServerCLExe -device MIMX9332_M33 -if JTAG -speed 4000 -port 50000
Run the Demo
Connect to the GDB server in the first terminal
/opt/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gdb
Execute the following to start debuging the demo
target remote localhost:50000
monitor reset
monitor halt
load ~/workspace/build/hello_world_cm33.elf
monitor go
The second serial terminal should print a “hello world.” message.