You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- fixed uploader offset (i just wrote a bad python scipt (forgot flash_base, and it must be hex()))
- fixed platformio-build.py dependency (by using the newest stm32duino core version, which includes fixes). See stm32duino/Arduino_Core_STM32#2135
- cleaned up some minor stuff
Copy file name to clipboardExpand all lines: README.md
+5-8
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,13 @@ Jumping to the user program takes about ~1.5ms if using 'leave_LSE_same' (asin
9
9
10
10
Usage: (see example project)
11
11
- (to compile the example script, copy the whole library into the lib folder of that project)
12
-
- replace the platformio-build.py script in .platformio\packages\framework-arduinoststm32\tools\platformio with the one in patches\ (this makes setting a VECT_TAB_OFFSET possible)
13
-
- in the platformio.ini file, there are 2 targets. One is for uploading bootloader code and the other is for uploading application code. (Note: currently, my ST-links are overwriting the bootloader when uploading user-applications. Very annoying, will fix soon).
14
-
- Upload the user-app (by selecting the 'OTA_z_STM32WB55' target)
12
+
- in the platformio.ini file, there are 2 targets. One is for uploading bootloader code and the other is for uploading application code.
13
+
- Upload the user-app (by selecting the 'OTA_z_STM32WB55' target) (Note: if your uploader offset settings are correct, this should not overwrite bootloaders)
15
14
- then upload the bootloader (by selecting the 'BOOTL_STM32WB55' target)
16
15
- watch the serial monitor show it booting twice
17
16
18
17
19
18
current problems i'm trying to solve:
20
-
- patching the platformio-build.py script automatically (and perhaps more eligantly than just replacing it)
21
-
- test bluetooth before and after jump
22
-
- add some basic watchdog suggestions
23
-
- add some basic flash/backup-domain flag suggestions
24
-
- (work on the full BLE OTA code that relies on this stuff)
19
+
- find a way to perform SHCI_C2_Reinit() (from the STM32duinoBLE library, but without importing the whole library), or perhaps a more universal CPU2 reset
20
+
- add some basic watchdog example code
21
+
- add some basic flash/backup-domain flag example code
board_config=env.BoardConfig() # fetch board configuration of current env
13
+
board_config.update("upload.offset_address", hex(flash_base+PROGRAM_START)) # indicate where to start uploading the new program
14
+
board_config.update("build.flash_offset", PROGRAM_START) # tell platformio-build.py to tell the compiler & linker to offset flash.
15
+
## NOTE: from STM32duino version 2.7.0 onwards, platformio-build will (finally) set LD_FLASH_OFFSET flag and define VECT_TAB_OFFSET based on build.flash_offset
0 commit comments