Page 2 of 4

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Fri Jun 27, 2014 8:31 pm
by part1zan_
Well, AFAICS, it's definitely not a stack overflow. The thread for 2.x just locks everything by doing nothing in a cycle, when the thread for 3.x does something and doesn't lock anything. That's how I see it from my point of view. Also, how could that be a stack overflow if when I added a sleep function, everything began working just fine?

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Fri Jun 27, 2014 10:04 pm
by Giovanni
Are threads at the same priority level? In 3.0 round robin is exclusively cooperative, threads at same priority have to yield explicitly in order to rotate.

Giovanni

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Sat Jun 28, 2014 1:41 pm
by part1zan_
Yes, they are at the same priority. But why is it working when I add the sleep function?

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Sat Jun 28, 2014 1:43 pm
by Giovanni
Because by going to sleep implicitly you yield and the next thread at the same priority goes in.

Giovanni

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Sat Jun 28, 2014 1:46 pm
by part1zan_
Okay, I see. Thank you very much for the explanation.

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Sat Jun 28, 2014 4:55 pm
by part1zan_
Is chrtclib ported to 3.0 yet? I get compiler errors at it.

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Sat Jun 28, 2014 6:47 pm
by Giovanni
The RTC driver in 3.0 is not yet complete and there will be no chrtclib.

Giovanni

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Sat Jun 28, 2014 8:27 pm
by part1zan_
Aha, I see. So I'll wait for it. Thank you again for your kind replies.

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Thu Aug 21, 2014 11:07 am
by steved
A couple of things I've noticed while porting some 2.X code to 3.0:

1. chDebugPanic() seems to have vanished (although still referenced in a couple of macros in chcore.h). What's the OSAL equivalent?

2. The INLINE macro has gone - I note that 3.0 uses 'inline' - does this make it compiler-specific?

Re: [INFO] ChibiOS 2.6->3.0 porting guide

Posted: Thu Aug 21, 2014 2:52 pm
by Giovanni
Hi,

1) Now there are osalSysHalt() and chSysHalt(). I will fix the instances of the old function.

2) The 3.0 kernel has C99 as requirement so INLINE is no more required, "inline" is standard now.

Giovanni