From 2de126b0eaea14403bcaefb97caef7dd675e00b4 Mon Sep 17 00:00:00 2001 From: Sebastien Merle Date: Thu, 5 Dec 2024 00:52:58 +0100 Subject: [PATCH 1/4] Add support for GRiSP Nano --- src/grisp_tools_step.erl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/grisp_tools_step.erl b/src/grisp_tools_step.erl index cb08a6e..48ea680 100644 --- a/src/grisp_tools_step.erl +++ b/src/grisp_tools_step.erl @@ -124,6 +124,19 @@ collect(#{project_root := Root, platform := Platform, mapz:deep_put([build, hash], #{value => Hash, index => HashIndex}, S3). toolchain(#{paths := #{toolchain := {docker, _}}} = S0) -> S0; +toolchain(#{platform := grisp_nano, + paths := #{toolchain := {directory, ToolchainRoot}}} = S0) -> + [error({toolchain_root_invalid, ToolchainRoot}) || not filelib:is_dir(ToolchainRoot)], + Files = [ + ["GRISP_TOOLCHAIN_REVISION"], + ["GRISP_TOOLCHAIN_PLATFORM"], + ["grisp_buildinfo.hrl"], + ["arm-rtems6"], + ["arm-rtems6", "stm32u5-grisp-nano"], + ["bin","arm-rtems6-gcc"] + ], + [ check_toolchain_file([ToolchainRoot|File]) || File <- Files], + S0; toolchain(#{paths := #{toolchain := {directory, ToolchainRoot}}} = S0) -> [error({toolchain_root_invalid, ToolchainRoot}) || not filelib:is_dir(ToolchainRoot)], Files = [ From b25347d083dca889708a1f25bca4456316413465 Mon Sep 17 00:00:00 2001 From: Sebastien Merle Date: Thu, 29 May 2025 11:06:41 +0200 Subject: [PATCH 2/4] Update the preloaded module before build --- src/grisp_tools_build.erl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/grisp_tools_build.erl b/src/grisp_tools_build.erl index a908f7f..99543a7 100644 --- a/src/grisp_tools_build.erl +++ b/src/grisp_tools_build.erl @@ -45,6 +45,7 @@ run(Configuration) -> ]}, {compile, [ fun configure/1, + fun update_preloaded/1, fun boot/1, fun install/1, fun post/1 @@ -190,6 +191,10 @@ configure(#{build := Build, otp_version := {[Ver | _], _, _, _}} = S0) -> event(S0, ['_skip']) end. +update_preloaded(State0) -> + Opts = [{cd, mapz:deep_get([paths, build], State0)}], + build_step("./otp_build update_preloaded --no-commit", Opts, State0). + boot(State0) -> Opts = [{cd, mapz:deep_get([paths, build], State0)}], build_step("./otp_build boot -a", Opts, State0). From e7406bac613dd8eb974e86b287aa741b865949e5 Mon Sep 17 00:00:00 2001 From: Sebastien Merle Date: Mon, 16 Jun 2025 16:46:47 +0200 Subject: [PATCH 3/4] Add prebuilt update option --- src/grisp_tools_build.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/grisp_tools_build.erl b/src/grisp_tools_build.erl index 99543a7..78abfe3 100644 --- a/src/grisp_tools_build.erl +++ b/src/grisp_tools_build.erl @@ -191,9 +191,11 @@ configure(#{build := Build, otp_version := {[Ver | _], _, _, _}} = S0) -> event(S0, ['_skip']) end. -update_preloaded(State0) -> +update_preloaded(#{build := #{flags := #{update_prebuild := true}}} = State0) -> Opts = [{cd, mapz:deep_get([paths, build], State0)}], - build_step("./otp_build update_preloaded --no-commit", Opts, State0). + build_step("./otp_build update_preloaded --no-commit", Opts, State0); +update_preloaded(State0) -> + event(State0, ['_skip']). boot(State0) -> Opts = [{cd, mapz:deep_get([paths, build], State0)}], From db76177124cb6545ae89fdfb422b165a846f2b64 Mon Sep 17 00:00:00 2001 From: Sebastien Merle Date: Wed, 18 Jun 2025 17:00:21 +0200 Subject: [PATCH 4/4] Fix CI --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77bf4b2..17c49a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,28 +7,28 @@ on: jobs: ci: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 name: Erlang ${{matrix.otp}} / rebar ${{matrix.rebar3}} strategy: matrix: - otp: ['25', '26', '27'] + otp: ['26', '27'] rebar3: ['3'] # latest rebar3 versions that do not give problems with selected OTPs include: - - otp: '23' - rebar3: '3.20.0' - otp: '24' rebar3: '3.23.0' + - otp: '25' + rebar3: '3.24.0' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{matrix.otp}} rebar3-version: ${{matrix.rebar3}} - - uses: actions/cache@v2 + - uses: actions/cache@v4 env: cache-name: rebar3 with: