diff --git a/Makefile b/Makefile index 519294bed3e3bac026e3b177b4418b340195c9e3..89989a7b593da7071efcf10ef054786fbc60904b 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,19 @@ -TARGETS = bare0 bare1 bare2 bare3 bare4 bare5 bare6 clk_out_itm -DIR = target/thumbv7em-none-eabihf/debug/examples/ -ELFS = $(addprefix $(DIR), $(TARGETS)) +TARGETS = bare0 bare1 bare2 bare3 bare4 bare5 bare6 +DEV = target/thumbv7em-none-eabihf/debug/examples/ +REL = target/thumbv7em-none-eabihf/release/examples/ +ELFS = $(addprefix $(DEV), $(TARGETS)) EELFS = $(addsuffix .elf, $(ELFS)) +ELFSR = $(addprefix $(REL), $(TARGETS)) +EELFSR = $(addsuffix .elf, $(ELFSR)) .PHONY: all -all: xargo $(EELFS) +all: xargo $(EELFS) $(EELFSR) xargo: - xargo build --examples + xargo build --examples + xargo build --release --examples %.elf : % cp $< $@ diff --git a/examples/bare1.rs b/examples/bare1.rs index 696de888efbda691a6d5568a76a8f158ab988978..884799353c7462ac9d799822ce84e3101bc21e5b 100644 --- a/examples/bare1.rs +++ b/examples/bare1.rs @@ -23,10 +23,12 @@ fn main() { ipln!("ITM: Hello World"); // semihosting trace (slow) - sprintln!("SEMIHOSTING: Hello World"); + // sprintln!("SEMIHOSTING: Hello World"); // to prevent returning loop { + ipln!("here"); + // cortex_m::asm::nop(); // cortex_m::asm::bkpt(); }