diff options
author | cpldcpu <cpldcpu@gmail.com> | 2014-01-25 09:16:01 +0100 |
---|---|---|
committer | cpldcpu <cpldcpu@gmail.com> | 2014-01-25 09:16:01 +0100 |
commit | a6d2d3151498284efe8241ea1a6e300973038698 (patch) | |
tree | 2b275b1c44c4996dad1d9b3d7a544419c4f70a08 /firmware/Makefile | |
parent | 392c36ad8d5b44ff97937777fb002307c8fd4172 (diff) | |
download | micronucleus-a6d2d3151498284efe8241ea1a6e300973038698.tar.gz micronucleus-a6d2d3151498284efe8241ea1a6e300973038698.tar.bz2 micronucleus-a6d2d3151498284efe8241ea1a6e300973038698.zip |
firmware: first steps to integrated upgrade
Diffstat (limited to 'firmware/Makefile')
-rw-r--r-- | firmware/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/Makefile b/firmware/Makefile index 996b08c..2e8eca8 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -190,7 +190,7 @@ read_fuses: $(UISP) --rd_fuses clean: - @rm -f main.hex main.bin main.c.lst main.map *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s main.lss + @rm -f main.hex main.bin main.c.lst main.map main.raw *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s main.lss # file targets: main.bin: $(OBJECTS) @@ -201,6 +201,14 @@ main.hex: main.bin @avr-objcopy -j .text -j .data -O ihex main.bin main.hex @avr-size main.bin +upgrade: main.bin + avr-objcopy -O binary main.bin main.raw + avr-objcopy -I binary -O elf32-avr \ + --rename-section .data=.text \ + --redefine-sym _binary_main_raw_start=loader \ + --redefine-sym _binary_main_raw_end=loader_end \ + main.raw bootloader_linkable.o + disasm: main.bin @avr-objdump -d -S main.bin >main.lss |