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(¶ms);
GateTaskHandle = GateTask_create(¶ms, &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();
}
From @rei-vilo on June 22, 2015 8:14
When exploring the implementation of the
GateTasks
, both embedXcode and Energia raise errors about undefined references.Here's the code for Energia:
Copied from original issue: energia/Energia#637