We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f53638 commit 9410a6fCopy full SHA for 9410a6f
1 file changed
Makefile
@@ -12,6 +12,7 @@ TARGET?=stm32f4
12
DEBUG?=0
13
VTOR?=1
14
SWAP?=1
15
+CORTEX_M0?=0
16
17
LSCRIPT:=hal/$(TARGET).ld
18
@@ -28,7 +29,17 @@ OBJS:= \
28
29
./lib/wolfssl/wolfcrypt/src/wolfmath.o \
30
./lib/wolfssl/wolfcrypt/src/fe_low_mem.o
31
-CFLAGS:=-mcpu=cortex-m3 -mthumb -Wall -Wextra -Wno-main -Wstack-usage=1024 -ffreestanding -Wno-unused \
32
+ifeq ($(TARGET),samr21)
33
+ CORTEX_M0=1
34
+endif
35
+
36
+ifeq ($(CORTEX_M0),1)
37
+ CFLAGS:=-mcpu=cortex-m0
38
+else
39
+ CFLAGS:=-mcpu=cortex-m3
40
41
42
+CFLAGS+=-mthumb -Wall -Wextra -Wno-main -Wstack-usage=1024 -ffreestanding -Wno-unused \
43
-Ilib/bootutil/include -Iinclude/ -Ilib/wolfssl -nostartfiles \
44
-nostdlib \
45
-DWOLFSSL_USER_SETTINGS \
0 commit comments