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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

311 Views
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 Kudos
2 Replies

153 Views
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 Kudos

153 Views
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 Kudos