enable cmake build for f4 and h5
This commit is contained in:
parent
6772b26b29
commit
2a0b51b32a
6 changed files with 75 additions and 17 deletions
24
.github/actions/setup_toolchain/action.yml
vendored
24
.github/actions/setup_toolchain/action.yml
vendored
|
|
@ -32,18 +32,10 @@ runs:
|
|||
- name: Get Toolchain URL
|
||||
if: >-
|
||||
inputs.toolchain != 'arm-gcc' &&
|
||||
inputs.toolchain != 'arm-iar' &&
|
||||
inputs.toolchain != 'esp-idf'
|
||||
id: set-toolchain-url
|
||||
run: |
|
||||
TOOLCHAIN_JSON='{
|
||||
"aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
|
||||
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz",
|
||||
"msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
|
||||
"riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
|
||||
"rx-gcc": "http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run"
|
||||
}'
|
||||
TOOLCHAIN_URL=$(echo $TOOLCHAIN_JSON | jq -r '.["${{ inputs.toolchain }}"]')
|
||||
TOOLCHAIN_URL=$(jq -r '."${{ inputs.toolchain }}"' .github/actions/setup_toolchain/toolchain.json)
|
||||
echo "toolchain_url=$TOOLCHAIN_URL"
|
||||
echo "toolchain_url=$TOOLCHAIN_URL" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
|
@ -51,9 +43,21 @@ runs:
|
|||
- name: Download Toolchain
|
||||
if: >-
|
||||
inputs.toolchain != 'arm-gcc' &&
|
||||
inputs.toolchain != 'arm-iar' &&
|
||||
inputs.toolchain != 'esp-idf'
|
||||
uses: ./.github/actions/setup_toolchain/download
|
||||
with:
|
||||
toolchain: ${{ inputs.toolchain }}
|
||||
toolchain_url: ${{ steps.set-toolchain-url.outputs.toolchain_url }}
|
||||
|
||||
- name: Set toolchain option
|
||||
id: set-toolchain-option
|
||||
run: |
|
||||
BUILD_OPTION=""
|
||||
if [[ "${{ inputs.toolchain }}" == *"clang"* ]]; then
|
||||
BUILD_OPTION="--toolchain clang"
|
||||
elif [[ "${{ inputs.toolchain }}" == "arm-iar" ]]; then
|
||||
BUILD_OPTION="--toolchain iar"
|
||||
fi
|
||||
echo "build_option=$BUILD_OPTION"
|
||||
echo "build_option=$BUILD_OPTION" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -23,11 +23,25 @@ runs:
|
|||
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p ~/cache/${{ inputs.toolchain }}
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
|
||||
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
|
||||
|
||||
if [[ ${{ inputs.toolchain }} == rx-gcc ]]; then
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.run
|
||||
chmod +x toolchain.run
|
||||
./toolchain.run -p ~/cache/${{ inputs.toolchain }}/gnurx -y
|
||||
elif [[ ${{ inputs.toolchain }} == arm-iar ]]; then
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O ~/cache/${{ inputs.toolchain }}/cxarm.deb
|
||||
else
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
|
||||
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Set Toolchain Path
|
||||
- name: Setup Toolchain
|
||||
run: |
|
||||
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
|
||||
if [[ ${{ inputs.toolchain }} == arm-iar ]]; then
|
||||
sudo apt-get install -y ~/cache/${{ inputs.toolchain }}/cxarm.deb
|
||||
echo >> $GITHUB_PATH "/opt/iar/cxarm/arm/bin"
|
||||
else
|
||||
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
|
||||
fi
|
||||
shell: bash
|
||||
|
|
|
|||
9
.github/actions/setup_toolchain/toolchain.json
vendored
Normal file
9
.github/actions/setup_toolchain/toolchain.json
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
|
||||
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
|
||||
"arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v14.2.1-1.1/xpack-arm-none-eabi-gcc-14.2.1-1.1-linux-x64.tar.gz",
|
||||
"msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
|
||||
"riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
|
||||
"rx-gcc": "https://github.com/hathach/rx_device/releases/download/0.0.1/gcc-8.3.0.202411-GNURX-ELF.run",
|
||||
"arm-iar": "https://netstorage.iar.com/FileStore/STANDARD/001/003/583/cxarm-9.60.4.deb"
|
||||
}
|
||||
11
.github/workflows/build_util.yml
vendored
11
.github/workflows/build_util.yml
vendored
|
|
@ -51,9 +51,14 @@ jobs:
|
|||
- name: Build
|
||||
if: inputs.toolchain != 'esp-idf'
|
||||
run: |
|
||||
make -C ports/${{ inputs.port }} BOARD=${{ matrix.board }} all self-update copy-artifact
|
||||
if [ -d "ports/${{ inputs.port }}/apps" ]; then
|
||||
for app in ports/${{ inputs.port }}/apps/*/; do if [ $app != 'apps/self_update/' ]; then make -C $app BOARD=${{ matrix.board }} all; fi done
|
||||
if [[ ${{ inputs.build-system }} == cmake ]]; then
|
||||
cmake -B build -G Ninja -DBOARD=${{ matrix.board }} ports/${{ inputs.port }}
|
||||
cmake --build build
|
||||
else
|
||||
make -C ports/${{ inputs.port }} BOARD=${{ matrix.board }} all self-update copy-artifact
|
||||
if [ -d "ports/${{ inputs.port }}/apps" ]; then
|
||||
for app in ports/${{ inputs.port }}/apps/*/; do if [ $app != 'apps/self_update/' ]; then make -C $app BOARD=${{ matrix.board }} all; fi done
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Build using ESP-IDF docker
|
||||
|
|
|
|||
13
.idea/debugServers/imxrt1011.xml
Normal file
13
.idea/debugServers/imxrt1011.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<component name="DebugServers">
|
||||
<jlink-debug-target name="imxrt1011" uniqueID="c89c1f7c-1ad4-4697-81c0-0dd105e56880">
|
||||
<debugger version="1">
|
||||
<debugger kind="GDB" isBundled="true" />
|
||||
<env />
|
||||
</debugger>
|
||||
<gdbserver exe="/usr/bin/JLinkGDBServerCLExe" />
|
||||
<console port="19021" />
|
||||
<target device="MIMXRT1011xxx5A" reset-before="false" frequency="16000" />
|
||||
<connection extended-remote="false" port="4444" warmup-ms="500" />
|
||||
<swo />
|
||||
</jlink-debug-target>
|
||||
</component>
|
||||
13
.idea/debugServers/stm32f411.xml
Normal file
13
.idea/debugServers/stm32f411.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<component name="DebugServers">
|
||||
<jlink-debug-target name="stm32f411" uniqueID="a5715613-24cc-4e22-b0c6-21af297cb4cc" selected="true">
|
||||
<debugger version="1">
|
||||
<debugger kind="GDB" isBundled="true" />
|
||||
<env />
|
||||
</debugger>
|
||||
<gdbserver exe="/usr/bin/JLinkGDBServerCLExe" />
|
||||
<console port="19021" />
|
||||
<target device="STM32F411VE" reset-before="false" />
|
||||
<connection extended-remote="false" port="4444" warmup-ms="500" />
|
||||
<swo />
|
||||
</jlink-debug-target>
|
||||
</component>
|
||||
Loading…
Reference in a new issue