[INFO] ChibiOS 2.6->3.0 porting guide
Re: [INFO] ChibiOS 2.6->3.0 porting guide
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?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [INFO] ChibiOS 2.6->3.0 porting guide
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
Giovanni
Re: [INFO] ChibiOS 2.6->3.0 porting guide
Yes, they are at the same priority. But why is it working when I add the sleep function?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [INFO] ChibiOS 2.6->3.0 porting guide
Because by going to sleep implicitly you yield and the next thread at the same priority goes in.
Giovanni
Giovanni
Re: [INFO] ChibiOS 2.6->3.0 porting guide
Is chrtclib ported to 3.0 yet? I get compiler errors at it.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [INFO] ChibiOS 2.6->3.0 porting guide
The RTC driver in 3.0 is not yet complete and there will be no chrtclib.
Giovanni
Giovanni
Re: [INFO] ChibiOS 2.6->3.0 porting guide
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
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?
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?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [INFO] ChibiOS 2.6->3.0 porting guide
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
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