Skip to content

Commit

Permalink
Fix issues in TCP QEMU Demo (FreeRTOS#948)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
  • Loading branch information
kar-rahul-aws and aggarg authored Mar 7, 2023
1 parent b06d170 commit 25d9826
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/CMSIS/CMSDK_CM3.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/FreeRTOSConfig.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
5 changes: 5 additions & 0 deletions FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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++ )
{
Expand Down

0 comments on commit 25d9826

Please sign in to comment.