Re: [avr-libc-dev] const struct in program memory

2019-06-18 Thread avr-libc-devel
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

Re: [avr-libc-dev] const struct in program memory

2019-06-17 Thread David Brown
On 17/06/2019 09:38, avr-libc-devel wrote: 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

Re: [avr-libc-dev] const struct in program memory

2019-06-17 Thread avr-libc-devel
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;

Re: [avr-libc-dev] const struct in program memory

2019-06-16 Thread David Brown
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? On 17/06/2019 07:08, avr-libc-devel wrote: Hello friends. Tell me, please, c

[avr-libc-dev] const struct in program memory

2019-06-16 Thread avr-libc-devel
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. __