[Top][All Lists]

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

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

From: avr-libc-devel
Subject: Re: [avr-libc-dev] const struct in program memory
Date: Tue, 18 Jun 2019 12:43:00 +0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

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 (and IO registers).  So if you have told the compiler to put the data in flash, you have to tell it to read the data from flash:

Newer gcc versions also support the "__flash" address space.  This lets
Thank :)
I have an understanding of the features of addressing memory in the AVR family and access to them, but thanks anyway for an explanation - I was not mistaken :) I was wondering if the compiler for AVR microcontrollers can address the elements in the program memory without a significant change in the code semantics . Thanks to your explanation about the __flash modifier, I saw that yes, it could. It really works.

Thank you very much for your attention and time spent, have a nice day!

reply via email to

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