From 5a0898288d27be8db53e1eb156cf0578502e1676 Mon Sep 17 00:00:00 2001 From: Philipp Schilk Date: Thu, 6 Jun 2024 17:36:09 +0200 Subject: [PATCH 1/3] Give queue set queues a unique type number. (#1083) Discussed here: https://forums.freertos.org/t/tracing-improvements/20097 Changes the value of queueQUEUE_TYPE_SET to a unique value (5) to allow tracers to differentiate between normal queues and queue sets. Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> --- include/queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/queue.h b/include/queue.h index 1e56c35f1..62d095a8e 100644 --- a/include/queue.h +++ b/include/queue.h @@ -71,11 +71,11 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t; /* For internal use only. These definitions *must* match those in queue.c. */ #define queueQUEUE_TYPE_BASE ( ( uint8_t ) 0U ) -#define queueQUEUE_TYPE_SET ( ( uint8_t ) 0U ) #define queueQUEUE_TYPE_MUTEX ( ( uint8_t ) 1U ) #define queueQUEUE_TYPE_COUNTING_SEMAPHORE ( ( uint8_t ) 2U ) #define queueQUEUE_TYPE_BINARY_SEMAPHORE ( ( uint8_t ) 3U ) #define queueQUEUE_TYPE_RECURSIVE_MUTEX ( ( uint8_t ) 4U ) +#define queueQUEUE_TYPE_SET ( ( uint8_t ) 5U ) /** * queue. h From 11174fb860ae4aaca544b2ad12df040b81a132e3 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:50:56 +0530 Subject: [PATCH 2/3] Add a list of third party tools (#1080) * Add a list of third party tools Signed-off-by: Gaurav Aggarwal --- .github/third_party_tools.md | 14 ++++++++++++++ README.md | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 .github/third_party_tools.md diff --git a/.github/third_party_tools.md b/.github/third_party_tools.md new file mode 100644 index 000000000..6d5d02fa5 --- /dev/null +++ b/.github/third_party_tools.md @@ -0,0 +1,14 @@ +Note that these tools are provided by different vendors and not by the FreeRTOS +team. + +## Tracing Tools +| Tool | Website | Getting Started | +|------|---------|-----------------| +| Tracelyzer | [Link](https://percepio.com/tracealyzer/freertostrace/) | [Link](https://percepio.com/getstarted/latest/html/freertos.html) | +| SystemView | [Link](https://www.segger.com/products/development-tools/systemview/) | [Link](https://wiki.segger.com/FreeRTOS_with_SystemView) | + +## Static Code Analysis Tools +| Tool | Website | Getting Started | +|------|---------|-----------------| +| Code Sonar | [Link](https://codesecure.com/our-products/codesonar/) | [Link](https://github.com/CodeSecure-SE/FreeRTOS-Kernel) | +| Coverity | [Link](https://www.synopsys.com/software-integrity/security-testing/static-analysis-sast.html) | [Link](../examples/coverity/README.md) | diff --git a/README.md b/README.md index 7a60f3594..ce34d56ab 100644 --- a/README.md +++ b/README.md @@ -180,3 +180,7 @@ then sort the list, which can be done by running the bash command: Note that only the FreeRTOS-Kernel Source Files, [include](include), [portable/MemMang](portable/MemMang), and [portable/Common](portable/Common) files are checked for proper spelling, and formatting at this time. + +## Third Party Tools +Visit [this link](.github/third_party_tools.md) for detailed information about +third-party tools with FreeRTOS support. From c431b358c802e1ec207ecbf3f68c34e9b2a17f46 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Fri, 7 Jun 2024 10:17:13 +0200 Subject: [PATCH 3/3] event_create(): check malloc() return value to be non-NULL (#1084) * event_create(): check malloc() to be non-NULL Check malloc() to return non-NULL before writing data in the function event_create(). Signed-off-by: Florian La Roche * Code review suggestion Signed-off-by: Gaurav Aggarwal --------- Signed-off-by: Florian La Roche Signed-off-by: Gaurav Aggarwal Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal --- portable/ThirdParty/GCC/Posix/utils/wait_for_event.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c index beca2b360..bf744e27f 100644 --- a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c +++ b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c @@ -43,9 +43,13 @@ struct event * event_create( void ) { struct event * ev = malloc( sizeof( struct event ) ); - ev->event_triggered = false; - pthread_mutex_init( &ev->mutex, NULL ); - pthread_cond_init( &ev->cond, NULL ); + if( ev != NULL ) + { + ev->event_triggered = false; + pthread_mutex_init( &ev->mutex, NULL ); + pthread_cond_init( &ev->cond, NULL ); + } + return ev; }