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
Am I the only one who are quite a bit confused why you ask about help with IAR on a Keil forum? Do you call Ford to ask about service information for a Toyota?
You know english?... Sure better than me... Please, read my comments better, I know a way to do a thing in IAR and want to do the same in Keil, im a Keil user... is more easy to put an example of something instead writing a lot of lines explain the problem.
Ok. Sorry for the confusion, but the question: "Is any option like __flash in IAR to store data in the program memory instead of ram??" Can very much be read as: Does IAR have a function like __flash, to store data in the program memory?
And believe me, there have been a number of people who have visited this form to explicitly ask for help with IAR.
const SHADOW_RAM_CONFIG_DATA_S default_config =
Don't worry Westermark... :)
Hi Erik,
Can explain it better?..
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
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