Thread: pointer in rom

  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Denmark
    Posts
    13

    pointer in rom

    How do I place a pointer to a strings in the rom, I have attemptet this:
    Code:
    const char *MenuAHeadline[NUM_OF_LANG]= {"1 Unload program",""};
    But it still puts the pointer into the ram.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    You've gotta say which compiler / linker / rom image generator you're using.

  3. #3
    Registered User
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    64
    You've got three threads now in here that discuss basically the same issue.

    The other two:
    pointer to a function
    less use of ram

    How about trying to keep it focused in one thread? The answers you get in one thread are likely to be important for the other two threads as well.

  4. #4
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by ramdal
    How do I place a pointer to a strings in the rom, I have attemptet this:
    Code:
    const char *MenuAHeadline[NUM_OF_LANG]= {"1 Unload program",""};
    But it still puts the pointer into the ram.
    How about this?
    Code:
    const char *const MenuAHeadline[NUM_OF_LANG]= {"1 Unload program",""};
    [edit]If you'd actually tell us your target MCU, this could be easier. If this is still the Zilog {insertthenameofthedevice}, the ZDS docs mention a language extension rom type and show several examples.
    Last edited by Dave_Sinkula; 12-19-2005 at 09:24 AM.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Denmark
    Posts
    13
    thanx..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 03-20-2008, 07:59 AM
  2. Parameter passing with pointer to pointer
    By notsure in forum C++ Programming
    Replies: 15
    Last Post: 08-12-2006, 07:12 AM
  3. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  4. How did you master pointers?
    By Afrinux in forum C Programming
    Replies: 15
    Last Post: 01-17-2006, 08:23 PM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM