diff --git a/ci_build.sh b/ci_build.sh index e0e1e6fbb..41457cc3b 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -10,37 +10,27 @@ LC_ALL=C export LANG LC_ALL # Location of releases +set +e GIT_DESCRIBE=$(git describe --tags --abbrev=10) +if [ $? -ne 0 ]; then + GIT_DESCRIBE=devel +fi +set -e # Declare all combinations for deploy all # Note that the key is the name of the release object declare -A BUILDS BUILDS[afc-bpm-3.0-${GIT_DESCRIBE}]="\ - -DBOARD=afc-bpm \ - -DVERSION=3.0 \ - -DBOARD_RTM= \ - -DCMAKE_BUILD_TYPE=Release" -BUILDS[afc-bpm-3.1-${GIT_DESCRIBE}]="\ - -DBOARD=afc-bpm \ - -DVERSION=3.1 \ - -DBOARD_RTM= \ - -DCMAKE_BUILD_TYPE=Release" -BUILDS[afc-timing-${GIT_DESCRIBE}]="\ - -DBOARD=afc-timing \ - -DVERSION= \ - -DBOARD_RTM=rtm-8sfp \ - -DCMAKE_BUILD_TYPE=Release" -BUILDS[debug-afc-bpm-3.0-${GIT_DESCRIBE}]="\ -DBOARD=afc-bpm \ -DVERSION=3.0 \ -DBOARD_RTM= \ -DCMAKE_BUILD_TYPE=RelWithDebInfo" -BUILDS[debug-afc-bpm-3.1-${GIT_DESCRIBE}]="\ +BUILDS[afc-bpm-3.1-${GIT_DESCRIBE}]="\ -DBOARD=afc-bpm \ -DVERSION=3.1 \ -DBOARD_RTM= \ -DCMAKE_BUILD_TYPE=RelWithDebInfo" -BUILDS[debug-afc-timing-${GIT_DESCRIBE}]="\ +BUILDS[afc-timing-${GIT_DESCRIBE}]="\ -DBOARD=afc-timing \ -DVERSION= \ -DBOARD_RTM=rtm-8sfp \ diff --git a/modules/i2c.c b/modules/i2c.c index 946b1d928..aa3ab7e7f 100644 --- a/modules/i2c.c +++ b/modules/i2c.c @@ -85,7 +85,7 @@ bool i2c_take_by_busid( uint8_t bus_id, uint8_t *i2c_interface, TickType_t timeo bool i2c_take_by_chipid( uint8_t chip_id, uint8_t *i2c_address, uint8_t *i2c_interface, uint32_t timeout ) { - if ( chip_id > I2C_BUS_CNT ) { + if ( chip_id > I2C_CHIP_CNT ) { return false; } diff --git a/toolchain/toolchain-arm-none-eabi.cmake b/toolchain/toolchain-arm-none-eabi.cmake index 51ac651a6..21cd66daa 100644 --- a/toolchain/toolchain-arm-none-eabi.cmake +++ b/toolchain/toolchain-arm-none-eabi.cmake @@ -26,7 +26,7 @@ set( CMAKE_OBJCOPY ${TC_PATH}${CROSS_COMPILE}objcopy set( CMAKE_OBJDUMP ${TC_PATH}${CROSS_COMPILE}objdump CACHE FILEPATH "The toolchain objdump command " FORCE ) -set(COMMON_FLAGS "-fno-builtin -ffunction-sections -fdata-sections -fno-strict-aliasing -fmessage-length=0") +set(COMMON_FLAGS "-fno-common -fno-builtin -ffunction-sections -fdata-sections -fno-strict-aliasing -fmessage-length=0") set(CMAKE_C_FLAGS "${COMMON_FLAGS} -std=gnu99") set(CMAKE_CXX_FLAGS "${COMMON_FLAGS} -std=gnu++0x") set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections --specs=nosys.specs -nostdlib -static -nostartfiles")