QP is an event-driven, RTOS-like, active object framework for microcontrollers, such as mbed. The QP framework provides thread-safe execution of active objects (concurrent state machines) and support both manual and automatic coding of UML statecharts in readable, production-quality C or C++. Automatic code generation of QP code is supported by the free QM modeling tool.
Dependents: qp_hangman qp_dpp qp_blinky
QP/C++ (Quantum Platform in C++) is a lightweight, open source active object (actor) framework for building responsive and modular real-time embedded applications as systems of asynchronous event-driven active objects (actors). The QP/C++ framework is a member of a larger family consisting of QP/C++, QP/C, and QP-nano frameworks, which are all strictly quality controlled, thoroughly documented, and available under GPLv3 with a special Exception for mbed (see http://www.state-machine.com/licensing/QP-mbed_GPL_Exception.txt).
The behavior of active objects is specified in QP/C++ by means of hierarchical state machines (UML statecharts). The framework supports manual coding of UML state machines in C++ as well as automatic code generation by means of the free QM modeling tool (http://www.state-machine.com/qm).
Please see the "QP/C++ Reference Manual" (http://www.state-machine.com/qpcpp) for more information.
Revision 5:949864ba515c, committed 2011-09-25
- Comitter:
- QL
- Date:
- Sun Sep 25 18:10:41 2011 +0000
- Parent:
- 4:156463fbfae6
- Child:
- 6:01d57c81e96a
- Commit message:
- 4.2.04
Changed in this revision
--- a/qk_port.s Tue Feb 22 15:35:14 2011 +0000 +++ b/qk_port.s Sun Sep 25 18:10:41 2011 +0000 @@ -1,7 +1,7 @@ ;***************************************************************************** ; Product: QK port to ARM Cortex-M0/M3, mbed ARM assembler, CMSIS-compliant -; Last Updated for Version: 4.1.06 -; Date of the Last Update: Feb 07, 2011 +; Last Updated for Version: 4.2.04 +; Date of the Last Update: Sep 23, 2011 ; ; Q u a n t u m L e a P s ; --------------------------- @@ -37,8 +37,8 @@ ;***************************************************************************** ; -; The QK_init function sets the priorities of SVCall and PendSV exceptions -; to the lowest level possible (0xFF). The function internally disables +; The QK_init function sets the priorities of PendSV and SVCall exceptions +; to 0xFF and 0x00, respectively. The function internally disables ; interrupts, but restores the original interrupt lock before exit. ; ;***************************************************************************** @@ -54,7 +54,7 @@ STR r2,[r1,#8] ; write the System 12-15 Priority Register LDR r2,[r1,#4] ; load the System 8-11 Priority Register LSLS r3,r3,#8 - ORRS r2,r3 ; set PRI_11 (SVCall) to 0xFF + BICS r2,r3 ; set PRI_11 (SVCall) to 0x00 STR r2,[r1,#4] ; write the System 8-11 Priority Register MSR PRIMASK,r0 ; restore the original PRIMASK @@ -85,13 +85,17 @@ ;***************************************************************************** PendSV_Handler CPSID i ; disable interrupts at processor level + LDR r0,=0xE000ED04 ; load the NVIC-ICSR register address + MOVS r1,#0x01 + LSLS r1,r1,#27 ; make up a mask with only the PENDSVCLR bit set + STR r1,[r0] ; remove the pending status of PendSV LDR r0,=QK_readySet_ ; load the address of QK_readySet_ LDRB r0,[r0] ; load the first byte of QK_readySet_ CMP r0,#0 ; is QK_readySet_ == 0 ? BEQ.N iret ; if QK_readySet_ == 0, branch to iret - MOVS r1,#0x01 - LSLS r1,r1,#24 ; make up a task xPSR with only the T bit set + ; at this point r1 contains (1 << 27) + LSRS r1,r1,#3 ; make up a task xPSR with only the T bit set LDR r0,=schedule ; load the address of sched wrapper (new PC) PUSH {r0-r1} ; push xPSR,PC SUB sp,sp,#(6*4) ; don't care for lr,r12,r3,r2,r1,r0
--- a/qp.h Tue Feb 22 15:35:14 2011 +0000 +++ b/qp.h Sun Sep 25 18:10:41 2011 +0000 @@ -1,7 +1,7 @@ ////////////////////////////////////////////////////////////////////////////// // Product: QP/C++ // Last Updated for QP ver: 4.1.06 (modified to fit in one file) -// Date of the Last Update: Feb 22, 2011 +// Date of the Last Update: Jan 26, 2011 // // Q u a n t u m L e a P s // --------------------------- @@ -2633,7 +2633,7 @@ /// to NULL. /// /// \sa Example of using QS filters in #QS_FILTER_ON documentation -#define QS_FILTER_AP_OBJ(obj_) (QS::apObj_ = (obj_)) +#define QS_FILTER_AP_OBJ(obj_) (QS_apObj_ = (obj_)) //////////////////////////////////////////////////////////////////////////////
--- a/qp_port.h Tue Feb 22 15:35:14 2011 +0000 +++ b/qp_port.h Sun Sep 25 18:10:41 2011 +0000 @@ -1,7 +1,7 @@ ////////////////////////////////////////////////////////////////////////////// // Product: QP/C++ port to ARM Cortex, selectable Vanilla/QK, mbed compiler // Last Updated for QP ver: 4.1.06 (modified to fit in one file) -// Date of the Last Update: Feb 15, 2011 +// Date of the Last Update: Feb 08, 2011 // // Q u a n t u m L e a P s // --------------------------- @@ -28,7 +28,7 @@ #ifndef qp_port_h #define qp_port_h -#include "qp_config.h" // QP config file defined at the application level +#include "qp_config.h" // QP configuration defined at the application level //............................................................................ // QF critical section entry/exit