Browse Source

AP_Bootloader: support STM32G4

c415-sdk
Andrew Tridgell 4 years ago
parent
commit
af64b86c9e
  1. 3
      Tools/AP_Bootloader/bl_protocol.cpp
  2. 16
      Tools/AP_Bootloader/mcu_g4.h
  3. 3
      Tools/AP_Bootloader/support.cpp

3
Tools/AP_Bootloader/bl_protocol.cpp

@ -251,6 +251,9 @@ jump_to_app() @@ -251,6 +251,9 @@ jump_to_app()
#if defined(STM32H7)
rccDisableAPB1L(~0);
rccDisableAPB1H(~0);
#elif defined(STM32G4)
rccDisableAPB1R1(~0);
rccDisableAPB1R2(~0);
#else
rccDisableAPB1(~0);
#endif

16
Tools/AP_Bootloader/mcu_g4.h

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
/*
MCU tables for STM32G4
*/
#if defined(STM32G4)
#define STM32_UNKNOWN 0
mcu_des_t mcu_descriptions[] = {
};
const mcu_rev_t silicon_revs[] = {
};
#endif // STM32G4

3
Tools/AP_Bootloader/support.cpp

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
#include "mcu_f4.h"
#include "mcu_f7.h"
#include "mcu_h7.h"
#include "mcu_g4.h"
// optional uprintf() code for debug
// #define BOOTLOADER_DEBUG SD1
@ -71,7 +72,7 @@ void cout(uint8_t *data, uint32_t len) @@ -71,7 +72,7 @@ void cout(uint8_t *data, uint32_t len)
#endif // BOOTLOADER_DEV_LIST
static uint32_t flash_base_page;
static uint8_t num_pages;
static uint16_t num_pages;
static const uint8_t *flash_base = (const uint8_t *)(0x08000000 + (FLASH_BOOTLOADER_LOAD_KB + APP_START_OFFSET_KB)*1024U);
/*

Loading…
Cancel
Save