Skip to main content
KAnahar
Associate III
July 13, 2022
Solved

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

  • July 13, 2022
  • 7 replies
  • 3627 views

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?

This topic has been closed for replies.
Best answer by Tesla DeLorean

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

7 replies

KnarfB
Super User
July 13, 2022

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

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
July 13, 2022

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
KAnahar
KAnaharAuthor
Associate III
July 13, 2022

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
Principal III
July 20, 2022

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

KAnahar
KAnaharAuthor
Associate III
August 6, 2022

bruh :D

Piranha
Principal III
August 9, 2022

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