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.

UCD3138A headers + linker files

Other Parts Discussed in Thread: UCD3138, UCD3138A64, UCD3138A

Hello,

I'm porting firmware written for UCD3138A64 to UCD3138A. For building a project I need header files and linker files. In the training labs these are located in UCD3138*_Header Files and UCD3138*_Linker Files directories. There is a directory for UCD3138A64, but there is none for UCD3138A. Should I use the files for UCD3138, or is there any code intended specifically for UCD3138A? Where can I find it? Should I ask you to send it via email?

Best regards,

Adam

  • Hi, Adam,

    Please let us know your email, we will email you.

    Regards,
    Sean

  • Hello,

    please, use my address:    tech@arf.net.pl

    Thank you,
    Adam

  • Hi, A.R.F,

    Actually, you can download Ti LLCHB firmware where all linker and header files are included from internet. After you unzip the file , you will see the below exe installer.

    LLCHBFirmware-1.2-windows-installer.exe


    Regards,
    Sean
  • Please use the LLC HB firmware as the starting point. Delete the contents of the main.c and add in your training lab code. Then chose the build configuration right click the project -> Build Configurations -> Set active .

    The executable file will be in the related device being chosen.

    Thanks,
    Sanatan
  • Hello,

    LLC HB firmware is too big project to be used as a base for a new firmware. Instead of starting a clean firmware from scratch, first it needs guessing which parts of the code should be removed, to know what is going on in the code and to avoid "surprises" later, like duplicating something that's already there, for example init functions.

    Just replacing the header and linker files from training labs with the ones from LLC HB firmware doesn't help, as the LLC HB firmware linker files do not define _zero_out_integrity_word symbol, needed by code from training labs. If I try to copy more code from LLC HB firmware to the code of training labs further errors appear, like undefined symbols or redefined symbols.

    Can you provide "training labs compatible" linker files for UCD3138A?

    Regards,
    Adam
  • Adam,

    Its actually very simple . Remove all functions in main.c except void main() and void c_init00(void). And keep the main function as follows :
    void main()
    {
    init_pmbus(0x58);
    for(;;)
    {
    pmbus_handler();
    }

    }

    Then you can start adding code for initializations .
    Thanks,
    Sanatan
  • Sanatan,

    I was thinking rather about the code in software_interrupt.c, interrupts.c, function_definitions.h, pmbus*, etc.

    As I wrote in the first post, I am _porting_ a tested firmware, which was prepared for other chip from UCD3138 family. I would like not to have to start the work from zero and not to have to guess if my code interacts with other "predefined" parts of the code.

    I have not seen any documentation that would explain which parts of the code in the files mentioned above is the bare minimum necessary. Is such documentation available?

    Regards,
    Adam
  • Adam,

    We don't have such a document . Also its a very complex task trying to get the environment working by porting to a new device . Hence we suggest the following method.
    Even though you have a working code for the UCD3138 device , its still a matter of copying the code from your project to the other .
    I can give you instructions on this :

    1) import the LLCHB firmware to your workspace.
    2) Set the device configuration to ucd3138A . To do this, go to project , right click -> "Build Configurations "-> "Set active"->"UCD3138A (UCD3138A Configuration)".
    3) Delete all the files except cyclone_global_variables_defs.c ,main.h, software_interrupt_wrapper.c, software_interrupt.c and software_interrupts.h.
    4) Now add the files from your existing project(main.c,interrupts.c,standard_interrupt.c and variables.h
    ) to this project so that the files containing in the new project are

    cyclone_global_variables_defs.c ,main.h, software_interrupt_wrapper.c, software_interrup.c, software_interrupts.h, main.c,interrupts.c, standard_interrupt.c and variables.h

    5) Make sure that the files from your existing project has the following header files :

    #include "system_defines.h"
    #include "cyclone_device.h"
    #include "variables.h"
    #include "function_definitions.h"
    #include "software_interrupts.h"
    #include "cyclone_defines.h"
    #include "pmbus_common.h"

    Please let me know how it goes .

    Thanks,
    Sanatan