Is it possible to seperate the executable used for debugging and for flashing in embedded development?
I'm using CLion in embedded development, when using gnu arm toolchain, everything works perfect. However, when I'm writing a custom CMake toolchain file to invoke Arm Compiler 6 for compiling and linking, I found that the generated axf(which is also elf) executable places RAM variables in different addresses compared to the elf generated by gnu toolchain, the gnu toolchain places these variables right behind the RO codes in flash and these variables gets copied into RAM right after execution starts, but the AC6 toolchain places them at the actual execute address in RAM, and therefore these variables can't be downloaded into chip's flash memory .
My ld files and sct files should be correct since the hex file generated from both elf and axf using tools from corresponding toolchian is correct. I tried to specify hex files as the executable in Run/Debug Configurations, in this way download works, but I can only debug in disassembly. Is there a way allows me to download hex or bin files to MCUs and at the same time debug using elf or axf files?
Please sign in to leave a comment.