Skip to content

Commit aeb5172

Browse files
committed
Makefile: Build uVisor for M3, even on M4 CPUs
Currently, uVisor builds with `-mcpu=cortex-m4`, even on Cortex M3 CPUs. This can lead to using unavailable instructions. Build uVisor using the least common denominator architecture. This avoids using unavailable instructions when targeting Cortex M3 CPUs.
1 parent a0871b9 commit aeb5172

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ ifeq ("$(PROGRAM_VERSION)","")
140140
PROGRAM_VERSION:='unknown'
141141
endif
142142

143-
FLAGS_CM4:=-mcpu=cortex-m4 -march=armv7e-m -mthumb
143+
FLAGS_CORE:=-mcpu=cortex-m3 -march=armv7-m -mthumb
144144

145145
LDFLAGS:=\
146-
$(FLAGS_CM4) \
146+
$(FLAGS_CORE) \
147147
-T$(CONFIGURATION_PREFIX).linker \
148148
-nostartfiles \
149149
-nostdlib \
@@ -166,7 +166,7 @@ CFLAGS_PRE:=\
166166
-ffunction-sections \
167167
-fdata-sections
168168

169-
CFLAGS:=$(FLAGS_CM4) $(CFLAGS_PRE)
169+
CFLAGS:=$(FLAGS_CORE) $(CFLAGS_PRE)
170170
CPPFLAGS:=
171171
CXXFLAGS:=-fno-exceptions
172172

0 commit comments

Comments
 (0)