From bcd8c9f4eb995ae9bca46530af2c75096839dc75 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 13:04:47 +0100 Subject: [PATCH 1/9] examples: cortex-m: Renamed the coroLab base.oil file from the baseCMake example to baseCMake.oil to simplify the CI. Also improved the .gitignore. Signed-off-by: Adrien Ricciardi --- .../armv7em/stm32f303/coroLab/baseCMake/.gitignore | 10 ++++++---- .../armv7em/stm32f303/coroLab/baseCMake/README.md | 2 +- .../coroLab/baseCMake/{base.oil => baseCMake.oil} | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) rename examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/{base.oil => baseCMake.oil} (98%) diff --git a/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/.gitignore b/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/.gitignore index 7b1c18666..c55798e22 100644 --- a/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/.gitignore +++ b/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/.gitignore @@ -1,8 +1,10 @@ -base -build -*.elf +baseCMake/ +build/ *.bin +*.elf *.map *.py .vscode -CMakeLists.txt +CMake* +cmake* +Makefile diff --git a/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/README.md b/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/README.md index 73decdcd8..53494d310 100644 --- a/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/README.md +++ b/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/README.md @@ -5,7 +5,7 @@ * TaskB4 to TaskB7, depending on the button pressed. ` -goil --target=cortex-m/armv7em/stm32f303/coroLabBoard --templates=../../../../../../goil/templates/ base.oil +goil --target=cortex-m/armv7em/stm32f303/coroLabBoard --templates=../../../../../../goil/templates/ baseCMake.oil ` This example uses CMake to build binary and add VSCode integration. VSCode requires extensions: diff --git a/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/base.oil b/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/baseCMake.oil similarity index 98% rename from examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/base.oil rename to examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/baseCMake.oil index 0d4f38346..4fd880526 100644 --- a/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/base.oil +++ b/examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/baseCMake.oil @@ -22,7 +22,7 @@ CPU blink { TRAMPOLINE_BASE_PATH = "../../../../../.."; APP_CPPSRC = "blink.cpp"; APP_CPPSRC = "buttonTasks.cpp"; - APP_NAME = "base.elf"; + APP_NAME = "baseCMake.elf"; CFLAGS = "-Os -fstack-usage -Wno-strict-aliasing"; LIBRARY = coroBoard; LDFLAGS = "-Map=blink.map"; From e2915f91ebf5bf38521f80c0c3af126ff8818d76 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 15:25:28 +0100 Subject: [PATCH 2/9] examples: cortex-m: Improved coroLab 'traces' example .gitignore. Signed-off-by: Adrien Ricciardi --- .../armv7em/stm32f303/coroLab/trace/.gitignore | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/cortex-m/armv7em/stm32f303/coroLab/trace/.gitignore b/examples/cortex-m/armv7em/stm32f303/coroLab/trace/.gitignore index 92ebbdfff..e30f04f50 100644 --- a/examples/cortex-m/armv7em/stm32f303/coroLab/trace/.gitignore +++ b/examples/cortex-m/armv7em/stm32f303/coroLab/trace/.gitignore @@ -1,8 +1,10 @@ -trace -build -*.elf +build/ +trace/ *.bin +*.elf *.map *.py .vscode -CMakeLists.txt +CMake* +cmake* +Makefile From 4f20587a45550fa271c3c9a8d4a6e587875ec29a Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 13:08:31 +0100 Subject: [PATCH 3/9] ci: Added Cortex-M coroLab STM32F303 examples build. Signed-off-by: Adrien Ricciardi --- .github/workflows/build-examples.yaml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/build-examples.yaml b/.github/workflows/build-examples.yaml index 80516f072..9dad52bf9 100644 --- a/.github/workflows/build-examples.yaml +++ b/.github/workflows/build-examples.yaml @@ -267,6 +267,37 @@ jobs: run: ./make.py working-directory: examples/cortex-m/armv7m/SmartFusion2/starterKit/${{ matrix.example_name }} + cortex-m-corolab-f303-examples: + name: Build Cortex-M coroLab-F303 examples + runs-on: ubuntu-22.04 + needs: goil-linux + strategy: + matrix: + example_name: [base, baseCMake, trace] + steps: + - name: Install ARM toolchain + run: | + sudo apt update + sudo apt install -y gcc-arm-none-eabi + - name: Retrieve sources and Goil binary + uses: actions/cache/restore@v3 + with: + path: ${{ github.workspace }} + key: ${{ env.CACHE_KEY }} + - name: Generate the code + run: ${{ env.GOIL }} --target=cortex-m/armv7em/stm32f303/coroLabBoard --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil + working-directory: examples/cortex-m/armv7em/stm32f303/coroLab/${{ matrix.example_name }} + - name: Build the code + run: | + if [ -e CMakeLists.txt ] + then + cmake . + make -j $(nproc) + else + ./make.py + fi + working-directory: examples/cortex-m/armv7em/stm32f303/coroLab/${{ matrix.example_name }} + cortex-m-smart-nucleo-f303-examples: name: Build Cortex-M Nucleo-F303 examples runs-on: ubuntu-22.04 From 9490a9d81d40c1b248b4af482e004f738eeef34c Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 15:48:13 +0100 Subject: [PATCH 4/9] examples: cortex-m: Renamed the STM32F4 DISCOVERY readbutton_isr.oil file from the readbutton_isr1 example to readbutton_isr1.oil to simplify the CI. Signed-off-by: Adrien Ricciardi --- .../stm32f407/stm32f4discovery/readbutton_isr1/.gitignore | 2 +- .../stm32f407/stm32f4discovery/readbutton_isr1/README.md | 4 ++-- .../{readbutton_isr.oil => readbutton_isr1.oil} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/{readbutton_isr.oil => readbutton_isr1.oil} (98%) diff --git a/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/.gitignore b/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/.gitignore index c05de9b7f..68b5815ed 100644 --- a/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/.gitignore +++ b/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/.gitignore @@ -1,4 +1,4 @@ -readbutton_isr +readbutton_isr1 build *_exe *.bin diff --git a/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/README.md b/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/README.md index 5784ee8c4..4023ca934 100644 --- a/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/README.md +++ b/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/README.md @@ -1,9 +1,9 @@ -|=-----=[ readbutton_isr example ]=-----=| +|=-----=[ readbutton_isr1 example ]=-----=| This application deals with ISR1, with the same EXTI handler. Configure the application with: ``` -goil --target=cortex-m/armv7em/stm32f407/stm32f4discovery --templates=../../../../../../goil/templates/ readbutton_isr.oil +goil --target=cortex-m/armv7em/stm32f407/stm32f4discovery --templates=../../../../../../goil/templates/ readbutton_isr1.oil ``` diff --git a/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/readbutton_isr.oil b/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/readbutton_isr1.oil similarity index 98% rename from examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/readbutton_isr.oil rename to examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/readbutton_isr1.oil index 877778436..597800e22 100644 --- a/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/readbutton_isr.oil +++ b/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/readbutton_isr1/readbutton_isr1.oil @@ -19,7 +19,7 @@ CPU readbutton_isr { BUILD = TRUE { TRAMPOLINE_BASE_PATH = "../../../../../.."; APP_SRC = "readbutton_isr.c"; - APP_NAME = "readbutton_isr_exe"; + APP_NAME = "readbutton_isr1_exe"; CFLAGS = "-O0"; LDFLAGS = "-Map=readbutton_isr.map"; COMPILER = "arm-none-eabi-gcc"; From 07da75cc0aca6a6b4ccb321565214d359167ea45 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 15:50:44 +0100 Subject: [PATCH 5/9] ci: Added the remaining Cortex-M STM32F4 DISCOVERY examples to the build as they are working now. Signed-off-by: Adrien Ricciardi --- .github/workflows/build-examples.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-examples.yaml b/.github/workflows/build-examples.yaml index 9dad52bf9..a294c5569 100644 --- a/.github/workflows/build-examples.yaml +++ b/.github/workflows/build-examples.yaml @@ -354,8 +354,7 @@ jobs: needs: goil-linux strategy: matrix: - # List only the examples that currently compile - example_name: [blink, readbutton, testDisableEnable] + example_name: [alarms, blink, readbutton, readbutton_isr, readbutton_isr1, testDisableEnable, timer] steps: - name: Install ARM toolchain run: | From 21273f52d763373c28f0248c95a58f1694b1fe5b Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 15:58:32 +0100 Subject: [PATCH 6/9] ci: Added the remaining Cortex-M Nucleo STM32L432 examples to the build as they are working now. Signed-off-by: Adrien Ricciardi --- .github/workflows/build-examples.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-examples.yaml b/.github/workflows/build-examples.yaml index a294c5569..24ff0435a 100644 --- a/.github/workflows/build-examples.yaml +++ b/.github/workflows/build-examples.yaml @@ -329,8 +329,7 @@ jobs: needs: goil-linux strategy: matrix: - # List only the examples that currently compile - example_name: [blink, readbutton, serial] + example_name: [blink, readbutton, readbutton_isr, serial, trace] steps: - name: Install ARM toolchain run: | From 0074b91600328be0fcadd2f65eb649d40ab20c69 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 16:03:11 +0100 Subject: [PATCH 7/9] ci: Added the remaining Cortex-M Nucleo STM32F303 examples to the build as they are working now. Signed-off-by: Adrien Ricciardi --- .github/workflows/build-examples.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-examples.yaml b/.github/workflows/build-examples.yaml index 24ff0435a..93f8af885 100644 --- a/.github/workflows/build-examples.yaml +++ b/.github/workflows/build-examples.yaml @@ -304,8 +304,7 @@ jobs: needs: goil-linux strategy: matrix: - # List only the examples that currently compile - example_name: [blink, serial] + example_name: [blink, readbutton_isr, serial, trace] steps: - name: Install ARM toolchain run: | From c98d4e2ce853bc7fd8438b52723e3849e94922a4 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 16:09:01 +0100 Subject: [PATCH 8/9] examples: cortex-m: Renamed the SmartFusion2 'fpgaInterrupt' example directory to 'blinkAndFPGA' to simplify the CI. Signed-off-by: Adrien Ricciardi --- .../starterKit/{fpgaInterrupt => blinkAndFPGA}/.gitignore | 0 .../starterKit/{fpgaInterrupt => blinkAndFPGA}/README.md | 0 .../starterKit/{fpgaInterrupt => blinkAndFPGA}/blinkAndFPGA.c | 0 .../starterKit/{fpgaInterrupt => blinkAndFPGA}/blinkAndFPGA.oil | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename examples/cortex-m/armv7m/SmartFusion2/starterKit/{fpgaInterrupt => blinkAndFPGA}/.gitignore (100%) rename examples/cortex-m/armv7m/SmartFusion2/starterKit/{fpgaInterrupt => blinkAndFPGA}/README.md (100%) rename examples/cortex-m/armv7m/SmartFusion2/starterKit/{fpgaInterrupt => blinkAndFPGA}/blinkAndFPGA.c (100%) rename examples/cortex-m/armv7m/SmartFusion2/starterKit/{fpgaInterrupt => blinkAndFPGA}/blinkAndFPGA.oil (100%) diff --git a/examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/.gitignore b/examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/.gitignore similarity index 100% rename from examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/.gitignore rename to examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/.gitignore diff --git a/examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/README.md b/examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/README.md similarity index 100% rename from examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/README.md rename to examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/README.md diff --git a/examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/blinkAndFPGA.c b/examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/blinkAndFPGA.c similarity index 100% rename from examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/blinkAndFPGA.c rename to examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/blinkAndFPGA.c diff --git a/examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/blinkAndFPGA.oil b/examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/blinkAndFPGA.oil similarity index 100% rename from examples/cortex-m/armv7m/SmartFusion2/starterKit/fpgaInterrupt/blinkAndFPGA.oil rename to examples/cortex-m/armv7m/SmartFusion2/starterKit/blinkAndFPGA/blinkAndFPGA.oil From eed014ef9cb90e627f094ce046789635490ce81c Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Fri, 1 Dec 2023 16:10:14 +0100 Subject: [PATCH 9/9] ci: Added the remaining Cortex-M SmartFusion2 examples to the build as they are working now. Signed-off-by: Adrien Ricciardi --- .github/workflows/build-examples.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-examples.yaml b/.github/workflows/build-examples.yaml index 93f8af885..67d7bf195 100644 --- a/.github/workflows/build-examples.yaml +++ b/.github/workflows/build-examples.yaml @@ -248,8 +248,7 @@ jobs: needs: goil-linux strategy: matrix: - # List only the examples that currently compile - example_name: [blink] + example_name: [blink, blinkAndFPGA] steps: - name: Install ARM toolchain run: |