Skip to content

Commit

Permalink
6.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
QL committed Apr 3, 2020
1 parent d60c50d commit b063a64
Show file tree
Hide file tree
Showing 125 changed files with 872 additions and 28,077 deletions.
6 changes: 4 additions & 2 deletions 3rd_party/efm32pg1b/gnu/startup_efm32pg1b.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);

/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */

/*----------------------------------------------------------------------------
Expand Down Expand Up @@ -281,7 +283,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (
Expand Down
6 changes: 4 additions & 2 deletions 3rd_party/ek-tm4c123gxl/gnu/startup_TM4C123GH6PM.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);

/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */

/*----------------------------------------------------------------------------
Expand Down Expand Up @@ -471,7 +473,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (
Expand Down
6 changes: 4 additions & 2 deletions 3rd_party/mbed-lpc1768/gnu/startup_LPC17xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);

/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */

/*----------------------------------------------------------------------------
Expand Down Expand Up @@ -294,7 +296,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (
Expand Down
6 changes: 4 additions & 2 deletions 3rd_party/nucleo-l053r8/gnu/startup_stm32l053xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);

/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */

/*----------------------------------------------------------------------------
Expand Down Expand Up @@ -284,7 +286,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (
Expand Down
6 changes: 4 additions & 2 deletions 3rd_party/nucleo-l053r8/llvm/startup_stm32l053xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);

/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */

/*----------------------------------------------------------------------------
Expand Down Expand Up @@ -284,7 +286,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (
Expand Down
6 changes: 4 additions & 2 deletions 3rd_party/nucleo-l152re/gnu/startup_stm32l1xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ extern int __stack_end__;
* assembly to avoid accessing the stack, which might be corrupted by
* the time assert_failed is called.
*/
__attribute__ ((naked)) void assert_failed(char const *module, int loc);
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc);

/* Function prototypes -----------------------------------------------------*/
void Default_Handler(void); /* Default empty handler */
void Reset_Handler(void); /* Reset Handler */
void SystemInit(void); /* CMSIS system initialization */
__attribute__ ((noreturn))
void Q_onAssert(char const *module, int loc); /* QP assertion handler */

