mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
1ef820ecfe
* update chipidea dcd, remove manual ep_count and use DCCPARAMS to get number of endpoint instead * add dcd dcache for chipidea * add cmake for lpc18 * add makefile build for mcx * use fork of mcu sdk * fix ci build with nrf * flash rp2040 with openocd
63 lines
1.5 KiB
CMake
63 lines
1.5 KiB
CMake
set(CMAKE_SYSTEM_NAME Generic)
|
|
|
|
set(CMAKE_ASM_COMPILER "arm-none-eabi-gcc")
|
|
set(CMAKE_C_COMPILER "arm-none-eabi-gcc")
|
|
set(CMAKE_CXX_COMPILER "arm-none-eabi-g++")
|
|
|
|
set(TOOLCHAIN_SIZE "arm-none-eabi-size" CACHE INTERNAL "")
|
|
set(GCC_ELF2BIN "arm-none-eabi-objcopy")
|
|
set_property(GLOBAL PROPERTY ELF2BIN ${GCC_ELF2BIN})
|
|
|
|
# Look for includes and libraries only in the target system prefix.
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
# pass TOOLCHAIN_CPU to
|
|
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_SYSTEM_PROCESSOR)
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/../cpu/${CMAKE_SYSTEM_PROCESSOR}.cmake)
|
|
|
|
# enable all possible warnings for building examples
|
|
list(APPEND TOOLCHAIN_COMMON_FLAGS
|
|
-fdata-sections
|
|
-ffunction-sections
|
|
-fsingle-precision-constant
|
|
-fno-strict-aliasing
|
|
)
|
|
|
|
list(APPEND TOOLCHAIN_EXE_LINKER_FLAGS
|
|
-Wl,--print-memory-usage
|
|
-Wl,--gc-sections
|
|
-Wl,--cref
|
|
)
|
|
|
|
list(APPEND TOOLCHAIN_WARNING_FLAGS
|
|
-Wall
|
|
-Wextra
|
|
-Werror
|
|
-Wfatal-errors
|
|
-Wdouble-promotion
|
|
-Wstrict-prototypes
|
|
-Wstrict-overflow
|
|
-Werror-implicit-function-declaration
|
|
-Wfloat-equal
|
|
-Wundef
|
|
-Wshadow
|
|
-Wwrite-strings
|
|
-Wsign-compare
|
|
-Wmissing-format-attribute
|
|
-Wunreachable-code
|
|
-Wcast-align
|
|
-Wcast-function-type
|
|
-Wcast-qual
|
|
-Wnull-dereference
|
|
-Wuninitialized
|
|
-Wunused
|
|
-Wreturn-type
|
|
-Wredundant-decls
|
|
)
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/set_flags.cmake)
|