Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #2

Closed
wants to merge 8 commits into from
Closed
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
33 changes: 33 additions & 0 deletions .github/workflows/an547-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: AN547 Tests M55
on:
pull_request:
branches: [ "main" ]
env:
USE_GCC: 1
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: install dependencies
run: sudo apt install gcc-arm-none-eabi qemu-system
- name: Test Hello World M55
run: |
make run-m55-an547-helloworld
- name: Test Kyber NTT M55
run: |
make run-m55-an547-ntt_kyber
- name: Test Dilithium NTT M55
run: |
make run-m55-an547-ntt_dilithium
- name: Test flt FFT M55
run: |
make run-m55-an547-flt_fft
- name: Test fx FFT M55
run: |
make run-m55-an547-fx_fft
- name: Test sqmag M55
run: |
make run-m55-an547-sqmag
27 changes: 27 additions & 0 deletions .github/workflows/core-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Core Tests M55
on:
pull_request:
branches: [ "main" ]
env:
USE_GCC: 1
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: install dependencies
run: sudo apt install gcc-arm-none-eabi qemu-system
- name: Test Kyber NTT M55
run: |
make run-m55-core-ntt_kyber
- name: Test Dilithium NTT M55
run: |
make run-m55-core-ntt_dilithium
- name: Test fx FFT M55
run: |
make run-m55-core-fx_fft
- name: Test flt FFT M55
run: |
make run-m55-core-flt_fft
2 changes: 1 addition & 1 deletion asm/manual/sqmag/cmplx_mag_sqr_fx.s
2 changes: 1 addition & 1 deletion asm/manual/sqmag/cmplx_mag_sqr_fx_opt_M55_unroll1.s
2 changes: 1 addition & 1 deletion asm/manual/sqmag/cmplx_mag_sqr_fx_opt_M55_unroll2.s
2 changes: 1 addition & 1 deletion asm/manual/sqmag/cmplx_mag_sqr_fx_opt_M55_unroll4.s
2 changes: 1 addition & 1 deletion asm/manual/sqmag/cmplx_mag_sqr_fx_opt_M85_unroll1.s
2 changes: 1 addition & 1 deletion asm/manual/sqmag/cmplx_mag_sqr_fx_opt_M85_unroll2.s
2 changes: 1 addition & 1 deletion asm/manual/sqmag/cmplx_mag_sqr_fx_opt_M85_unroll4.s
4 changes: 2 additions & 2 deletions envs/fvp-corstone300-mps2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ else # AC6 / GCC
# GCC toolchain

# Toolchain
CC=$(_GCC10_DIR)arm-none-eabi-gcc-10.2.1
LD=$(_GCC10_DIR)arm-none-eabi-gcc-10.2.1
CC=$(_GCC10_DIR)arm-none-eabi-gcc
LD=$(_GCC10_DIR)arm-none-eabi-gcc

CFLAGS = -mfloat-abi=softfp -march=armv8.1-m.main+mve -mcpu=cortex-m55 \
-I$(CMSIS_DEVICE)/Include \
Expand Down
9 changes: 6 additions & 3 deletions envs/m55-an547/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ SRC_DIR=./src

.phony: all clean run

CC=arm-none-eabi-gcc-12.2.1
CC=arm-none-eabi-gcc
LD := $(CC)


SYSROOT := $(shell $(CC) --print-sysroot)
CFLAGS += \
-O3 \
Expand Down Expand Up @@ -49,6 +48,8 @@ LDFLAGS += \

all: $(TARGET)

include src/platform/mps3-an547.mk

C_SRC_FILES_PRE=$(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/*/*.c) $(wildcard $(SRC_DIR)/*/*/*.c)
C_SRC_FILES=$(patsubst $(SRC_DIR)/%.c, %.c, $(C_SRC_FILES_PRE))

Expand All @@ -60,12 +61,14 @@ C_OBJ_FILES=$(patsubst %.c, $(BUILD_DIR)/%.o, $(C_SRC_FILES))
OBJ_FILES=$(ASM_OBJ_FILES) $(C_OBJ_FILES) $(CMSIS_OBJ_FILES)

$(C_OBJ_FILES): $(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
mkdir -p $(@D)
$(CC) $(CFLAGS) -c -o $@ $<

$(ASM_OBJ_FILES): $(BUILD_DIR)/%.o: $(SRC_DIR)/%.s
mkdir -p $(@D)
$(CC) -x assembler-with-cpp $(CFLAGS) -c -o $@ $<

test.elf: $(OBJS_DIR) $(OBJ_FILES) $(LDSCRIPT)
test.elf: $(OBJS_DIR) $(OBJ_FILES) $(LDSCRIPT) $(LIBDEPS)
$(LD) $(LDFLAGS) -o $@ $(OBJ_FILES)

%.bin: %.elf
Expand Down
30 changes: 4 additions & 26 deletions envs/m55-an547/src/platform/mps3-an547.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,11 @@ CPPFLAGS += \
--sysroot=$(SYSROOT) \
-DARMCM55

ARCH_FLAGS += \
-mcpu=cortex-m55 \
-mthumb \
-mfloat-abi=hard -mfpu=fpv4-sp-d16 \

CPPFLAGS += \
-Iplatform/

CFLAGS += \
$(ARCH_FLAGS) \
--specs=nosys.specs

LDSCRIPT = platform/mps3.ld

LDFLAGS += \
--specs=nosys.specs \
-Wl,--wrap=_write \
-Wl,--wrap=_read \
-ffreestanding \
-T$(LDSCRIPT) \
$(ARCH_FLAGS)

HAL_SRC += \
platform/startup_ARMCM55.c \
platform/system_ARMCM55.c \
platform/semihosting.c \
platform/uart.c
src/platform/startup_ARMCM55.c \
src/platform/system_ARMCM55.c \
src/platform/semihosting.c \
src/platform/uart.c
HAL_OBJ = $(call objs,$(HAL_SRC))

OBJ += $(HAL_OBJ)
Expand Down
2 changes: 1 addition & 1 deletion envs/m85-an555/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SRC_DIR=./src

.phony: all clean run

CC=arm-none-eabi-gcc-12.2.1
CC=arm-none-eabi-gcc
LD := $(CC)


Expand Down
2 changes: 1 addition & 1 deletion slothy
Submodule slothy updated 224 files
2 changes: 2 additions & 0 deletions tests/ntt_kyber/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#include <stdlib.h>
#include <time.h>

#include "poly.h"

// base
void ntt_kyber_1_23_45_67_no_trans(int16_t *src);
void ntt_kyber_1_23_45_67_no_trans_vld4(int16_t *src);
Expand Down
Loading