Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
# Display size of file.HEXSIZE = $(SIZE) -A $(PRG).hex ELFSIZE = $(SIZE) -A $(PRG).elf MSG_SIZE_BEFORE = Size before: MSG_SIZE_AFTER = Size after:sizebefore:# @if [ -f $(PRG).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi @if [ -f $(PRG).hex ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fisizeafter:# @if [ -f $(PRG).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi @if [ -f $(PRG).hex ]; then echo; echo $(MSG_SIZE_AFTER); $(HEXSIZE); echo; fi
# Display size of file.HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hexELFSIZE = $(SIZE) -A $(TARGET).elf MSG_SIZE_BEFORE = Size before: MSG_SIZE_AFTER = Size after:sizebefore:# @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi @if [ -f $(TARGET).hex ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fisizeafter:# @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi @if [ -f $(TARGET).hex ]; then echo; echo $(MSG_SIZE_AFTER); $(HEXSIZE); echo; fi
Size before: text data bss dec hex filename 0 17826 0 17826 45a2 AVR_Fish.hexCreating load file for EEPROM: AVR_Fish.eepavr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \--change-section-lma .eeprom=0 -O ihex AVR_Fish.elf AVR_Fish.eepc:\Program Files\WinAVR\bin\avr-objcopy.exe: there are no sections to be copied!c:\Program Files\WinAVR\bin\avr-objcopy.exe: --change-section-lma .eeprom=0x00000000 never usedmake: [AVR_Fish.eep] Error 1 (ignored)Size after: text data bss dec hex filename 0 17826 0 17826 45a2 AVR_Fish.hex
Hmmmm webbot, I am getting this error when using your code:
cause I have a hunch you're onto RAM usage here.
benji, according to XP, its 49kb which I highly doubt is the actual amount of memory space it takes up on my micro . . . its just too large . . .
# Display size of file.HEXSIZE = $(SIZE) -C --mcu=$(MCU) $(PRG).hexELFSIZE = $(SIZE) -C --mcu=$(MCU) $(PRG).elfMSG_SIZE_BEFORE = Size before: MSG_SIZE_AFTER = Size after:sizebefore: @if [ -f $(PRG).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi# @if [ -f $(PRG).hex ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fisizeafter: @if [ -f $(PRG).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi# @if [ -f $(PRG).hex ]; then echo; echo $(MSG_SIZE_AFTER); $(HEXSIZE); echo; fi
# Processor frequency.# This will define a symbol, F_CPU, in all source code files equal to the # processor frequency. You can then use this symbol in your source code to # calculate timings. Do NOT tack on a 'UL' at the end, this will be done# automatically to create a 32-bit value in your source code.# Typical values are:# F_CPU = 1000000# F_CPU = 1843200# F_CPU = 2000000# F_CPU = 3686400# F_CPU = 4000000# F_CPU = 7372800# F_CPU = 8000000# F_CPU = 11059200# F_CPU = 14745600 F_CPU = 16000000# F_CPU = 18432000# F_CPU = 20000000# F_CPU = 3686400
# Place -D or -U options hereCDEFS =
# Place -D or -U options hereCDEFS =-D F_CPU=$(F_CPU)
Creating load file for Flash: AVR_Fish.hexavr-objcopy -O ihex -R .eeprom AVR_Fish.elf AVR_Fish.hexavr-objcopy: AVR_Fish.elf: File format not recognizedmake: *** [AVR_Fish.hex] Error 1Build succeeded with 0 Warnings...
using the auto-generated makefile and not the external one?
Z:\>HEX2BIN AVR_Fish.hex binary.bin [/Z:] HEX2BIN.EXE v3.1 - Converts Intel,Motorola and Tektronixs HEX files to BINARY Supports 16,24 and 32 bit addressing formats Copyright (c) 1994,1996 Read 1117 lines. Wrote 17840 bytes
Size after: text data bss dec hex filename 0 17840 0 17840 45b0 AVR_Fish.hex
I am assuming my memory usage is 17840 bytes, right?
Didn't any one check the wiki.