This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSPM0C1104:分频期间出现硬故障

Guru**** 2815985 points

Other Parts Discussed in Thread: MSPM0C1104

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1627001/mspm0c1104-hard-fault-during-division

器件型号: MSPM0C1104

在我的 MSPM0C1104 部门中、调用_udivsi3 等 GCC 实现时会导致硬故障。  故障最终由闪存中的.word 操作触发、我知道该操作会在其位置分配存储器。

使用 GCC ARM 库时、如何将写入操作放入闪存中? 更重要的是、如何将它们移至 RAM 中?

division_hard_fault_trace.png

  闪存中       (RX) :origin = 0x00000000、length = 0x00003BFF
  SRAM       (rwx):origin = 0x20000000、length = 0x00000400
  device_config  (rw!x):origin = 0x00003C00、length = 0x000001ff
  BCR_CONFIG   (R)  :origin = 0x41C00000、length = 0x000000FF

编译器:

"C:/TI/gcc_arm_none_eabi_9_2_1/bin/arm-none-eabi-gcc-9.2.1.exe" 
-c 
@"device.opt" 
-mcpu=cortex-m0plus 
-march=armv6-m 
-mthumb 
-mfloat-abi=soft 
-I"C:/TI/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include" 
-I"C:/TI/mspm0_sdk_2_09_00_01/source" 
-I"C:/MYPROJ/src" 
-I"C:/MYPROJ/src/modules" 
-I"C:/MYPROJ/src/modules/comp1" 
-I"C:/MYPROJ/src/modules/communication" 
-I"C:/MYPROJ/src/modules/mylib" 
-I"C:/MYPROJ/src/modules/battery" 
-I"C:/MYPROJ/src/modules/accelerometer" 
-I"C:/MYPROJ" 
-I"C:/MYPROJ/Debug" 
-O2 
-ffunction-sections 
-fdata-sections 
-gdwarf-3 
-gstrict-dwarf 
-Wall 
-fno-math-errno 
-MMD 
-MP 
-MF"src/modules/communication/communication.d_raw" 
-MT"src/modules/communication/communication.o" 
-std=c99 
@"./device.opt" 
-o"src/modules/communication/communication.o" 
"../src/modules/communication/communication.c" 

链接器:

"C:/TI/gcc_arm_none_eabi_9_2_1/bin/arm-none-eabi-gcc-9.2.1.exe" 
@"device.opt" 
-O2
-ffunction-sections 
-fdata-sections 
-gdwarf-3
-gstrict-dwarf 
-Wall
-fno-math-errno 
-mthumb
-mfloat-abi=soft 
-Wl,-Map,"myproj.map" 
-nostartfiles 
-nostdlib
-static 
-Wl,--gc-sections 
-L"C:/TI/mspm0_sdk_2_09_00_01/source/ti/driverlib/lib/gcc/m0p/mspm0c110x" 
-L"C:/TI/mspm0_sdk_2_09_00_01/source" 
-L"C:/MYPROJ" 
-L"C:/MYPROJ/Debug/syscfg" 
-L"C:/TI/gcc_arm_none_eabi_9_2_1/lib/gcc/arm-none-eabi/9.2.1" 
-L"C:/TI/gcc_arm_none_eabi_9_2_1/arm-none-eabi/lib/thumb/v6-m/nofp" 
-march=armv6-m 
-mthumb
--specs=nano.specs 
-o"myproj.out" 
"./ti_msp_dl_config.o" 
"./startup_mspm0c110x_gcc.o" 
"./main.o" 
"./src/modules/accelerometer/accelerometer.o" 
"./src/modules/battery/battery.o" 
"./src/modules/mylib/communication/communication.o" 
"./src/modules/rear_light/comp1.o" 
-Wl,-T"../make/myproj.lds" 
-Wl,-Tdevice.lds.genlibs 
-lm
-lgcc 
-lc 
-l:driverlib.a 

.map 文件

 .text          0x000004e8      0x114 C:/TI/gcc_arm_none_eabi_9_2_1/lib/gcc/arm-none-eabi/9.2.1\libgcc.a(_udivsi3.o)
                0x000004e8                __aeabi_uidiv
                0x000004e8                __udivsi3
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    libgcc.a我使用的版本错误。 正确的路径是 "C:\TI\gcc_arm_none_eabi_9_2_1\lib\gcc\arm-none-eabi\9.2.1\thumb\v6-m\nofp\libgcc.a"