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.

Problems in BIOS5 on EVM6472

BIOS doe not support the functions fprint/printf  etc.

It is recommended to convert the references to fprintf/printf to System_printf.

Of course we have to change: 

1. The include file to: 

#include <xdc/std.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>

#include <ti/sdo/io/Stream.h>
#include <ti/sdo/io/drivers/Generator.h>
#include <xdc/cfg/global.h>
2. In the configuration file, we have to insert  alos: 
var SysMin = xdc.useModule('xdc.runtime.SysMin');
var System = xdc.useModule('xdc.runtime.System');
System.SupportProxy = SysMin;

However, there is a bug in the build process. The exeutable file is not build.

  • Hi Dr. Yehuda Singer,

    Can you please post the build error that you are seeing? (the entire build output is preferred)

    Thanks,

    Steve

  • Dear Steve,

    THanks for your reply. 

    After I build the cfg file, we get:(CCS5 colours lines 12-17 ).

    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory')
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    System.SupportProxy = SysMin ;
    var Text = xdc.useModule('xdc.runtime.Text');
    var BIOS = xdc.useModule('ti.sysbios.BIOS');Z
    BIOS.taskEnabled = true;
    BIOS.swiEnabled = true;
    BIOS.libType = BIOS.LibType_Custom;
    BIOS.clockEnabled = false;
    BIOS.rtsGateType = BIOS.NoLocking;
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var Task = xdc.useModule('ti.sysbios.knl.Task');

    Task.defaultStackSize = 1000;
    Task.defaultStackHeap = null;
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Event = xdc.useModule('ti.sysbios.knl.Event');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');

    /*
    * Create system heap in DDR2.
    */

    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var heapMemParams = new HeapMem.Params();
    heapMemParams.size = 0x00400000; // 4 MB
    heapMemParams.sectionName = "systemHeap";
    Program.global.heap0 = HeapMem.create(heapMemParams);
    Program.sectMap["systemHeap"] = "DDR2";

    var Memory = xdc.useModule('xdc.runtime.Memory');
    Memory.defaultHeapInstance = Program.global.heap0;
    /*---------------------------------------------------------------------------------*/
    Program.sectMap[".far"] = "DDR2";
    Program.sectMap[".cinit"] = "DDR2";
    Program.sectMap[".bss"] = "DDR2";
    Program.sectMap[".const"] = "DDR2";
    Program.sectMap[".text"] = "DDR2";
    Program.sectMap[".code"] = "DDR2";
    Program.sectMap[".data"] = "DDR2";
    Program.sectMap[".far::taskStackSection"] = "SL2RAM";

    //Program.sectMap[".far:taskStackSection"] = "SL2RAM";
    Program.sectMap[".stack"] = "SL2RAM";

    Program.sectMap[".sysmem"] = "DDR2";


    /*
    * Create heaps as global variables so they can be used in C code.
    */
    var tempMemParams = new HeapMem.Params();

    var extHeapName = "DDR2"; // just a default, override if needed

    tempMemParams.size = 0x00400000; // 4 MB
    tempMemParams.sectionName = ".DDR2_HEAP";

    Program.global.DDR2_HEAP = HeapMem.create(tempMemParams);
    Program.sectMap[".DDR2_HEAP"] = extHeapName;

    var intHeapName = "LL2RAM"; // just a default, override if needed

    tempMemParams.size = 0x0002c000; // 112 KB
    tempMemParams.sectionName = ".LL2_HEAP";

    Program.global.LL2_HEAP = HeapMem.create(tempMemParams);
    Program.sectMap[".LL2_HEAP"] = intHeapName;


    Can I send you via Email the project?
    Best regadrs,
    Yehuda
  • Yehuda,

    I could not open your project.  When I tried I got an error that it is corrupted ...

    Are you able to open up what you sent me in your version of CCS?  Please try opening it in a *new workspace* and let me know if you see the same error.

    Thanks,

    Steve

  • Yehuda,

    As discussed privately, I still could not open your project due to corrupt project meta data.

    Can you please reply with the error message that you are seeing?  I asked for that previously but you only posted some configuration code and C code.

    If you post the error message (in fact, the full build output, including the error message) this will help me better understand the problem you are facing and perhaps enable me to provide a solution.

    Thanks,

    Steve

  • 8475.TI demo Version 0.8.zip

    Dear Steve, 

    Thanks for your answer. You are right. THe export function from the CCS5 does not include the meta-data.

    Instead, I did WINZIP on the folder which included the meta-data.

    Thanks,

    Yehuda

  • Yehuda,

    Ok, thanks.  This time I was able to import your project without any issues within CCS.

    I've been looking at your project and have seen a few problems.

    1. I notice that you are using a custom config.bld file ... in your project's XDCtools "Advanced Options" you are including a build configuration file:

    "${PROJECT_ROOT}/.config/xconfig_bios6/config.bld"

    This file was causing build errors so I removed it.  I'm curious as to why you are building with that file?  (perhaps it truly is needed but I missed the reason to use it in the build).

    I removed it ...

    2. After the above, the next problem I see is due to inconsistencies between your bios6.cfg file and the linker command file lnk.cmd that you are are using in your project:

    configuring bios6.xe64P from package/cfg/bios6_pe64P.cfg ...
    js: "C:\ti\xdctools_3_22_04_46\packages\ti\targets\elf\linkcmd.xdt#108(eval)", line 1: Error: Allocations for sections '.bss', '.rodata' and '.neardata' must be same.

    This error is due to your bios6.cfg file having:

    Program.sectMap[".bss"]              =    "DDR2";

    but your lnk.cmd file has:

    SECTIONS
    {
        .text          >  SHL2RAM
        .stack         >  SHL2RAM
        .bss           >  SHL2RAM

    To get past this, I removed the line from your cfg file that placed bss into DDR2.

    3. The next problem is that the IPC file List.h could not be found:

    "C:/Documents and Settings/a0323418/My Documents/Downloads/2642.TI0demo0Version00.8/TI demo Version 0.8/RISC_Demo_EVM6472_Version_0.75/SOURCE_FILES/systemc_2.2.1/src/sysc/utils/sc_string.h", line 60: fatal error #5: could not open source file "ti/sdo/utils/List.h"
    1 fatal error detected in the compilation of "../SOURCE_FILES/systemc_2.2.1/src/sysc/kernel/sc_time.cpp".
    Compilation terminated.

    This is because you did not bring in the List module into your configuration:

    var List = xdc.useModule("ti.sdo.utils.List");

    The above actually led to an issue I couldn't figure out yet.  Usually doing this should add the IPC installation path to the build options; however it did not and so I had to add the following manually to the XDCtools build options (--xdcpath):

        "${IPC_CG_ROOT}/packages"

    4. At this point, the project is getting errors due to C++ class member access. For example:

    "C:/Documents and Settings/a0323418/My Documents/Downloads/2642.TI0demo0Version00.8/TI demo Version 0.8/RISC_Demo_EVM6472_Version_0.75/SOURCE_FILES/systemc_2.2.1/src/sysc/datatypes/fx/scfx_ieee.h", line 204: error #136: class "sc_dt::ieee_double::<unnamed>" has no member "negative"

    I think these errors are due to some problem in your application and are not BIOS related.  So, I will let you take it over from here.  I'll post the updated example to our "friend thread" so that it remains private.

    Steve