Hello,
I’ve modified the RP2040 port to make FreeRTOS usable with the RP2350 until official support is available. You can find the repository at github’com\gabor-budai\FreeRTOS_PICO2350. (‘=’.‘;’'=‘/’; that’s my first topic, I had to find a workaround )
For simplicity, I’ve included the changes that were made to portmacro.h
below:
static inline void vPortRecursiveLock( uint32_t ulLockNum, spin_lock_t * pxSpinLock, BaseType_t uxAcquire )
{
// recursion logic...
if( uxAcquire )
{
//if( __builtin_expect( !*pxSpinLock, 0 ) )
if ( __builtin_expect(!spin_try_lock_unsafe(pxSpinLock), 0 ) )
{
// recursion logic (if aquired, returns)
// return;
spin_lock_unsafe_blocking(pxSpinLock);
//while( __builtin_expect( !*pxSpinLock, 0 ) ) {}
}
//__mem_fence_acquire(); // lock does this.
// recursion logic
}
else
{
// recursion logic (release if recursion count is 0)
spin_unlock_unsafe(pxSpinLock);
//__mem_fence_release(); // unlock does this.
//*pxSpinLock = 1;
}
}