how to define memory position and assign number....

From: Mark (yodai_at_spamnot.mail.vu)
Date: 03/31/04


Date: Wed, 31 Mar 2004 13:46:49 GMT

Hey all.... I'm trying to do something that should be easy, but my compiler
doesn't allow me... I am trying to define a variable into a certain memory
position and then assign a default value for it....

#define _CLAVE1 ((uint16_t*)0xD000)

//This memory position is located on a flash memory
//of an embedded system and has to have the
//startup value of '99' but it will be changed from time
//to time from inside my program, which writes into the flash...
// so I try to define it's value, but my compiler says
// "_CLAVE1 redefined" if I do this

#define ((uint16_t*)0xD000) 99

//I've tried all sorts of combinations, and still, nothing works...

Any idea on how to define a memory position and it's initial value without
initialising the value from inside the program?



Relevant Pages

  • how to define a memory position variable and give it a value
    ... I've already had Mark A. Odell answer this question saying this can't be ... MSP430 and using IAR ew compiler... ... I am trying to define a variable into a certain memory ... //This memory position is located on a flash memory ...
    (comp.arch.embedded)
  • Re: WWDC -- MacBook Pro?
    ... ....but once the program has loaded it into its program memory, ... boundaries, int16 are aligned on 2 byte boundaries, int32 are ... people are always able to come up with the compiler ... Case B, same glass, same ice code water.  ...
    (comp.sys.mac.system)
  • Re: Javas performance far better that optimized C++
    ... The compiler is extremely stupid. ... no memory leaks are guaranteed. ... However I have GC in my .NET programming. ... "C.9.1 Automatic Garbage Collection ...
    (comp.lang.cpp)
  • Re: If you were inventing CoBOL...
    ... > size of shared memory is the size of procedural code. ... SECTIONs and the SEGMENT-LIMIT clause as *guidelines* in that process. ... discussing what COBOL *ought to do* and what features COBOL *ought to ... Two passes in the compiler front-end. ...
    (comp.lang.cobol)
  • Re: Compiler and How It Handles Scope
    ... VB's compiler isn't really "state of the art" David. ... memory, no matter how many processes map the code into their virtual address ... words, no real distinction is made between Public/Private variables, or even ... > Modules can contain Public and Private variables, ...
    (microsoft.public.vb.winapi)