question

TimothyFields-1568 avatar image
0 Votes"
TimothyFields-1568 asked ScottAzureRTOS commented

Azure RTOs Threadx Module example running on Cortex M7

I am trying to get the Threadx Module "Example Build" to run on my hardware which is a Cortex-M7 (STM32H753) using IAR tools. The provided example runs in the simulator, but when I modify the memory locations to try to get it to work on my harware, it doesn't work. Do you having any Threadx Module example that run on Cortex HW?

azure-rtos
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ScottAzureRTOS avatar image
0 Votes"
ScottAzureRTOS answered

Hi Tim,

ST has many Modules projects available for their various development boards. I suggest you peruse their Github. Here's one example: https://github.com/STMicroelectronics/x-cube-azrtos-f7/tree/main/Projects/STM32F769I-Discovery/Applications/ThreadX/Tx_MPU

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TimothyFields-1568 avatar image
0 Votes"
TimothyFields-1568 answered ScottAzureRTOS commented

@ScottLarson-1357
That's exactly what I was looking for and I can get this to work. Thank you very much.

One further question. Since there is a project for both the module and the module manager, they both create .out files. Is there a practical way to debug the module? I loaded the debug symbols for Module while debugging the module manager, but that didn't seem to help since I can't set breakpoints in the module while running the module manager. Any help would be much appreciated.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This depends on the debugger, e.g. ARM DS can do this but IAR cannot.

0 Votes 0 ·
LicioMAPELLI-4995 avatar image
0 Votes"
LicioMAPELLI-4995 answered ScottAzureRTOS commented

Hello, i succeeded in Module debugging using IAR toolchain on ARM M33, the step i followed are listed below:
1) from the Module prj generate the Module.bin (raw binary file) and Module.out (ELF file with debugging symbols), remember to disable all compiler optimizations. Read the Module.out (the ELF) with readelf Linux cmd or also can read the ELF on some website offering the readelf capability

199139-image.png

2) from the Module Manager IAR prj Options->Debugger->Images enable the checkbox "Download extra image" enter the Offset 0x34 (from the ELF) and enable the checkbox "Debug info only"

3) Using IAR debugger flash on the target both the Module Manager main application and the Module PIC & PID library, from now on it possible to place a breakpoint in module code.

Please consider the above procedure works if module is "executed in place" calling txm_module_manager_in_place_load() because in that case the module is executed from the same flash mem address for which it was compiled (see the linker script).

While, loading the Module from file, instead of flashing it together with the ModuleManager app, (eg. calling txm_module_manager_file_load()) load and execute the module from SDRAM so it will end up in a random SDRAM address different than the one specified in the Module linker scrip, in that case the Module debug does not work for me.
Hope it helps, regards



image.png (6.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @LicioMAPELLI-4995 - great work! It is possible to debug a module in IAR when loaded "in place" and also downloading the extra image "debug info only."

0 Votes 0 ·