Hi All,
I have question for you about the following compiler options
--abi=eabi ; EABI
Originally when I was trying to get Vector GMLAN software to run on Cortex M3 core I used the following compiler options,
-o2 -fr $(OBJ_PATH) \
-fb $(LST_PATH) \
-ff $(LST_PATH) \
-fs $(LST_PATH) \
-dC_DERIVATIVE_$(PLANET_$(DERIVATIVE)) \
-dBRS_TIMEBASE=$(CPU_FREQUENCY) \
-k \
-g \
-mv7M3
and linker options were
-a \
-c \
-x \
-i $(COMPILER_LIB) \
-m $(PROJECT_NAME).map \
-o $(PROJECT_NAME).$(BINARY_SUFFIX)
I was also using rtsv7M3_T_be_tiarm9.lib
But when I try to migrate to eabi
–abi=eabi option and rtsv7M3_T_be_eabi library to link
And the following warnings were
warning: LOAD placement specified for section
".text:decompress:none:rtsv7M3_T_be_eabi.lib<copy_decompress_none.obj>".
This section contains decompression routines required for linker generated
copy tables and C/C++ auto-initialization. Must ensure that this section is
copied to run address before the C/C++ boot code is executed or is placed
with single allocation specifier (ex. "> MEMORY").
warning: LOAD placement specified for section
".text:decompress:ZI:rtsv7M3_T_be_eabi.lib<copy_zero_init.obj>". This
section contains decompression routines required for linker generated copy
tables and C/C++ auto-initialization. Must ensure that this section is
copied to run address before the C/C++ boot code is executed or is placed
with single allocation specifier (ex. "> MEMORY").
warning: LOAD placement specified for section
".text:rtsv7M3_T_be_eabi.lib<memset_t2.obj>". This section contains
decompression routines required for linker generated copy tables and C/C++
auto-initialization. Must ensure that this section is copied to run address
before the C/C++ boot code is executed or is placed with single allocation
specifier (ex. "> MEMORY").
warning: LOAD placement specified for section
".text:decompress:rle:rtsv7M3_T_be_eabi.lib<copy_decompress_rle.obj>". This
section contains decompression routines required for linker generated copy
tables and C/C++ auto-initialization. Must ensure that this section is
copied to run address before the C/C++ boot code is executed or is placed
with single allocation specifier (ex. "> MEMORY").
warning: creating ".stack" section with default size of 0x800; use the -stack
option to change the default size
In addition I tried to run the code on the secondary cortex m3 core and the code no longer works.
i change the following in the startup code:
I removed .cinit and its auto initialization code and it was replace by the following code
typedef void (*handler_fptr)(const unsigned char *in,unsigned char *out);
#define HANDLER_TABLE __TI_Handler_Table_Base
#define HANDLER_TABLE_LIMIT __TI_Handler_Table_Limit
#pragma WEAK(HANDLER_TABLE)
#pragma WEAK(HANDLER_TABLE_LIMIT)
extern unsigned int HANDLER_TABLE;
extern unsigned int HANDLER_TABLE_LIMIT;
extern unsigned char *__TI_CINIT_Base;
extern unsigned char *__TI_CINIT_Limit;
void auto_initialize()
{
unsigned char **table_ptr;
unsigned char **table_limit;
/*--------------------------------------------------------------*/
/* Check if Handler table has entries. */
/*--------------------------------------------------------------*/
if (&__TI_Handler_Table_Base >= &__TI_Handler_Table_Limit)
return;
/*---------------------------------------------------------------*/
/* Get the Start and End of the CINIT Table. */
/*---------------------------------------------------------------*/
table_ptr = (unsigned char **)&__TI_CINIT_Base;
table_limit = (unsigned char **)&__TI_CINIT_Limit;
while (table_ptr < table_limit)
{
/*-------------------------------------------------------------*/
/* 1. Get the Load and Run address. */
/* 2. Read the 8-bit index from the load address. */
/* 3. Get the hander function pointer using the index from */
/* handler table. */
/*-------------------------------------------------------------*/
unsigned char *load_addr = *table_ptr++;
unsigned char *run_addr = *table_ptr++;
unsigned char handler_idx = *load_addr++;
handler_fptr handler =
(handler_fptr)(&HANDLER_TABLE)[handler_idx];
/*-------------------------------------------------------------*/
/* 4. Call the handler and pass the pointer to the load data */
/* after index and the run address. */
/*-------------------------------------------------------------*/
(*handler)((const unsigned char *)load_addr, run_addr);
}
}
and I call auto_initialize() in c_int00
Can you help me migrate my code from ti arm9 to eabi? I tried to do that on my own using TMS470EABIMIGRATION.pdf and didnt work and I am still having the warnings.
Thanks for your time.