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.

Need help for using new sysbios modules

Other Parts Discussed in Thread: SYSBIOS

Hi:
    I am trying to port my application to sysbios using new modules and APIs.
A part of my .cfg file looks like this

bios.MEM.instance("IRAM").base = 0x00800900;
bios.MEM.instance("IRAM").len = 0x00100000;
bios.MEM.instance("IRAM").createHeap = 1;
bios.MEM.instance("IRAM").enableHeapLabel = 1;
bios.MEM.instance("IRAM").heapLabel = "IRAMSEG1";
bios.MEM.instance("IRAM").heapSize = 0x00002000;

which i have tried to replace it like this
xdc.global.HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');

var params = new HeapMem.Params ;
params.size = 0x00002000;
params.sectionName = "IRAMSEG1";
var heap1 = HeapMem.create(params);
Memory.defaultHeapInstance = heap1;
Defaults.common$.instanceHeap = heap1;

var IRAM  = Program.cpu.memoryMap.IRAM;
Program.sectMap["IRAMSEG1"] = {loadSegment: IRAM.name};

On building the program, i get the following error

undefined first referenced
  symbol       in file    
 --------- ----------------
 _IRAMSEG1 ./bioslapi.obj 

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "SysBios.out" not
   built

>> Compilation failure

 

Aparna

 

  • Are you changing your C code from DSP/BIOS 5 to SYS/BIOS 6 too? If yes, your MEM_alloc calls would have to be replaced with Memory_alloc calls. The best way to learn those new APIs is to create a new CCS project and select SYS/BIOS Memory example as a project template. In that case, you can remove all references to IRAMSEG1 from your C code because you won't need it.

    If you are using your existing C code with MEM_alloc calls, the problem is that memory heaps' IDs are not generated in SYS/BIOS 6 configurations. The only thing that might work is if you pass 0 as the first parameter to your MEM_alloc(). Your call will be then rerouted to the default heap instance, which is the IRAMSEG1 heap anyway.

    So either way, you can remove all references to IRAMSEG1 in your C code.

     

  • Thank you Sasha ! the memory example was of immense help!