avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] avr-c++ static constructors in bootloader usage


From: Jörg Diederich
Subject: [avr-gcc-list] avr-c++ static constructors in bootloader usage
Date: Tue, 19 Sep 2006 22:09:00 +0800

hello,

so i'm new to this list, a short hello (again) to everyone.

in using the at90can128, there's a problem with static constructors in 
bootloaders. the following example does not work as expected.

#include <avr/io.h>
/*
  PORTE rises a pin on my board. used to see what's happening
 */
class A {
 public:
  A(){
    PORTE |= (1 << 7);
    while(1);
  }
};

A a_test ;
int 
main(int argc, char** args)
{
  PORTE |= (1 << 2);
  while(1);

  return 0;
}

both pins stay low. usart-output didn't work too.
adress of bootloader/text-section is 0x1E000. another possible start address 
(0x1F000) doesn't change the problem,
never tryed last possible address (0x1F800), but i don't expect it to work 
either.

trying to switch off most compiler options doesn't result in a change.
gcc version 4.1.1, avr-libc 1.4.4

there's a bug-report at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29141 for 
this.

bye Jörg


-- 
_______________________________________________
Get your free email from http://www.graffiti.net

Powered By Outblaze




reply via email to

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