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
I do not kbow what you need explained better.
the linker locates the above struct in the code segment 0x08...., no measures other then what is in the line of code is taken.
I do not know of this is significant, the above code runs on a STM32f103
Erik
.... once it was possible in Keil to "deconstant" a variable by referencing it externally
i.e.
ralph.c const U8 Jacob;
rahph.h extern U8 Jacob
george.c include ralph.h
Jacob = 47;
I hope this is fixed, but do not know if this still is possible and I will not screw up my code to try
const SHADOW_RAM_CONFIG_DATA_S default_config =
then
Erik,
Good you haven't changed since my last visit [and that your keyboards skills are still suspect].
Your explanation must rank as one of the worst I've ever seen; and I've seen quite a few.
What is SHADOW_RAM_CONFIG_DATA_S defined as in your project? Is it always available on the STM32f103? Would it be available to other projects written by other people?
Now who was it who wrote something about using "more words"???
Thanks Rob...
At this point... Anyone know how to place data in code segment????... I'm not asking about life on Mars or an explanation for black holes.. heheeh.. :P
Thanks anyway
Anyone know how to place data in code segment????
I'm not sure what 'code segment' is, but if you are talking about placing variables in ROM, static const has always done that for me. If it doesn't work for you, my guess is you have a non-standard linker configuration.
Just like others have said before, I've always used the following with great success on Keil ARM
static const char MessageForMrSmartyPants[] = "Less speed and more keyboard accuracy makes better code.";
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
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
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!