Skip to content

Commit

Permalink
Merge pull request #157 from RICCIARDI-Adrien/ci_add_remaining_cortex…
Browse files Browse the repository at this point in the history
…_m_examples_build

CI: Added the remaining Cortex-M examples builds.
  • Loading branch information
RICCIARDI-Adrien authored Dec 4, 2023
2 parents faff619 + eed014e commit df31a2c
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 22 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/build-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -267,14 +266,44 @@ 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
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: |
Expand All @@ -298,8 +327,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: |
Expand All @@ -323,8 +351,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: |
Expand Down
10 changes: 6 additions & 4 deletions examples/cortex-m/armv7em/stm32f303/coroLab/baseCMake/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
base
build
*.elf
baseCMake/
build/
*.bin
*.elf
*.map
*.py
.vscode
CMakeLists.txt
CMake*
cmake*
Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
10 changes: 6 additions & 4 deletions examples/cortex-m/armv7em/stm32f303/coroLab/trace/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
trace
build
*.elf
build/
trace/
*.bin
*.elf
*.map
*.py
.vscode
CMakeLists.txt
CMake*
cmake*
Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
readbutton_isr
readbutton_isr1
build
*_exe
*.bin
Expand Down
Original file line number Diff line number Diff line change
@@ -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
```
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit df31a2c

Please sign in to comment.