Linking Builtin/ROM code in KEAZ64xxx4

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Linking Builtin/ROM code in KEAZ64xxx4

ソリューションへジャンプ
1,487件の閲覧回数
mfarv
Contributor I

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)

ラベル(1)
0 件の賞賛
返信
1 解決策
1,464件の閲覧回数
mfarv
Contributor I

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";

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,465件の閲覧回数
mfarv
Contributor I

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";

0 件の賞賛
返信