Hello,
I have a code section (interrupt entry table), which start address should be a symbol that has to be known to the c-compiler (for setting the base register in normal c-code) , the assembler (for the interrupt handler to jump to the table) and the linker (for linking the table to the base address set in the c-code). I know how to define a symbol in a *.asm file, which could also be used in a *.c file. But the linker can't use that symbol in the linker.cmd file's SECTIONS directive to link the code section (the interrupt entry table) to the correct memory location.
Is there the possibility to define such symbol? If yes, in which file I have to define it (linker.cmd file or asm file)? Solving the problem is not essential for survival, but would save the trouble to change the start address in all files, if necessary. I use the TMS470 c-compiler v4.6 with CCS v4.1.3. Here's my source code to better illustrate my problem:
main.c
extern Uint32 eabaseaddress; /* symbol is defined in the intvecs.asm file */
....
INTC_EABASE = eabaseaddress; /* setting the EABASE address for the arm interrupt controller */
....
---------------------------------------------------------------------------------------------------
intvecs.asm
...
.global eabaseaddress /* make symbol seen by all other files */
...
eabaseaddress:
.word 0x00006000 ; entry address of interrupt table
...
----------------------------------------------------------------------------------------------------
linker.cmd
...
SECTIONS
{
.inttable > eabaseaddress /* Linker doesn't know that symbol !!! */
...
}
Regards,
Matthias