I have done a custom bootloader for stm32f405vg using IAR workbench. Inside the bootloader, I do the following.
1. Mount a SD card
2. Check for a file named "KTT.bin" in that using
Code: Select all
fr = f_open(&SDFile, CONF_FILENAME, FA_READ);
3. De_Init the sd card peripheral
4. Jump to application address (Micropython firmware)
Now after booting micropython, I Just create the file with the same name "/sd/KTT.bin" with
Code: Select all
f = open('/sd/KTT.bin','w')
Code: Select all
EINVAL[Error 22]
Please advice!!