Debugging ModuleX

HugPeter-9392 246 Reputation points
2022-11-29T10:54:57.923+00:00

Hello
We observe severe limitations when debugging ModuleX module using IAR v9.30.1. This includes that the IAR ThreadX views do not get updated properly. This is the views get cleared and shows '0'. Additionally, when breaking (single stepping or break point gets hit) IAR toggles between disassembly view and source code view. This is annoying. Unfortunately, the IAR support could only provide within 6 months a work around to disable debug support in the ModuleX module. But then debugging is limited to disassembly only - the source code overlay in the disassembly view does not get shown. For me this very limiting.

Question: Is there another development environment that works better with ModuleX modules? What do you recommend?

We are developing in C++. For this reason we generate absolute placed code and execute in place. See https://www.iar.com/knowledge/support/technical-notes/compiler/ewarm-position-independent-code-and-data-ropi-and-rwpi-ewarm-5.50/. The above we observed with Cortex-M0+ and Cortex-M7. Now we move toward Cortex-M33. Might it makes a difference.

Thanks for support.
Peter

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
323 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Scott Azure RTOS 4,051 Reputation points
    2022-11-29T18:51:38.16+00:00

    Hi Peter,

    Debugging Modules with IAR isn't great - because modules usually have memory protection enabled, the ThreadX plugin can't show the ThreadX objects when stepping into a module. You should still be able to step through the module C/assembly code. For example, see screenshot below. I am able to step through the C code and the disassembly shows what's going on at the assembly level.
    265346-image.png

    Other good debuggers I've used with Modules are ARM DS and Keil. Another problem that I think is common to all these debuggers is that the module data is relocatable and the debugger isn't able to resolve the data addresses at runtime.