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.

Compiler/TMS320F28388D: Porting BIOS to C2000Ware Project

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE,

Tool/software: TI C/C++ Compiler

Hi all,

I need to port BIOS to an existing C2000Ware project due to customer requirements. According to the code generation procedure below,

I need to new a makefile to parse *.cfg file which is used to configure SYS/BIOS, at the same time, the makefile also could build original C2000Ware source code just like before.

So what should I do for this purpose?

Thanks.

QL

  • Another question:

    The "src" folder is generated automatically when I try to rebulid the RTOS project including *.cfg file. My question is how to change the output path of "src" folder?

    The file "makefile" is also auto-generated at the same time, so I don't know how to edit it.

    Thanks.

  • A good reference on how to use C2000Ware with SYS/BIOS can be found here: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/773407?RTOS-TMS320F28379D-How-can-I-use-C2000Ware-library-with-SYS-BIOS-

    The steps on how to relocate the 'src' subdirectory are explained here: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/773407?RTOS-TMS320F28379D-How-can-I-use-C2000Ware-library-with-SYS-BIOS-

    In following these two threads, you won't have to edit the makefile. It is recommended to not edit auto-generated makefiles. 

    Best,

    Megan

  • Dear Megan,

    As you said, it is recommended starting from a SYS/BIOS project and adding support for the C2000Ware libraries to it, adding the required library files and include paths. However, here is the reality. I have already finished a complicated project based on C2000Ware libraries. While I also create a RTOS project with threads configuration completed, which could meet the scheduling requirements that have been implemented in C2000Ware project based on Timer interrupts.

    So I want to porting RTOS to previous C2000Ware project, not the other way around.

    What I have done are these as following, please help me check it.

    First, in the previous C2000Ware project, I new a RTOS_CPU1.cfg file and copy the contents from the file of same type in the RTOS project mentioned ahead.

    Second, I changed the compiler options of the current C2000Ware project, refer to the settings of the RTOS project. Just take the picture below for an example:

    Third, I changed the linker configuration file (cmd) refer to both the linker errors and the cmd file in RTOS project.

    Forth, I new a c file to implemente necessary threads, like Hwi, Swi, Tasks,and Semaphore, etc.

    At the end, I close clock configuration in previous C2000Ware project, and add Bios_Start() to the main() function just like this:

    Now I have finished the building of the current project mixed with RTOS and C2000Ware libraries. But I don't know if it could work well.

    Please help me review it. Thanks.

    QL

  • Since there is a mix of configurations (e.g. include paths, auto-generated cmd files, etc) that need to be just right to make a project work correctly, we strongly recommend starting with an existing SYS/BIOS project and adding C2000Ware on top of it.

    The steps you have provided look correct. However, there could be missing configurations that aren't shown that could cause the project to not work. As such, is there an error you are getting that could identify any gaps in your project setup? I would also suggest cross-referencing your current configuration with the *.cfg files of an existing SYS/BIOS project to find any gaps.

  • Dear Megan,I‘ll check it next week, and then it would be clear if it works well. Thanks again!

  • Dear Megan,

    Recently I find the output frequency become inaccuracy  when I use the project with BIOS. I confirm that the configurations of EPWM11 are the same between project with BIOS and  without BIOS (i.e. C2000ware projec). Pls refer to the information below for details:

    With the same configuration of EPWM11, the output frequency is 250Khz based on bare-metal project, contrastly, the output is 237Khz based on BIOS project.

    I don't know what happened. Does it the bus conflict occur?  As far as I know, the EPWM modules run itself once configured. Anything else (other software module) could not influence them at all. So what would I do to avoid this. Dose it the BIOS itself implicitly changed the configurations of the corresponding EPWM module? Please help me resolve it.

    Thanks.

    PS: Other things seems run normaly until now with the BIOS.

  • In your BIOS project, are you using an internal (INTOSC1 or INTOSC2) or an external oscillator for your device? If you are using an external oscillator, you may need to adjust the following setting in your kernel configuration (*.cfg): 

    var Boot = xdc.useModule('ti.sysbios.family.arm.f2838x.init.Boot');
    Boot.pllSourcedINTOSC = true;

    You can see the boot module here for more details.

  • Dear Megan,

    First, thanks a lot for your help since a long time.

    Recently, I found several exceptions of my program with SYS/BIOS. When I monitor runtime with ROV classic viewer, tasks are bloked on "Internal Error" like below:

    I want to know what has happened urgently because my project runs to B Sample now. So please help me review my configuration of SYS/BIOS, and give me some explanation about the "Internal Error" mentioned ahead.

    Following are my configurations of BIOS based on TMS320F28388D, including RTOS_CPU1.cfg and Bios_Cfg.c.

    BIOS_CFG.rar

    Following is the snapshot of "Internal Error":

    BIOS_errors.rar

    Please help me for it. Thanks a lot!

    QL

  • Hi QL,

    It looks like the target was still running when ROV was updating. This may result in garbage in ROV. Please refer to the second question on this forum for more detail: http://e2e.ti.com/support/tools/ccs/f/81/t/741987?CCS-LAUNCHXL-CC2640R2-ROV-view-stackPeak-and-internal-error

    Megan

  • Thanks again.

    Please inform me if my configurations of BIOS have errors or inappropriate points.

    QL

  • Hello,

    The configurations look good to me.

    For any future problems you may face, please start a new thread. We aim to have one topic per thread so that other users with the same issue can easily find a helpful thread.

    Best,

    Megan