STM32 Semaphore pool Topic is solved

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

STM32 Semaphore pool  Topic is solved

Postby martinkuhn » Fri Feb 21, 2020 8:51 am

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: 12589
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 647 times
Been thanked: 544 times
Contact:

Re: STM32 Semaphore pool

Postby Giovanni » Fri Feb 21, 2020 9:54 am

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

Postby martinkuhn » Fri Feb 21, 2020 10:03 am

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

Kind regards,
Martin

User avatar
Giovanni
Site Admin
Posts: 12589
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 647 times
Been thanked: 544 times
Contact:

Re: STM32 Semaphore pool

Postby Giovanni » Fri Feb 21, 2020 10:24 am

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: 12589
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 647 times
Been thanked: 544 times
Contact:

Re: STM32 Semaphore pool

Postby Giovanni » Fri Feb 21, 2020 11:00 am

Fixed as bug #1075.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest