AP_Bootloader: support STM32G4

This commit is contained in:
Andrew Tridgell 2021-03-09 17:44:37 +11:00
parent 439a944801
commit af64b86c9e
3 changed files with 21 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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)
#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);
/*