This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Writing a Text to a Specific Memory Adresss

Hello,

I want to write a text e.g. the Version Number to a Specific memory Location in the Code area.

EG the _at_ command by variables.

The text should be seen in the hex file in ascii format (for version control).

is this possible ??.

Greetings
Markus

Parents
  • You can use the #pragma USERCLASS to put an initialized string at a specific address:

    #pragma USERCLASS (CONST=VERSION)
    
    code const char* gVersion="#ver 00#";
    

    You need to put the variable in a separate source file and add the user class to the linker section:

    CONST (C:0x0000-C:0x00FF, C:0x0200-C:0xFF7F),
    CONST_VERSION (C:0x0100-C:0x01FF),
    

    Gert

Reply
  • You can use the #pragma USERCLASS to put an initialized string at a specific address:

    #pragma USERCLASS (CONST=VERSION)
    
    code const char* gVersion="#ver 00#";
    

    You need to put the variable in a separate source file and add the user class to the linker section:

    CONST (C:0x0000-C:0x00FF, C:0x0200-C:0xFF7F),
    CONST_VERSION (C:0x0100-C:0x01FF),
    

    Gert

Children
No data