Skip to content

Commit f1e006d

Browse files
authored
Merge pull request hathach#2137 from hathach/cmake-ra
enhance RA family
2 parents 942eb0f + d5d1b43 commit f1e006d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1636
-1184
lines changed

.github/workflows/build_arm.yml

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ jobs:
6767
repository: hathach/linkermap
6868
path: linkermap
6969

70-
- name: Checkout pico-sdk for rp2040
71-
if: matrix.family == 'rp2040'
72-
run: |
73-
git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
74-
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
75-
7670
- name: Get Dependencies
7771
run: python3 tools/get_deps.py ${{ matrix.family }}
7872

@@ -87,81 +81,3 @@ jobs:
8781
do
8882
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
8983
done
90-
91-
# Upload binaries for hardware test with self-hosted
92-
- name: Prepare stm32l412nucleo Artifacts
93-
if: contains(matrix.family, 'stm32l4')
94-
run: find examples/ -path "*stm32l412nucleo/*.elf" -exec mv {} . \;
95-
96-
- name: Upload Artifacts for stm32l412nucleo
97-
if: contains(matrix.family, 'stm32l4') && github.repository_owner == 'hathach'
98-
uses: actions/upload-artifact@v3
99-
with:
100-
name: stm32l4
101-
path: |
102-
*.elf
103-
104-
# # ---------------------------------------
105-
# # Hardware in the loop (HIL)
106-
# # Current self-hosted instance is running on an EPYC 7232 server hosted by HiFiPhile user
107-
# # - STM32L412 Nucleo with on-board jlink as ttyACM0
108-
# # ---------------------------------------
109-
# hw-stm32l412nucleo-test:
110-
# needs: build-arm
111-
# runs-on: [self-hosted, Linux, X64, hifiphile]
112-
#
113-
# steps:
114-
# - name: Clean workspace
115-
# run: |
116-
# echo "Cleaning up previous run"
117-
# rm -rf "${{ github.workspace }}"
118-
# mkdir -p "${{ github.workspace }}"
119-
#
120-
# - name: Download stm32l4 Artifacts
121-
# uses: actions/download-artifact@v3
122-
# with:
123-
# name: stm32l4
124-
#
125-
# - name: Create flash.sh
126-
# run: |
127-
# echo > flash.sh 'echo halt > flash.jlink'
128-
# echo >> flash.sh 'echo r >> flash.jlink'
129-
# echo >> flash.sh 'echo loadfile $1 >> flash.jlink'
130-
# echo >> flash.sh 'echo r >> flash.jlink'
131-
# echo >> flash.sh 'echo go >> flash.jlink'
132-
# echo >> flash.sh 'echo exit >> flash.jlink'
133-
# echo >> flash.sh 'cmdout=$(JLinkExe -device stm32l412kb -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink)'
134-
# echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
135-
# chmod +x flash.sh
136-
#
137-
# - name: Test cdc_dual_ports
138-
# run: |
139-
# ./flash.sh cdc_dual_ports.elf
140-
# while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
141-
# test -e /dev/ttyACM1 && echo "ttyACM1 exists"
142-
# test -e /dev/ttyACM2 && echo "ttyACM2 exists"
143-
#
144-
# # Debian does not auto mount usb drive. skip this test for now
145-
# - name: Test cdc_msc
146-
# if: false
147-
# run: |
148-
# ./flash.sh cdc_msc.elf
149-
# readme='/media/pi/TinyUSB MSC/README.TXT'
150-
# while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
151-
# test -e /dev/ttyACM1 && echo "ttyACM1 exists"
152-
# test -f "$readme" && echo "$readme exists"
153-
# cat "$readme"
154-
#
155-
# - name: Test dfu
156-
# run: |
157-
# ./flash.sh dfu.elf
158-
# while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
159-
# dfu-util -d cafe -a 0 -U dfu0
160-
# dfu-util -d cafe -a 1 -U dfu1
161-
# grep "TinyUSB DFU! - Partition 0" dfu0
162-
# grep "TinyUSB DFU! - Partition 1" dfu1
163-
#
164-
# - name: Test dfu_runtime
165-
# run: |
166-
# ./flash.sh dfu_runtime.elf
167-
# while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done

.github/workflows/cmake_arm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
- 'lpc18'
3939
- 'lpc55'
4040
- 'mcx'
41+
- 'ra'
4142
- 'rp2040'
4243
- 'stm32f0'
4344
- 'stm32f1'

.idea/cmake.xml

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/kl25.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/stm32g474.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hw/bsp/family_support.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${FAMILY}/family.cmake)
3636
message(FATAL_ERROR "Family '${FAMILY}' is not known/supported")
3737
endif()
3838

39+
# enable LTO if supported
40+
include(CheckIPOSupported)
41+
check_ipo_supported(RESULT IPO_SUPPORTED)
42+
if (IPO_SUPPORTED)
43+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
44+
endif ()
45+
3946
set(WARNING_FLAGS_GNU
4047
-Wall
4148
-Wextra

hw/bsp/imxrt/family.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
1616

1717
set(FAMILY_MCUS MIMXRT1XXX CACHE INTERNAL "")
1818

19-
# enable LTO if supported
20-
include(CheckIPOSupported)
21-
check_ipo_supported(RESULT IPO_SUPPORTED)
22-
if (IPO_SUPPORTED)
23-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
24-
endif ()
25-
2619

2720
#------------------------------------
2821
# BOARD_TARGET

hw/bsp/kinetis_kl/family.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
1616

1717
set(FAMILY_MCUS KINETIS_KL CACHE INTERNAL "")
1818

19-
# enable LTO if supported
20-
include(CheckIPOSupported)
21-
check_ipo_supported(RESULT IPO_SUPPORTED)
22-
if (IPO_SUPPORTED)
23-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
24-
endif ()
25-
2619

2720
#------------------------------------
2821
# BOARD_TARGET

hw/bsp/lpc18/family.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
1515

1616
set(FAMILY_MCUS LPC18XX CACHE INTERNAL "")
1717

18-
# enable LTO if supported
19-
include(CheckIPOSupported)
20-
check_ipo_supported(RESULT IPO_SUPPORTED)
21-
if (IPO_SUPPORTED)
22-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
23-
endif ()
24-
2518

2619
#------------------------------------
2720
# BOARD_TARGET

hw/bsp/mcx/family.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
1616

1717
set(FAMILY_MCUS MCXN9 CACHE INTERNAL "")
1818

19-
# enable LTO if supported
20-
include(CheckIPOSupported)
21-
check_ipo_supported(RESULT IPO_SUPPORTED)
22-
if (IPO_SUPPORTED)
23-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
24-
endif ()
25-
2619

2720
#------------------------------------
2821
# BOARD_TARGET

hw/bsp/nrf/family.cmake

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
2323

2424
set(FAMILY_MCUS NRF5X CACHE INTERNAL "")
2525

26-
# enable LTO if supported
27-
include(CheckIPOSupported)
28-
check_ipo_supported(RESULT IPO_SUPPORTED)
29-
if (IPO_SUPPORTED)
30-
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
31-
endif ()
3226

3327
#------------------------------------
3428
# BOARD_TARGET
@@ -124,8 +118,6 @@ function(family_configure_example TARGET RTOS)
124118
)
125119
target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
126120

127-
128-
129121
# Link dependencies
130122
target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
131123

0 commit comments

Comments
 (0)