Compiling and burning your own hex file

Compiling and burning your own hex file

Postby bleo » Fri Mar 20, 2015 8:18 am

I've *kinda* figured out how to compile a hex file from the source. However, I noticed it's coming out at 87k whereas the original one included with the source was only 32k. What am I doing wrong? I ran it from the command line and here's what I got:

Code: Select all
C:\avrassembler>avrasm2.exe -S "C:\vamps\vamp2\vamp2_avr\labels.tmp" -fI -W+ie -
C V2E -o "C:\vamps\vamp2\vamp2_avr\vamp2.hex" -d "C:\vamps\vamp2\vamp2_avr\vamp2
.obj" -e "C:\vamps\vamp2\vamp2_avr\vamp2.eep" -m "C:\vamps\vamp2\vamp2_avr\vamp2
.map" "C:\vamps\vamp2\vamp2_avr\vamp2.asm"
AVRASM: AVR macro assembler 2.1.43 (build 48 May 30 2011 10:07:37)
Copyright (C) 1995-2011 ATMEL Corporation

C:\vamps\vamp2\vamp2_avr\vamp2.asm(70): Including file 'C:\vamps\vamp2\vamp2_avr
\m328pdef.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(147): Including file 'C:\vamps\vamp2\vamp2_av
r\vamp2_defs.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(912): Including file 'C:\vamps\vamp2\vamp2_av
r\drum-synth.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(915): Including file 'C:\vamps\vamp2\vamp2_av
r\envelope-engine2.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(918): Including file 'C:\vamps\vamp2\vamp2_av
r\fm_mod.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(921): Including file 'C:\vamps\vamp2\vamp2_av
r\sweeps.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(927): Including file 'C:\vamps\vamp2\vamp2_av
r\delay_table.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(930): Including file 'C:\vamps\vamp2\vamp2_av
r\notelookup_assy.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(933): Including file 'C:\vamps\vamp2\vamp2_av
r\sine_table_2k_signed.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(936): Including file 'C:\vamps\vamp2\vamp2_av
r\square.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(939): Including file 'C:\vamps\vamp2\vamp2_av
r\eeh.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(942): Including file 'C:\vamps\vamp2\vamp2_av
r\aay.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(945): Including file 'C:\vamps\vamp2\vamp2_av
r\lid1.txt'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(948): Including file 'C:\vamps\vamp2\vamp2_av
r\tube1.txt'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(951): Including file 'C:\vamps\vamp2\vamp2_av
r\pot1.txt'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(954): Including file 'C:\vamps\vamp2\vamp2_av
r\noise3.txt'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(957): Including file 'C:\vamps\vamp2\vamp2_av
r\ohh2.txt'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(960): Including file 'C:\vamps\vamp2\vamp2_av
r\cymbal_assy.inc'
C:\vamps\vamp2\vamp2_avr\vamp2.asm(961): No EEPROM data, deleting C:\vamps\vamp2
\vamp2_avr\vamp2.eep

ATmega328P memory use summary [bytes]:
Segment   Begin    End      Code   Data   Used    Size   Use%
---------------------------------------------------------------
[.cseg] 0x000000 0x008000   2358  29170  31528   32768  96.2%
[.dseg] 0x000100 0x000100      0      0      0    2048   0.0%
[.eseg] 0x000000 0x000000      0      0      0    1024   0.0%

Assembly complete, 0 errors. 0 warnings


Secondly, when I finally do get the correct hex file size, would this be the correct syntax to write to the chip using avrdude?

Code: Select all
avrdude -V -p m328 -c USBasp -P usb -U flash:w:vamp2.hex


Thanks!
bleo
 
Posts: 4
Joined: Wed Nov 06, 2013 5:55 am

Re: Compiling and burning your own hex file

Postby guest » Fri Mar 20, 2015 10:25 am

that looks like the correct code size. if you look at the summary at the bottom, it lists total use at 96%.

avrdude always gives me grief, so i use avrstudio. why dont you give that syntax a try, and if it doesnt work, i can help you figure it out. im not exactly sure what it should be.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm


Return to MIDIvampire

Who is online

Users browsing this forum: No registered users and 1 guest


cron