Hi all
I just switched to Ride7 from Ride6 (BN747) and have some problems to build my project in the new enviroment.
The project worked fine in Ride6, so it seems to be a problem with the new IDE.
My application runs from Flash. However, some functions need to be executed from RAM.
I did this by placing the function into "data" section with the "section" attribute and calling the function via a function pointer as following:
//**************************************************************************
/* Function Prototype */
void RAM_Function(void) __attribute__ ((section (".data")));
/* Function Pointer */
static void (*Pointer_to_RAM_Function)(void) = RAM_Function;
/* Function */
void RAM_Function(void)
{
...
}
/* Application running from FLASH and calling the function located in RAM */
void FLASH_Function(void)
{
...
(*Pointer_to_RAM_Function)();
...
}
//**************************************************************************
This worked well with Ride6.
With Ride7, the linker has some problems and build fails:
//**********************************************************
Running : LD
\"C:\Program Files\Raisonance\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=arm7tdmi -Wl,-T -Xlinker "pxp_mmi_rev_02_00_01.elf.ld" -u _start -nostartfiles -Wl,-Map -Xlinker "pxp_mmi_rev_02_00_01.map"
pxp_mmi_configmgr.o: In function `myFLASH_WordWrite':
pxp_mmi_configmgr.c:(.text+0x34): relocation truncated to fit: R_ARM_CALL against symbol `myFLASH_WaitForLastTask' defined in .data section in pxp_mmi_configmgr.o
pxp_mmi_configmgr.c:(.text+0x60): relocation truncated to fit: R_ARM_JUMP24 against symbol `myFLASH_WaitForLastTask' defined in .data section in pxp_mmi_configmgr.o
collect2: ld returned 1 exit status
Build failed
//**********************************************************
Does anyone have a idea what the problem is? Should I define the functions in a different way for Ride7?
Thanks for your help!
|
Hi
I know this is a linker error message but it might come from the compiler option.
If you use the latest version of our software Ride7 version 7.10.0000 and RKit-ARM version 1.10.0000
you should find in the GCC compiler option, the option "Call->generate long calls".
This option need to be set to "Yes" to call function from RAM because the gap is higher in this case.
But I have retested it and there is a problem with this option that I will correct right now.
The solution is to use the "more" box where you need to add "-mlong-calls"
Matloub
Hi
With the option "-mlong-calls" in the "more" box, the build works fine.
The "Call->generate long calls" flag does not work.
Thanks for the help.
Gutor