Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,19 @@ jobs:
- name: Build targets
shell: nix develop .#ci -c bash -e {0}
run: |
make
make RNG=NISTKAT nistkat
make_platform() {
echo "::group::make platform $1"
make PLATFORM="$1"
echo "::endgroup::"

echo "::group::make platform $1 nistkat"
make PLATFORM="$1" RNG=NISTKAT nistkat
echo "::endgroup::"
}

make_platform stm32f4discovery
make_platform nucleo-f767zi

- name: Build for emulation on QEMU
shell: nix develop .#ci -c bash -e {0}
run: |
Expand All @@ -38,15 +49,15 @@ jobs:
id: func_test
shell: nix develop .#ci -c bash -e {0}
run: |
tests func -e -v stm32f4discovery
tests func -v mps2-an386
- name: Speed test
id: speed_test
shell: nix develop .#ci -c bash -e {0}
if: |
success()
|| steps.func_test.conclusion == 'failure'
run: |
tests speed -e -v stm32f4discovery
tests speed -v mps2-an386
- name: Stack test
id: stack_test
shell: nix develop .#ci -c bash -e {0}
Expand All @@ -55,7 +66,7 @@ jobs:
|| steps.func_test.conclusion == 'failure'
|| steps.speed_test.conclusion == 'failure'
run: |
tests stack -e -v stm32f4discovery
tests stack -v mps2-an386
- name: Nistkat test
shell: nix develop .#ci -c bash -e {0}
if: |
Expand All @@ -64,4 +75,4 @@ jobs:
|| steps.speed_test.conclusion == 'failure'
|| steps.stack_test.conclusion == 'failure'
run: |
tests nistkat -e -v stm32f4discovery
tests nistkat -v mps2-an386
51 changes: 28 additions & 23 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,39 @@
perSystem = { pkgs, ... }:
let
libopencm3 = pkgs.callPackage ./libopencm3.nix {
targets = [ "stm32/f4" ];
targets = [ "stm32/f4" "stm32/f7" ];
};
core = with pkgs; [
# formatter & linters
nixpkgs-fmt
shfmt
astyle # 3.4.10
core = builtins.attrValues {
libopencm3 = libopencm3;

# build dependencies
gcc-arm-embedded-13 # arm-gnu-toolchain-13.2.rel1
python311
qemu # 8.1.5
libopencm3
inherit (pkgs)
# formatter & linters
nixpkgs-fmt
shfmt
astyle# 3.4.10

yq
python311Packages.pyserial # 3.5
python311Packages.click
];
# build dependencies
gcc-arm-embedded-13# arm-gnu-toolchain-13.2.rel1
python311
qemu# 8.1.5

yq;

inherit (pkgs.python311Packages)
pyserial# 3.5
click;
};
in
{
devShells.default = with pkgs; mkShellNoCC {
packages = core ++ [
direnv
nix-direnv
devShells.default = pkgs.mkShellNoCC {
packages = core ++ builtins.attrValues {
inherit (pkgs)
direnv
nix-direnv

# debug dependencies
openocd # 0.12.0
];
# debug dependencies
openocd; # 0.12.0
};

shellHook = ''
export OPENCM3_DIR=${libopencm3}
Expand All @@ -55,7 +60,7 @@
'';
};

devShells.ci = with pkgs; mkShellNoCC {
devShells.ci = pkgs.mkShellNoCC {
packages = core;

shellHook = ''
Expand Down
2 changes: 2 additions & 0 deletions hal/devices.data
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
stm32f407vg stm32f4 ROM=1024K RAM=128K
stm32f4 END ROM_OFF=0x08000000 RAM_OFF=0x20000000 CPU=cortex-m4 FPU=hard-fpv4-sp-d16
stm32f767zi stm32f7 ROM=2048K RAM=384K
stm32f7 END ROM_OFF=0x08000000 RAM_OFF=0x20010000 CPU=cortex-m7 FPU=hard-fpv5-sp-d16
Loading