Re: codewarrior HC12,thanks but......
- From: John Devereux <jdREMOVE@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Dec 2006 17:17:19 +0000
"blisca" <bliscachiocciolinatiscali.it> writes:
Thanks but the problem is that i'm compiling for a microprocessor of hc12
family,the 9s12e64,and is not so easy to change te value of the location in
the flash at run time,
as you know you have to erase and re-write a whole flash block,and during
this time the program has to be copied somewhere in RAM,because the MCU
can't read instructions from the flash
during flash manipulation.
Talking about a constant it is easier to declare it in the flash at compile
time,but the linker decides where to put it.
I would be able to set the constant in an absolute location,i.e. 0x4500
Thank you again
So you want to have location 0x4500 contain a particular constant
value? I think you will have to do this outside of the C program,
unless your dialect of C has special extensions to do this.
As you say, the linker decides where to put it. So the general
approach would be to have an assembly language file that defines the
constant, in its own section. Then you need to modify the linker
script to place this section at the address you want. The details will
depend on the tools you use.
Why do you want to do this? It does not make much sense to me.
--
John Devereux
.
- Follow-Ups:
- Re: codewarrior HC12,thanks but......
- From: cs_posting
- R: codewarrior HC12,thanks but......
- From: blisca
- Re: codewarrior HC12,thanks but......
- References:
- codewarrior HC12,how to impose absolute address in C?
- From: blisca
- Re: codewarrior HC12,how to impose absolute address in C?
- From: Jan Panteltje
- Re: codewarrior HC12,how to impose absolute address in C?
- From: John Devereux
- codewarrior HC12,thanks but......
- From: blisca
- codewarrior HC12,how to impose absolute address in C?
- Prev by Date: One Giant Monolithic LED
- Next by Date: Re: leaving pin floating
- Previous by thread: codewarrior HC12,thanks but......
- Next by thread: R: codewarrior HC12,thanks but......
- Index(es):
Relevant Pages
|