From 3599f10d7c9d8edbe062d7cd892f767a4f6052aa Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Thu, 9 Jul 2026 12:20:26 +0200 Subject: [PATCH] Add workflow for building examples with GCC --- .github/workflows/Build_GCC.yml | 82 +++++++++++++++++++ .../linker_gnu_mram.ld.src | 4 +- .../linker_gnu_mram.ld.src | 4 +- README.md | 2 + vcpkg-configuration.json | 6 +- 5 files changed, 92 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/Build_GCC.yml diff --git a/.github/workflows/Build_GCC.yml b/.github/workflows/Build_GCC.yml new file mode 100644 index 0000000..5d77e36 --- /dev/null +++ b/.github/workflows/Build_GCC.yml @@ -0,0 +1,82 @@ +# Copyright (c) 2026 Arm Limited (or its affiliates). All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Build examples with GCC +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + CI: + runs-on: ubuntu-24.04 + + strategy: + fail-fast: false + matrix: + config: + [ # example directory, project, build-type, target-type, toolchain + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Debug, target-type: AppKit-E7-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Release, target-type: AppKit-E7-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: AlgorithmTest, build-type: Debug, target-type: AppKit-E7-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Debug, target-type: SSE-300-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: DataTest, build-type: Release, target-type: SSE-300-U55, toolchain: GCC }, + { dir: ./Alif/AppKit-E7_USB, project: AlgorithmTest, build-type: Debug, target-type: SSE-300-U55, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Debug, target-type: DevKit-E8-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Release, target-type: DevKit-E8-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: AlgorithmTest, build-type: Debug, target-type: DevKit-E8-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Debug, target-type: SSE-320-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: DataTest, build-type: Release, target-type: SSE-320-U85, toolchain: GCC }, + { dir: ./Alif/DevKit-E8_ETH, project: AlgorithmTest, build-type: Debug, target-type: SSE-320-U85, toolchain: GCC } + ] + + steps: + - name: Checkout this repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: Install vcpkg + uses: ARM-software/cmsis-actions/setup-vcpkg@v1 + with: + version: 2026.04.27 + + - name: Install required tools + uses: ARM-software/cmsis-actions/vcpkg@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 + with: + config: "./vcpkg-configuration.json" + cache: "Tools" + + - name: Activate Arm tool license + uses: ARM-software/cmsis-actions/armlm@8a50b77681a484568e08f31fb7c2285c4735f682 # v1.3 + + - name: Initialize CMSIS pack root folder + run: | + cpackget init https://www.keil.com/pack/index.pidx + cpackget update-index + + - name: Cache CMSIS packs + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + key: cmsis-packs-${{ hashFiles('**/*.csolution.yml', '**/*.cproject.yml', '**/*.clayer.yml') }} + restore-keys: | + cmsis-packs- + path: /home/runner/.cache/arm/packs + + - name: Build example in ${{matrix.config.dir}} for context ${{matrix.config.project}}.${{matrix.config.build-type}}+${{matrix.config.target-type}} with ${{matrix.config.toolchain}} toolchain + working-directory: ${{matrix.config.dir}} + run: | + cbuild SDS.csolution.yml --context ${{matrix.config.project}}.${{matrix.config.build-type}}+${{matrix.config.target-type}} --toolchain ${{matrix.config.toolchain}} --packs --update-rte diff --git a/Alif/AppKit-E7_USB/Board/AppKit-E7_M55_HP/RTE/Device/AE722F80F55D5LS_M55_HP/linker_gnu_mram.ld.src b/Alif/AppKit-E7_USB/Board/AppKit-E7_M55_HP/RTE/Device/AE722F80F55D5LS_M55_HP/linker_gnu_mram.ld.src index a1c5392..7dc4934 100644 --- a/Alif/AppKit-E7_USB/Board/AppKit-E7_M55_HP/RTE/Device/AE722F80F55D5LS_M55_HP/linker_gnu_mram.ld.src +++ b/Alif/AppKit-E7_USB/Board/AppKit-E7_M55_HP/RTE/Device/AE722F80F55D5LS_M55_HP/linker_gnu_mram.ld.src @@ -113,7 +113,6 @@ SECTIONS .code.at_itcm : ALIGN(8) { - *(.text*) *(.itcm*) /* Object targeting ITCM */ . = ALIGN(16); } > ITCM AT > MRAM @@ -167,6 +166,7 @@ SECTIONS *(.bss.lcd_frame_buf) /* LCD frame Buffer. */ *(.bss.camera_frame_buf) /* Camer Frame Buffer */ *(.bss.camera_frame_bayer_to_rgb_buf) /* (Optional) Camera Frame Buffer for Bayer to RGB Conversion. */ + *(.bss.*) } > SRAM0 #endif @@ -174,7 +174,6 @@ SECTIONS { __bss_start__ = .; *(.bss) - *(.bss.*) *(COMMON) . = ALIGN(8); @@ -261,6 +260,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + *(.text*) *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/Alif/DevKit-E8_ETH/Board/DevKit-E8_M55_HP/RTE/Device/AE822FA0E5597LS0_M55_HP/linker_gnu_mram.ld.src b/Alif/DevKit-E8_ETH/Board/DevKit-E8_M55_HP/RTE/Device/AE822FA0E5597LS0_M55_HP/linker_gnu_mram.ld.src index 263a7c6..2e38ba8 100644 --- a/Alif/DevKit-E8_ETH/Board/DevKit-E8_M55_HP/RTE/Device/AE822FA0E5597LS0_M55_HP/linker_gnu_mram.ld.src +++ b/Alif/DevKit-E8_ETH/Board/DevKit-E8_M55_HP/RTE/Device/AE822FA0E5597LS0_M55_HP/linker_gnu_mram.ld.src @@ -145,7 +145,6 @@ SECTIONS .code.at_itcm : ALIGN(8) { - *(.text*) *(.itcm*) /* Object targeting ITCM */ . = ALIGN(16); } > ITCM AT > MRAM @@ -175,6 +174,7 @@ SECTIONS *(.bss.lcd_frame_buf) /* LCD frame Buffer. */ *(.bss.camera_frame_buf) /* Camer Frame Buffer */ *(.bss.camera_frame_bayer_to_rgb_buf) /* (Optional) Camera Frame Buffer for Bayer to RGB Conversion. */ + *(.bss.*) } > SRAM0 #endif @@ -182,7 +182,6 @@ SECTIONS { __bss_start__ = .; *(.bss) - *(.bss.*) *(COMMON) . = ALIGN(8); @@ -269,6 +268,7 @@ SECTIONS *(SORT(.dtors.*)) *(.dtors) + *(.text*) *(.rodata*) KEEP(*(.eh_frame*)) diff --git a/README.md b/README.md index 1828640..8c2471c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![License](https://img.shields.io/github/license/Arm-Examples/Safety-Example-STM32?label)](https://github.com/Arm-Examples/Safety-Example-STM32/blob/main/LICENSE) [![Build_AC6](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Build_AC6.yml?logo=arm&logoColor=0091bd&label=Build%20examples%20with%20AC6)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Build_AC6.yml) +[![Build_GCC](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Build_GCC.yml?logo=arm&logoColor=0091bd&label=Build%20examples%20with%20GCC)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Build_GCC.yml) [![Test_Alif_E7](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Test_Alif_E7.yml?logo=arm&logoColor=0091bd&label=Test%20Alif%20AppKit-E7%20example)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Test_Alif_E7.yml) [![Test_Alif_E8](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Test_Alif_E8.yml?logo=arm&logoColor=0091bd&label=Test%20Alif%20DevKit-E8%20example)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Test_Alif_E8.yml) [![Test_ST_KeywordSpotting](https://img.shields.io/github/actions/workflow/status/Arm-Examples/SDS-Examples/Test_ST_KeywordSpotting.yml?logo=arm&logoColor=0091bd&label=Test%20ST%20Keyword%20Spotting)](https://github.com/Arm-Examples/SDS-Examples/tree/main/.github/workflows/Test_ST_KeywordSpotting.yml) @@ -68,6 +69,7 @@ Refer to [Understanding GitHub Actions](https://docs.github.com/en/actions/get-s |
CI Workflow
| Description | |--- |--- | | [Build_AC6](./.github/workflows/Build_AC6.yml) | Use Arm Compiler for Embedded (AC6) to create binaries for different configuration of targets, build types, and boards. | +| [Build_GCC](./.github/workflows/Build_GCC.yml) | Use GNU Arm Embedded Toolchain (GCC) to create binaries for different configuration of targets, build types, and boards. | | [Test_Alif_E7](./.github/workflows/Test_Alif_E7.yml) | Build the binary for an object detection algorithm and execute a regression test using an FVP model. Compare the original SDS recording with the newly generated recording produced during the simulator run. Store the build outputs and SDS recordings as workflow artifacts. | | [Test_Alif_E8](./.github/workflows/Test_Alif_E8.yml) | Build the binary for an object detection algorithm and execute a regression test using an FVP model. Compare the original SDS recording with the newly generated recording produced during the simulator run. Store the build outputs and SDS recordings as workflow artifacts. | | [Test_ST_KeywordSpotting](./.github/workflows/Test_ST_KeywordSpotting.yml) | Build the binary for a keyword spotting algorithm and execute a regression test using an FVP model. Compare the original SDS recording with the newly generated recording produced during the simulator run. Store the build outputs and SDS recordings as workflow artifacts. | diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index 51616a0..a3ec5f8 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -5,10 +5,12 @@ "location" : "https://artifacts.tools.arm.com/vcpkg-registry" } ], "requires" : { - "arm:tools/open-cmsis-pack/cmsis-toolbox" : "^2.13.0", - "arm:compilers/arm/armclang" : "^6.24.0", + "arm:tools/open-cmsis-pack/cmsis-toolbox" : "^2.14.1", "arm:tools/kitware/cmake" : "^4.3.3", "arm:tools/ninja-build/ninja" : "^1.12.1", + "arm:compilers/arm/armclang" : "^6.24.0", + "arm:compilers/arm/arm-none-eabi-gcc" : "14.3.1", + "arm:compilers/arm/llvm-embedded" : "22.1.0", "arm:models/arm/avh-fvp" : "^11.31.28" } }