Hey there!
Im running ChibiOS with nanoFramework on a custom STM32F427 based MCU board. I enabled the debug checks and found some bugs. I'm not sure whether this is also one:
Let's have a look at the cmsis_os.c file in os/common/abstractions/cmsis_os/. We create a semaphore pool in osKernelInitialize with a provider chCoreAllocAligned. In my opinion this should be the chCoreAllocAlignedI function instead. Because if we are create a semaphore in osSempahoreCreate, the following call chPoolAlloc does a SysLock and calls chPoolAllocI. If we then use the chCoreAllocAligned method, we call Syslock twice which causes a chSysHalt.
This would be also the same with the timer pool (same file).
What do you think?
STM32 Semaphore pool Topic is solved
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32 Semaphore pool
Hi,
Thanks for finding, it is confirmed. Will be fixed in 18.x, 19.x and trunk.
Giovanni
Thanks for finding, it is confirmed. Will be fixed in 18.x, 19.x and trunk.
Giovanni
-
martinkuhn
- Posts: 5
- Joined: Mon Oct 07, 2019 1:24 pm
- Been thanked: 1 time
Re: STM32 Semaphore pool
Thanks a lot!
Could you also push this to the nanoframework/ChibiOS mirror please?
Kind regards,
Martin
Could you also push this to the nanoframework/ChibiOS mirror please?
Kind regards,
Martin
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32 Semaphore pool
martinkuhn wrote:Thanks a lot!
Could you also push this to the nanoframework/ChibiOS mirror please?
Kind regards,
Martin
That is not up to me, I am not handling that.
Giovanni
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times