Hello-
We have a project using a bootloader on the STM32F411. Splitting the flash memory section into sections 'A' and 'B' and keeping the bootloader and application as separate projects (yes, there are ways to combine it, but we're not doing that for now) the bootloader running in flash section 'A' correctly receives, writes, and branches to the application in flash section 'B'. As a side note, the application project is compiling with the __VTOR_CONFIG option.
As an additional level of safety we'd like to have two sections of application flash, 'B' and 'C', so that if the write to one section fails then the application can still be executed from the last successfully loaded memory section. It's not clear what the exact terminology is to be used but we would like to get some kind of relocatable image built so that after compiling the application only one time the bootload process can successfully place and execute the application in either flash section 'B' or 'C'. From reviewing the SES link options it seems like to get this to work the application would have to be compiled twice, once under each different memory map, and the host and device ends of the bootloader would have to decide which image is the one to upload. Is this assessment correct or is there a way to have a single HEX file that will run properly regardless of where in flash you place it?
We have a project using a bootloader on the STM32F411. Splitting the flash memory section into sections 'A' and 'B' and keeping the bootloader and application as separate projects (yes, there are ways to combine it, but we're not doing that for now) the bootloader running in flash section 'A' correctly receives, writes, and branches to the application in flash section 'B'. As a side note, the application project is compiling with the __VTOR_CONFIG option.
As an additional level of safety we'd like to have two sections of application flash, 'B' and 'C', so that if the write to one section fails then the application can still be executed from the last successfully loaded memory section. It's not clear what the exact terminology is to be used but we would like to get some kind of relocatable image built so that after compiling the application only one time the bootload process can successfully place and execute the application in either flash section 'B' or 'C'. From reviewing the SES link options it seems like to get this to work the application would have to be compiled twice, once under each different memory map, and the host and device ends of the bootloader would have to decide which image is the one to upload. Is this assessment correct or is there a way to have a single HEX file that will run properly regardless of where in flash you place it?