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

PSVPAG error PIC24FJ256DA210

Posted by Fruitmans on November 10, 2010
I am trying to use the FreeRTOS kernel on the PIC24FJ256DA210 microcontroller from Microchip. When i select this device within the demo project and select the correct headerfile in FreeRTOS.h i get the following error.

port.c: In function 'pxPortInitialiseStack':
port.c:223: error: 'PSVPAG' undeclared (first use in this function)
port.c:223: error: (Each undeclared identifier is reported only once
port.c:223: error: for each function it appears in.)

I am pretty new to FreeRTOS so all the help i can get would be very helpfull.

Thanks in advance,

Rik Vugteveen

RE: PSVPAG error PIC24FJ256DA210

Posted by woops_ on November 10, 2010
The Microchip\MPLAB C30\support\PIC24F\h folder holds a header for each device individually in which PSVPAG is referenced. Are you including the header? It is normally inc from FreeRTOSconfig header.

RE: PSVPAG error PIC24FJ256DA210

Posted by Richard Damon on November 10, 2010
It looks like that chip has a new feature (Extended Data Space) that may require a small change in the port to handle. It looks like the PSVPAG register becomes the DSWPAG and DSRPAG for EDS parts.

RE: PSVPAG error PIC24FJ256DA210

Posted by m_aunsbjerg on August 5, 2011
A late reply, but here goes.

I had the same problem with a EDS pic device, a PIC24FJ256GB210.
I found a post on the microchip forum that dealt with the same issue: http://www.microchip.com/forums/m568144-print.aspx.

The suggested solution is to change the kernel code in a few places. In port.c under the portRESTORE_CONTEXT() macro, replace the line "POP PSVPAG" with POP "DSWPAG" and "POP DSRPAG". The order of the pops is important!

In port.c under in the pxPortInitialiseStack function definition, replace the lines
*pxTopOfStack = PSVPAG; pxTopOfStack++;
with
*pxTopOfStack = DSRPAG; pxTopOfStack++; *pxTopOfStack = DSWPAG; pxTopOfStack++
.

Finally in portasm_PIC24.S in the _vPortYield section, replace "PUSH PSVPAG" with "PUSH DSRPAG" and "PUSH DSWPAG", and replace the line "POP PSVPAG" with "POP DSWPAG" and "POP DSRPAG". Again, notice the order of push and pops.

These changes make FreeRTOS run on the fore mentioned micro, but I cannot guarantee that they will work under all circumstances.


[ 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