Hi,
The CONTROL register is in version 4.60 correct, but the BASEPRI is still wrong.
A priority of 0x28 (e.g. FreeRTOS) is still displayed at 0x2800.
EmBlocks users:
Keep the shifting in the squirrel scripting arm-gdb-reg.script for the basepri
Display All
The CONTROL register is in version 4.60 correct, but the BASEPRI is still wrong.
A priority of 0x28 (e.g. FreeRTOS) is still displayed at 0x2800.
EmBlocks users:
Keep the shifting in the squirrel scripting arm-gdb-reg.script for the basepri
Source Code
- ////////////////////////////////////////////////////////////////////////////////
- // The ARM BASEPRI register
- ////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////
- // Function returns: comma seperated list
- //
- function parse_bpri(value)
- {
- local result = ::wxString();
- // Correct the endiannesses of Segger J-link
- value = (value >>8)&0xFF;
- result = _T("");
- result += _T("BASEPRI=");
- result += ::wxString.Format(_T("0x%02X;"), value );
- result += ::wxString.Format(_T("%u,"), value );
- return result;
- }
- /////////////////////////////////////////////////////////
- // Function
- //
- // member : wxString -> register member
- // regval : unsigned long -> the value of the parent register
- // memval : unsigned long -> the new value for the register member
- //
- // returns: wxString which is directly used for the GDB command driver
- //
- function set_bpri(member, regval, memval)
- {
- local result = ::wxString();
- if( member.Matches(_T("BASEPRI") ) )
- {
- regval = memval & 0xFF;
- }
- // Correct the endiannesses of Segger J-link
- regval = regval << 8;
- result = result.Format(_T("0x%X"),regval );
- return result;
- }