File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/platforms/common/blackpill-f4 Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -131,18 +131,18 @@ const char *platform_target_voltage(void)
131131 return NULL ;
132132}
133133
134- #pragma GCC diagnostic push
135- #pragma GCC diagnostic ignored "-Warray-bounds"
136-
134+ /*
135+ * Write the bootloader flag and reboot.
136+ * The platform_init() will see this and reboot a second time into ST BootROM.
137+ * If BMPBootloader is enabled, then it will see this and initialize its DFU.
138+ */
137139void platform_request_boot (void )
138140{
139141 magic [0 ] = BOOTMAGIC0 ;
140142 magic [1 ] = BOOTMAGIC1 ;
141143 scb_reset_system ();
142144}
143145
144- #pragma GCC diagnostic pop
145-
146146#ifdef PLATFORM_HAS_POWER_SWITCH
147147bool platform_target_get_power (void )
148148{
Original file line number Diff line number Diff line change @@ -46,9 +46,8 @@ int main(void)
4646 if (!gpio_get (GPIOA , GPIO0 ) || (magic [0 ] == BOOTMAGIC0 && magic [1 ] == BOOTMAGIC1 )) {
4747 magic [0 ] = 0 ;
4848 magic [1 ] = 0 ;
49- } else {
49+ } else
5050 dfu_jump_app_if_valid ();
51- }
5251
5352 rcc_clock_setup_pll (& rcc_hse_25mhz_3v3 [PLATFORM_CLOCK_FREQ ]);
5453
You can’t perform that action at this time.
0 commit comments