STM32 Semaphore pool Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
martinkuhn
Posts: 5
Joined: Mon Oct 07, 2019 1:24 pm
Been thanked: 1 time

STM32 Semaphore pool

Post by martinkuhn »

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?
User avatar
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

Post by Giovanni »

Hi,

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

Post by martinkuhn »

Thanks a lot!
Could you also push this to the nanoframework/ChibiOS mirror please?

Kind regards,
Martin
User avatar
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

Post by Giovanni »

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
User avatar
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

Post by Giovanni »

Fixed as bug #1075.

Giovanni
Post Reply