You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pulling over changes from MRI repository, many of which were made to
ease future porting efforts and better integrate the thread support.
ThreadMRI class updates:
* Add THREADMRI_BREAK_ON_SETUP macro to make it clearer what the
breakInSetup parameter to the ThreadMRI constructor is being used
for.
* Move the g_contextEntries ScatterGatherEntry array into ThreadMRI
instead of the CortexMState object since the required size depends
on the layout of the register context used by each different RTOS.
Call ScatterGather_Init() from Platform_Init() since it knows the
size of the array.
* Fixed a bug in advancePCToNextInstruction() which was dereferencing
the current instruction incorrectly.
Hardcode MRI_THREAD_MRI to a value of 1 in armv7-m.h for now.
Fixed a bug in mriScatterGather_Set() where it was always throwing a
bufferOverrunException, even when the set was successful.
Dropping the initial "_" from include file protection macroes so
that they don't conflict with the Standard C Library reserved prefix.
I also pulled mriCortexMDebuggerStack and mriCortexMFlags objects out
of CortexMState object to make it easier for assembly language code to
access. Before the assembly language code needed to know the offset of
these fields in the structure when accessing them. Now it can just
refer to the individual globals directly.
Platform_EnteringDebugger() in armv7-m.c now takes care of setting the
the CORTEXM_FLAGS_ACTIVE_DEBUG and Platform_LeavingDebugger() takes
care of clearing it so that handler/thread mode specific code doesn't
have to anymore. Don't need to do it from the ThreadMRI object itself.
mriCortexMInit() now takes a highestExternalIrq parameter that can be
passed in from device specific init routines to indicate how many
external interrupt sources should be defaulted to sub-zero priorities.
Previously each particular device had its own loop to lower the
priority of its external interrupts. That duplicate code across
multiple devices is now gone.
Add debugMonPriority parameter mriCortexMInit() function to allow
port to specify the priority it desires for the DebugMonitor
interrupt handler. Typically this will be 0, the highest priority,
but there are cases when you might have code that should continue
to run at the highest priority in the background, even when halted
in GDB. In these cases, it makes sense for the background ISRs to be
given a priority of 0 and DebugMonitor a priority of 1. The other
default handler priorities are lowered to fall below DebugMonitor by
mriCortexMInit() so that they can be debugged.
Expose mriCortexMSetPriority() API which can be used by device/board
specific code to set interrupt priority using MRI code that doesn't
rely on __NVIC_PRIO_BITS being set correctly in the CMSIS headers. It
instead determines the number of sub-priority bits at runtime.
Expose the mriCortexMGetPriority() API publicly. This function also
uses the runtime calculated sub-priority bit count.
Updated target XML to mark LR as a code pointer as well so that GDB
knows to try looking up the matching symbol when dumping it.
Simplify device porting:
* Now handle spurious UART interrupts in CortexM code rather than
having all CortexM devices contain duplicated code to handle it.
This means that ports no longer need to implement:
* Platform_CommCausedInterrupt()
* Platform_CommClearInterrupt()
* Ports no longer need to implement:
mriPlatform_CommUartIndex()
* Cortex-M7 names their system handler priority register array SHPR
instead of SHP like the rest of the ARMv7-M family for some reason.
Added a macro to take care of this name change.
0 commit comments