From 609322eb3630708f93fa2667348e1aa8247dbb29 Mon Sep 17 00:00:00 2001 From: Nicolas Robert Date: Fri, 5 Nov 2021 05:16:23 +0100 Subject: [PATCH] fix: refacto architecture Signed-off-by: Nicolas Robert --- test/Makefile => Makefile | 9 +++++---- {test => src}/test.c | 0 {test => src}/test.lds | 0 3 files changed, 5 insertions(+), 4 deletions(-) rename test/Makefile => Makefile (85%) rename {test => src}/test.c (100%) rename {test => src}/test.lds (100%) diff --git a/test/Makefile b/Makefile similarity index 85% rename from test/Makefile rename to Makefile index b925f8c..49a44c4 100644 --- a/test/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy -LDS=test.lds +SRC=src/test.c +LDS=src/test.lds OPTI=-O0 CFLAGS= $(OPTI) -g -gdwarf-2 -mthumb -fno-builtin -mcpu=cortex-m4 -Wall -std=c99 -ffunction-sections -fdata-sections -mabi=aapcs -fno-unroll-loops -ffast-math -ftree-vectorize -fverbose-asm @@ -9,10 +10,10 @@ LDFLAGS=-nostartfiles -Wl,-gc-sections -T$(LDS) -L. --specs=nano.specs all: test.bin -test.o: test.c - $(CC) $(CFLAGS) -c test.o test.c +test.o: $(SRC) + $(CC) $(CFLAGS) -c -o $@ $< -test.elf: test.o test.lds +test.elf: test.o $(LDS) $(CC) $(LDFLAGS) test.o -o test.elf test.bin: test.elf diff --git a/test/test.c b/src/test.c similarity index 100% rename from test/test.c rename to src/test.c diff --git a/test/test.lds b/src/test.lds similarity index 100% rename from test/test.lds rename to src/test.lds