Skip to main content
Associate III
March 11, 2024
Question

How to flash Embed config files in stm32 flash memory

  • March 11, 2024
  • 2 replies
  • 1351 views

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?

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
March 12, 2024

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Associate III
March 12, 2024

@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