- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to incorporate the example from the eeprom example:
into my project.
However when I compile the code, it generates Em_EEPROM_config as a const, and therefore causes warnings when I compile with the following line:
eepromReturnValue = Cy_Em_EEPROM_Init(&Em_EEPROM_config, &Em_EEPROM_context);
The warning is:
prj.M0121: passing argument 1 of 'Cy_Em_EEPROM_Init' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
The example project does not generate this as a const, but mine does in PSoC Creator 4.2.
Any help would be much appreciated.
Thanks
Solved! Go to Solution.
- Tags:
- emulated eeprom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
Can you make sure that the "Config Data in Flash" option is unchecked in the Em_EEPROM component configuration window Built-in tab.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please attach your project. In the example project this is not declared as a const.
extern cy_stc_eeprom_config_t Em_EEPROM_config;
This is declared as a variable of type cy_stc_eeprom_config_t type.The actual declaration is inside the file Em_EEPROM.c.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, I cannot share the project.
If you create an emulated EEPROM block in one of your TopDesign windows and compile, does it generate the config as a const? How do I get it to generate it to match the example project?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
Can you make sure that the "Config Data in Flash" option is unchecked in the Em_EEPROM component configuration window Built-in tab.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That fixed it. Thank you!