diff options
author | kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com> | 2023-03-07 09:33:12 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 09:33:12 +0530 |
commit | 25d9826eafc419848892bfd7f35ef15a6e29fc91 (patch) | |
tree | 6e724c7d56370abb53c66b691a3db5c0c7898a88 | |
parent | b06d17086118549cc228d6062a3594203474e26e (diff) | |
download | freertos-git-25d9826eafc419848892bfd7f35ef15a6e29fc91.tar.gz |
Fix issues in TCP QEMU Demo (#948)
* Fix issues in TCP QEMU Demo
* set the Ethernet interrupt priority
* Include CMSIS header files to fix build issues
* Review suggestion
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
---------
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
-rwxr-xr-x[-rw-r--r--] | FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/CMSIS/CMSDK_CM3.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSConfig.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/CMSIS/CMSDK_CM3.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/CMSIS/CMSDK_CM3.h index b63b2bff0..da3cbe16c 100644..100755 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/CMSIS/CMSDK_CM3.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/CMSIS/CMSDK_CM3.h @@ -103,7 +103,7 @@ typedef enum IRQn /* -------- Configuration of the Cortex-M3 Processor and Core Peripherals ------- */ #define __CM3_REV 0x0201 /* Core revision r2p1 */ #define __MPU_PRESENT 1 /* MPU present or not */ -#define __NVIC_PRIO_BITS 3 /* Number of Bits used for Priority Levels */ +#define __NVIC_PRIO_BITS 8 /* Number of Bits used for Priority Levels */ #define __Vendor_SysTickConfig 0 /* Set to 1 if different SysTick Config is used */ #include <core_cm3.h> /* Processor and core peripherals */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSConfig.h index 21949013d..5704118e9 100644..100755 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSConfig.h @@ -78,11 +78,11 @@ to exclude the API function. */ #define INCLUDE_vTaskDelay 1 -#define configKERNEL_INTERRUPT_PRIORITY 252 +#define configKERNEL_INTERRUPT_PRIORITY 255 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #define configMAX_SYSCALL_INTERRUPT_PRIORITY 5 /* equivalent to 0xa0, or priority 5. */ -#define configMAC_INTERRUPT_PRIORITY 2 +#define configMAC_INTERRUPT_PRIORITY 5 /* networking definitions */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c index 7c0bcaf96..457d6fcb7 100644..100755 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c @@ -45,6 +45,8 @@ #include "FreeRTOS.h" #include "task.h" #include "queue.h" +#include "CMSIS/CMSDK_CM3.h" +#include "CMSIS/core_cm3.h" /* FreeRTOS+TCP includes. */ #include "FreeRTOS_IP.h" @@ -108,6 +110,9 @@ { BaseType_t x; + /* Set Ethernet interrupt priority to configMAC_INTERRUPT_PRIORITY. */ + NVIC_SetPriority( ETHERNET_IRQn , configMAC_INTERRUPT_PRIORITY ); + /* Create the echo client tasks. */ for( x = 0; x < echoNUM_ECHO_CLIENTS; x++ ) { |