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.

[参考译文] TMS570LC4357:函数 getResetSource()导致硬复位/调试器复位错误

Guru**** 2609895 points
Other Parts Discussed in Thread: HALCOGEN

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/758292/tms570lc4357-function-getresetsource-causing-error-on-hard-reset-debugger-reset

器件型号:TMS570LC4357
主题中讨论的其他器件:HALCOGEN

您好!

我正在使用 Ubuntu 存储库中的 ARM-NONE eabi (v6.3.1)与 HALCoGen 04.07.00 (Windows)配合使用。

该函数声明为:

resetSource_t getResetSource (void)__attribute__((naked)); 

这使得编译器不会从直接从_c_int00调用的函数生成任何类型的返回、然后继续执行下一个函数、在我的情况下、该函数是 systemGetConfigValue、由于 config_ret 为 NULL、因此失败。

之所以在此处插入此__attribute__((裸机)),是因为堆栈未初始化,但在我的 HALCoGen 堆栈版本中,在该函数之前已初始化,因此删除__attribute__(裸机))可以解决我的问题。

只是想告诉您我遇到的问题。

此致、

Marko