FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [January 2012 Threads] MPLAB PIC32MX reserved instruction?Posted by ulmus on January 4, 2012 Hi! I try to run freeRTOS for the first time, i have main.c as simple as possible:
int main( void ) { /* Finally start the scheduler. */ vTaskStartScheduler();
/* Will only reach here if there is insufficient heap available to start the scheduler. */ return 0; }
void vApplicationStackOverflowHook( void ) { /* Look at pxCurrentTCB to see which task overflowed its stack. */ for( ;; ); }
but i get exception titled: EXCEP_RI, // reserved instruction
dissamble looks like:
2120: static void prvCheckTasksWaitingTermination( void ) 2121: { 9D002138 27BDFFF8 addiu sp,sp,-8 9D00213C AFBE0000 sw s8,0(sp) <--- exception address points here 9D002140 03A0F021 addu s8,sp,zero 9D002144 03C0E821 addu sp,s8,zero 9D002148 8FBE0000 lw s8,0(sp) 9D00214C 27BD0008 addiu sp,sp,8 9D002150 03E00008 jr ra
Thanx for any advice, i can't start freeRTOS and dont know why.
RE: MPLAB PIC32MX reserved instruction?Posted by ulmus on January 4, 2012 I think i got answer: in main() you have to call INTEnableSystemMultiVectoredInt(); hmm, i googled it but i have also 'Using the freertos' pic32 edition book and in examples from the book there is no call for that function... :(
RE: MPLAB PIC32MX reserved instruction?Posted by Richard on January 4, 2012 It sounds like you just haven't set up the CPU, which you would have to do for any application you were writing (although the actual setup required depends on the application).
I suggest starting with an existing FreeRTOS demo application. Several are provided with the book, and there is a more complex example in the main FreeRTOS zip file download. Once you have an existing example compiling, you can leave in any configuration and setup necessary in main (the #pragmas at the top of main, and normally a function called prvSetupHardware()), and edit away the rest and replace it with your code.
Regards.
RE: MPLAB PIC32MX reserved instruction?Posted by ulmus on January 4, 2012 Thanx, only enable vectored interrupt i was missing:) now all works fine. I have a big application with lots of hardware and now i want to transalte it into freeRTOS app :) Cross your fingers:)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|