Closed viobiscu closed 5 months ago
I find this solution:
` printf("Boot from %d\n", FMC_GetBootSource());
uint32_t adres_main = (uint32_t)&main;
printf("Address %x\n", adres_main);
printf("Run from %s\n", adres_main < FMC_APROM_BANK0_END? "Partition 1":"Partition 2"); `
I run on M487KM and have divided the memory in 2 BANK as per existing MACROS: FMC_APROM_BASE as start address for Partition 1 and FMC_APROM_BANK0_END as start address for Partition 2
Then I use the FMC_SetVectorPageAddr(StartAddress); in LD_ROM program to decide from which partition to run.
Question: After I start the program in AP_ROM, How do I recognise from which Address space is the code running?