Hello friends.
A long time ago, more than 10 years ago, I used avr-gcc + avr-binutils +
avr-libc on Linux.
Today I had to compile a test project with a modern installation of
avr-gcc, avr-binutils, avr-libc.
And I noticed a strange assembler code in the listing: there is no
initialization of th
Seems like a strange compiler build.
In my opinion, the problem at the link stage: the object file after
compilation looks OK
Command line to compile the project:
$ avr-gcc -iquote . -Os -pipe -mmcu=attiny2313 -mint8 -g -c -o blink.o
blink.c
While I would not recommend using -mint8 (it has b
Seems like a strange compiler build.
If this can be useful, I will provide an user account in Debian 9.7,
where I try to compile the project — you can try your thoughts on this
installation, if you wish.
___
AVR-libc-dev mailing list
AVR-libc-dev@non
Your linker call is missing the -mmcu option.
That's why no startup code has been scheduled to link against.
OMG, thank you, it works :)
___
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev
Hello friends.
Tell me, please, can I use constant structures located in the program
memory, as usual, which are located in the RAM?
I tried to use the structure with the PROGMEM modifier, the program is
compiled, but it seems to work incorrectly.
Thank you.
__
You certainly can use PROGMEM (or the newer __flash) on structs in
program memory. But you need to use the right methods to access the
data. Can you post a short sample code that you tried but which did not
work?
typedef struct {
uint16_t int_part;
uint8_t frac_part;
I recommend never using the "packed" attribute. It rarely helps (and
Thanks, I will consider it. In general, I know this, I'm just
experimenting :)
PROGMEM tells the compiler to put the data (bw_tab here) in flash
memory. On the AVR, flash is accessed with different instructions from
ram (a