2020-09-30 02:48 AM
I have a bootstrap in internal FLASH that configures the FMC driver to setup external FLASH and SDRAM. After setting them up it jumps to the application stored in external FLASH and executes it from there. The application also needs to use the FMC driver, but if it is included in the application project, the FMC clocks are initialised a second time - first in the bootstrap and then in the application. Initialising the FMC while executing using it causes bad juju.
I would like an option to include a HAL driver, but don't initialise it in any way, including the clocks.
The same goes for the MPU driver.
Cheers
David
2020-09-30 07:31 AM
Just a workaround, but that could maybe help in your case. In STM32CubeMX, In Project Manager>Advanced Settings, you can disable the call to the init function.
In that case, the init function will still be generated and present in the main.c file, but without the call to them in the main().
And if not used at all, those functions will be removed during the build process and not present in the final binary.
2020-09-30 06:31 PM
Hi Herve,
Thank you for your reply. I think you might be on to something there. I had already disabled the FMC function call, but the problem was it still initialised the FMC clocks which crashed the app. Instead, what I could do is this:
Jump to the application:
Hopefully that will work, but I'll let you know how I get on.
Cheers
David