Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Demo code stuck at programming

Posted by swer rock on August 24, 2010

I work on RTOSDemo-Example 14. It works pretty fine without changing anything.
When I try to change the
ulReceivedNumber &= 0x03;
ulReceivedNumber += 0x01;
xQueueSendToBackFromISR( xStringQueue, &ulReceivedNumber , &xHigherPriorityTaskWoken );

in the vSW1_ISR_Handler section, it builds ok but, freeze at the programming part while programming the memory.

After that whole mplab craches. I couldn't figure out what the problem is..

I use pic32mx360F512L (starter kit) removing the line of " #pragma config FSRSSEL = PRIORITY_7"

This error wasn't the only one , I have encountered different ones also..

Thanks in advance..

RE: Demo code stuck at programming

Posted by Richard on August 24, 2010
From your question I am presuming you are talking about the demos that come with the PIC32 version of the FreeRTOS eBook.

The MPLAB projects are configured to run on the PIC32MX795F512L-80I/PT (which as a new generation part definitely does need the #pragma config FSRSSEL = PRIORITY_7 for it to be stable). Unfortunately I have never tried them on the PIC32MX360F512L, but I do know that the 360 part has 32K of RAM while the 795 part has 128K of RAM. The demo itself only uses a tiny amount of RAM, but I suppose the debugger might make assumptions as to which parts of the data space it can use itself, so my first question is, did you re-target the project correctly for this different part? There could also be differences in the flash programming I suppose (but don't know).

It is strange that such a small change would cause a problem though.


RE: Demo code stuck at programming

Posted by swer rock on August 24, 2010
Thanks for you reply;

Yes I work on the ones come with the Freertos ebook.

I haven't changed anything about RAM parts.Just simple removed #pragma config FSRSSEL = PRIORITY_7 line..
Might be because of ram problem , But I am not sure how to fix this ..

Any help will be appreciated.

RE: Demo code stuck at programming

Posted by Dave on August 24, 2010
“I haven't changed anything about RAM parts”

Sounds like your memory map is very wrong then. Look in the IDE for a project setting that selects the part being used, that might then automatically correct he memory map. Alternatively, look in the files that are included as part of the project to see if there is a linker script. Finally, some projects will have a MCU specific header file included that sets all the configuration options. Look at the top of FreeRTOSConfig.h to see if there is such a header file.

RE: Demo code stuck at programming

Posted by swer rock on August 26, 2010
Hello again;

Richartbarry said that one of its entries he didn't write a linker script file for freertos.
and there is no script file included in the project. which means mplab uses the default script file its own.

but only question i came up;
why we need to retarget the memory??
I have chosen the new processor i use and remove the required line.. (#pragma ...... )
and mplab uses the default linker script and predefined processor-specific object file which contains sfr definitions. (procdefs.ld)

So I think i am not clear on this ?? Can you please help me a little more ??

Thanks again..

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

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner