Revert "Remove OpenPilot bootloader support."

This reverts commit 0150abf1bc.

Conflicts:
	src/main/target/CC3D/target.h
This commit is contained in:
borisbstyle 2015-10-15 09:33:24 +02:00
parent e25087bbbc
commit 05dec6c21e
7 changed files with 51 additions and 11 deletions

View File

@ -3,6 +3,7 @@ env:
- PUBLISHMETA=True
- PUBLISHDOCS=True
- TARGET=CC3D
- TARGET=CC3D OPBL=yes
- TARGET=COLIBRI_RACE
- TARGET=CHEBUZZF3
- TARGET=CJMCU

View File

@ -20,6 +20,9 @@ TARGET ?= NAZE
# Compile-time options
OPTIONS ?=
# compile for OpenPilot BootLoader support
OPBL ?=no
# Debugger optons, must be empty or GDB
DEBUG ?=
@ -37,6 +40,9 @@ FORKNAME = betaflight
VALID_TARGETS = NAZE NAZE32PRO OLIMEXINO STM32F3DISCOVERY CHEBUZZF3 CC3D CJMCU EUSTM32F103RC SPRACINGF3 PORT103R SPARKY ALIENWIIF1 ALIENWIIF3 COLIBRI_RACE MOTOLAB RMDO
# Valid targets for OP BootLoader support
OPBL_VALID_TARGETS = CC3D
# Configure default flash sizes for the targets
ifeq ($(FLASH_SIZE),)
ifeq ($(TARGET),$(filter $(TARGET),CJMCU))
@ -404,6 +410,16 @@ OLIMEXINO_SRC = startup_stm32f10x_md_gcc.S \
$(HIGHEND_SRC) \
$(COMMON_SRC)
ifeq ($(OPBL),yes)
ifneq ($(filter $(TARGET),$(OPBL_VALID_TARGETS)),)
TARGET_FLAGS := -DOPBL $(TARGET_FLAGS)
LD_SCRIPT = $(LINKER_DIR)/stm32_flash_f103_$(FLASH_SIZE)k_opbl.ld
.DEFAULT_GOAL := binary
else
$(error OPBL specified with a unsupported target)
endif
endif
CJMCU_SRC = \
startup_stm32f10x_md_gcc.S \
drivers/adc.c \

View File

@ -39,6 +39,8 @@ Current meter cannot be used in conjunction with Sonar.
| ------------- | ------------- | ------------------- |
| PB5 | PB0 | YES (3.3v input) |
Sonar support is not available when using the OpenPilot bootloader (OPBL).
#### Constraints
Sonar cannot be used in conjuction with SoftSerial or Parallel PWM.

View File

@ -105,3 +105,9 @@ git pull
make clean TARGET=NAZE
make TARGET=NAZE
```
Or in the case of CC3D in need of a `obj/cleanflight_CC3D.bin`
```
make clean TARGET=CC3D
make TARGET=CC3D OPBL=yes
```

View File

@ -3,6 +3,7 @@
targets=("PUBLISHMETA=True" \
"RUNTESTS=True" \
"TARGET=CC3D" \
"TARGET=CC3D OPBL=yes" \
"TARGET=CHEBUZZF3" \
"TARGET=CJMCU" \
"TARGET=COLIBRI_RACE" \
@ -25,7 +26,7 @@ export TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG:=$USER/simulated}
for target in "${targets[@]}"
do
unset RUNTESTS PUBLISHMETA TARGET
unset RUNTESTS PUBLISHMETA TARGET OPBL
eval "export $target"
make clean
./.travis.sh

View File

@ -132,20 +132,13 @@
#define S1W_RX_GPIO GPIOB
#define S1W_RX_PIN GPIO_Pin_11
#if defined(OPBL)
// disabled some features for OPBL build due to code size.
#undef AUTOTUNE
#undef BARO
#undef DISPLAY
#undef SONAR
#define SKIP_CLI_COMMAND_HELP
#endif
#if defined(OPBL) && defined(USE_SERIAL_1WIRE)
#undef DISPLAY
#undef SONAR
#undef BARO
#define SKIP_CLI_COMMAND_HELP
#endif
#define SPEKTRUM_BIND
// USART3, PB11 (Flexport)
#define BIND_PORT GPIOB

View File

@ -0,0 +1,21 @@
/*
*****************************************************************************
**
** File : stm32_flash.ld
**
** Abstract : Linker script for STM32F103CB Device with
** 128KByte FLASH, 20KByte RAM
**
*****************************************************************************
*/
/* Specify the memory areas. */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08003000, LENGTH = 126K - 0x03000 /* last 2kb used for config storage first 12k for OP Bootloader*/
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
}
INCLUDE "stm32_flash.ld"