summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMartino Facchin <[email protected]>2023-06-05 09:12:50 +0200
committerMartino Facchin <[email protected]>2023-06-05 09:12:50 +0200
commitcdbd3a0b4ee6c97f2c3cd568b3ff453639ed81cd (patch)
treed053d74ee2089a272a4fa1ac518a96231f83aaa0 /tools
parentcdae66c8371e1c73d28279462fa8598a9daae5a7 (diff)
parentc7686f8d5e98660137ef176d35bc8a82f63675f3 (diff)
Merge remote-tracking branch 'mainline/master' into HEAD
Update fsp to 4.0.0
Diffstat (limited to 'tools')
-rw-r--r--tools/build_cmake.py106
-rw-r--r--tools/build_family.py10
-rw-r--r--tools/build_utils.py1
-rw-r--r--tools/cmake/cpu/cortex-m0plus.cmake17
-rw-r--r--tools/cmake/cpu/cortex-m3.cmake16
-rw-r--r--tools/cmake/cpu/cortex-m33.cmake19
-rw-r--r--tools/cmake/cpu/cortex-m4.cmake19
-rw-r--r--tools/cmake/cpu/cortex-m7.cmake19
-rw-r--r--tools/cmake/toolchain/arm_gcc.cmake72
-rw-r--r--tools/cmake/toolchain/arm_iar.cmake34
-rw-r--r--tools/cmake/toolchain/set_flags.cmake17
-rw-r--r--tools/get_deps.py246
-rw-r--r--tools/iar_template.ipcf32
-rw-r--r--tools/make/cpu/cortex-m33.mk14
-rw-r--r--tools/make/cpu/cortex-m4.mk12
-rw-r--r--tools/make/cpu/cortex-m7.mk12
16 files changed, 576 insertions, 70 deletions
diff --git a/tools/build_cmake.py b/tools/build_cmake.py
new file mode 100644
index 000000000..eb7375ae2
--- /dev/null
+++ b/tools/build_cmake.py
@@ -0,0 +1,106 @@
+import os
+import sys
+import time
+import subprocess
+import pathlib
+from multiprocessing import Pool
+
+import build_utils
+
+SUCCEEDED = "\033[32msucceeded\033[0m"
+FAILED = "\033[31mfailed\033[0m"
+SKIPPED = "\033[33mskipped\033[0m"
+
+build_separator = '-' * 106
+
+toolchain_iar = '-DTOOLCHAIN=iar'
+
+def filter_with_input(mylist):
+ if len(sys.argv) > 1:
+ input_args = list(set(mylist).intersection(sys.argv))
+ if len(input_args) > 0:
+ mylist[:] = input_args
+
+
+def build_family(family, toolchain_option):
+ all_boards = []
+ for entry in os.scandir("hw/bsp/{}/boards".format(family)):
+ if entry.is_dir() and entry.name != 'pico_sdk':
+ all_boards.append(entry.name)
+ all_boards.sort()
+
+ # success, failed, skipped
+ ret = [0, 0, 0]
+ for board in all_boards:
+ start_time = time.monotonic()
+
+ build_dir = f"cmake-build/cmake-build-{board}"
+
+ # Generate build
+ r = subprocess.run(f"cmake examples -B {build_dir} -G \"Ninja\" -DFAMILY={family} -DBOARD"
+ f"={board} {toolchain_option}", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+
+ # Build
+ if r.returncode == 0:
+ r = subprocess.run(f"cmake --build {build_dir}", shell=True, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+
+ duration = time.monotonic() - start_time
+
+ if r.returncode == 0:
+ status = SUCCEEDED
+ ret[0] += 1
+ else:
+ status = FAILED
+ ret[1] += 1
+
+ flash_size = "-"
+ sram_size = "-"
+ example = 'all'
+ title = build_utils.build_format.format(example, board, status, "{:.2f}s".format(duration), flash_size, sram_size)
+
+ if os.getenv('CI'):
+ # always print build output if in CI
+ print(f"::group::{title}")
+ print(r.stdout.decode("utf-8"))
+ print(f"::endgroup::")
+ else:
+ # print build output if failed
+ print(title)
+ if r.returncode != 0:
+ print(r.stdout.decode("utf-8"))
+
+ return ret
+
+
+if __name__ == '__main__':
+ # IAR CC
+ if toolchain_iar not in sys.argv:
+ toolchain_iar = ''
+
+ # If family are not specified in arguments, build all supported
+ all_families = []
+ for entry in os.scandir("hw/bsp"):
+ if entry.is_dir() and entry.name != 'espressif' and os.path.isfile(entry.path + "/family.cmake"):
+ all_families.append(entry.name)
+ filter_with_input(all_families)
+ all_families.sort()
+
+ print(build_separator)
+ print(build_utils.build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
+ total_time = time.monotonic()
+
+ # succeeded, failed, skipped
+ total_result = [0, 0, 0]
+ for family in all_families:
+ fret = build_family(family, toolchain_iar)
+ if len(fret) == len(total_result):
+ total_result = [total_result[i] + fret[i] for i in range(len(fret))]
+
+ total_time = time.monotonic() - total_time
+ print(build_separator)
+ print("Build Summary: {} {}, {} {}, {} {} and took {:.2f}s".format(total_result[0], SUCCEEDED, total_result[1],
+ FAILED, total_result[2], SKIPPED, total_time))
+ print(build_separator)
+
+ sys.exit(total_result[1])
diff --git a/tools/build_family.py b/tools/build_family.py
index f9f7261fe..9b612b4cb 100644
--- a/tools/build_family.py
+++ b/tools/build_family.py
@@ -41,11 +41,11 @@ if __name__ == '__main__':
# If examples are not specified in arguments, build all
all_examples = []
- for dir1 in os.scandir("examples"):
- if dir1.is_dir() and 'cmake-build' not in dir1.name:
- for entry in os.scandir(dir1.path):
- if entry.is_dir():
- all_examples.append(dir1.name + '/' + entry.name)
+ for d in os.scandir("examples"):
+ if d.is_dir() and 'cmake' not in d.name:
+ for entry in os.scandir(d.path):
+ if entry.is_dir() and 'cmake' not in entry.name:
+ all_examples.append(d.name + '/' + entry.name)
filter_with_input(all_examples)
all_examples.sort()
diff --git a/tools/build_utils.py b/tools/build_utils.py
index ec850e732..6f907729b 100644
--- a/tools/build_utils.py
+++ b/tools/build_utils.py
@@ -47,6 +47,7 @@ def skip_example(example, board):
mk_contents = board_mk.read_text()
+ mcu = "NONE"
for token in mk_contents.split():
if "CFG_TUSB_MCU=OPT_MCU_" in token:
# Strip " because cmake files has them.
diff --git a/tools/cmake/cpu/cortex-m0plus.cmake b/tools/cmake/cpu/cortex-m0plus.cmake
new file mode 100644
index 000000000..bc2257048
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m0plus.cmake
@@ -0,0 +1,17 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m0plus
+ -mfloat-abi=soft
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m0
+ )
+
+ set(FREERTOS_PORT IAR_ARM_CM0 CACHE INTERNAL "")
+
+endif ()
diff --git a/tools/cmake/cpu/cortex-m3.cmake b/tools/cmake/cpu/cortex-m3.cmake
new file mode 100644
index 000000000..f6f5a62f8
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m3.cmake
@@ -0,0 +1,16 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m3
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM3 CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m3
+ )
+
+ set(FREERTOS_PORT IAR_ARM_CM3 CACHE INTERNAL "")
+
+endif ()
diff --git a/tools/cmake/cpu/cortex-m33.cmake b/tools/cmake/cpu/cortex-m33.cmake
new file mode 100644
index 000000000..7ebaf1748
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m33.cmake
@@ -0,0 +1,19 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m33
+ -mfloat-abi=hard
+ -mfpu=fpv5-sp-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM33_NTZ_NONSECURE CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m33
+ --fpu VFPv5-SP
+ )
+
+ set(FREERTOS_PORT IAR_ARM_CM4F CACHE INTERNAL "")
+
+endif ()
diff --git a/tools/cmake/cpu/cortex-m4.cmake b/tools/cmake/cpu/cortex-m4.cmake
new file mode 100644
index 000000000..a0cf3498f
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m4.cmake
@@ -0,0 +1,19 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m4
+ -mfloat-abi=hard
+ -mfpu=fpv4-sp-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM4F CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m4
+ --fpu VFPv4
+ )
+
+ set(FREERTOS_PORT IAR_ARM_CM4F CACHE INTERNAL "")
+
+endif ()
diff --git a/tools/cmake/cpu/cortex-m7.cmake b/tools/cmake/cpu/cortex-m7.cmake
new file mode 100644
index 000000000..3e5f7f44b
--- /dev/null
+++ b/tools/cmake/cpu/cortex-m7.cmake
@@ -0,0 +1,19 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m7
+ -mfloat-abi=hard
+ -mfpu=fpv5-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m7
+ --fpu VFPv5_D16
+ )
+
+ set(FREERTOS_PORT IAR_ARM_CM7 CACHE INTERNAL "")
+
+endif ()
diff --git a/tools/cmake/toolchain/arm_gcc.cmake b/tools/cmake/toolchain/arm_gcc.cmake
new file mode 100644
index 000000000..6dd1e7002
--- /dev/null
+++ b/tools/cmake/toolchain/arm_gcc.cmake
@@ -0,0 +1,72 @@
+set(CMAKE_SYSTEM_NAME Generic)
+
+set(CMAKE_C_COMPILER "arm-none-eabi-gcc")
+set(CMAKE_CXX_COMPILER "arm-none-eabi-g++")
+set(CMAKE_ASM_COMPILER "arm-none-eabi-gcc")
+
+set(CMAKE_SIZE "arm-none-eabi-size" CACHE FILEPATH "")
+set(CMAKE_OBJCOPY "arm-none-eabi-objcopy" CACHE FILEPATH "")
+set(CMAKE_OBJDUMP "arm-none-eabi-objdump" CACHE FILEPATH "")
+
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
+
+# 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
+ )
+
+set(TOOLCHAIN_EXE_LINKER_FLAGS
+ -Wl,--print-memory-usage
+ -Wl,--gc-sections
+ -Wl,--cref
+ )
+
+set(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)
+
+# try_compile is cmake test compiling its own example,
+# pass -nostdlib to skip stdlib linking
+get_property(IS_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE)
+if (IS_IN_TRY_COMPILE)
+ set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -nostdlib")
+ set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -nostdlib")
+endif ()
diff --git a/tools/cmake/toolchain/arm_iar.cmake b/tools/cmake/toolchain/arm_iar.cmake
new file mode 100644
index 000000000..dfbe55e0d
--- /dev/null
+++ b/tools/cmake/toolchain/arm_iar.cmake
@@ -0,0 +1,34 @@
+set(CMAKE_SYSTEM_NAME Generic)
+
+set(CMAKE_C_COMPILER "iccarm")
+set(CMAKE_CXX_COMPILER "iccarm")
+set(CMAKE_ASM_COMPILER "iasmarm")
+
+set(CMAKE_SIZE "size" CACHE FILEPATH "")
+set(CMAKE_OBJCOPY "ielftool" CACHE FILEPATH "")
+set(CMAKE_OBJDUMP "iefdumparm" CACHE FILEPATH "")
+
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
+
+# 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
+ )
+
+list(APPEND TOOLCHAIN_EXE_LINKER_FLAGS
+ )
+
+list(APPEND TOOLCHAIN_WARNING_FLAGS
+ )
+
+include(${CMAKE_CURRENT_LIST_DIR}/set_flags.cmake)
diff --git a/tools/cmake/toolchain/set_flags.cmake b/tools/cmake/toolchain/set_flags.cmake
new file mode 100644
index 000000000..44930ef4d
--- /dev/null
+++ b/tools/cmake/toolchain/set_flags.cmake
@@ -0,0 +1,17 @@
+include(CMakePrintHelpers)
+
+# join the toolchain flags into a single string
+list(JOIN TOOLCHAIN_COMMON_FLAGS " " TOOLCHAIN_COMMON_FLAGS)
+
+foreach (LANG IN ITEMS C CXX ASM)
+ set(CMAKE_${LANG}_FLAGS_INIT ${TOOLCHAIN_COMMON_FLAGS})
+
+ #cmake_print_variables(CMAKE_${LANG}_FLAGS_INIT)
+
+ # optimization flags for LOG, LOGGER ?
+ #set(CMAKE_${LANG}_FLAGS_RELEASE_INIT "-Os")
+ #set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-O0")
+endforeach ()
+
+# Linker
+list(JOIN TOOLCHAIN_EXE_LINKER_FLAGS " " CMAKE_EXE_LINKER_FLAGS_INIT)
diff --git a/tools/get_deps.py b/tools/get_deps.py
index 4f2f7b089..da935a901 100644
--- a/tools/get_deps.py
+++ b/tools/get_deps.py
@@ -4,67 +4,177 @@ from pathlib import Path
from multiprocessing import Pool
# Mandatory Dependencies that is always fetched
-# path, url, commit (Alphabet sorted by path)
+# path, url, commit, family (Alphabet sorted by path)
deps_mandatory = {
- 'lib/FreeRTOS-Kernel' : ['5f19e34f878af97810a7662a75eac59bd74d628b', 'https://github.com/FreeRTOS/FreeRTOS-Kernel.git' ],
- 'lib/lwip' : ['159e31b689577dbf69cf0683bbaffbd71fa5ee10', 'https://github.com/lwip-tcpip/lwip.git' ],
- 'tools/uf2' : ['19615407727073e36d81bf239c52108ba92e7660', 'https://github.com/microsoft/uf2.git' ],
+ 'lib/FreeRTOS-Kernel': ['https://github.com/FreeRTOS/FreeRTOS-Kernel.git',
+ '5f19e34f878af97810a7662a75eac59bd74d628b',
+ 'all'],
+ 'lib/lwip': ['https://github.com/lwip-tcpip/lwip.git',
+ '159e31b689577dbf69cf0683bbaffbd71fa5ee10',
+ 'all'],
+ 'tools/uf2': ['https://github.com/microsoft/uf2.git',
+ '19615407727073e36d81bf239c52108ba92e7660',
+ 'all'],
}
# Optional Dependencies per MCU
-# path, url, commit (Alphabet sorted by path)
+# path, url, commit, family (Alphabet sorted by path)
deps_optional = {
- 'hw/mcu/allwinner' : ['8e5e89e8e132c0fd90e72d5422e5d3d68232b756', 'https://github.com/hathach/allwinner_driver.git' ],
- 'hw/mcu/bridgetek/ft9xx/ft90x-sdk' : ['91060164afe239fcb394122e8bf9eb24d3194eb1', 'https://github.com/BRTSG-FOSS/ft90x-sdk.git' ],
- 'hw/mcu/broadcom' : ['08370086080759ed54ac1136d62d2ad24c6fa267', 'https://github.com/adafruit/broadcom-peripherals.git' ],
- 'hw/mcu/gd/nuclei-sdk' : ['7eb7bfa9ea4fbeacfafe1d5f77d5a0e6ed3922e7', 'https://github.com/Nuclei-Software/nuclei-sdk.git' ],
- 'hw/mcu/infineon/mtb-xmclib-cat3' : ['daf5500d03cba23e68c2f241c30af79cd9d63880', 'https://github.com/Infineon/mtb-xmclib-cat3.git' ],
- 'hw/mcu/microchip' : ['9e8b37e307d8404033bb881623a113931e1edf27', 'https://github.com/hathach/microchip_driver.git' ],
- 'hw/mcu/mindmotion/mm32sdk' : ['0b79559eb411149d36e073c1635c620e576308d4', 'https://github.com/hathach/mm32sdk.git' ],
- 'hw/mcu/nordic/nrfx' : ['281cc2e178fd9a470d844b3afdea9eb322a0b0e8', 'https://github.com/NordicSemiconductor/nrfx.git' ],
- 'hw/mcu/nuvoton' : ['2204191ec76283371419fbcec207da02e1bc22fa', 'https://github.com/majbthrd/nuc_driver.git' ],
- 'hw/mcu/nxp/lpcopen' : ['43c45c85405a5dd114fff0ea95cca62837740c13', 'https://github.com/hathach/nxp_lpcopen.git' ],
- 'hw/mcu/nxp/mcux-sdk' : ['f357a1150f6cf6c6b844f53f2d426bfb3e649850', 'https://github.com/NXPmicro/mcux-sdk.git' ],
- 'hw/mcu/nxp/nxp_sdk' : ['845c8fc49b6fb660f06a5c45225494eacb06f00c', 'https://github.com/hathach/nxp_sdk.git' ],
- 'hw/mcu/raspberry_pi/Pico-PIO-USB' : ['c3715ce94b6f6391856de56081d4d9b3e98fa93d', 'https://github.com/sekigon-gonnoc/Pico-PIO-USB.git' ],
- 'hw/mcu/renesas/fsp' : ['9860fae1f180340a0e3c097dc6e91323cf83b926', 'https://github.com/renesas/fsp.git' ],
- 'hw/mcu/renesas/rx' : ['706b4e0cf485605c32351e2f90f5698267996023', 'https://github.com/kkitayam/rx_device.git' ],
- 'hw/mcu/silabs/cmsis-dfp-efm32gg12b' : ['f1c31b7887669cb230b3ea63f9b56769078960bc', 'https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b.git' ],
- 'hw/mcu/sony/cxd56/spresense-exported-sdk' : ['2ec2a1538362696118dc3fdf56f33dacaf8f4067', 'https://github.com/sonydevworld/spresense-exported-sdk.git' ],
- 'hw/mcu/st/cmsis_device_f0' : ['2fc25ee22264bc27034358be0bd400b893ef837e', 'https://github.com/STMicroelectronics/cmsis_device_f0.git' ],
- 'hw/mcu/st/cmsis_device_f1' : ['6601104a6397299b7304fd5bcd9a491f56cb23a6', 'https://github.com/STMicroelectronics/cmsis_device_f1.git' ],
- 'hw/mcu/st/cmsis_device_f2' : ['182fcb3681ce116816feb41b7764f1b019ce796f', 'https://github.com/STMicroelectronics/cmsis_device_f2.git' ],
- 'hw/mcu/st/cmsis_device_f3' : ['5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b', 'https://github.com/STMicroelectronics/cmsis_device_f3.git' ],
- 'hw/mcu/st/cmsis_device_f4' : ['2615e866fa48fe1ff1af9e31c348813f2b19e7ec', 'https://github.com/STMicroelectronics/cmsis_device_f4.git' ],
- 'hw/mcu/st/cmsis_device_f7' : ['fc676ef1ad177eb874eaa06444d3d75395fc51f4', 'https://github.com/STMicroelectronics/cmsis_device_f7.git' ],
- 'hw/mcu/st/cmsis_device_g0' : ['08258b28ee95f50cb9624d152a1cbf084be1f9a5', 'https://github.com/STMicroelectronics/cmsis_device_g0.git' ],
- 'hw/mcu/st/cmsis_device_g4' : ['ce822adb1dc552b3aedd13621edbc7fdae124878', 'https://github.com/STMicroelectronics/cmsis_device_g4.git' ],
- 'hw/mcu/st/cmsis_device_h7' : ['60dc2c913203dc8629dc233d4384dcc41c91e77f', 'https://github.com/STMicroelectronics/cmsis_device_h7.git' ],
- 'hw/mcu/st/cmsis_device_l0' : ['06748ca1f93827befdb8b794402320d94d02004f', 'https://github.com/STMicroelectronics/cmsis_device_l0.git' ],
- 'hw/mcu/st/cmsis_device_l1' : ['7f16ec0a1c4c063f84160b4cc6bf88ad554a823e', 'https://github.com/STMicroelectronics/cmsis_device_l1.git' ],
- 'hw/mcu/st/cmsis_device_l4' : ['6ca7312fa6a5a460b5a5a63d66da527fdd8359a6', 'https://github.com/STMicroelectronics/cmsis_device_l4.git' ],
- 'hw/mcu/st/cmsis_device_l5' : ['d922865fc0326a102c26211c44b8e42f52c1e53d', 'https://github.com/STMicroelectronics/cmsis_device_l5.git' ],
- 'hw/mcu/st/cmsis_device_u5' : ['bc00f3c9d8a4e25220f84c26d414902cc6bdf566', 'https://github.com/STMicroelectronics/cmsis_device_u5.git' ],
- 'hw/mcu/st/cmsis_device_wb' : ['9c5d1920dd9fabbe2548e10561d63db829bb744f', 'https://github.com/STMicroelectronics/cmsis_device_wb.git' ],
- 'hw/mcu/st/stm32f0xx_hal_driver' : ['0e95cd88657030f640a11e690a8a5186c7712ea5', 'https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git'],
- 'hw/mcu/st/stm32f1xx_hal_driver' : ['1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29', 'https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git'],
- 'hw/mcu/st/stm32f2xx_hal_driver' : ['c75ace9b908a9aca631193ebf2466963b8ea33d0', 'https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git'],
- 'hw/mcu/st/stm32f3xx_hal_driver' : ['1761b6207318ede021706e75aae78f452d72b6fa', 'https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git'],
- 'hw/mcu/st/stm32f4xx_hal_driver' : ['04e99fbdabd00ab8f370f377c66b0a4570365b58', 'https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git'],
- 'hw/mcu/st/stm32f7xx_hal_driver' : ['f7ffdf6bf72110e58b42c632b0a051df5997e4ee', 'https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git'],
- 'hw/mcu/st/stm32g0xx_hal_driver' : ['5b53e6cee664a82b16c86491aa0060e2110c00cb', 'https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git'],
- 'hw/mcu/st/stm32g4xx_hal_driver' : ['8b4518417706d42eef5c14e56a650005abf478a8', 'https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git'],
- 'hw/mcu/st/stm32h7xx_hal_driver' : ['d8461b980b59b1625207d8c4f2ce0a9c2a7a3b04', 'https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git'],
- 'hw/mcu/st/stm32l0xx_hal_driver' : ['fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b', 'https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git'],
- 'hw/mcu/st/stm32l1xx_hal_driver' : ['44efc446fa69ed8344e7fd966e68ed11043b35d9', 'https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git'],
- 'hw/mcu/st/stm32l4xx_hal_driver' : ['aee3d5bf283ae5df87532b781bdd01b7caf256fc', 'https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git'],
- 'hw/mcu/st/stm32l5xx_hal_driver' : ['675c32a75df37f39d50d61f51cb0dcf53f07e1cb', 'https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git'],
- 'hw/mcu/st/stm32u5xx_hal_driver' : ['2e1d4cdb386e33391cb261dfff4fefa92e4aa35a', 'https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git'],
- 'hw/mcu/st/stm32wbxx_hal_driver' : ['2c5f06638be516c1b772f768456ba637f077bac8', 'https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git'],
- 'hw/mcu/ti' : ['143ed6cc20a7615d042b03b21e070197d473e6e5', 'https://github.com/hathach/ti_driver.git' ],
- 'hw/mcu/wch/ch32v307' : ['17761f5cf9dbbf2dcf665b7c04934188add20082', 'https://github.com/openwch/ch32v307.git' ],
- 'lib/CMSIS_5' : ['20285262657d1b482d132d20d755c8c330d55c1f', 'https://github.com/ARM-software/CMSIS_5.git' ],
- 'lib/sct_neopixel' : ['e73e04ca63495672d955f9268e003cffe168fcd8', 'https://github.com/gsteiert/sct_neopixel.git' ],
+ 'hw/mcu/allwinner': ['https://github.com/hathach/allwinner_driver.git',
+ '8e5e89e8e132c0fd90e72d5422e5d3d68232b756',
+ 'fc100s'],
+ 'hw/mcu/bridgetek/ft9xx/ft90x-sdk': ['https://github.com/BRTSG-FOSS/ft90x-sdk.git',
+ '91060164afe239fcb394122e8bf9eb24d3194eb1',
+ 'brtmm90x'],
+ 'hw/mcu/broadcom': ['https://github.com/adafruit/broadcom-peripherals.git',
+ '08370086080759ed54ac1136d62d2ad24c6fa267',
+ 'broadcom_32bit broadcom_64bit'],
+ 'hw/mcu/gd/nuclei-sdk': ['https://github.com/Nuclei-Software/nuclei-sdk.git',
+ '7eb7bfa9ea4fbeacfafe1d5f77d5a0e6ed3922e7',
+ 'gd32vf103'],
+ 'hw/mcu/infineon/mtb-xmclib-cat3': ['https://github.com/Infineon/mtb-xmclib-cat3.git',
+ 'daf5500d03cba23e68c2f241c30af79cd9d63880',
+ 'xmc4000'],
+ 'hw/mcu/microchip': ['https://github.com/hathach/microchip_driver.git',
+ '9e8b37e307d8404033bb881623a113931e1edf27',
+ 'sam3x samd11 samd21 samd51 same5x same7x saml2x samg'],
+ 'hw/mcu/mindmotion/mm32sdk': ['https://github.com/hathach/mm32sdk.git',
+ '0b79559eb411149d36e073c1635c620e576308d4',
+ 'mm32'],
+ 'hw/mcu/nordic/nrfx': ['https://github.com/NordicSemiconductor/nrfx.git',
+ '2527e3c8449cfd38aee41598e8af8492f410ed15',
+ 'nrf'],
+ 'hw/mcu/nuvoton': ['https://github.com/majbthrd/nuc_driver.git',
+ '2204191ec76283371419fbcec207da02e1bc22fa',
+ 'nuc'],
+ 'hw/mcu/nxp/lpcopen': ['https://github.com/hathach/nxp_lpcopen.git',
+ '43c45c85405a5dd114fff0ea95cca62837740c13',
+ 'lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43'],
+ 'hw/mcu/nxp/mcux-sdk': ['https://github.com/hathach/mcux-sdk.git',
+ '950819b7de9b32f92c3edf396bc5ffb8d66e7009',
+ 'kinetis_k32l lpc51 lpc54 lpc55 mcx imxrt'],
+ 'hw/mcu/nxp/nxp_sdk': ['https://github.com/hathach/nxp_sdk.git',
+ '845c8fc49b6fb660f06a5c45225494eacb06f00c',
+ 'kinetis_kl'],
+ 'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git',
+ 'c3715ce94b6f6391856de56081d4d9b3e98fa93d',
+ 'rp2040'],
+ 'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git',
+ '9860fae1f180340a0e3c097dc6e91323cf83b926',
+ 'ra'],
+ 'hw/mcu/renesas/rx': ['https://github.com/kkitayam/rx_device.git',
+ '706b4e0cf485605c32351e2f90f5698267996023',
+ 'rx'],
+ 'hw/mcu/silabs/cmsis-dfp-efm32gg12b': ['https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b.git',
+ 'f1c31b7887669cb230b3ea63f9b56769078960bc',
+ 'efm32'],
+ 'hw/mcu/sony/cxd56/spresense-exported-sdk': ['https://github.com/sonydevworld/spresense-exported-sdk.git',
+ '2ec2a1538362696118dc3fdf56f33dacaf8f4067',
+ 'spresense'],
+ 'hw/mcu/st/cmsis_device_f0': ['https://github.com/STMicroelectronics/cmsis_device_f0.git',
+ '2fc25ee22264bc27034358be0bd400b893ef837e',
+ 'stm32f0'],
+ 'hw/mcu/st/cmsis_device_f1': ['https://github.com/STMicroelectronics/cmsis_device_f1.git',
+ '6601104a6397299b7304fd5bcd9a491f56cb23a6',
+ 'stm32f1'],
+ 'hw/mcu/st/cmsis_device_f2': ['https://github.com/STMicroelectronics/cmsis_device_f2.git',
+ '182fcb3681ce116816feb41b7764f1b019ce796f',
+ 'stm32f2'],
+ 'hw/mcu/st/cmsis_device_f3': ['https://github.com/STMicroelectronics/cmsis_device_f3.git',
+ '5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b',
+ 'stm32f3'],
+ 'hw/mcu/st/cmsis_device_f4': ['https://github.com/STMicroelectronics/cmsis_device_f4.git',
+ '2615e866fa48fe1ff1af9e31c348813f2b19e7ec',
+ 'stm32f4'],
+ 'hw/mcu/st/cmsis_device_f7': ['https://github.com/STMicroelectronics/cmsis_device_f7.git',
+ 'fc676ef1ad177eb874eaa06444d3d75395fc51f4',
+ 'stm32f7'],
+ 'hw/mcu/st/cmsis_device_g0': ['https://github.com/STMicroelectronics/cmsis_device_g0.git',
+ '3a23e1224417f3f2d00300ecd620495e363f2094',
+ 'stm32g0'],
+ 'hw/mcu/st/cmsis_device_g4': ['https://github.com/STMicroelectronics/cmsis_device_g4.git',
+ 'ce822adb1dc552b3aedd13621edbc7fdae124878',
+ 'stm32g4'],
+ 'hw/mcu/st/cmsis_device_h7': ['https://github.com/STMicroelectronics/cmsis_device_h7.git',
+ '60dc2c913203dc8629dc233d4384dcc41c91e77f',
+ 'stm32h7'],
+ 'hw/mcu/st/cmsis_device_l0': ['https://github.com/STMicroelectronics/cmsis_device_l0.git',
+ '06748ca1f93827befdb8b794402320d94d02004f',
+ 'stm32l0'],
+ 'hw/mcu/st/cmsis_device_l1': ['https://github.com/STMicroelectronics/cmsis_device_l1.git',
+ '7f16ec0a1c4c063f84160b4cc6bf88ad554a823e',
+ 'stm32l1'],
+ 'hw/mcu/st/cmsis_device_l4': ['https://github.com/STMicroelectronics/cmsis_device_l4.git',
+ '6ca7312fa6a5a460b5a5a63d66da527fdd8359a6',
+ 'stm32l4'],
+ 'hw/mcu/st/cmsis_device_l5': ['https://github.com/STMicroelectronics/cmsis_device_l5.git',
+ 'd922865fc0326a102c26211c44b8e42f52c1e53d',
+ 'stm32l5'],
+ 'hw/mcu/st/cmsis_device_u5': ['https://github.com/STMicroelectronics/cmsis_device_u5.git',
+ 'bc00f3c9d8a4e25220f84c26d414902cc6bdf566',
+ 'stm32u5'],
+ 'hw/mcu/st/cmsis_device_wb': ['https://github.com/STMicroelectronics/cmsis_device_wb.git',
+ '9c5d1920dd9fabbe2548e10561d63db829bb744f',
+ 'stm32wb'],
+ 'hw/mcu/st/stm32f0xx_hal_driver': ['https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git',
+ '0e95cd88657030f640a11e690a8a5186c7712ea5',
+ 'stm32f0'],
+ 'hw/mcu/st/stm32f1xx_hal_driver': ['https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git',
+ '1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29',
+ 'stm32f1'],
+ 'hw/mcu/st/stm32f2xx_hal_driver': ['https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git',
+ 'c75ace9b908a9aca631193ebf2466963b8ea33d0',
+ 'stm32f2'],
+ 'hw/mcu/st/stm32f3xx_hal_driver': ['https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git',
+ '1761b6207318ede021706e75aae78f452d72b6fa',
+ 'stm32f3'],
+ 'hw/mcu/st/stm32f4xx_hal_driver': ['https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git',
+ '04e99fbdabd00ab8f370f377c66b0a4570365b58',
+ 'stm32f4'],
+ 'hw/mcu/st/stm32f7xx_hal_driver': ['https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git',
+ 'f7ffdf6bf72110e58b42c632b0a051df5997e4ee',
+ 'stm32f7'],
+ 'hw/mcu/st/stm32g0xx_hal_driver': ['https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git',
+ 'e911b12c7f67084d7f6b76157a4c0d4e2ec3779c',
+ 'stm32g0'],
+ 'hw/mcu/st/stm32g4xx_hal_driver': ['https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git',
+ '8b4518417706d42eef5c14e56a650005abf478a8',
+ 'stm32g4'],
+ 'hw/mcu/st/stm32h7xx_hal_driver': ['https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git',
+ 'd8461b980b59b1625207d8c4f2ce0a9c2a7a3b04',
+ 'stm32h7'],
+ 'hw/mcu/st/stm32l0xx_hal_driver': ['https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git',
+ 'fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b',
+ 'stm32l0'],
+ 'hw/mcu/st/stm32l1xx_hal_driver': ['https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git',
+ '44efc446fa69ed8344e7fd966e68ed11043b35d9',
+ 'stm32l1'],
+ 'hw/mcu/st/stm32l4xx_hal_driver': ['https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git',
+ 'aee3d5bf283ae5df87532b781bdd01b7caf256fc',
+ 'stm32l4'],
+ 'hw/mcu/st/stm32l5xx_hal_driver': ['https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git',
+ '675c32a75df37f39d50d61f51cb0dcf53f07e1cb',
+ 'stm32l5'],
+ 'hw/mcu/st/stm32u5xx_hal_driver': ['https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git',
+ '2e1d4cdb386e33391cb261dfff4fefa92e4aa35a',
+ 'stm32u5'],
+ 'hw/mcu/st/stm32wbxx_hal_driver': ['https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git',
+ '2c5f06638be516c1b772f768456ba637f077bac8',
+ 'stm32wb'],
+ 'hw/mcu/ti': ['https://github.com/hathach/ti_driver.git',
+ '143ed6cc20a7615d042b03b21e070197d473e6e5',
+ 'msp430 msp432e4 tm4c123'],
+ 'hw/mcu/wch/ch32v307': ['https://github.com/openwch/ch32v307.git',
+ '17761f5cf9dbbf2dcf665b7c04934188add20082',
+ 'ch32v307'],
+ 'lib/CMSIS_5': ['https://github.com/ARM-software/CMSIS_5.git',
+ '20285262657d1b482d132d20d755c8c330d55c1f',
+ 'imxrt kinetis_k32l lpc51 lpc54 lpc55 mcx mm32 msp432e4 nrf ra saml2x'
+ 'stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32g0 stm32g4 '
+ 'stm32h7 stm32l0 stm32l1 stm32l4 stm32l5 stm32u5 stm32wb'],
+ 'lib/sct_neopixel': ['https://github.com/gsteiert/sct_neopixel.git',
+ 'e73e04ca63495672d955f9268e003cffe168fcd8',
+ 'lpc55'],
}
# combined 2 deps
@@ -78,8 +188,10 @@ def get_a_dep(d):
if d not in deps_all.keys():
print('{} is not found in dependency list')
return 1
- commit = deps_all[d][0]
- url = deps_all[d][1]
+ url = deps_all[d][0]
+ commit = deps_all[d][1]
+ families = deps_all[d][2]
+
print('cloning {} with {}'.format(d, url))
p = Path(TOP / d)
@@ -103,14 +215,26 @@ def get_a_dep(d):
return 0
+# Arguments can be
+# - family name
+# - specific deps path
+# - all
if __name__ == "__main__":
status = 0
deps = list(deps_mandatory.keys())
- # get all if executed with all as argument
+ # get all if 'all' is argument
if len(sys.argv) == 2 and sys.argv[1] == 'all':
- deps += deps_optional
+ deps += deps_optional.keys()
else:
- deps += sys.argv[1:]
+ for arg in sys.argv[1:]:
+ if arg in deps_all.keys():
+ # if arg is a dep, add it
+ deps.append(arg)
+ else:
+ # arg is a family name, add all deps of that family
+ for d in deps_optional:
+ if arg in deps_optional[d][2]:
+ deps.append(d)
with Pool() as pool:
status = sum(pool.map(get_a_dep, deps))
diff --git a/tools/iar_template.ipcf b/tools/iar_template.ipcf
index d243aab0a..6ea1d576d 100644
--- a/tools/iar_template.ipcf
+++ b/tools/iar_template.ipcf
@@ -57,7 +57,13 @@
<group name="src/host">
<path>$TUSB_DIR$/src/host/hub.c</path>
<path>$TUSB_DIR$/src/host/usbh.c</path>
- <path>$TUSB_DIR$/src/host/usbh_control.c</path>
+ </group>
+ <group name="src/portable/bridgetek/ft9xx">
+ <path>$TUSB_DIR$/src/portable/bridgetek/ft9xx/dcd_ft9xx.c</path>
+ </group>
+ <group name="src/portable/chipidea/ci_hs">
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_hs/dcd_ci_hs.c</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_hs/hcd_ci_hs.c</path>
</group>
<group name="src/portable/synopsys/dwc2">
<path>$TUSB_DIR$/src/portable/synopsys/dwc2/dcd_dwc2.c</path>
@@ -73,6 +79,7 @@
</group>
<group name="src/portable/mentor/musb">
<path>$TUSB_DIR$/src/portable/mentor/musb/dcd_musb.c</path>
+ <path>$TUSB_DIR$/src/portable/mentor/musb/hcd_musb.c</path>
</group>
<group name="src/portable/microchip/samd">
<path>$TUSB_DIR$/src/portable/microchip/samd/dcd_samd.c</path>
@@ -83,6 +90,12 @@
<group name="src/portable/microchip/samx7x">
<path>$TUSB_DIR$/src/portable/microchip/samx7x/dcd_samx7x.c</path>
</group>
+ <group name="src/portable/microchip/pic">
+ <path>$TUSB_DIR$/src/portable/microchip/pic/dcd_pic.c</path>
+ </group>
+ <group name="src/portable/microchip/pic32mz">
+ <path>$TUSB_DIR$/src/portable/microchip/pic32mz/dcd_pic32mz.c</path>
+ </group>
<group name="src/portable/mindmotion/mm32">
<path>$TUSB_DIR$/src/portable/mindmotion/mm32/dcd_mm32f327x_otg.c</path>
</group>
@@ -100,6 +113,7 @@
</group>
<group name="src/portable/nxp/khci">
<path>$TUSB_DIR$/src/portable/nxp/khci/dcd_khci.c</path>
+ <path>$TUSB_DIR$/src/portable/nxp/khci/hcd_khci.c</path>
</group>
<group name="src/portable/nxp/lpc17_40">
<path>$TUSB_DIR$/src/portable/nxp/lpc17_40/dcd_lpc17_40.c</path>
@@ -115,13 +129,17 @@
<group name="src/portable/ohci">
<path>$TUSB_DIR$/src/portable/ohci/ohci.c</path>
</group>
+ <group name="src/portable/raspberrypi/pio_usb">
+ <path>$TUSB_DIR$/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c</path>
+ <path>$TUSB_DIR$/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c</path>
+ </group>
<group name="src/portable/raspberrypi/rp2040">
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/dcd_rp2040.c</path>
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/hcd_rp2040.c</path>
- <path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/rp2040_usb.c</path>
</group>
- <group name="src/portable/renesas/usba">
- <path>$TUSB_DIR$/src/portable/renesas/usba/dcd_usba.c</path>
+ <group name="src/portable/renesas/rusb2">
+ <path>$TUSB_DIR$/src/portable/renesas/rusb2/dcd_rusb2.c</path>
+ <path>$TUSB_DIR$/src/portable/renesas/rusb2/hcd_rusb2.c</path>
</group>
<group name="src/portable/sony/cxd56">
<path>$TUSB_DIR$/src/portable/sony/cxd56/dcd_cxd56.c</path>
@@ -129,12 +147,18 @@
<group name="src/portable/st/stm32_fsdev">
<path>$TUSB_DIR$/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c</path>
</group>
+ <group name="src/portable/sunxi">
+ <path>$TUSB_DIR$/src/portable/sunxi/dcd_sunxi_musb.c</path>
+ </group>
<group name="src/portable/ti/msp430x5xx">
<path>$TUSB_DIR$/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c</path>
</group>
<group name="src/portable/valentyusb/eptri">
<path>$TUSB_DIR$/src/portable/valentyusb/eptri/dcd_eptri.c</path>
</group>
+ <group name="src/portable/wch/ch32v307">
+ <path>$TUSB_DIR$/src/portable/wch/ch32v307/dcd_usbhs.c</path>
+ </group>
<group name="lib/SEGGER_RTT">
<path>$TUSB_DIR$/lib/SEGGER_RTT/RTT/SEGGER_RTT.c</path>
<path>$TUSB_DIR$/lib/SEGGER_RTT/RTT/SEGGER_RTT_printf.c</path>
diff --git a/tools/make/cpu/cortex-m33.mk b/tools/make/cpu/cortex-m33.mk
new file mode 100644
index 000000000..3d12b01fd
--- /dev/null
+++ b/tools/make/cpu/cortex-m33.mk
@@ -0,0 +1,14 @@
+ifeq ($(TOOLCHAIN),gcc)
+ CFLAGS += \
+ -mthumb \
+ -mcpu=cortex-m33 \
+ -mfloat-abi=hard \
+ -mfpu=fpv5-sp-d16 \
+
+ #-mfpu=fpv5-d16 \
+
+ #set(FREERTOS_PORT GCC_ARM_CM33_NONSECURE CACHE INTERNAL "")
+ FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM33_NTZ/non_secure
+else ifeq ($(TOOLCHAIN),iar)
+ # TODO support IAR
+endif
diff --git a/tools/make/cpu/cortex-m4.mk b/tools/make/cpu/cortex-m4.mk
new file mode 100644
index 000000000..890feefe3
--- /dev/null
+++ b/tools/make/cpu/cortex-m4.mk
@@ -0,0 +1,12 @@
+ifeq ($(TOOLCHAIN),gcc)
+ CFLAGS += \
+ -mthumb \
+ -mcpu=cortex-m4 \
+ -mfloat-abi=hard \
+ -mfpu=fpv4-sp-d16 \
+
+ #set(FREERTOS_PORT GCC_ARM_CM4F CACHE INTERNAL "")
+ FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM4F
+else ifeq ($(TOOLCHAIN),iar)
+ # TODO support IAR
+endif
diff --git a/tools/make/cpu/cortex-m7.mk b/tools/make/cpu/cortex-m7.mk
new file mode 100644
index 000000000..504ffd486
--- /dev/null
+++ b/tools/make/cpu/cortex-m7.mk
@@ -0,0 +1,12 @@
+ifeq ($(TOOLCHAIN),gcc)
+ CFLAGS += \
+ -mthumb \
+ -mcpu=cortex-m7 \
+ -mfloat-abi=hard \
+ -mfpu=fpv5-d16 \
+
+ #set(FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "")
+ FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM7/r0p1
+else ifeq ($(TOOLCHAIN),iar)
+ # TODO support IAR
+endif