-
Notifications
You must be signed in to change notification settings - Fork 12
CMSIS v5 / RTOS v2 - on top of PAL R1.1 rel #61
Conversation
Bartek's original submit.
Further changes to PAL to make it work with mbed OS 5.5.
pal 1.1 and lower should not support mbedOS5.5 or higher |
#endif | ||
|
||
#include "critical.h" | ||
#include "mbed.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once this code goes in it will break the compatibility below mbedOS5.5
so seems that
#if defined(osRtxVersionAPI) && (osRtxVersionAPI >= 20000000)
is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need that compatibility - if someone wants to use the older one, they will have to keep the mbed-os.lib and pal.lib in sync. Anyone using mbed OS 5.5 or newer - use this, older ones use the PAL r1.1 from pal.lib (i.e. hash before this one).
The mbed-os-example-client keeps these in sync, so if you check out any version of the client -> you will get a working combination.
#if PAL_UNIQUE_THREAD_PRIORITY | ||
g_palThreadPriorities[thread->osThread.tpriority+PRIORITY_INDEX_OFFSET] = false; | ||
#if PAL_UNIQUE_THREAD_PRIORITY | ||
g_palThreadPriorities[thread->osThread.priority+PRIORITY_INDEX_OFFSET] = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all such kinds of priorities math won't work with cmsis2.
code to handle such scenarios exists in pal master branch
using the mapThreadPriorityToPlatSpecific function
without it the application will crash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add a commit on top of this, that sorts it if it's really bad.
I will merge this PR in, And apply my changes on master later on. |
This one is on top of the PAL R1.1 release, 1st (#60) pull was on top of the PAL R1.0 (which the mbed-os-example-client is still using).