Linking error when building release version

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

Linking error when building release version

ソリューションへジャンプ
1,429件の閲覧回数
JBM
Contributor V

I am developing an application for the LPC844M201JHI33Y (no hardware yet - did most of it with the LPC845 development kit and then created a new project for the LPC844 and copied the code over).  

I'm using MCUXpresso version 11.6.1.  SDK was built and downloaded in January.

I have a debug version of the code that compiles and links with no errors.  I created a release configuration from the debug configuration and changed debugging information to minimal and SDK_DEBUGCONSOLE=2 (no debug console).  This release version compiled and linked with no errors.

I then changed the preprocessor defined symbol "DEBUG" to "NDEBUG" and I get an error in linking:

"cannot move location counter backwards (from 000003ac to 000002fc)"

I know 0x2FC is the address of the code read protection word which I haven't changed.  

I compared all the linker files (*.ld) between the DEBUG and RELEASE versions and they are the same except for the creation times in the comments.

I tried different library versions (NewLib, NewLibNano, RedLib) and it does the same thing with all.

Any idea what is going on?

 

0 件の賞賛
返信
1 解決策
1,422件の閲覧回数
ErichStyger
Specialist I

It is because the linker tries to fit in a block into that space, and fails because of memory 'segement' size.

Try changing that option in the project settings for the linker:

ErichStyger_0-1678988570642.png

I hope this helps,

Erich

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,423件の閲覧回数
ErichStyger
Specialist I

It is because the linker tries to fit in a block into that space, and fails because of memory 'segement' size.

Try changing that option in the project settings for the linker:

ErichStyger_0-1678988570642.png

I hope this helps,

Erich

 

0 件の賞賛
返信
1,419件の閲覧回数
JBM
Contributor V

Thanks Erich.  That worked.

0 件の賞賛
返信