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
Use const.
With const the data is also stored in data segment... don't want this, want to free some data bytes storing it in code segment.
With const the data is also stored in data segment...
This would happen if you declared a local variable as const. You have to declare them as static const.
Declaring the data like "static const uint16_t data[150].." inside or outside function the compiler stores it is the data segment... no in the code segment as I need.
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.