Re: codewarrior HC12,thanks but......



"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
.



Relevant Pages

  • coders having fun.
    ... I was recently doing a portupgrade of Eterm and as it was compiling I saw ... this flash across the screen: ... checking for Linux 2.1 or higher... ...
    (comp.unix.bsd.freebsd.misc)
  • newbie Platform build questions
    ... I've installed win ce 5.0 and I'm trying to create a boot flash card ... and compiling it. ... Now I want to transfer the compiled platform to compact flash and try to ... My compact flash have 256MB and my platform image have about 12MB. ...
    (microsoft.public.windowsce.embedded)
  • Re: Optimizing with GCC
    ... The OS is now running and uses ~3.7K Flash. ... In an earlier thread Mr John Devereux wrote: ... Map-file showed a startup object size 0x44 @ address 0. ... At the top of the linker script. ...
    (comp.arch.embedded)
  • Re: Confused about Flash
    ... doing the flash and hope the power stays on. ... copied from the flash to the RAM is on a different adress, ... This is easily done by adding an appropriate section in the linker ... reflash everything, boot block too, and make a clean start. ...
    (sci.electronics.design)
  • Re: 68HC08
    ... > controller flash on the board. ... Can CW HC12 be used as a stand alone flash programmer for the HC12 ... You can build a DOS batch file as ... Also change the s-record name to the one you want. ...
    (comp.arch.embedded)