PIC32 StarterKit General Exception Handler cr

Hallo everyone, I am using PIC32 Starter

PIC32 StarterKit General Exception Handler cr

Hallo everyone,
Sorry I make accidentally pressed enter. I am using PIC32 Starter kit (PIC32MX360F512L). freeRTOSv5.10
C32 Compiler v1.05
MPLABv8.60 Previously, I have made it work to create task such as blinking LED.
Then I port it with API from Microchip Graphics Library.
There is no problem. Next, I also implement FS API from Microchip with FreeRTOS.
It crash and go to
void _general_exception_handler( unsigned portLONG ulCause, unsigned portLONG ulStatus )
it crashed here and never back. Then I add
taskENTER_CRITICAL();
while(1)
{
}
taskEXIT_CRITICAL(); It worked, but the task will be always executed (looping here)
It never go to applicationIdleHook. So, I think that it is not the solution. I suspicious that the problem is on Stack.
I have modified configMINIMAL_STACK_SIZE, but nothing was changed.
Even, the memory gauge on MPLAB did not changed the Data memory. Does anyone have the solution ?
Any suggestions would be very appreciated. Thanks

PIC32 StarterKit General Exception Handler cr

> It worked, but the task will be always executed (looping here) It
> never go to applicationIdleHook. You have locked it in a null loop in a critical section.  It will not leave that code, and the tick interrupt is being held off by the critical section.  I would expect that to be the only code that executed (except interrupts that are above a certain priority level that are not effected by the critical section). >
> So, I think that it is not the solution.
>
> I suspicious that the problem is on Stack. I have modified
> configMINIMAL_STACK_SIZE, but nothing was changed. Even, the memory
> gauge on MPLAB did not changed the Data memory. You can turn stack checking on, if it is not on already. Regards.

PIC32 StarterKit General Exception Handler cr

Hi richard, Thank you very much. >You can turn stack checking on, if it is not on already.
Do you mean  #define configCHECK_FOR_STACK_OVERFLOW 2   (in FreeRTOSConfig.h)  ?
I have turned it more than 0. (2)
It never go to void vApplicationStackOverflowHook( void )
Is this mean that there is no stack overflow ? Before the program went to
void _general_exception_handler( unsigned portLONG ulCause, unsigned portLONG ulStatus )
The program is break in port_asm.S portRESTORE_CONTEXT There is error below in MPLAB IDE
CORE-E0002: Exception due to misaligned word access, from instruction at 0x9d01b28c What does it mean ? Thank you very much.

PIC32 StarterKit General Exception Handler cr

Some architectures need word (32 bit) data and instructions to be aligned on 32 bit boundaries in memory. And if you try reading, writing, or executing a 32 variable or instruction that is not on a 32 bit boundary you will get a misaligned word access exception. It tells you the address of the instruction that caused the exception, so you need to look up what is at that address.

PIC32 StarterKit General Exception Handler cr

Hi dave, Thanks for your suggestion. If I know the address of instruction which caused the exception, how to know what kind of instruction in C ?
MPLAB will generate the .hex , but I do not know which instruction in C. Thank you very much..