This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28P659DH-Q1: Undefined SecureCopyCodeZ1() Function

Part Number: TMS320F28P659DH-Q1
Other Parts Discussed in Thread: C2000WARE

Hello experts,

I would like to invoke the ROM function SecureCopyCodeZ1() to trigger the SCCRESET.

However, after linking "F28P65x_CPU1_SafeZoneCodeSymbols.lib", the compiler indicates that SecureCopyCodeZ1() is the undefined symbol.

Could you please let me know where this function is defined that I should link or include?

Thanks and regards,

C.C.Liu

  • Hi C.C.

    Try copying the f28P65xCPU1_SecureZoneCodeSymbols.lib file from C2000Ware_5_02_00_00\libraries\boot_rom\f28P65x\rev0\rom_symbol_libs\cpu1\SafeZoneCode\lib into your project.

    Thank you,

    Luke

  • Hello Luke,

    Thank you for the information.

    Since I'm using the COFF format instead of the ELF format, linking 'f28P65xCPU1_SecureZoneCodeSymbols.lib' from '..\rom_symbol_libs\cpu1\SafeZoneCode\lib' displays the following warning message:

    So, I tried linking 'F28P65x_CPU1_SafeZoneCodeSymbols.lib' from '..\rom_symbol_libs\cpu1\SafeZoneCode_coff\lib' as described in this ticket, and it shows the message below:

    Do you have any other solutions or suggestions?

    Thanks and regards,

    C.C.Liu

  • Have you declared this function in your main.c file?

    --Luke

  • Hello Luke,

    Yes, I have declared this function, like below:

    extern uint16 SecureCopyCodeZ1(uint32 size, uint16 *dst, uint16 *src);
    Thanks and Regards,
    C.C.Liu
  • C.C.

    Could you try copy and pasting the .lib file into your project?

    Thank you,

    Luke

  • Hello Luke,

    I have tried to copy both the 'f28P65xCPU1_SecureZoneCodeSymbols.lib' and 'F28P65x_CPU1_SafeZoneCodeSymbols.lib' into my project and linked them directly (one by one). The phenomena were the same as mentioned above.

    Thanks and regards,

    C.C. Liu

  • C.C.

    Understood, I'll loop in another security expert to assist with this issue.

    --Luke

  • Hello Luke,

    Could you please let me know if you have any updated information that you can share with us?

    Thanks and regards,

    C.C. Liu

  • Hi C.C.

    I will try to get back to you tomorrow on this issue.

    Thank you,

    Luke

  • Hi Chen-Chih,

    The following solution worked for me:

    Declare function in main as follows:

    uint16_t SecureCopyCodeZ1(uint32_t size, uint16_t *dst, uint16_t *src);

    Copy the following .lib into your project:

    libraries\boot_rom\f28P65x\rev0\rom_symbol_libs\cpu1\SafeZoneCode\lib\f28P65xCPU1_SecureZoneCodeSymbols.lib

    In your project properties, change C2000 Compiler -> Processor Options -> Specify VCU support to vcu0.

    Let me know if this works for you.

    Thank you,

    Luke

  • Hello Luke,

    This method also shows that SecureCopyCodeZ1 has not been defined. The difference from my earlier test is that I did not configure any VCU. However, the compiler datasheet mentions that the default is vcu0, so there may not be a problem.

    My C2000Ware version is 5_01_00_00. May I know which version you used for testing? Alternatively, could you send me the f28P65xCPU1_SecureZoneCodeSymbols.lib directly for validation?

    Thanks and regards,

    C.C. Liu

  • Hi C.C.

    I used the same C2000Ware version, you can use the file path I shared in my previous post to get the same .lib file. It may be worth trying with the latest C2000Ware as well.

    Do you still get an error message saying the file types are incompatible? This went away for me after changing the project properties. Can you check to make sure you've configured this to vcu0?

    Thank you,

    Luke

  • Hello Luke,

    After configuring VCU to vcu0, the compiler displays additional information that the file type is incompatible.

    Since the same settings work fine on the 28377D (with the corresponding .lib and function), I don't think there are any incorrect settings on the F28P65x. This is a little bit strange...

    Kindly help me determine if there are any settings I missed.

    Thanks and Regards,

    C.C. Liu

  • Hi C.C.

    I started this process over and followed the following steps:

    1. Using CCS 12.7
    2. Import empty_driverlib_project from C2000Ware 5.01
    3. Copy and pasted C2000Ware_5_01_00_00libraries\boot_rom\f28P65x\rev0\rom_symbol_libs\cpu1\SafeZoneCode\lib\f28P65xCPU1_SecureZoneCodeSymbols.lib
    4. Added function declaration above main function:

    uint16_t SecureCopyCodeZ1(uint32_t size, uint16_t *dst, uint16_t *src);

    5. Added following line of code to beginning of main function:

     uint16_t junk = SecureCopyCodeZ1(0,0,0);

    Can you follow these steps exactly and let me know if you encounter an error?

    Thank you,

    Luke

  • Hello Luke,

    It works based on your steps. However, the demo project, empty_driverlib_project, uses the ELF format by default. After switching to the COFF format (because my project also uses the COFF format), it still shows that SecureCopyCodeZ1 is undefined.

    Could you configure the output format to COFF on your side as well? As shown below:

    I have conducted an additional test (as I inquired about in this ticket). If we copy ..\C2000Ware_5_01_00_00\libraries\boot_rom\f28P65x\rev0\rom_symbol_libs\cpu1\SafeZoneCode_coff\lib\F28P65x_CPU1_SafeZoneCodeSymbols.lib and paste it into the imported empty_driverlib_project, it still displays that SecureCopyCodeZ1 is undefined.

    This confuses me as to why F28P65x_CPU1_SafeZoneCodeSymbols.lib also cannot be supported when the output format is COFF.

    Thanks and Regards,

    C.C. Liu

  • Hi C.C.

    I have recreated this issue on my side using the COFF format. I will bring this up with our software team to correct this in the next version of C2000Ware.

    For now, do you have the option to build your project in the ELF format?

    Thank you,

    Luke

  • Hello Luke,

    Thank you.

    Since we used the old project (28377D) with some modifications to design our next-generation product (by using F28p65x), we don't want to change too much, including the output format.

    Our goal is to trigger the reset without RAM initialization. The F28P65x can use both SCCRESET and WDRS to trigger a reset without initializing RAM data. Hence, the issue of this ticket is not urgent for us. However, we may still need to use such a security copy function in the future. Given this, please kindly push the development team to fix it.

    Thanks and Regards,

    C.C. Liu

  • Hi C.C.

    Understood, I will emphasize the importance of getting this fixed to our software team. Let me know if you need any further support.

    Thank you,

    Luke