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

C167 What's behind ?C_LIB_NCONST

We are currently debugging a C167 project that has been developed 10 years ago, it's approx. 80x out there in the field.
We found out that there is some misconfiguration in the memory map, the NCONST class is located to the XRAM memory address range.

NCONST( 0x00E000-0x00E3FF)

Now, the M66 linker output tells us, that 30bytes of constants have been located there. The linker name of this constants is ?C_LIB_NCONST.
What is this and what is it used for? Doesn't seem to be important since the systems out there cannot use these constants. But we'd like to know in order to avoid problems in the future and of course to understand the project fully.

Parents
  • If the answer is: those constants are not only used in cases we do not have, then we're fine.
    

    Only Keil can answer that... Or perhaps my using some smart emulator debugging to check if the memory area gets accessed and if so by which function. But even then, when the software (or Keil tools) ever gets updated - and they will - and the "consts" are still missing, things can still go wrong.

    My suggestion is to disable the on-chip XRAM and put flash ROM in the area, or move the NCONST area to be in flash ROM space. That's the only way to make sure you won't run into problems (regarding this issue).

    Good luck!

    --
    J

Reply
  • If the answer is: those constants are not only used in cases we do not have, then we're fine.
    

    Only Keil can answer that... Or perhaps my using some smart emulator debugging to check if the memory area gets accessed and if so by which function. But even then, when the software (or Keil tools) ever gets updated - and they will - and the "consts" are still missing, things can still go wrong.

    My suggestion is to disable the on-chip XRAM and put flash ROM in the area, or move the NCONST area to be in flash ROM space. That's the only way to make sure you won't run into problems (regarding this issue).

    Good luck!

    --
    J

Children
No data