Change echo for printf
rationale: http://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo fix #129
This commit is contained in:
parent
51f1271b32
commit
d32d612a4b
2 changed files with 10 additions and 11 deletions
|
@ -10,6 +10,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
|
||||||
- In ISP mode, read baudrate and programmer from boards.txt. See #125
|
- In ISP mode, read baudrate and programmer from boards.txt. See #125
|
||||||
- Add `burn_bootloader` target. See #85
|
- Add `burn_bootloader` target. See #85
|
||||||
- Show correct path to `arduino.mk` file in help message. Fix #120
|
- Show correct path to `arduino.mk` file in help message. Fix #120
|
||||||
|
- Change echo for printf. Fix #129 (https://github.com/thomassigurdsen)
|
||||||
|
|
||||||
### 1.0.1 (2013-09-25)
|
### 1.0.1 (2013-09-25)
|
||||||
- Unconditionally add -D in avrdude options. See #114
|
- Unconditionally add -D in avrdude options. See #114
|
||||||
|
|
|
@ -735,7 +735,7 @@ NM = $(AVR_TOOLS_PATH)/$(NM_NAME)
|
||||||
REMOVE = rm -rf
|
REMOVE = rm -rf
|
||||||
MV = mv -f
|
MV = mv -f
|
||||||
CAT = cat
|
CAT = cat
|
||||||
ECHO = echo
|
ECHO = printf
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
|
|
||||||
# General arguments
|
# General arguments
|
||||||
|
@ -939,12 +939,12 @@ $(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.cpp $(COMMON_DEPS) | $(OBJDIR)
|
||||||
$(OBJDIR)/%.hex: $(OBJDIR)/%.elf $(COMMON_DEPS)
|
$(OBJDIR)/%.hex: $(OBJDIR)/%.elf $(COMMON_DEPS)
|
||||||
@$(MKDIR) $(dir $@)
|
@$(MKDIR) $(dir $@)
|
||||||
$(OBJCOPY) -O ihex -R .eeprom $< $@
|
$(OBJCOPY) -O ihex -R .eeprom $< $@
|
||||||
@$(ECHO)
|
@$(ECHO) '\n'
|
||||||
$(call avr_size,$<,$@)
|
$(call avr_size,$<,$@)
|
||||||
ifneq ($(strip $(HEX_MAXIMUM_SIZE)),)
|
ifneq ($(strip $(HEX_MAXIMUM_SIZE)),)
|
||||||
@if [ `$(SIZE) $@ | awk 'FNR == 2 {print $$2}'` -le $(HEX_MAXIMUM_SIZE) ]; then touch $@.sizeok; fi
|
@if [ `$(SIZE) $@ | awk 'FNR == 2 {print $$2}'` -le $(HEX_MAXIMUM_SIZE) ]; then touch $@.sizeok; fi
|
||||||
else
|
else
|
||||||
@$(ECHO) Maximum flash memory of $(BOARD_TAG) is not specified. Make sure the size of $@ is less than $(BOARD_TAG)\'s flash memory
|
@$(ECHO) "Maximum flash memory of $(BOARD_TAG) is not specified. Make sure the size of $@ is less than $(BOARD_TAG)\'s flash memory"
|
||||||
@touch $@.sizeok
|
@touch $@.sizeok
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1150,25 +1150,23 @@ monitor:
|
||||||
$(MONITOR_CMD) $(call get_monitor_port) $(MONITOR_BAUDRATE)
|
$(MONITOR_CMD) $(call get_monitor_port) $(MONITOR_BAUDRATE)
|
||||||
|
|
||||||
disasm: $(OBJDIR)/$(TARGET).lss
|
disasm: $(OBJDIR)/$(TARGET).lss
|
||||||
@$(ECHO) The compiled ELF file has been disassembled to $(OBJDIR)/$(TARGET).lss
|
@$(ECHO) "The compiled ELF file has been disassembled to $(OBJDIR)/$(TARGET).lss"
|
||||||
|
|
||||||
symbol_sizes: $(OBJDIR)/$(TARGET).sym
|
symbol_sizes: $(OBJDIR)/$(TARGET).sym
|
||||||
@$(ECHO) A symbol listing sorted by their size have been dumped to $(OBJDIR)/$(TARGET).sym
|
@$(ECHO) "A symbol listing sorted by their size have been dumped to $(OBJDIR)/$(TARGET).sym"
|
||||||
|
|
||||||
verify_size:
|
verify_size:
|
||||||
ifeq ($(strip $(HEX_MAXIMUM_SIZE)),)
|
ifeq ($(strip $(HEX_MAXIMUM_SIZE)),)
|
||||||
@$(ECHO)
|
@$(ECHO) "\nMaximum flash memory of $(BOARD_TAG) is not specified. Make sure the size of $(TARGET_HEX) is less than $(BOARD_TAG)\'s flash memory\n\n"
|
||||||
@$(ECHO) Maximum flash memory of $(BOARD_TAG) is not specified. Make sure the size of $(TARGET_HEX) is less than $(BOARD_TAG)\'s flash memory
|
|
||||||
@$(ECHO)
|
|
||||||
endif
|
endif
|
||||||
@if [ ! -f $(TARGET_HEX).sizeok ]; then echo >&2 "\nThe size of the compiled binary file is greater than the $(BOARD_TAG)'s flash memory. \
|
@if [ ! -f $(TARGET_HEX).sizeok ]; then echo >&2 "\nThe size of the compiled binary file is greater than the $(BOARD_TAG)'s flash memory. \
|
||||||
See http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it."; false; fi
|
See http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it."; false; fi
|
||||||
|
|
||||||
generate_assembly: $(OBJDIR)/$(TARGET).s
|
generate_assembly: $(OBJDIR)/$(TARGET).s
|
||||||
@$(ECHO) Compiler-generated assembly for the main input source has been dumped to $(OBJDIR)/$(TARGET).s
|
@$(ECHO) "Compiler-generated assembly for the main input source has been dumped to $(OBJDIR)/$(TARGET).s"
|
||||||
|
|
||||||
generated_assembly: generate_assembly
|
generated_assembly: generate_assembly
|
||||||
@$(ECHO) "generated_assembly" target is deprecated. Use "generate_assembly" target instead
|
@$(ECHO) "\"generated_assembly\" target is deprecated. Use \"generate_assembly\" target instead"
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@$(ECHO) "\nAvailable targets:\n\
|
@$(ECHO) "\nAvailable targets:\n\
|
||||||
|
@ -1192,7 +1190,7 @@ help:
|
||||||
make burn_bootloader - Burn bootloader and/or fuses\n\
|
make burn_bootloader - Burn bootloader and/or fuses\n\
|
||||||
make help - show this help\n\
|
make help - show this help\n\
|
||||||
"
|
"
|
||||||
@$(ECHO) "Please refer to $(ARDMK_FILE) for more details."
|
@$(ECHO) "Please refer to $(ARDMK_FILE) for more details.\n"
|
||||||
|
|
||||||
.PHONY: all upload raw_upload raw_eeprom error_on_caterina reset reset_stty ispload \
|
.PHONY: all upload raw_upload raw_eeprom error_on_caterina reset reset_stty ispload \
|
||||||
clean depends size show_boards monitor disasm symbol_sizes generated_assembly \
|
clean depends size show_boards monitor disasm symbol_sizes generated_assembly \
|
||||||
|
|
Loading…
Reference in a new issue