cancel
Showing results for 
Search instead for 
Did you mean: 

How to flash Embed config files in stm32 flash memory

srikanthpalvai
Associate III

STM32CubeU5/Projects/B-U585I-IOT02A/Applications/FileX at main · STMicroelectronics/STM32CubeU5 (github.com).
Here the example is to create the STM.TXT in the run-time 
/* Create a file called STM32.TXT in the root directory. */
nor_ospi_status = fx_file_create(&nor_ospi_flash_disk, "STM32.TXT");

But I have my pre-configured config.ini file and cacert.pem files and want flash them in stm32  
How can inject them into the stm32 target? Could you please share an example of it?

2 REPLIES 2

Make as an array of bytes, perhaps use your C skills to use STDIO file functions to read and process on your host PC.

Different tools have things like INCBIN to pull in files to the Linker or assembler.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@Tesla DeLorean 

thanks for the info 


Could you please give me some references 

is there any alternative ways to achieve it

 

in my case I will use ini parser to read the all configuration values from ini file

and I will update the specific configuration value at runtime based on the requirement