Hi,
Is any option like __flash in IAR to store data in the program memory instead of ram??... Want to store 300 bytes of data "uint16_t data[150]={0x3349, 0x4430...." and read it later. I'm trying think like that:
__flash uint6_t data[150].. code uint6_t data[150]..
But compiler don'r recognizes any...
Thanks
SHADOW_RAM_CONFIG_DATA_S is a structure name
... it goes into the code segment without 'static'
And was that supposed to be useful to the OP? What are you suggesting with it? that all structures go into the code segment 0x08?
Far more likely that someone who was competent with the tools was capable of locating sections at specific addresses via a scatter file.
And was that supposed to be useful to the OP? What are you suggesting with it? that all structures go into the code segment 0x08? what I DID show (in the original post where you could not detect that SHADOW_RAM_CONFIG_DATA_S was a structure name) was that 'const' put the data in the code area, that, at least, should be obvious (to most)
Erik original post:
this one goes in the code segment
const SHADOW_RAM_CONFIG_DATA_S default_config =
that, at least, should be obvious (to most)
Yes, but the rest???
I'd guess you've never been a mentor.
Yes, but the rest??? to show that a sruct goes to code memory does not need to show the struct itself, WHAT REST?
I'd guess you've never been a mentor. sure have, very succesfully
Erik
Hi, Ok, now the data is in the code segment (RO section), but, the ZI remains the same at 8702 bytes... why the ZI not changes?...
what is "the ZI"?
forgot my last question... is absurd..
to show that a sruct goes to code memory does not need to show the struct itself, WHAT REST?
To a beginner, including a struct without saying it's a struct may be misleading. Hence the comment of rest!
sure have, very succesfully
Mr Hubris strikes again!
Keep up smart guy. Zi=Zero Init.
So when you did your mentoring, was it in any way related to technology? (that's a rhetorical question)
ZI = Zero-Initialized, i.e. the segment used for global variables that haven't been given an initial value. The C language standard requires all global variabls to have a known value before you get to main(), so the startup code have to zero-initialize variables without explicit assign.
To answer your question about the size of the ZI region - your map file should tell what the memory is used for. Do a quick check, and you will find out.