From 8041627ca33ffc9691da4eef90f6be7b6959928f Mon Sep 17 00:00:00 2001 From: ayabusa Date: Tue, 2 Apr 2024 18:29:50 +0200 Subject: [PATCH] updated workflow --- .github/workflows/makefile.yml | 3 +++ numworks_port/Makefile | 21 +++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index 230c479..7e787a7 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ "main" ] +env: + RUN_IN_GITHUB_ACTION: TRUE + jobs: build: diff --git a/numworks_port/Makefile b/numworks_port/Makefile index 44faede..87ab9ad 100644 --- a/numworks_port/Makefile +++ b/numworks_port/Makefile @@ -9,14 +9,19 @@ LD_SCRIPT = $(SRC_DIR)/linker.ld MCU_SPEC = cortex-m7 # Toolchain definitions (ARM bare metal defaults) -TOOLCHAIN = /usr -CP = $(TOOLCHAIN)/bin/arm-none-eabi-g++ -CC = $(TOOLCHAIN)/bin/arm-none-eabi-gcc -AS = $(TOOLCHAIN)/bin/arm-none-eabi-as -LD = $(TOOLCHAIN)/bin/arm-none-eabi-ld -OC = $(TOOLCHAIN)/bin/arm-none-eabi-objcopy -OD = $(TOOLCHAIN)/bin/arm-none-eabi-objdump -OS = $(TOOLCHAIN)/bin/arm-none-eabi-size +ifeq ($(RUN_IN_GITHUB_ACTION),"TRUE") +TOOLCHAIN = $(ARM_NONE_EABI_GCC_PATH) +else +TOOLCHAIN = /usr/bin +endif + +CP = $(TOOLCHAIN)/arm-none-eabi-g++ +CC = $(TOOLCHAIN)/arm-none-eabi-gcc +AS = $(TOOLCHAIN)/arm-none-eabi-as +LD = $(TOOLCHAIN)/arm-none-eabi-ld +OC = $(TOOLCHAIN)/arm-none-eabi-objcopy +OD = $(TOOLCHAIN)/arm-none-eabi-objdump +OS = $(TOOLCHAIN)/arm-none-eabi-size # Assembly directives. ASFLAGS += -c