i have to place one function at specific address using scatter file please give me any idea.
Means i have 2 scatter file so i want to call from 1st scatter file to 2nd scatter file 'function'.
in the 1st scatter memory reason my function call is there and 2nd scatter memory reason my function definition
so i have to link them at run time.
I wonder if what you really mean is this?developer.arm.com/.../Access-symbols-in-another-image
We cannot use 2 different scatter file same memory?
Please can you explain your desired final outcome, and perhaps I can answer that way.
Means i have 2 scatter file 1st scatter file containing my application and 2nd scatter file containing SDK function.
so i have to call 2nd scatter file function from 1st scatter file function call.
The 1st scatter memory reason my function call is there and 2nd scatter memory reason my function definition means SDK.
when i have to done FOTA that time i will change only 1st scatter file.
please check dummy example.
******************************************************************************
application.c
=======================================
u32 gpio_pin(u32) __attribute__((section(".ARM.__at_0x10004")));
typedef int (*FP_GPIO)(int);
FP_GPIO gpio_pin=0x010004;
void main(){
pin=gpio_pin(1);
}
________________________________________
SDK_function.c
======================================
int gpio_pin(u32 pin){
u32 pin_s;
pin_s=selection_pin(pin);
return pin_s;
-----------------------------------------------------------------------------------------------------
scatter file 1
...
ER_1 0x08000 0x2000{
application.o(+RO)
___________________________________________________________
scatter file 2
ER_1 0x010000 0x2000{
SDK_function.o(+RO)
when i have to update application.o then i will write ER_1 0x08000 to 0x2000memory regions.
I see that you are forcing gpio_pin(u32) to be at 0x10004. Are you getting link errors with the ER_1 region at 0x10000. Perhaps you need to specify the OVERLAY keyword for this region (I'm sorry, I'm still not totally sure what you are trying to do beyond the normal usage) Can you not simply specify both regions in your scatter file?
LR_1 0x8000{ ... ER_1 0x08000 0x2000{ application.o(+RO) } ER_2 0x010000 OVERLAY 0x2000{ SDK_function.o(+RO) } }
Yes i can use one scatter file but if i want to change only application.o in scatter_1 file this will be not possible, then i have to flash both of file application.o and SDK_functio.o so this is little bit time consuming method for OTA.
if all SDK file in different scatter file and my application is different file, then i have to update application file only here i will save the program flashing time at the time of OTA.
suppose my SDK file size is 3MB and Application file size is 2MB then total size is 5MB file send for FOTA. every time i have to send extra 3MB file and this is not required to do, instead of that i have to change application only this will be less than 2MB so now i have to send for FOTA 2 MB only. not required to send SDK file.
Already we have SDK function scatter file now we are developing our own another application scatter file.
so here is not required flash all code every time, flash only application file in that particular memory reasons .
------------------------------------------------
This is only example ignore it.
I see that you are forcing gpio_pin(u32) to be at 0x10004. Are you getting link errors with the ER_1 region at 0x10000.
No, i am not getting any errors i get only warnings of memory padding of 4 byte.
Is there any other way to achieve that scenario.
I have to link 2 bin file at run time.
1st .bin file have function call and 2nd .bin have function definition (SDK Functions) also have to store that binaries in different memory location in flash.
Thanks.
I'm sorry, I don't know of any other way. You could raise an official support case from the menu above to request such functionality.