- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Variables defined with const volatile type qualifier are linked to the DCONST section in ROM area.
During start-up initialization these variables are copied into INIT section in RAM area from where the SW reads their values.
My intention is to avoid coping the variables into INIT section in order to reduce the RAM memory usage.
How can I make the SW to read variables directly from DCONST section and avoid allocation into RAM memory?
Solved! Go to Solution.
- Labels:
-
Other Legacy MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Daniel,
I confirmed -K VCCONST is added in our latest Softune Profession pack Rev.300027 (Softune C compiler V30L22). Please kindly get in touch with Cypress local sales team or distributors for the latest version.
Best regards,
Amy Wang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The content of CONST section located in ROM is not copied to RAM in general. DCONST section stores the initial value of INIT variables without const qualifier. Please refer to Softune C Compiler manual (FccE.pdf included in your Softune package) for definition of each section.
Best regards,
Amy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Amy,
Thank you for your response.
However, my question was how to link the variables defined with "const volatile" type qualifier to the CONST section in ROM like other compilers do by default?
How can be avoid memory allocation in INIT section during startup routine for these variables and make the SW read them directly from ROM area?
Best Regards,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Daniel,
Sorry I misunderstood your original question. You could use -K VCCONST suboption to change initialized variables defined with volatile const type qualifier to CONST section.
//F2MC-16 Family SOFTUNE C Compiler Manual (FccE.pdf, page 65),
Best regards,
Amy Wang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Amy,
Thank you again for your response.
This sounds like a possible solution, but can you please tell me what compiler version supports this sub-option?
I am working with the following F2MC-16 Family SOFTUNE C Compiler VERSION = PROPACK907S_V3_REV300023 and cannot find this option.
Best Regards,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Daniel,
I confirmed -K VCCONST is added in our latest Softune Profession pack Rev.300027 (Softune C compiler V30L22). Please kindly get in touch with Cypress local sales team or distributors for the latest version.
Best regards,
Amy Wang