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

Problems with storing data in ROM & lockups

Hello, I have data structures of the following type


const void * testpanel_pointers[][4] =
{
        { "Status", NULL, NULL, NULL },
        { "Configuration", NULL, NULL, NULL },
        { "Self Test", NULL, NULL, NULL },
        { "Day", NULL, NULL, NULL},
        { "Begin Countdown", NULL, NULL, NULL },
        { "Value", (void*)&edit_test, (void*)IntEdit::getString, "C" },
        { "Refresh Menu", NULL, NULL, NULL },
        { "Submenu->", NULL, NULL, NULL },
};

that I want to be stored in ROM as opposed to RAM, which is of course much more limited in size. The values are parameters that depend on the type of object that needs to be created. In the above example, some are C-strings, some are addresses of integers, and some are function pointers. However, the compiler/linker keeps treating the above data as RW-data, which produces lock-ups after the total exceeds about 1040 bytes.

Does anyone know what might be wrong?

Parents
  • "Is this the only place in your code that is referencing the DayOfWeek and the function? If so, then the compiler/linker might have previously removed the code and data associated with them when you changed these references to NULL."

    It is. Yeah, that sounds reasonable.

    A co-worker just helped me with the hanging issue. Since Cross-Module Optimization is turned on, I have to click Rebuild twice. After that, no more hangs. At least that's out of the way, although they could've highlighted this someplace other than an obscure part of the manual.

Reply
  • "Is this the only place in your code that is referencing the DayOfWeek and the function? If so, then the compiler/linker might have previously removed the code and data associated with them when you changed these references to NULL."

    It is. Yeah, that sounds reasonable.

    A co-worker just helped me with the hanging issue. Since Cross-Module Optimization is turned on, I have to click Rebuild twice. After that, no more hangs. At least that's out of the way, although they could've highlighted this someplace other than an obscure part of the manual.

Children
No data