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.

[参考译文] MSPM0G3507:基于 ARM 的微控制器论坛

Guru**** 2455560 points
Other Parts Discussed in Thread: MSPM0G3507

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1493122/mspm0g3507-arm-based-microcontrollers-forum

器件型号:MSPM0G3507

工具与软件:

尊敬的 TI 团队:

我们正在   我们的项目中使用函数'_static_inline void invkeBSLAsm (void)'。 这部分代码是从 参考示例代码 ..\ti\mspm0_sdk_2_03_00_07\examples\nortos\LP_MSPM0G3507\bsl\bsl_software_invoke_app_demo_uart 的 Invoke_BSLAsm 函数复制的。 我们 在编译项目后面临编译问题、并且出现以下错误

错误:符号"init_ecc_loop"已定义。 当在多次内联的函数中的内联汇编语句内定义标签时、可能会出现这种情况。 若要防止函数被内联、请使用"noinline"函数属性。
[264] 311 |"init_ecc_loop:\n"/*循环清除 ecc-code *

[269]../ src bootloader/boot_task/bootloader.c:319:10:错误:已定义符号"init_data_loop"。 当在多次内联的函数中的内联汇编语句内定义标签时、可能会出现这种情况。 若要防止函数被内联、请使用"noinline"函数属性。
[270] 319 |"init_data_loop:\n"/*清除 ECC-DATA 的循环*/

下面是当前的编译器版本、

我们尝试了使用路径中可用的空工程: ti\mspm0_sdk_2_03_00_07\examples\nortos\LP_MSPM0G3507\driverlib\empty、并复制了 函数 "__static_inline void invokeBSLAsm (void)"。 当我们构建该项目时、它将被成功编译。  

以下是用于空项目的编译器版本、

请告诉我们这一问题的根源、并告诉我们 优先解决这一问题的可能解决办法

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

    尝试在 工程文件夹中对该符号进行全局搜索:init_ecc_loop。

    此外、这些错误日志显示了多定义位置:

    [264] 311 | "init_ecc_loop: \n" /* Loop to clear ECC-code */
    
    [269]../src/bootloader/boot_task/bootloader.c:319:10: error: symbol 'init_data_loop' is already defined. This is possible when a label is defined inside an inline assembly statement within a function that is inlined multiple times. To prevent the function from being inlined, use the "noinline" function attribute.
    [270] 319 | "init_data_loop:\n" /* Loop to clear ECC-data */

    请检查这些区域。

    另一个问题、为什么需要  "__static_inline void bSLAsm (void)"?