This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/49764] [gcc-avr] Compiling for Arduino is not working


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-16 19:36:11 UTC ---
(In reply to comment #7)
> I don't understand what you want from me.
> I read that "How to report, what we need and what we don't" SO?
> What info you want from me in addition to the text I posted in the bug report?

Exactly the info listed at that URL, which was missing from the bug report
i.e.
the preprocessed source of the code that fails to compile
the output of 'gcc -v'
etc.

> I don't know 
> "the complete command line that triggers the bug;"
>
> because I don't know how to compile that code outside of IDE.

Just because you don't know how to do it doesn't mean we don't want that
information.


> You would ONLY need 3 minutes to download and to run that IDE on both versions
> of gcc-avr. and You would know what's the reason is. I don't what is causing
> this errors, the only thing that was changed on my machine is the GCC-AVR
> version, from 4.6.0->4.6.1

But the IDE doesn't come with gcc-avr, so I'd need to install that, and my
distro doesn't have version 4.6.1, so I'd need to install avr-libc and build
avr-gcc myself, and if you think I'm doing that just to help someone who calls
me a stupid and incompetent moron then you're sorely mistaken.

> lines 66-.. that are in the error:
> 66 extern const uint16_t PROGMEM port_to_mode_PGM[];
>  67 extern const uint16_t PROGMEM port_to_input_PGM[];
>  68 extern const uint16_t PROGMEM port_to_output_PGM[];
>  69 
>  70 extern const uint8_t PROGMEM digital_pin_to_port_PGM[];
>  71 // extern const uint8_t PROGMEM digital_pin_to_bit_PGM[];
>  72 extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[];
>  73 extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
> 
> on gcc-avr 4.6.0 I get no errors on that code, on gcc-avr 4.6.1 I get error
> listed in the first message.
> 
> "variable 'port_to_mode_PGM' must be const in order to be put into read-only"
> produced from this:
> extern const uint16_t PROGMEM port_to_mode_PGM[];

OK, now we're getting somewhere.  Try putting just this in a file and compiling
it with gcc-avr:

extern const int __attribute__((progmem)) p[];


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]