I have a line of source code:
That shows up in the .lst file as
96 gps_data_buffer:
97 0000 2447 5052 .ascii "$GPRMC,190844,A,3"
97 4D43 2C31
97 3930 3834
97 342C 412C
97 33
98 0011 3933 302E .string
"930.2391,N,11947.1967,W,000.0,268.1,041204,015.6,E*6B "
98 3233 3931
98 2C4E 2C31
98 3139 3437
98 2E31 3936
99 0052 0000 .skip 2,0
But after loading the .hex file into avr studio 4, I see the string has been corrupted.
After a few bytes, it is overwritten with "P l e a s e w a i t , L o a d i n g p
r o g r a m m e m o r y" with nulls between each byte.
avr-objdump'ing the .hex files shows the string intact.
13d0 0048656c 6c6f2077 6f726c64 00244750 .Hello world.$GP
13e0 524d432c 31393038 34342c41 2c333933 RMC,190844,A,393
13f0 302e3233 39312c4e 2c313139 34372e31 0.2391,N,11947.1
1400 3936372c 572c3030 302e302c 3236382e 967,W,000.0,268.
1410 312c3034 31323034 2c303135 2e362c45 1,041204,015.6,E
1420 2a364220 20202020 20202020 20200000 *6B ..
1430 00122000 1d020000 .. .....
So, is there something wrong with loading the hex file into avr-studio?
Below is the output from make, so that you can see just how program was compiled
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -mcall-prologues -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
-Wa,-adhlns=jtimers.lst -std=gnu99 jtimers.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > jtimers.d; \
[ -s jtimers.d ] || rm -f jtimers.d
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -mcall-prologues -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
-Wa,-adhlns=gps.lst -std=gnu99 gps.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > gps.d; \
[ -s gps.d ] || rm -f gps.d
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -mcall-prologues -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes
-Wa,-adhlns=modem.lst -std=gnu99 modem.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > modem.d; \
[ -s modem.d ] || rm -f modem.d