cancel
Showing results for 
Search instead for 
Did you mean: 

How can i upload/download my code to MCU/SD Card?

KAnahar
Associate III

Im working on stm32f767 project. I designed my board. I want to upload&download my code. First step i need to take backup (download) my code after that creating a file (xml..?) to SD card. Also i want to upload code which in SD card to MCU. How can i do these?

1 ACCEPTED SOLUTION

Accepted Solutions

The FLASH memory is accessible like other readable memory in the system, so things like memcpy(), and FATFS's f_write() should function.

You could process the memory content and create a .HEX file if that is more preferable over a .BIN file.

For programming the FLASH you could hold data in a .BIN, .HEX or .DFU, and read / process that.

The loader approach would allow a relatively small implementation (say about 16KB) to program a larger application image into subsequent portions of FLASH

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

View solution in original post

7 REPLIES 7
KnarfB
Principal III

Guess that the SD card is somehow attached to the stm32f767. Then, you have to write a bootloader doing the up/download. Look at https://github.com/STMicroelectronics/stm32-mw-openbl how it was done for other interfaces.

hth

KnarfB

The FLASH memory is accessible like other readable memory in the system, so things like memcpy(), and FATFS's f_write() should function.

You could process the memory content and create a .HEX file if that is more preferable over a .BIN file.

For programming the FLASH you could hold data in a .BIN, .HEX or .DFU, and read / process that.

The loader approach would allow a relatively small implementation (say about 16KB) to program a larger application image into subsequent portions of FLASH

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

okay. i will use f_write f_read functions. i ll create bin folder in sd card. i will write all flash datas into bin folder. when i want to upload new code, i ll read datas from sd card

Piranha
Chief II

Looking at the topics you have created and comments written, it is very clear that you are designing something far above your level of understanding. If you want to actually learn development, start with the basics:

https://www.embeddedrelated.com/showarticle/453.php

bruh :D

Laughing and ignorant attitude will not help either. You will realize this after a year or few of wasted time... ;)

ok bro you know everything, you are the best