PROGMEM_DECLARE error - AS6

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, when I compile this code

PROGMEM_DECLARE(AppCommandDescriptor_t appCoordinatorCmdDescTable[]) =
{
  APP_COMMAND_DESCRIPTOR(APP_NETWORK_INFO_COMMAND_ID, appCoordinatorNwkInfoCmdHandler),
  APP_COMMAND_DESCRIPTOR(APP_IDENTIFY_COMMAND_ID, appCoordinatorIdentifyCmdHandler)
};

I get an error like this:

Error	1	variable 'appCoordinatorCmdDescTable' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

I read a lot about this and I tried to put const before AppCommandDescriptor_t but it keeps firing the same error. It seems that it is a problem of the new version of GCC in AS6.
What shoul I do?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

See also https://www.avrfreaks.net/index.p... from ME
Best wishes,

Jerry