forked from tralamazza/embedded_zig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
990079e
commit 7d62072
Showing
4 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
MAKEFLAGS += --no-builtin-rules | ||
MAKEFLAGS += --no-builtin-variables | ||
|
||
BUILD_FLAGS = --release-small -target thumbv7m-freestanding-none | ||
BUILD_FLAGS = -O ReleaseSmall -target thumb-freestanding -mcpu cortex_m3 | ||
LINKER_SCRIPT = arm_cm3.ld | ||
LD_FLAGS = --gc-sections -nostdlib | ||
OBJS = startup.o main.o | ||
|
@@ -12,7 +12,7 @@ PROG = firmware | |
zig build-obj ${BUILD_FLAGS} $< | ||
|
||
${PROG}: ${OBJS} | ||
zig build-exe ${BUILD_FLAGS} $(OBJS:%=--object %) --name $@.elf --linker-script ${LINKER_SCRIPT} | ||
zig build-exe ${BUILD_FLAGS} $(OBJS:%=%) --name $@.elf --script ${LINKER_SCRIPT} | ||
# arm-none-eabi-ld ${OBJS} -o [email protected] -T ${LINKER_SCRIPT} -Map [email protected] ${LD_FLAGS} | ||
|
||
clean: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters