Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

TCP/IP STACK + freeRTOS Harmony / PIC32MX32 combination, wont' glue together for me.

Posted by andrewfrazer on February 22, 2016

I'm new to working with both freeRTOS and Harmony and have run into a problem that is causing me some issues; Im using MPLAB 3.20, and Harmony 1.06 I'm trying to get the TCP/IP stack + freeRTOS working together in the same stack. It just doe'snt want to play for me..

I created a new project, based around a PIC32MX795P512-L ( using an ethernet Starter Kit 2 ), and set up the TCP/IP etc, used the appropriate BSP files, added a file system. and it all works without any issues..

Then go back and add FreeRTOS into the mix using the Harmony Configurator;

Selected FreeRTOS_V8.x.x Memory management Type is Heap5 The Tick Rate is 1000Hz Total Heap Size is 10240

There were no changes in any code when it was generated. The code compiles ands installs on the Starter Kit 2, but does not seem to operate correctly. When i debug the code, i end up in the vApplicationMallocFailedHook() loop, when the tasks are created ( before starting the scheduler ).

This is my SYS_Task.. It doesnt get past the first part.

~~~~ ~~~~ void SYS_Tasks ( void ) ~~~~

{ /* Create OS Thread for Sys Tasks. */ xTaskCreate((TaskFunctiont) _SYSTasks, "Sys Tasks", 1024, NULL, 1, NULL);

/* Create OS Thread for APP Tasks. */ xTaskCreate((TaskFunctiont) _APPTasks, "APP Tasks", 1024, NULL, 1, NULL);

/************** * Start RTOS * *************/ vTaskStartScheduler(); / This function never returns. */ ~~~~ }

~~~~ ~~~~

any pointers woud be greater appreicated.


TCP/IP STACK + freeRTOS Harmony / PIC32MX32 combination, wont' glue together for me.

Posted by andrewfrazer on February 22, 2016

Stepping through the debug, vApplicationMallocFailedHook() is being called by *pvPortMalloc.

Im at a loss to know why pvReturn == NULL


TCP/IP STACK + freeRTOS Harmony / PIC32MX32 combination, wont' glue together for me.

Posted by rtel on February 22, 2016

Have a look at http://www.freertos.org/a00111.html - it sounds like you need to increase the size of configTOTALHEAPSIZE, but it is also likely you could decrease the size of the stacks allocated to the tasks too.

Once the tasks are running you can use uxTaskGetStackHighWaterMark() to see how much stack the tasks are actually using, and then reduce the amount of stack (which can be done in the configuration) accordingly so memory is used efficiently.

Regards.


TCP/IP STACK + freeRTOS Harmony / PIC32MX32 combination, wont' glue together for me.

Posted by andrewfrazer on February 22, 2016

I increased TOTALHEAPSIZE to 100240 ( from 10024 ) and reduced the size of the stacks, but got the same result.


TCP/IP STACK + freeRTOS Harmony / PIC32MX32 combination, wont' glue together for me.

Posted by andrewfrazer on February 22, 2016

changed things to heap4 and its working! Seems that heap5 needs some extra configuraion.


TCP/IP STACK + freeRTOS Harmony / PIC32MX32 combination, wont' glue together for me.

Posted by rtel on February 22, 2016

The link sent previously provides information on the initialisation required for heap_5.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists