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.

Rebuilding SYS/BIOS

Other Parts Discussed in Thread: CCSTUDIO, TMS320C6416, SYSBIOS

Hello, Everyone!

I have a question about rebuilding SYS/BIOS

The version of CCS I used is CCSv5.0.3. I referred to a pdf named  "TI SYS/BIOS Real-time Operating System v6.x User’s Guide". The version of BIOS I used is bios_6_31_04_27. I want to rebuild the SYS/BIOS.But when I do it according to the pdf, I met a question as follows:

I saw the file named "fsutils.c". In this file, it defines the header file named "stdio.h".

In stdio.h,there are codes as follows:

#ifndef _STDIO_H
# error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
#endif

I don't know what the problem it is.

So can you tell me what I should do to solve this problem.

Thanks.

  • Hi Meng,

    Where did the bits/stdio.h come from? It is not part of the SYS/BIOS install.

    Todd

  • Thank you for your reply, Todd.

    I know it's not part of the SYS/BIOS install. But when I rebuild the SYS/BIOS through DOS command prompt window, it will have an error because there is no source file such as "endian.h" and so on.

    So I copied those files from Red Hat Enterprise Linux v5.The path is /include.

    Is there anything wrong ??

    Or what should I do when the error that is no source file happened?

    Can you tell me ?

    Thanks.

  • Meng,

    The steps to build any operating system are pretty formal. I don't think putting SYS/BIOS files into Red Hat would work either.

    What are the exact errors you get when you tried to rebuild SYS/BIOS (as shipped)? Why are you trying to rebuild it anyway?

    Todd

  • Thank you , Todd.

    I know it's formal, but I have no idea about it.

    When I rebuild the SYS/BIOS , it will have a question as follows:

    It told me that it needs some source files. But I didn't find the file.

    So in this case, what should I do??

    If I want to modify or add functionality, I need to rebuild the SYS/BIOS.

    So can you give me some good ideas??

  • I'll confirm that the instructions in the guide are correct. I'll do this on Monday morning.

    Todd

  • Meng,

    When you tried to rebuild SYS/BIOS had you modified any of the code?

    Can you attach your biosConfig.bld file?

    Are you building on Linux or Windows?

    Can you printout your XDCPATH and Parth (e.g. on Command Prompt, type "set").

    Todd

  • Thank you , Todd.

    1. When I tried to rebuild SYS/BIOS, I have modified some code.

    2. My biosConfig.bld file is as follows:

    /*
     *  ======== config.bld ========
     *  Sample Build configuration script
     */

    //Use CCS4.0
    var rootDirPre = "C:/Program Files/Texas Instruments/CCSv4/tools/compiler/";
    var rootDirPost = "";

    //Use CCS3.3
    //var rootDirPre = "C:/CCStudio_v3.3/";
    //var rootDirPost = "/cgtools";

    //Setup for c28_large target
    var C28_large = xdc.useModule('ti.targets.C28_large');
    C28_large.rootDir = rootDirPre + "c2000" + rootDirPost;
    //C28_large.ccOpts.suffix += " -mi10 -mo ";
    //set default platform and list of all interested platforms for c28_large
    C28_large.platforms = [
                        "ti.platforms.ezdsp28335",
                    ];
    C28_large.platform = C28_large.platforms[0];               

    //Setup for c64P target
    var C64P = xdc.useModule('ti.targets.C64P');
    C64P.rootDir = rootDirPre + "c6000" + rootDirPost;
    C64P.ccOpts.suffix += " -mi10 -mo ";
    //set default platform and list of all interested platforms for c64P
    C64P.platforms = [
                         "ti.platforms.sim64Pxx:simTCI6482",
                         "ti.platforms.evmDM6446",
                     ];
    C64P.platform = C64P.platforms[0];

    //Setup for c67P elf target
    var C67P = xdc.useModule('ti.targets.elf.C67P');
    C67P.rootDir = rootDirPre + "c6000" + rootDirPost;
    C67P.ccOpts.suffix += " -mi10 -mo ";
    //set default platform and list of all interested platforms for c67P
    C67P.platforms = [
                         "ti.platforms.padk6727",
                     ];
    C67P.platform = C67P.platforms[0];

    //Setup for c674 target
    var C674 = xdc.useModule('ti.targets.C674');
    C674.rootDir = rootDirPre + "c6000" + rootDirPost;
    C674.ccOpts.suffix += " -mi10 -mo ";
    //set default platform and list of all interested platforms for c674
    C674.platforms = [
                        "ti.platforms.evmDA830",
                    ];
    C674.platform = C674.platforms[0];

    //Setup for ARM elf target
    var Arm9 = xdc.useModule('ti.targets.arm.elf.Arm9');
    Arm9.rootDir =  rootDirPre + "tms470" + rootDirPost;
    Arm9.ccOpts.suffix += " -ms ";
    //set default platform and list of all interested platforms for Arm9
    Arm9.platforms = [
                         "ti.platforms.evmDM6446",
                     ];
    Arm9.platform = Arm9.platforms[0];

    //Setup for M3 elf target
    var M3 = xdc.useModule('ti.targets.arm.elf.M3');
    M3.rootDir =  rootDirPre + "tms470" + rootDirPost;
    M3.ccOpts.suffix += " -ms ";
    //set default platform and list of all interested platforms for M3
    M3.platforms = [
                         "ti.platforms.simDucati",
                   ];
    M3.platform = M3.platforms[0];

    //Setup for MSP430 target
    var MSP430 = xdc.useModule('ti.targets.msp430.MSP430');
    MSP430.rootDir =  rootDirPre + "msp430" + rootDirPost;
    MSP430.ccOpts.suffix;
    //set default platform and list of all interested platforms for MSP430
    MSP430.platforms = [
                         "ti.platforms.exp430F5438",
                   ];
    MSP430.platform = MSP430.platforms[0];

    // Setup for Microsoft target for Visual Studio 8.0
    var Win32 = xdc.useModule('microsoft.targets.Win32');
    // pathname to C:\Program Files\Microsoft Visual Studio 8 (8.3 format)
    Win32.rootDir = "C:/PROGRA~1/MID05A~1";
    // pathname of Platform SDK if not installed under Visual Studio 8 (8.3 format)
    // Win32.vcPath["VC8"].sdkPath = "C:/PROGRA~1/MI9547~1";
    Win32.profiles["whole_program"] = Win32.profiles["release"];
    Win32.profiles["whole_program_debug"] = Win32.profiles["release"];
    Win32.strictANSI = false;
    Win32.platforms = [
                         "host.platforms.PC",
                     ];

    //list interested targets in Build.targets array
    Build.targets = [
                        //C28_large,
                        C64P,
                        //C67P,
                        //C674,
                        //Arm9,
                        //M3,
                        //MSP430,   
                        //Win32,
                    ];

    //Specify deviceName for simulators
    Build.platformTable["ti.platforms.sim6xxx:sim6416"] = {deviceName: "TMS320C6416"};
    Build.platformTable["ti.platforms.sim64Pxx:simTCI6482"] = {deviceName: "TMS320CTCI6482"};

     

    3. I am building on Windows

    4. My XDCPATH is as follows:

    set XDCPATH=%XDCPATH%;E:/CCS_5.0.3/ipc_1_22_03_23/packages

     

    Are there any problems??

  • It looks fine. Were you able to rebuild before you made modifications. I recommend doing this to avoid issues that you might have introduced. Can you type "set" in the command prompt. I'd like to see all your environment variables.

    Todd

  • Thank you, Todd.

    Before I made modifications, I didn't rebuild.

    When I tried to do this, I also had some questions.

    1. When I rebuild, I modified some path in my biosConfig.bld file. This is as follows:

         var rootDirPre = "E:/CCS_5.0.3/ccsv5/tools/compiler";

        Win32.rootDir = "F:/VS2008";

        Win32.vcPath["VC8"].sdkPath = "F:/VS2008/SDK"; 

    2. After modification, I rebuild. There is an error as follows:

    It told me that it needs some files.

    3. My environment variables are as follows:

    Are there any problems??

    Can you give me some suggestions??

  • Hi Meng,

    I am able to reproduce the error you've been seeing here.

    The only thing I change here so far was:

    var rootDirPre = "C:/TI/ccsv5/tools/compiler/"; (because I'm using CCS v5.1)

    I'll get back to you when I know more.

    -Tom

  • Meng,

    if you aren't planning to use the FatFs (FAT file system) utilities, then you can simply exclude it from being built with SYS/BIOS.

    To do this, rename the "package.bld" file within ti/sysbios/fatfs/utils/ to some other name, such as "package.nomak."

    This problem has been fixed in the more recent versions of SYS/BIOS.

  • Thank you , Tom

    1. When I only changed the rootDirPre, it told me that the Win32.rootDir is wrong. So I modified it.

       At last, I modified the rootDirPre, Win32.rootDir and Win32.vcPath["VC8"].sdkPath .  After modifying the path, it told me that it's lack of some files.

       So what should I do??

    2. If I rename the "package.bld" file, is there any influence on the system?? 

  • Meng,

    as you aren't building for the Win32 target, you can also comment out the related Win32 code.

    I've attached my "biosConfig.bld". You will need to remove the .txt extension and update the "rootDirPre" variable for your installation directory.

    Renaming package.bld within ti/sysbios/fatfs/utils, will just prevent xdc from finding the utils directory during build time; hence excluding it. The FatFs module will still be available if want to use it, but the additional utilities wouldn't be.

    The FatFs Utilities section in the link provided below can explain what the utilities do.

    http://processors.wiki.ti.com/index.php/FatFS_for_SYS/BIOS

    6433.biosConfig.bld.txt

    -Tom

  • Thank you , Tom.

    I rebuild the SYS/BIOS as you said. It had no errors.

    And then I used the new package in CCSv5, that means I pointed my project to this rebuilt under the Products and Repositories tab.

    When I debug my project, the CCSv5 was automatically closed.

    Why did this problem occur??

     

    Meng

  • Hi Meng,

    I don't know why CCS would have closed or crashed. Does it happen repeatedly?

    Did you add your version of BIOS with the "packages" sub-directory and remove the existing version of BIOS?

    e.g. C:\mybios\custom_bios_6_31_04_27\packages

    Did you perform a "Clean Project" before rebuilding?

  • Thank you, Tom

    This problem happened repeatedly.

    Of couse, I added  my new "packages" sub-directory and remove the existing one as follows:

    I didn't perform the clean project. Because when I executed the command "xdc clean", it would occur an error as follows:

    So what's the problem??

     

    Meng

  • Hi Meng,

    I believe we are seeing two (or more) problems here.

    CCS crashing:

    You are using an older version of CCS v5. I would update your CCS to the latest version found here.

    SYS/BIOS building/cleaning:

    The version of BIOS you are using is using an older method of building the SYS/BIOS libraries. (Newer versions of SYS/BIOS has this simplified using gmake). In order for you to clean your version of SYS/BIOS you will need to go into the ".\ti\sysbios" sub-directory and then execute a xdc clean.

    e.g. D:\myBiosBuilds\custom_bios_6_31_04_27\packages\ti\sysbios> xdc clean

    This issue however shouldn't be the cause for CCS to crash.

    What I meant by cleaning your project was to "right-click" on your project and selecting Clean Project.

    With the settings you've shown in your previous posts, you should be able to clean and build your project against your custom BIOS libraries.