In my scenario, I have two C files. First file is user and the second file is the provider.
Example:
user.c
const int config_user;
void user(void) {
if (config_user == 1) {
... do something ...
}
}
provider.c
cont int config_provider = 1;
In the above scenario the address of config_provider
should be same as that of config_user
. I made several attempts in linker script but I was not successful. I can not use extern, I have to do it using memory linking.