[chore] add tflite library,modify cpu_id default value

This commit is contained in:
jzlv 2021-07-12 16:48:13 +08:00
parent 163c679e01
commit 20b12ac405
5 changed files with 10 additions and 6 deletions

View file

@ -2,7 +2,7 @@ BOARD?=bl706_iot
CHIP?=bl702
APP_DIR?=examples
APP?=helloworld
CPU_ID?=m0
CPU_ID?=none
COMx?=
SUPPORT_SHELL?=n
@ -47,7 +47,7 @@ download:
./tools/bflb_flash_tool/bflb_mcu_tool --chipname=$(CHIP) --interface=$(INTERFACE) --port=$(COMx) --baudrate=$(BAUDRATE)
format:
find $(FORMAT_DIR)/ -name "*.c" -o -name "*.h" | xargs clang-format -style=file -i
find $(FORMAT_DIR)/ -name "*.c" -o -name "*.h" -o -name "*.cc" -o -name "*.cpp"| xargs clang-format -style=file -i
clean:
$(RM) out

View file

@ -46,7 +46,7 @@
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="F:\bl_mcu_sdk\out\hellowd\helloworld\helloworld_main.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="F:\bl_mcu_sdk\out\examples\hellowd\helloworld\helloworld_main.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="bl_mcu_sdk"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.base.528944072"/>

View file

@ -1,5 +1,8 @@
cmake_definition+= -DCHIP=$(CHIP)
ifneq ($(CPU_ID),none)
cmake_definition+= -DCPU_ID=$(CPU_ID)
endif
cmake_definition+= -DCHIP=$(CHIP)
cmake_definition+= -DBOARD=$(BOARD)
cmake_definition+= -DSUPPORT_FLOAT=$(SUPPORT_FLOAT)
cmake_definition+= -DSUPPORT_SHELL=$(SUPPORT_SHELL)

View file

@ -1,7 +1,7 @@
include(${CMAKE_SOURCE_DIR}/drivers/${CHIP}_driver/cpu_flags.cmake)
list(APPEND GLOBAL_C_FLAGS -Os -g3)
list(APPEND GLOBAL_C_FLAGS -fshort-enums -fno-common -fms-extensions -ffunction-sections -fdata-sections -fstrict-volatile-bitfields)
list(APPEND GLOBAL_C_FLAGS -fshort-enums -fno-common -fms-extensions -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -ffast-math)
list(APPEND GLOBAL_C_FLAGS -Wall -Wshift-negative-value -Wchar-subscripts -Wformat -Wuninitialized -Winit-self -Wignored-qualifiers -Wunused -Wundef)
list(APPEND GLOBAL_C_FLAGS -msmall-data-limit=4)
@ -15,6 +15,7 @@ if(${SUPPORT_FLOAT} STREQUAL "y")
list(APPEND GLOBAL_LD_FLAGS -u _printf_float)
endif()
if(${SUPPORT_SHELL} STREQUAL "y")
list(APPEND GLOBAL_C_FLAGS -DSHELL_SUPPORT)
endif()

View file

@ -252,7 +252,7 @@ function(check_all_library)
endif()
if(${SUPPORT_TFLITE} STREQUAL "y")
check_add_library(xz ${CMAKE_SOURCE_DIR}/components/tflite)
check_add_library(tflite ${CMAKE_SOURCE_DIR}/components/tflite)
endif()
endfunction(check_all_library)