mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 04:03:34 +08:00
stm32f7 bootloader update support (#11394)
* micro_hal: F7 add flash * micro_hal: F7 non up_progmem functions * bl_update: Add F7 Support
This commit is contained in:
committed by
Daniel Agar
parent
d7d0bd2764
commit
f96c47ae1b
@@ -70,6 +70,10 @@ __BEGIN_DECLS
|
||||
# if defined(CONFIG_ARCH_CHIP_STM32F7)
|
||||
# define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID_STM32F7
|
||||
# include <chip.h>
|
||||
# include <chip/stm32_flash.h>
|
||||
void stm32_flash_lock(void);
|
||||
void stm32_flash_unlock(void);
|
||||
int stm32_flash_writeprotect(size_t page, bool enabled);
|
||||
# include <up_internal.h> //include up_systemreset() which is included on stm32.h
|
||||
# include <stm32_bbsram.h>
|
||||
# define PX4_BBSRAM_SIZE STM32F7_BBSRAM_SIZE
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/**
|
||||
* @file bl_update.c
|
||||
*
|
||||
* STM32F4 bootloader update tool.
|
||||
* STM32F4 & STM32F7 bootloader update tool.
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
__EXPORT int bl_update_main(int argc, char *argv[]);
|
||||
|
||||
#if defined (CONFIG_STM32_STM32F4XXX)
|
||||
#if defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7)
|
||||
static int setopt(void);
|
||||
|
||||
static void print_usage(const char *reason)
|
||||
@@ -75,12 +75,13 @@ static void print_usage(const char *reason)
|
||||
PRINT_MODULE_USAGE_COMMAND_DESCR("<file>", "Bootloader bin file");
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7)
|
||||
|
||||
|
||||
int
|
||||
bl_update_main(int argc, char *argv[])
|
||||
{
|
||||
#if !defined (CONFIG_STM32_STM32F4XXX)
|
||||
#if !(defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7))
|
||||
PX4_ERR("Not supported on this HW");
|
||||
return 1;
|
||||
}
|
||||
@@ -242,4 +243,4 @@ setopt(void)
|
||||
PX4_ERR("option bits setting failed; readback 0x%04" PRIx32, *optcr);
|
||||
return 1;
|
||||
}
|
||||
#endif // CONFIG_STM32_STM32F4XXX
|
||||
#endif // defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7)
|
||||
|
||||
Reference in New Issue
Block a user