I have a bare metal application that crashes whenever strlen is called. The same code that previously leveraged PE does not.
As I understand it this function may exist in ROM on the part, instead of having to be compiled into the flash image. Is this correct, and if so how do I tell the linker that fact since the default linker file does not appear to include it? (Modified bare metal linker script is attached)
解決済! 解決策の投稿を見る。
The issue was not related to the linker at all. Another author had declared a string like this:
static const uint8_t *Carriage = "\r\n";
When strlen(Carriage) was run against this, it crashed.
When the declaration was rewritten, it works.
static const uint8_t Carriage[] = "\r\n";
The issue was not related to the linker at all. Another author had declared a string like this:
static const uint8_t *Carriage = "\r\n";
When strlen(Carriage) was run against this, it crashed.
When the declaration was rewritten, it works.
static const uint8_t Carriage[] = "\r\n";