/*----------------------------------------------------------------------------
Expand Down Expand Up @@ -339,7 +341,7 @@ void Default_Handler(void) {
*
* NOTE: the function Q_onAssert should NOT return.
*****************************************************************************/
__attribute__ ((naked))
__attribute__ ((naked, noreturn))
void assert_failed(char const *module, int loc) {
/* re-set the SP in case of stack overflow */
__asm volatile (
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QP-nano"
PROJECT_NUMBER = "6.8.0"
PROJECT_NUMBER = "6.8.1"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile-CHM
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QP-nano"
PROJECT_NUMBER = "6.8.0"
PROJECT_NUMBER = "6.8.1"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =
Expand Down
26 changes: 25 additions & 1 deletion doxygen/history.dox
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
/**
@page history Revision History

@section qpn_6_8_0 Version 6.8.0, 2020-03-31
@section qpn_6_8_1 Version 6.8.1, 2020-04-04

Fixed the following bugs:

This release updates the QP-nano ports and examples for workstations (Windows and POSIX) by consistently applying the "safe" versions of services from `<stdio.h>` and `<string.h>`. The "portable" versions of these services are defined as macros in the `safe_std.h` header file and include the following services:

- `MEMMOVE_S()` -> `memmove_s()`
- `STRCPY_S()` -> `strcpy_s()`
- `STRCPY_S()` -> `strcpy_s()`
- `STRCAT_S()` -> `strcat_s()`
- `SNPRINTF_S()` -> `_snprintf_s()`
- `PRINTF_S()` -> `printf_s()`
- `FPRINTF_S()` ->`fprintf_s()`
- `FREAD_S()` -> `fread_s()`
- `FOPEN_S()` -> `fopen_s()`
- `LOCALTIME_S()` -> `localtime_s()`

These "safe" functions are mapped to the best approximation of these services available on a given platform. For example, `STRCPY_S()` is mapped to `strcpy_s()` on Windows and `strcpy()` on POSIX (Linux/MacOS/etc.).

Finally, this release consistently applies the #Q_NORETURN macro to the Q_onAssert() implementations in the QP-nano examples.


------------------------------------------------------------------------------
@section qpn_6_8_0 Version 6.8.0, 2020-03-21

Source code changes:

Expand Down Expand Up @@ -1548,3 +1571,4 @@ wrap-around point.
updated to the latest QP-nano API changes.
*/

Finally, this release improves the comments in the QF_stop() function. The comments now make it very clear that after calling QF_stop() the application must terminate and cannot continue. In particular, QF_stop() is **not** intended to be followed by a call to QF_init() to "resurrect" the application. The previous comments apparently were confusing and some developers attempted to "restart" a running application, which led to system crashes.
2 changes: 1 addition & 1 deletion doxygen/img/img.htm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QP built-in images</title>

<img src="logo_ql.gif">
<img src="logo_ql.png">
<img src="AN_Coding_Standard.jpg">
<img src="AN_Getting_Started_with_QPC.jpg">
<img src="AN_MISRA-QPC.jpg">
Expand Down
Binary file added doxygen/img/logo_ql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 51 additions & 51 deletions doxygen/metrics.dox
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
/** @page metrics Code Metrics

@code{cpp}
Code Metrics for QP-nano
================================================
NLOC CCN token PARAM length location
------------------------------------------------
9 1 48 2 9 QHsm_ctor@83-91@..\src\qfn\qepn.c
33 6 258 1 49 QHsm_init_@103-151@..\src\qfn\qepn.c
4 1 18 1 4 QHsm_top@169-172@..\src\qfn\qepn.c
62 11 434 1 88 QHsm_dispatch_@186-273@..\src\qfn\qepn.c
98 15 524 2 132 QHsm_tran_@287-418@..\src\qfn\qepn.c
23 4 117 2 31 QHsm_childState_@444-474@..\src\qfn\qepn.c
10 1 54 2 20 QActive_ctor@96-115@..\src\qfn\qfn.c
41 10 229 3 59 QActive_postX_@142-200@..\src\qfn\qfn.c
41 14 228 3 69 QActive_postXISR_@227-295@..\src\qfn\qfn.c
29 13 197 1 58 QF_init@310-367@..\src\qfn\qfn.c
20 8 143 1 31 QF_tickXISR@393-423@..\src\qfn\qfn.c
9 3 65 3 16 QActive_armX@459-474@..\src\qfn\qfn.c
7 3 66 2 13 QActive_disarmX@488-500@..\src\qfn\qfn.c
22 7 142 1 41 initialize@69-109@..\src\qkn\qkn.c
8 3 28 1 12 QF_run@121-132@..\src\qkn\qkn.c
15 2 79 1 22 QK_schedLock@161-182@..\src\qkn\qkn.c
15 4 96 1 28 QK_schedUnlock@200-227@..\src\qkn\qkn.c
21 6 124 1 33 QK_sched_@247-279@..\src\qkn\qkn.c
52 14 349 1 94 QK_activate_@291-384@..\src\qkn\qkn.c
52 14 337 1 97 QF_run@64-160@..\src\qvn\qvn.c
11 file analyzed.
==============================================================
NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
--------------------------------------------------------------
5 0.0 0.0 0.0 0 ..\include\qassert.h
34 0.0 0.0 0.0 0 ..\include\qepn.h
56 0.0 0.0 0.0 0 ..\include\qfn.h
15 0.0 0.0 0.0 0 ..\include\qkn.h
8 0.0 0.0 0.0 0 ..\include\qpn.h
4 0.0 0.0 0.0 0 ..\include\qstamp.c
2 0.0 0.0 0.0 0 ..\include\qvn.h
236 38.2 6.3 233.2 6 ..\src\qfn\qepn.c
174 22.4 7.4 140.3 7 ..\src\qfn\qfn.c
139 22.2 6.0 136.3 6 ..\src\qkn\qkn.c
56 52.0 14.0 337.0 1 ..\src\qvn\qvn.c

=============================================================================================================
No thresholds exceeded (cyclomatic_complexity > 20 or nloc > 1000000 or length > 500 or parameter_count > 10)
==========================================================================================
Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt
------------------------------------------------------------------------------------------
729 28.6 7.0 176.8 20 0 0.00 0.00
@endcode
*/
/** @page metrics Code Metrics
@code{cpp}
Code Metrics for QP-nano
================================================
NLOC CCN token PARAM length location
------------------------------------------------
9 1 48 2 9 QHsm_ctor@83-91@..\src\qfn\qepn.c
33 6 258 1 49 QHsm_init_@103-151@..\src\qfn\qepn.c
4 1 18 1 4 QHsm_top@169-172@..\src\qfn\qepn.c
62 11 434 1 88 QHsm_dispatch_@186-273@..\src\qfn\qepn.c
98 15 524 2 132 QHsm_tran_@287-418@..\src\qfn\qepn.c
23 4 117 2 31 QHsm_childState_@444-474@..\src\qfn\qepn.c
10 1 54 2 20 QActive_ctor@96-115@..\src\qfn\qfn.c
41 10 229 3 59 QActive_postX_@142-200@..\src\qfn\qfn.c
41 14 228 3 69 QActive_postXISR_@227-295@..\src\qfn\qfn.c
29 13 197 1 58 QF_init@310-367@..\src\qfn\qfn.c
20 8 143 1 31 QF_tickXISR@393-423@..\src\qfn\qfn.c
9 3 65 3 16 QActive_armX@459-474@..\src\qfn\qfn.c
7 3 66 2 13 QActive_disarmX@488-500@..\src\qfn\qfn.c
22 7 142 1 41 initialize@69-109@..\src\qkn\qkn.c
8 3 28 1 12 QF_run@121-132@..\src\qkn\qkn.c
15 2 79 1 22 QK_schedLock@161-182@..\src\qkn\qkn.c
15 4 96 1 28 QK_schedUnlock@200-227@..\src\qkn\qkn.c
21 6 124 1 33 QK_sched_@247-279@..\src\qkn\qkn.c
52 14 349 1 94 QK_activate_@291-384@..\src\qkn\qkn.c
52 14 337 1 97 QF_run@64-160@..\src\qvn\qvn.c
11 file analyzed.
==============================================================
NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
--------------------------------------------------------------
5 0.0 0.0 0.0 0 ..\include\qassert.h
34 0.0 0.0 0.0 0 ..\include\qepn.h
56 0.0 0.0 0.0 0 ..\include\qfn.h
15 0.0 0.0 0.0 0 ..\include\qkn.h
8 0.0 0.0 0.0 0 ..\include\qpn.h
4 0.0 0.0 0.0 0 ..\include\qstamp.c
2 0.0 0.0 0.0 0 ..\include\qvn.h
236 38.2 6.3 233.2 6 ..\src\qfn\qepn.c
174 22.4 7.4 140.3 7 ..\src\qfn\qfn.c
139 22.2 6.0 136.3 6 ..\src\qkn\qkn.c
56 52.0 14.0 337.0 1 ..\src\qvn\qvn.c
=============================================================================================================
No thresholds exceeded (cyclomatic_complexity > 20 or nloc > 1000000 or length > 500 or parameter_count > 10)
==========================================================================================
Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt
------------------------------------------------------------------------------------------
729 28.6 7.0 176.8 20 0 0.00 0.00
@endcode
*/
2 changes: 1 addition & 1 deletion examples/arm-cm/blinky_efm32-slstk3401a/qk/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void QK_onIdle(void) {
}

/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const module, int loc) {
Q_NORETURN Q_onAssert(char const Q_ROM * const module, int loc) {
/*
* NOTE: add here your application-specific error handling
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/arm-cm/blinky_efm32-slstk3401a/qv/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void QV_onIdle(void) { /* CATION: called with interrupts DISABLED, NOTE01 */
}

/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const module, int loc) {
Q_NORETURN Q_onAssert(char const Q_ROM * const module, int loc) {
/*
* NOTE: add here your application-specific error handling
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/arm-cm/blinky_ek-tm4c123gxl/qk/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void QK_onIdle(void) {
}

/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const module, int loc) {
Q_NORETURN Q_onAssert(char const Q_ROM * const module, int loc) {
/*
* NOTE: add here your application-specific error handling
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/arm-cm/blinky_ek-tm4c123gxl/qv/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void QV_onIdle(void) { /* CATION: called with interrupts DISABLED, NOTE01 */
}

/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const module, int loc) {
Q_NORETURN Q_onAssert(char const Q_ROM * const module, int loc) {
/*
* NOTE: add here your application-specific error handling
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/arm-cm/dpp_efm32-slstk3401a/qk/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void QK_onIdle(void) {
}

/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const module, int loc) {
Q_NORETURN Q_onAssert(char const Q_ROM * const module, int loc) {
/*
* NOTE: add here your application-specific error handling
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/arm-cm/dpp_efm32-slstk3401a/qv/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void QV_onIdle(void) { /* CATION: called with interrupts DISABLED, NOTE01 */
}

/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const module, int loc) {
Q_NORETURN Q_onAssert(char const Q_ROM * const module, int loc) {
/*
* NOTE: add here your application-specific error handling
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/arm-cm/dpp_efm32-slstk3401a/win32-gui/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "qwin_gui.h" /* QWIN GUI */
#include "resource.h" /* GUI resource IDs generated by the resource editior */

#include <stdio.h> /* for _snprintf_s() */
#include "safe_std.h" /* portable "safe" <stdio.h>/<string.h> facilities */

Q_DEFINE_THIS_FILE

Expand Down Expand Up @@ -210,7 +210,7 @@ void QF_onClockTickISR(void) {
}

/*..........................................................................*/
void Q_onAssert(char const * const module, int_t loc) {
Q_NORETURN Q_onAssert(char const * const module, int_t loc) {
char message[80];
QF_stop(); /* stop ticking */
SNPRINTF_S(message, Q_DIM(message) - 1,
Expand Down
2 changes: 1 addition & 1 deletion examples/arm-cm/dpp_ek-tm4c123gxl/qk/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void QK_onIdle(void) {
}

/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const module, int loc) {
Q_NORETURN Q_onAssert(char const Q_ROM * const module, int loc) {
/*
* NOTE: add here your application-specific error handling
*/
Expand Down
Loading

0 comments on commit b063a64

Please sign in to comment.