s32 powerpc complier link bug, omit the flash rcnw table.

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

s32 powerpc complier link bug, omit the flash rcnw table.

746件の閲覧回数
hexiaobo
Contributor I

I am work for the mpc5675k bsp.

When I create the simple project from the s32ds, it work good.

But when i make my bsp pkg, contian the base files same as the simple project, to be a library.

And make a test app, contain the v_test.cpp.

when I link the main.o and the bsp library, the compiler make thev_test.elf.

but when debug, it can't work, cpu can't init.

I debug it ,and trace in to the flash memory, the vector of addrees 0, is emit by the compiler.

I must to add this code to avoid the bug:

#ifdef __GNUC__
extern const uint32_t RCHW[];
cuint32_t * p = RCHW;
vuint32_t k = *p;
#endif

link_bug.jpg

0 件の賞賛
2 返答(返信)

588件の閲覧回数
alexanderfedoto
NXP Employee
NXP Employee

You can use EXTERN directive in linker script to force this symbol to be resolved

/* Entry Point */
ENTRY(_start)

EXTERN(RCHW)
0 件の賞賛

588件の閲覧回数
stanish
NXP Employee
NXP Employee

Hi,

Thank you for this report.

This indeed seems to be an issue with GCC e200 binutils .

Our compiler team is now investigating this problem.

The only work around currently available is to create a dummy reference to the object in the code (as you did).

Regards,

Stan

0 件の賞賛