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/PROCESSOR-SDK-AM335X: Build questions

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

(All this, in an effort to try to debug "SysDeplay" in the StarterWare libraries)

Start with a "Project | New | Sys/Bios  Typical" project...

BeagleBone Black, GNU compiler 6.3.1, XDC 3.32.1.22, only "Sys/Bios 6.46.5.55" checked.  It builds.

Add GPIO functions from from "StarterWare 2.0.1.1", like this:

Void taskFxn(UArg a0, UArg a1)
{
    DMTimer7ModuleClkConfig();
    SysDelayTimerSetup();   /*  Sets up TMR7, and sets the ISR to it's handler */
    while (1) {
        Sysdelay(1000);

        GPIOPinWrite(SOC_GPIO_1_REGS,21,1);
        GPIOPinWrite(SOC_GPIO_1_REGS,22,1);
        GPIOPinWrite(SOC_GPIO_1_REGS,23,1);
        GPIOPinWrite(SOC_GPIO_1_REGS,24,1);
        Sysdelay(1000);

        GPIOPinWrite(SOC_GPIO_1_REGS,21,0);
        GPIOPinWrite(SOC_GPIO_1_REGS,22,0);
        GPIOPinWrite(SOC_GPIO_1_REGS,23,0);
        GPIOPinWrite(SOC_GPIO_1_REGS,24,0);


    }
}

Add the three libs needed for StarterWare to the project, such as

${BIOS_LIBRARIES}
gcc
m
nosys
"c"
c
driver
platform
system

And of course the necessary search paths to the compiler and linker....  Try to build it, and get this:

makefile:149: recipe for target 'BasicGnuSleep.out' failed
C:\Users\scott\workspace_v7\BasicGnuSleep\src\sysbios\sysbios.aa8fg(gnu_ReentSupport.o): 
In function `ti_sysbios_rts_gnu_ReentSupport_Module_startup__E':
C:/ti/bios_6_46_05_55/packages/ti/sysbios/rts/gnu/ReentSupport.c:83: 
undefined reference to `ti_sysbios_rts_gnu_ReentSupport_checkIfCorrectLibrary'
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [BasicGnuSleep.out] Error 1

After spending a full day trying to figure out what is wrong, the best I can find is a WiKi entry that says make sure you are linking to the correct C libs.  Well I am. They were automatically included by the "wizard"  (And why does the default, automatically generated project include the c lib twice??  Once in quotes, and once without??) 

processors.wiki.ti.com/.../Processor_SDK_RTOS_FAQ

(And for that matter, why are ALL the WiKi support docs telling me to modify my linker command this way or that, while the CCS environment does NOT let you make those changes???  It's all done hidden for you by dialog boxes and XDC??)

Next, since I've been fighting with this for a day, I create a new project, just to have a clean one that I can demonstrate the issue.  Repeat all the steps above.  It builds...

So, I get to spend another day trying to find the difference.  Comparing the CFG file, the search paths, linker order...  All while staring at the message box every time I try to "clean" the project... It says it's done, but the box just sits there for about 2 minutes.

Suddenly I see this:

"${xdc_find:gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu:${ProjName}}"

in the linker search path.  It has nothing to do with libraries, it only is a search path...  but it caused the link stage to succeed.

What is it??  And why is it the difference between the linker succeeding and failing?  I want to know... so the next time I can save 12 hours to trying to figure out why things won't build.

(I would also blame the "New Project" step for including it once, and not in the other one, but after spending 12 hours days altering and retrying settings, I can no longer be sure what it originally did)

  • the RTOS team have been notified. They will respond here.
  • Chris,

    This issue is also discussed here:
    e2e.ti.com/.../450479

    This looks like an issue when SYSBIOS is used with GNU GCC compiler Semihosting library support.

    Also, Another note if you are using GPIO then we recommend using GPIO LLD example instead of Starterware APIs especially if you are using interrupt mode. Starterware code interrupt setup doesn`t work well with the HWI interface. The LLD drivers use an OS abstraction layer that allow for interface with TI RTOS HWI module.

    Regards,
    Rahul
  • Rahul,

    Apparently, Sys/Bios doesn't want to work with anything that was already out there being used by the general public...

    For example, the Sysdelay uses Timer 7, and fires an interrupt.  But the IVT that it uses is not configured when using Sys/Bios.   I tried it, and the program just branches off into deep space somewhere.  

    Don't try to use the StarterWare entry point to get things setup at program start...  The startup code can't link to _bss_start and _bss_end because they have now been renamed in the linker scripts.

    If I were to try to use timer 7 myself, in order to get the Sysdelay to work, which plenty of other packages in the old StarterWare rely on, there is no telling what Sys/Bios is doing under the covers.  And of course those library packages in the older StarterWare are not all available in the newer PDK.

    So... non existent backwards support.  In fact, no backwards support because the web pages all say it's not supported.  Gee...  thanks.

    -CSW