Skip to content

Commit

Permalink
Merge pull request #715 from concatime/cmsis-5
Browse files Browse the repository at this point in the history
vendor: Upgrade CMSIS from 4.5.0 to 5.7.0
  • Loading branch information
ataffanel authored Mar 5, 2021
2 parents 54d7cca + 64f437e commit f883f29
Show file tree
Hide file tree
Showing 7 changed files with 294 additions and 297 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "vendor/CMSIS"]
path = vendor/CMSIS
url = https://github.com/ARM-software/CMSIS.git
url = https://github.com/ARM-software/CMSIS_5.git
[submodule "vendor/FreeRTOS"]
path = vendor/FreeRTOS
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
Expand Down
29 changes: 15 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,24 +284,25 @@ SIZE = $(CROSS_COMPILE)size
OBJCOPY = $(CROSS_COMPILE)objcopy
GDB = $(CROSS_COMPILE)gdb

INCLUDES += -I$(FREERTOS)/include -I$(PORT) -I$(CRAZYFLIE_BASE)/src
INCLUDES += -I$(CRAZYFLIE_BASE)/src/config -I$(CRAZYFLIE_BASE)/src/hal/interface
INCLUDES += -I$(CRAZYFLIE_BASE)/src/modules/interface -I$(CRAZYFLIE_BASE)/src/modules/interface/lighthouse -I$(CRAZYFLIE_BASE)/src/modules/interface/kalman_core
INCLUDES += -I$(CRAZYFLIE_BASE)/src/utils/interface -I$(CRAZYFLIE_BASE)/src/drivers/interface -I$(CRAZYFLIE_BASE)/src/platform
INCLUDES += -I$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/Include -I$(CRAZYFLIE_BASE)/src/drivers/bosch/interface
INCLUDES += -I$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/Core/Include -I$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/DSP/Include
INCLUDES += -I$(CRAZYFLIE_BASE)/vendor/libdw1000/inc
INCLUDES += -I$(FREERTOS)/include -I$(PORT)

INCLUDES += -I$(LIB)/STM32F4xx_StdPeriph_Driver/inc
INCLUDES += -I$(CRAZYFLIE_BASE)/src/config
INCLUDES += -I$(CRAZYFLIE_BASE)/src/platform

INCLUDES += -I$(CRAZYFLIE_BASE)/src/deck/interface -I$(CRAZYFLIE_BASE)/src/deck/drivers/interface
INCLUDES += -I$(CRAZYFLIE_BASE)/src/drivers/interface -I$(CRAZYFLIE_BASE)/src/drivers/bosch/interface
INCLUDES += -I$(CRAZYFLIE_BASE)/src/hal/interface
INCLUDES += -I$(CRAZYFLIE_BASE)/src/modules/interface -I$(CRAZYFLIE_BASE)/src/modules/interface/kalman_core -I$(CRAZYFLIE_BASE)/src/modules/interface/lighthouse
INCLUDES += -I$(CRAZYFLIE_BASE)/src/utils/interface -I$(CRAZYFLIE_BASE)/src/utils/interface/kve -I$(CRAZYFLIE_BASE)/src/utils/interface/lighthouse -I$(CRAZYFLIE_BASE)/src/utils/interface/tdoa

INCLUDES += -I$(LIB)/FatFS
INCLUDES += -I$(LIB)/CMSIS/STM32F4xx/Include
INCLUDES += -I$(LIB)/STM32_USB_Device_Library/Core/inc
INCLUDES += -I$(LIB)/STM32_USB_OTG_Driver/inc
INCLUDES += -I$(CRAZYFLIE_BASE)/src/deck/interface -I$(CRAZYFLIE_BASE)/src/deck/drivers/interface
INCLUDES += -I$(CRAZYFLIE_BASE)/src/utils/interface/clockCorrection
INCLUDES += -I$(CRAZYFLIE_BASE)/src/utils/interface/tdoa
INCLUDES += -I$(CRAZYFLIE_BASE)/src/utils/interface/lighthouse
INCLUDES += -I$(CRAZYFLIE_BASE)/vendor/libdw1000/inc
INCLUDES += -I$(LIB)/FatFS
INCLUDES += -I$(LIB)/vl53l1
INCLUDES += -I$(LIB)/vl53l1/core/inc
INCLUDES += -I$(LIB)/STM32F4xx_StdPeriph_Driver/inc
INCLUDES += -I$(LIB)/vl53l1 -I$(LIB)/vl53l1/core/inc

CFLAGS += -g3
ifeq ($(DEBUG), 1)
Expand Down
4 changes: 2 additions & 2 deletions test/deck/drivers/src/test_lps_twr_tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
// The mocking FW can not handle the cf_math.h/arm_math.h file, it crashes while parsing it. We have to use manual mocks instead.
// Temporarily fix to make tests pass, add test code for the estimator part of rxcallback()
#include "cf_math.h"
void arm_std_f32( float32_t * pSrc, uint32_t blockSize, float32_t * pResult) { *pResult = 0.0; }
void arm_mean_f32( float32_t * pSrc, uint32_t blockSize, float32_t * pResult) { *pResult = 0.0; }
void arm_std_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult) { *pResult = 0.0; }
void arm_mean_f32(const float32_t * pSrc, uint32_t blockSize, float32_t * pResult) { *pResult = 0.0; }

#include "mock_estimator.h"

Expand Down
16 changes: 6 additions & 10 deletions tools/make/cmsis_dsp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ include obj.mk

BIN=$(PROJ_ROOT)/bin/vendor
PROJ_BIN=$(PROJ_ROOT)/bin
DSP_SRC=$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/DSP_Lib/Source
DSP_INC=$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/Include
CMSIS_INC=$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/Core/Include
DSP_INC=$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/DSP/Include
DSP_SRC=$(CRAZYFLIE_BASE)/vendor/CMSIS/CMSIS/DSP/Source

VPATH += $(BIN)
VPATH += $(DSP_SRC)/BasicMathFunctions/
Expand All @@ -20,18 +21,13 @@ VPATH += $(DSP_SRC)/TransformFunctions/

LIB=$(PROJ_BIN)/libarm_math.a

CSFLAGS = -O2 -I$(DSP_INC) -std=c11 -DARM_MATH_CM4 -D__FPU_PRESENT=1 -D__TARGET_FPU_VFP -mfloat-abi=hard -mfpu=fpv4-sp-d16
CSFLAGS += -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections
CFLAGS=$(CSFLAGS) -include stdint.h
CFLAGS = -O2 -I$(CMSIS_INC) -I$(DSP_INC) -std=c11
CFLAGS += -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += -DARM_MATH_CM4 -D__FPU_PRESENT=1 -ffunction-sections -fdata-sections

CROSS_COMPILE ?= arm-none-eabi-
AS = $(CROSS_COMPILE)as
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
SIZE = $(CROSS_COMPILE)size
OBJCOPY = $(CROSS_COMPILE)objcopy
GDB = $(CROSS_COMPILE)gdb

all: $(LIB)

Expand Down
Loading

0 comments on commit f883f29

Please sign in to comment.