energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
794 stars 672 forks source link

Undefined References for GateTask #637

Closed rei-vilo closed 8 years ago

rei-vilo commented 9 years ago

When exploring the implementation of the GateTasks, both embedXcode and Energia raise errors about undefined references.

sketch_jun20a.obj: In function ti_sysbios_gates_GateTask_Params_init': /Applications/IDE/Energia.app/Contents/Resources/Java/hardware/common/ti/sysbios/gates/GateTask.h:353: undefined reference toti_sysbios_gates_GateTask_Paramsinit(void) static' sketch_jun20a.obj: In function begin()': /privatesketch_jun20a.ino:17: undefined reference toti_sysbios_gates_GateTask_create' sketch_jun20a.obj: In function enter()': /privatesketch_jun20a.ino:22: undefined reference toti_sysbios_gates_GateTask_enterE' sketch_jun20a.obj: In function leave()': /privatesketch_jun20a.ino:27: undefined reference toti_sysbios_gates_GateTask_leave__E' collect2: error: ld returned 1 exit status make: *\ [sketch_jun20a.cpp.elf] Error 1

Here's the code for Energia:

#include <Energia.h>
#include <xdc/runtime/Error.h>
#include <ti/sysbios/gates/GateTask.h>
#include <ti/sysbios/BIOS.h>

    GateTask_Handle GateTaskHandle;
    IArg GateTask_key;

void begin()
{
    Error_Block eb;
    Error_init(&eb);

    GateTask_Params params;
    GateTask_Params_init(&params);
    GateTaskHandle = GateTask_create(&params, &eb);
}

void enter()
{
    GateTask_key = GateTask_enter(GateTaskHandle);
}

void leave()
{
    GateTask_leave(GateTaskHandle, GateTask_key);
}

void setup()
{
  // put your setup code here, to run once:
  begin();
}

void loop()
{
  // put your main code here, to run repeatedly:
  enter();
  leave();
}
robertinant commented 8 years ago

This issue was moved to energia/msp432-core#25