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
  • We are currently debugging a C167 project that has been developed 10 years ago

    Sounds familiar :-)

    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)

    With XRAM you mean the on-chip XRAM I pressume.

    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.

    C_LIB_NCONST seems to contain some constants used by the C167 library I guess.

    Why can't the system use those 30 bytes? Depending on your linker file/memory map and matching startup.a66 (containing the BUSCON's/ADDRSEL's), it might be reading flash or RAM at that location. You can disable the on-chip XRAM from the startup.a66 file; check _XRAMEN. As far as I know, this memory region can then be used by any other BUSCON/ADDRSEL or fall back to BUSON0 (=chip select).

    But then again, I don't know the exact setup of your system :-)

    --
    Joost

Reply
  • We are currently debugging a C167 project that has been developed 10 years ago

    Sounds familiar :-)

    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)

    With XRAM you mean the on-chip XRAM I pressume.

    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.

    C_LIB_NCONST seems to contain some constants used by the C167 library I guess.

    Why can't the system use those 30 bytes? Depending on your linker file/memory map and matching startup.a66 (containing the BUSCON's/ADDRSEL's), it might be reading flash or RAM at that location. You can disable the on-chip XRAM from the startup.a66 file; check _XRAMEN. As far as I know, this memory region can then be used by any other BUSCON/ADDRSEL or fall back to BUSON0 (=chip select).

    But then again, I don't know the exact setup of your system :-)

    --
    Joost

Children
More questions in this forum