bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ihex output from ld (2.13)erroneous?


From: Peter Janhall
Subject: ihex output from ld (2.13)erroneous?
Date: Thu, 10 Apr 2003 21:32:37 +0200

Hello GNU.

There seems to be a problem when making ld produce ihex output files.

I made a small C-program for an Atmel ATMega128, which did not execute.
'ld' was set up to produce ihex for the AVR Studio programmer.

To be able to see if the program looked as expected in assembler, I made
a link with elf output. The prints from 'objdump -d' seemed OK.
When I fed it through the AVR Studio assembler it worked.

The ihex output from 'objcopy -O ihex tmain.elf tmain.hex' compares well with 
the output from the AVR assembler. (This will be the work around)

Best regards
Peter Janhäll

My version:

bums!speja% avr-ld -V
GNU ld version 2.13
  Supported emulations:
   avr85xx
   avr1200
   avr23xx
   avr44x4
   avr4433
   avrmega603
   avrmega103
   avrmega161
   avr1
   avr2
   avr3
   avr4
   avr5

The C-program: 
---- BEGIN ----
#include <iom128.h>

int main(void) {
  *(volatile unsigned char *)DDRB = 0xff;
  for (;;)
    (*(volatile unsigned char *)PORTB)++;
  return 0;
}
---- END ----

bums!speja% avr-gcc -v
Reading specs from /home/speja/local/lib/gcc-lib/avr/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/home/speja/local 
--enable-languages=c --program-prefix=avr- --target=avr
Thread model: single
gcc version 3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]