Skip to main content
berardo
Associate II
October 31, 2013
Solved

undefined reference to `osalThreadSleepS'

  • October 31, 2013
  • 1 reply
  • 1118 views
Posted on October 31, 2013 at 12:20

Hello,

i have a question.

Bulding CAN code based on example for SPC56ELx produce this error:

build/obj/can.o: In function `canStart':

can.c:(.text_vle.canStart+0x2c): undefined reference to `osalThreadSleepS'

collect2: ld returned 1 exit status

make: *** [build/out.elf] Error 1

CAN configuration it is same that example.

But i have added Chibios.

I have replaced osalThreadSleepS(1) with osalThreadSleepSeconds(1) in :

C:\SPC5Studio\eclipse\plugins\org.chibios.spc5.components.spc5hal_1.0.0.201310031641\component\lib\src

But it seem  not correct.

Why compiler don't find function

osalThreadSleepS

?  there are conflicts with Chibios?

#osalthreadsleeps #can
This topic has been closed for replies.
Best answer by Nickname16641_O
Posted on November 08, 2013 at 10:18

Hello,

Thanks for reporting, it is a confirmed bug, the problem will be fixed in next release.

The workaround is to edit the file C:\SPC5Studio\eclipse\plugins\org.chibios.spc5.components.osal.spc56elxx_1.0.0.xxxxx\component\lib\src\osal.c

And change

inline void osalThreadSleepS(systime_t time) {

with

void osalThreadSleepS(systime_t time) {

Giovanni

1 reply

Nickname16641_O
Nickname16641_OBest answer
Visitor II
November 8, 2013
Posted on November 08, 2013 at 10:18

Hello,

Thanks for reporting, it is a confirmed bug, the problem will be fixed in next release.

The workaround is to edit the file C:\SPC5Studio\eclipse\plugins\org.chibios.spc5.components.osal.spc56elxx_1.0.0.xxxxx\component\lib\src\osal.c

And change

inline void osalThreadSleepS(systime_t time) {

with

void osalThreadSleepS(systime_t time) {

Giovanni