主题:MSPM0G3107、 SysConfig 中讨论的其他器件
工具/软件:
你(们)好
我目前面临的问题看起来像是堆栈溢出;因此我将堆栈大小从0x200增加到0x400、最后甚至是0x800、但结果没有改变。
仔细检查后、我发现在我的 linkerfile 中、即使我对工程进行了完全全新的重建、堆栈大小仍然是0x200、而不是设置的更大大小。
****************************************************************************** TI ARM Clang Linker PC v4.0.2 ****************************************************************************** >> Linked Fri Apr 11 13:58:16 2025 OUTPUT FILE NAME: <MCUCode.elf> ENTRY POINT SYMBOL: "_c_int00_noargs" address: 0000b061 MEMORY CONFIGURATION name origin length used unused attr fill ---------------------- -------- --------- -------- -------- ---- -------- FLASH 00000000 00020000 0000fa60 000105a0 R X SRAM 20200000 00008000 000045a1 00003a5f RW X BCR_CONFIG 41c00000 000000ff 00000060 0000009f R BSL_CONFIG 41c00100 00000080 00000058 00000028 R SEGMENT ALLOCATION MAP run origin load origin length init length attrs members ---------- ----------- ---------- ----------- ----- ------- 00000000 00000000 0000db10 0000db10 r-x 00000000 00000000 000000c0 000000c0 r-- .intvecs 000000c0 000000c0 0000be30 0000be30 r-x .text 0000bef0 0000bef0 00001c20 00001c20 r-- .rodata 0000db70 0000db70 00000ef0 00000ef0 r-- 0000db70 0000db70 00000ee0 00000ee0 r-- .cinit 0000ea50 0000ea50 00000010 00000010 r-- .binit 0001f000 0001f000 00001000 00001000 r-- 0001f000 0001f000 00000400 00000400 r-- .ProductionInfo 0001f400 0001f400 00000400 00000400 r-- .StateBackup 0001f800 0001f800 00000400 00000400 r-- .Diagnostics 0001fc00 0001fc00 00000400 00000400 r-- .Calibrations 20200000 20200000 00004344 00000000 rw- 20200000 20200000 00003645 00000000 rw- .data 20203648 20203648 00000800 00000000 rw- .sysmem 20203e48 20203e48 000004fc 00000000 rw- .bss 20204348 0000db10 00000060 00000060 r-x 20204348 0000db10 00000060 00000060 r-x .TI.ramfunc 20207e00 20207e00 00000200 00000000 rw- 20207e00 20207e00 00000200 00000000 rw- .stack 41c00000 41c00000 00000060 00000060 r-- 41c00000 41c00000 00000060 00000060 r-- .BCRConfig 41c00100 41c00100 00000058 00000058 r-- 41c00100 41c00100 00000058 00000058 r-- .BSLConfig SECTION ALLOCATION MAP
因此、对于我看来、栈大小参数完全被忽略...
我在 Windows 上使用 CCS Theia 20.1.1.8和 MSPM0g3107以及 TICLANG 编译器、以防万一...
完整的链接器设置是
linker.opt 包含的位置
-Wl,-m"MCUCode.map" -Wl,-i"C:/ti/mspm0_sdk_2_04_00_06/source" -Wl,-i"C:/GitRepos/MCUCode/Debug/syscfg" -Wl,-i"C:/ti/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.2.LTS/lib" -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="MCUCode_linkInfo.xml" -Wl,--rom_model和 eepromMap.opt 包含
-Wl,-l"eepromMap.cmd"
其中 eeprommap.cmd 依次包含
SECTIONS { .ProductionInfo: type=NOINIT {} > 0x0001f000 .StateBackup: type=NOINIT {} > 0x0001F400 .Diagnostics: type=NOINIT {} > 0x0001F800 .Calibrations: type=NOINIT {} > 0x0001FC00 }
因此、对于我担心的所有问题、我看不到该 size 参数应该如何被覆盖