Part Number:PROCESSOR-SDK-AM335X
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)