Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci update #2622

Merged
merged 30 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ea3f1d3
add cmake for pi zero (renamed from pi zero_w), build but the flash s…
hathach May 2, 2024
980f599
add cmake for broadcom 64-bit, like 32-bit it compiles but text is on…
hathach May 2, 2024
4b537a4
add cmake for kinetis k32l2 family
hathach May 2, 2024
c717e52
add cmake for lpc11
hathach May 2, 2024
374a4b4
update clang format
hathach May 2, 2024
19cb2f1
add cmake to lpc1347
hathach May 2, 2024
2213fe4
add cmake for lpc15
hathach May 2, 2024
e812fce
update cmake ci
hathach May 2, 2024
68a4d0c
add cmake to lpc51
hathach May 2, 2024
dde13a3
add cmake to msp432e4
hathach May 2, 2024
fc843c5
add cmake for saml2x
hathach May 3, 2024
1b97cec
fix missing linker entry with cmake for broadcom family
hathach May 3, 2024
6524e26
add cmake for stm32wb
hathach May 3, 2024
43f4317
add missing FreeRTOSConfig.h
hathach May 3, 2024
1cf68f9
- add cmake to samd11
hathach May 3, 2024
4b86b49
merge samd51 and same5x
hathach May 3, 2024
59f8e9d
rename to samd5x_e5x
hathach May 3, 2024
704412b
add cmake for tm4c
hathach May 3, 2024
f38fbbf
add cmake for xmc4000
hathach May 3, 2024
fcfd5a6
fix ci
hathach May 3, 2024
58248f3
mm32 temp
hathach May 3, 2024
7c7be88
clion setting
hathach May 3, 2024
f194043
fix get_deps.py for samd5x_e5x
hathach May 4, 2024
666702f
fix ci
hathach May 4, 2024
c020a01
add cmake for f1c100s
hathach May 4, 2024
3791514
add cmake for samg55
hathach May 4, 2024
d79c71a
update flash openocd
hathach May 6, 2024
4977853
add cmake for mm32, remove mm32 bluepill since it is custom/reworked …
hathach May 6, 2024
a9f1c62
temp fix for mm32 redundant-decls of SystemCoreClock
hathach May 6, 2024
dfda0b1
fix typo
hathach May 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 66 additions & 6 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,66 @@
---
BreakBeforeBraces: Linux
ColumnLimit: '200'
ReflowComments: 'true'

...
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 4
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 2
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 2
UseTab: Never
9 changes: 1 addition & 8 deletions .github/workflows/build_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ jobs:
matrix:
family:
# Alphabetical order
- 'broadcom_32bit'
- 'kinetis_k32l2'
- 'lpc11 lpc13 lpc15'
- 'lpc51'
- 'mm32 msp432e4'
- 'samd11 same5x saml2x'
- 'stm32l0 stm32wb'
- 'tm4c123 xmc4000'
- 'mm32'
steps:
- name: Setup Python
uses: actions/setup-python@v5
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ jobs:
matrix:
family:
# Alphabetical order
- 'broadcom_32bit'
- 'imxrt'
- 'kinetis_k kinetis_kl'
- 'kinetis_k kinetis_kl kinetis_k32l2'
- 'lpc11 lpc13 lpc15'
- 'lpc17 lpc18 lpc40 lpc43'
- 'lpc54 lpc55'
- 'lpc51 lpc54 lpc55'
- 'mcx'
- 'msp432e4'
- 'mm32'
- 'nrf'
- 'ra'
- 'rp2040'
- 'samd21'
- 'samd51'
- 'samd11 samd21 saml2x samd5x_e5x samg'
- 'stm32f0'
- 'stm32f1'
- 'stm32f2'
Expand All @@ -59,6 +62,9 @@ jobs:
- 'stm32h7'
- 'stm32l4'
- 'stm32u5'
- 'stm32wb'
- 'tm4c'
- 'xmc4000'
steps:
- name: Setup Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -87,28 +93,28 @@ jobs:
python3 tools/get_deps.py ${{ matrix.family }}

- name: Build
run: python tools/build_cmake.py ${{ matrix.family }} -DCMAKE_BUILD_TYPE=MinSizeRel
run: python tools/build_cmake.py ${{ matrix.family }}
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk

- name: Upload Artifacts for Hardware Testing (rp2040)
if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
if: contains(matrix.family, 'rp2040') && github.repository_owner == 'hathach'
uses: actions/upload-artifact@v4
with:
name: raspberry_pi_pico
path: |
cmake-build/cmake-build-raspberry_pi_pico/*/*/*.elf

- name: Upload Artifacts for Hardware Testing (nRF)
if: matrix.family == 'nrf' && github.repository_owner == 'hathach'
if: contains(matrix.family, 'nrf') && github.repository_owner == 'hathach'
uses: actions/upload-artifact@v4
with:
name: feather_nrf52840_express
path: |
cmake-build/cmake-build-feather_nrf52840_express/*/*/*.elf

