Description
I have a STM32F4-DISC1. I want develop custom bootloader so i followed step by step under.
Screenshots and Codes : https://www.dropbox.com/s/6b7g78y4xzu38z0/Screenshots_and_Codes.rar?dl=0
-
Installed Arduino IDE 1.8.9
-
Installed Arduino_Core_STM32 with Boards Manager in Arduino IDE
-
I copied in "Arduino15\packages\STM32\hardware\stm32\1.5.0\variants" the DISCO_F407VG folder with its contents and created two new names with the folder DISCO_F407VG_App and DISCO_F407VG_Boot
-
My bootloader size is 64KB so, changed line 63 in DISCO_F407VG_Boot/ldscript.ld, FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K
-
Changed line 63 in DISCO_F407VG_App/ldscript.ld, FLASH (rx) : ORIGIN = 0x8010000, LENGTH = 960K # (1024 - 64 = 960K)
-
Added DISCO_F407VG_App and DISCO_F407VG_Boot in boards.txt
-
Create new Project for Bootloader project (for test, blink green led and send data)
-
Build Bootloader project (compiled hex file copy to desktop)
-
Added code -DVECT_TAB_OFFSET=0x10000 in boards.txt next Arduino IDE Restart
-
Create new Project for Application project (for test, blink blue led and send data)
-
Build Application project (compiled hex file copy to desktop)
-
Erase all sectors with STM32 ST-LINK Utility.
-
Program respectively, Bootloader.hex and Application.hex with STM32 ST-LINK Utility. That is ok.
Green Led is blinking and data is sending. it's not problem but when i press button, only Green Led blinking stoped not working Blue Led.
The same bootloader software is running the test software I wrote in CubeMX. So the bootloader is jumping into the application field.
Do I need to do something about interrupt lines before the jump? Maybe the arduino is using other interrupt.