Hi,
I’m trying to setup my M4 project from the examples provided by NXP using the SDK (SDK_2_9_0_MIMX8UX5xxxFZ), however I have been not successful by debugging the examples provided by multicore.
The goal is to get a working environment using either KEIL or VSCode to debug M4 project.
VSCode approach:
(rpmsg_lite_pingpong_rtos)
This guide has been followed Developing M4 Applications Using Visual Studio Code as a first approach and everything is successfully installed and adjusted as well as in VSCode the cortex-debug.JLinkGDBServerPath and cortex-debug.gdbPath settings has been provided manually to inform VSCode where is my eabi-gdb and JLINKGDBSERVERCL exe are.
In the SDK provided by NXP you can see that the CMake files are adjusted only for MIMX8QX6, but in our case we are willing to work with the other device MIMX8UX5.
Using VSCode build tasks and adjusting all the CMake files to perform the same as the other device, had successfully provided me a compiled .bin and .elf files using Windows MinGW environment after adding the bin files from the suggested toolchain here (Linaro ARM Embedded/bare-metal toolchain, e.g. 4.8-2014-q3-update or 4.9-2015-q3-update).
Nevertheless, I had also adjusted my launch.json file in VSCode for accessing J-LINK API to use the debug node with providing device “MIMX8UX5_M4”.
CMakeLists.txt had also been adjusted to perform the same execution process that is applied on MIMX8QX6 to our device MIMX8UX5.
flages.cmake had also been adjusted to provide the proper variables needed in our approach regarding
- CMAKE_ASM_FLAGS_DEBUG
- CMAKE_C_FLAGS_DEBUG by adjusting the CPU to DCPU_MIMX8UX5AVLFZ (I’m sceptical on this)
- CMAKE_EXE_LINKER_FLAGS_DEBUG by adjusting the linker from MIMX8QX6xxxxx_cm4_ram.ld to MIMX8UX5xxxxx_cm4_ram.ld (These files are provided under devices/gcc)
So, in principle, device_MIMX8UX5_startup_MIMX8UX5.cmake is responsible for using the startup file. And the Linker is approached by the variable that has been given in flages.cmake.
Trying to debug still fails in more than principle that I cannot understand why.
As in main_remote the main function is approachable, and it is recognized by the debugger, but still the app_task cannot be reached even after calling vTaskStartScheduler(). As the (void)PRINTF(“\r\nRPMSG Ping-Pong FreeRTOS RTOS API Demo…\r\n”); cannot be seen and not breakable.
Maybe I can provide the project and my adjusts, so you can see where is my failures, maybe you can help me through.
Thanks!
Note: KEIL approach will be in another comment added. (rpmsg_lite_str_echo_rtos)
Colibri iMX8DX 1GB V1.0D
Iris Carrier Board V2.0
TorizonCore (2022-04-09 | 5.6.0+build.13)