- name: Upload Artifacts for Hardware Testing (samd51)
if: matrix.family == 'samd51' && github.repository_owner == 'hathach'
if: contains(matrix.family, 'samd5x_e5x') && github.repository_owner == 'hathach'
uses: actions/upload-artifact@v4
with:
name: itsybitsy_m4
Expand All @@ -134,7 +140,7 @@ jobs:
#- 'ra' port later
#- 'rp2040' port later
- 'samd21'
- 'samd51'
- 'samd5x_e5x'
- 'stm32f0'
- 'stm32f1'
- 'stm32f2'
Expand Down Expand Up @@ -188,7 +194,7 @@ jobs:
python3 tools/get_deps.py ${{ matrix.family }}

- name: Build
run: python tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=clang -DCMAKE_BUILD_TYPE=MinSizeRel
run: python tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=clang
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk

Expand Down Expand Up @@ -236,7 +242,7 @@ jobs:
python3 tools/get_deps.py ${{ matrix.family }}

- name: Build
run: python tools/build_cmake.py ${{ matrix.family }} -DCMAKE_BUILD_TYPE=MinSizeRel
run: python tools/build_cmake.py ${{ matrix.family }}

# ---------------------------------------
# Hardware in the loop (HIL)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_iar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: python3 tools/get_deps.py ${{ matrix.family }}

- name: Build
run: python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iar -DCMAKE_BUILD_TYPE=MinSizeRel
run: python3 tools/build_cmake.py ${{ matrix.family }} -DTOOLCHAIN=iar

- name: Test on actual hardware (hardware in the loop)
run: |
Expand Down
41 changes: 39 additions & 2 deletions .idea/cmake.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/rp2040.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions examples/build_system/cmake/cpu/arm1176jzf-s.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if (TOOLCHAIN STREQUAL "gcc")
set(TOOLCHAIN_COMMON_FLAGS
-mcpu=arm1176jzf-s
-ffreestanding
)
# set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
-mcpu=arm1176jzf-s
-mfpu=none
-mfloat-abi=soft
-ffreestanding
)
#set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "iar")
message(FATAL_ERROR "IAR not supported")

endif ()
21 changes: 21 additions & 0 deletions examples/build_system/cmake/cpu/arm926ej-s.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if (TOOLCHAIN STREQUAL "gcc")
set(TOOLCHAIN_COMMON_FLAGS
-mcpu=arm926ej-s
-ffreestanding
)
# set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
-mcpu=arm926ej-s
-mfpu=none
-mfloat-abi=soft
-ffreestanding
)
#set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "iar")
message(FATAL_ERROR "IAR not supported")

endif ()
17 changes: 17 additions & 0 deletions examples/build_system/cmake/cpu/cortex-a53.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if (TOOLCHAIN STREQUAL "gcc")
set(TOOLCHAIN_COMMON_FLAGS
-mcpu=cortex-a53
)
# set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
-mcpu=cortex-a53
)
#set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "iar")
message(FATAL_ERROR "IAR not supported")

endif ()
17 changes: 17 additions & 0 deletions examples/build_system/cmake/cpu/cortex-a72.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if (TOOLCHAIN STREQUAL "gcc")
set(TOOLCHAIN_COMMON_FLAGS
-mcpu=cortex-a72
)
# set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "clang")
set(TOOLCHAIN_COMMON_FLAGS
--target=arm-none-eabi
-mcpu=cortex-a72
)
#set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")

elseif (TOOLCHAIN STREQUAL "iar")
message(FATAL_ERROR "IAR not supported")

endif ()
21 changes: 21 additions & 0 deletions examples/build_system/cmake/toolchain/aarch64_gcc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if (NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER "aarch64-none-elf-gcc")
endif ()

if (NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER "aarch64-none-elf-g++")
endif ()

set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
set(CMAKE_SIZE "aarch64-none-elf-size" CACHE FILEPATH "")
set(CMAKE_OBJCOPY "aarch64-none-elf-objcopy" CACHE FILEPATH "")
set(CMAKE_OBJDUMP "aarch64-none-elf-objdump" CACHE FILEPATH "")

include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)

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")
cmake_print_variables(CMAKE_C_LINK_FLAGS)
endif ()
9 changes: 9 additions & 0 deletions examples/build_system/make/cpu/arm926ej-s.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
-mcpu=arm926ej-s \

else ifeq ($(TOOLCHAIN),iar)
#CFLAGS += --cpu cortex-a53
#ASFLAGS += --cpu cortex-a53

endif
2 changes: 2 additions & 0 deletions examples/device/audio_4_channel_mic_freertos/skip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ mcu:SAMX7X
mcu:VALENTYUSB_EPTRI
mcu:RAXXX
mcu:STM32L0
board:lpcxpresso11u37
board:lpcxpresso1347
family:broadcom_32bit
family:broadcom_64bit
8 changes: 8 additions & 0 deletions hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(CMAKE_SYSTEM_PROCESSOR arm1176jzf-s CACHE INTERNAL "System Processor")
#set(SUFFIX "")

function(update_board TARGET)
target_compile_definitions(${TARGET} PUBLIC
BCM_VERSION=2835
)
endfunction()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CPU_CORE = arm1176
CPU_CORE = arm1176jzf-s
CFLAGS += -DBCM_VERSION=2835 \
-DCFG_TUSB_MCU=OPT_MCU_BCM2835

Expand Down
Loading
Loading