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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

757 次查看
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 回复数

599 次查看
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 项奖励

599 次查看
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 项奖励