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.

RTOS/TMS320F28075: Linker error: #10008-D cannot find file

Part Number: TMS320F28075
Other Parts Discussed in Thread: SYSBIOS, TMS320F28335,

Tool/software: TI-RTOS

Hi,

I'm developing a project with SYS/BIOS and I've the following linker directive in file project.cmd:

    FwFlash                 : fill = 0h > FLASH_FW,             PAGE = 0, ALIGN(4)
    {
        file1.obj(.text)
        file2.obj(.text)
        file3.obj(.text)
                
        BIOS.obj(.text)
     }
        
file1.obj, file2.obj and file3.obj are the result of compilation of file1.c, file2.c and file3.c while BIOS.obj is a SYS/BIOS file.

file1.obj, file2.obj and file3.obj are automatically located in "project\Debug\Source" directory while BIOS.obj is automatically located in "project\src\sysbios" directory.

The problem is that linking process fails with error "#10008-D cannot find file 'BIOS.obj' ".

Any hints to solve this error?

Thanks,

Demis

  • You don't need to include BIOS.ob in your linker filej. The kernel's library is brought in by the generated linker file (Debug\configPkg\linker.cmd). For example in a project I have, there is the following in this file

    -l"C:\workspace\rov2\task_TMS320F28335\Debug\configPkg\package\cfg\mutex_p28FP.o28FP"
    -l"C:\workspace\rov2\task_TMS320F28335\src\sysbios\sysbios.a28FP"
    -l"C:\ti\bios_6_50_01_12\packages\ti\catalog\c2800\init\lib\Boot.a28FP"
    -l"C:\ti\bios_6_50_01_12\packages\ti\targets\rts2800\lib\ti.targets.rts2800.a28FP"
    -l"C:\ti\bios_6_50_01_12\packages\ti\targets\rts2800\lib\boot.a28FP"

    Quick sanity check...on your project, there is a little "RTSC" on the project's folder icon...correct?

  • Hi Tod,

    thank you for your answer.

    First of all I confirm there is a little "RTSC" on my project's folder icon, so I think the project is OK.

    Then I add that using the default linker file TMS320F28075.cmd the linking process ends correctly and the software works properly.

    In Debug\configPkg\linker.cmd of my project there are the following lines:

    -l"C:\job\Cp4pwm\Debug\configPkg\package\cfg\app_p28FP.o28FP"
    -l"C:\ti\uia_2_00_06_52\packages\ti\uia\sysbios\lib\release\ti.uia.sysbios.a28FP"
    -l"C:\ti\uia_2_00_06_52\packages\ti\uia\loggers\lib\release\ti.uia.loggers.a28FP"
    -l"C:\job\Cp4pwm\src\sysbios\sysbios.a28FP"
    -l"C:\ti\bios_6_46_01_38\packages\ti\catalog\c2800\init\lib\Boot.a28FP"
    -l"C:\ti\uia_2_00_06_52\packages\ti\uia\runtime\lib\release\ti.uia.runtime.a28FP"
    -l"C:\ti\uia_2_00_06_52\packages\ti\uia\events\lib\release\ti.uia.events.a28FP"
    -l"C:\ti\bios_6_46_01_38\packages\ti\targets\rts2800\lib\ti.targets.rts2800.a28FP"
    -l"C:\ti\bios_6_46_01_38\packages\ti\targets\rts2800\lib\boot.a28FP"
    -l"C:\ti\bios_6_46_01_38\packages\ti\catalog\c2800\initF2837x\lib\Boot.a28FP"

    However both code generated by my files (file1.c, file2.c, etc.) and code generated by SYS/BIOS files (BIOS.obj, c28_Hwi_asm.obj, etc.) are put in the same flash sector.

    Now on the opposite I want to put some of them in different sectors, something like this for instance:

      FwFlash                 : fill = 0h > FLASH_FW,             PAGE = 0, ALIGN(4)
        {
            file1.obj(.text)
            file2.obj(.text)
            file3.obj(.text)
                    
            BIOS.obj(.text)
         }

      FwFlash1                 : fill = 0h > FLASH_FW1,             PAGE = 0, ALIGN(4)
        {
            c28_Hwi_asm.obj(.text)
            c28_Hwi_disp_asm.obj(.text)
            c28_IntrinsicsSupport_asm.obj(.text)
         }

    But these directives don't work.

    Is there any workaround to put SYS/BIOS code in sectors I want?

    Thanks,

    Demis

  • You can explicitly place items (wild cards work also). For example (I split FLASH into FLASH and FLASH2)

    .text:_ti_sysbios_family_c28_Hwi_* : > FLASH2 PAGE = 0
    .text : > FLASH PAGE = 0

    There might be a slicker way to send the whole obj somewhere, but we'd need to check with the compiler folks for that. I'll ask one of them to chime in on this thread.

    Todd

  • I have some suggestions on how you can get greater control of input sections coming from libraries, and direct them to specific memory ranges.

    For my suggestions to make sense, you need a little background.  Please read the first part of the wiki article Linker Command File Primer about input sections and output sections.

    You also need to be familiar with how to name input sections from libraries like  sysbios.a64FP.  For that, please see the section titled Specifying Library or Archive Members as Input to Output Sections in the C28x assembly language tools manual.  

    I use the library sysbios.a64FP as an example.  The one you see in these examples may not be identical to the one you have.

    To see what files are in the library, use the library archiver command with the option -t ...

    $ ar2000 -t sysbios.a28FP
    
          SIZE   DATE                        FILE NAME
      --------   ------------------------    -----------------
        691945   Mon Sep 19 07:37:51 2016    mangled_ti.sysbios.family.c28.Hwi_config_lib.obj
         11317   Mon Sep 19 07:37:45 2016    family_c28_Hwi_asm_lib.obj
         11617   Mon Sep 19 07:37:45 2016    family_c28_Hwi_disp_asm_lib.obj
          1832   Mon Sep 19 07:37:45 2016    family_c28_IntrinsicsSupport_asm_lib.obj
          3031   Mon Sep 19 07:37:46 2016    family_c28_TaskSupport_asm_lib.obj

    Based on that, you could create an output section like this ...

    sysbios_text 
    {
       --library=sysbios.a28FP<family_c28_Hwi_asm_lib.obj family_c28_Hwi_disp_asm_lib.obj>(.text)
    } > FLASH2 PAGE=0

    You can see the names of the input sections in the library with the object file display utility ofd2000, like this ...

    $ ofd2000 -v --obj_display=none,sections sysbios.a28FP | grep text
        <2> ".text"
        <6> ".text:_ti_sysbios_knl_Task_yield__E__mangled__"
        <7> ".text:_ti_sysbios_knl_Task_unlockSched__E__mangled__"
        <8> ".text:_ti_sysbios_knl_Task_unblock__E__mangled__"
        <9> ".text:_ti_sysbios_knl_Task_unblockI__E__mangled__"
        <10> ".text:_ti_sysbios_knl_Task_stat__E__mangled__"
        <11> ".text:_ti_sysbios_knl_Task_startup__E__mangled__"
    ... and so on ...
    

    With this information, you might decide to take advantage of the patterns in the input section names ...

    sysbios_text 
    {
       *(.text:_ti_sysbios_knl_Task_*)
       *(.text:_ti_sysbios_knl_Swi_*)
       /* and so on */
    } > FLASH2 PAGE=0

    For any one library, use one technique or the other.  Using both on the same library would quickly get confusing.

    Thanks and regards,

    -George

  • Thank you for both your answers.

    I'll go into this question next days.

    Thanks and best wishes for an Happy Easter.