ptjmartins wrote on Monday, October 29, 2012:
I’m porting the FreeRTOS to a hardware platform made by my company that uses the pic24fj128gb206, with EDS.
I’m using the demo project for PIC24 included in FreeRTOS7.2.0. But the pic used on that demo is p24FJ128GA010, that does not have EDS.
I used this topic to make the necessary changes in order to port successfully to gb206 .
It compiles ok, but the problem is that using the simulator I’m having a error saying: CORE-E0004: Trap due to unimplemented FLASH memory access, occurred from instruction at 0x001370
This happens after passing the line:
asm volatile( “return” );
on portBASE_TYPE xPortStartScheduler( void )
I’m sure that the previous line, portRESTORE_CONTEXT, is causing this issue, since is where I substituted PSVPAG for the other 2 registers, and for some reason, the PC gets corrupted after this restore context
What seems to be the problem ? I have inverted the order in which i push and pop registers DSWPAG and DSRPAG.
Can you post your port of FreeRTOS on pics that have EDS ?