Skip to content

Commit

Permalink
[boards][stm32f4] Lisa MX luftboot support
Browse files Browse the repository at this point in the history
Added support for luftboot-like bootloader for Lisa MX 2.0 and 2.1
(the bootloader itself is in ext repository, this is only support in pprzi code)
  • Loading branch information
podhrmic authored and flixr committed Dec 15, 2014
1 parent 88fe553 commit 03b5801
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
13 changes: 7 additions & 6 deletions conf/boards/lisa_mx_2.0.makefile
Expand Up @@ -21,12 +21,13 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-mx.ld
# other possibilities: DFU-UTIL, SWD, JTAG_BMP, STLINK, SERIAL
FLASH_MODE ?= SWD


#
#
# some default values shared between different firmwares
#
#
HAS_LUFTBOOT ?= 0
ifeq (,$(findstring $(HAS_LUFTBOOT),0 FALSE))
$(TARGET).CFLAGS+=-DLUFTBOOT
$(TARGET).LDFLAGS+=-Wl,-Ttext=0x8004000
DFU_ADDR = 0x8004000
DFU_PRODUCT = Lisa/Lia
endif


#
Expand Down
13 changes: 7 additions & 6 deletions conf/boards/lisa_mx_2.1.makefile
Expand Up @@ -21,12 +21,13 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-mx.ld
# other possibilities: DFU-UTIL, SWD, JTAG_BMP, STLINK, SERIAL
FLASH_MODE ?= SWD


#
#
# some default values shared between different firmwares
#
#
HAS_LUFTBOOT ?= 0
ifeq (,$(findstring $(HAS_LUFTBOOT),0 FALSE))
$(TARGET).CFLAGS+=-DLUFTBOOT
$(TARGET).LDFLAGS+=-Wl,-Ttext=0x8004000
DFU_ADDR = 0x8004000
DFU_PRODUCT = Lisa/Lia
endif


#
Expand Down
1 change: 1 addition & 0 deletions conf/flash_modes.xml
Expand Up @@ -44,6 +44,7 @@
<boards>
<board name="krooz_sd"/>
<board name="li[s]?a_[m]?_.*"/>
<board name="li[s]?a_mx_.*"/>
<board name="px4fmu_.*"/>
</boards>
</mode>
Expand Down
4 changes: 4 additions & 0 deletions sw/airborne/arch/stm32/mcu_arch.c
Expand Up @@ -42,8 +42,12 @@
void mcu_arch_init(void) {
#if LUFTBOOT
PRINT_CONFIG_MSG("We are running luftboot, the interrupt vector is being relocated.")
#if defined STM32F4
SCB_VTOR = 0x00004000;
#else
SCB_VTOR = 0x00002000;
#endif
#endif
#if EXT_CLK == 8000000
#if defined(STM32F1)
PRINT_CONFIG_MSG("Using 8MHz external clock to PLL it to 72MHz.")
Expand Down
1 change: 1 addition & 0 deletions sw/tools/dfu/stm32_mem.py
Expand Up @@ -153,6 +153,7 @@ def update_progress_bar(completed, total):
valid_manufacturers.append("TUDelft MavLab. 2012->13")
valid_manufacturers.append("1 BIT SQUARED")
valid_manufacturers.append("S.Krukowski")
valid_manufacturers.append("Paparazzi UAV")

# list of tuples with possible stm32 (autopilot) devices
stm32devs = []
Expand Down

0 comments on commit 03b5801

Please sign in to comment.