questions about PIC32 porting

Hi all i have some questions: 1. Why there is this setting: configISR_STACK_SIZE ? i didn’t understand how i can manage it
2. What are the rules to manage ISR priorities using this port, if i need ISRs that works with or without kernel API?
3. (THE MUST IMPORTANT) If i try to compile using 16bit, even putting some functions with attribute nomips16, porting doesn’t work! have you ever try to build a demo on mplab using 16bit setting for compiler? thanks to all

questions about PIC32 porting

1. Why there is this setting: configISR_STACK_SIZE ? i didn’t understand how i can manage it
This is in FreeRTOSConfig.h.  Any definition that starts ‘config’ should be located in there (in theory).
2. What are the rules to manage ISR priorities using this port, if i need ISRs that works with or without kernel API?
Search for configKERNEL_INTERRUPT_PRIORITY on this page http://www.freertos.org/port_PIC32_MIPS_MK4.html
3. (THE MUST IMPORTANT) If i try to compile using 16bit, even putting some functions with attribute nomips16, porting doesn’t work! have you ever try to build a demo on mplab using 16bit setting for compiler?
I have just queried this myself and the answer was that there is no fundamental reason why it should not work with the nomips16 attribute placed correctly.  The main assembly code that performs the context switch already has this attribute set, but maybe it needs to be elsewhere also.  I have to admit to not having tried it. Regards.

questions about PIC32 porting

Quote:
1. Why there is this setting: configISR_STACK_SIZE ? i didn’t understand how i can manage it
This is in FreeRTOSConfig.h. Any definition that starts ‘config’ should be located in there (in theory). Ok… i found something about thsi in freertos website. Now it is clear.
Quote:
2. What are the rules to manage ISR priorities using this port, if i need ISRs that works with or without kernel API?
Search for configKERNEL_INTERRUPT_PRIORITY on this page http://www.freertos.org/port_PIC32_MIPS_MK4.html Thanks for your feedback.
Quote:
3. (THE MUST IMPORTANT) If i try to compile using 16bit, even putting some functions with attribute nomips16, porting doesn’t work! have you ever try to build a demo on mplab using 16bit setting for compiler?
I have just queried this myself and the answer was that there is no fundamental reason why it should not work with the nomips16 attribute placed correctly. The main assembly code that performs the context switch already has this attribute set, but maybe it needs to be elsewhere also. I have to admit to not having tried it. Richard, i found the solution! Let me explain. In pic32 porting, there are 3 macros (portDISABLE_INTERRUPTS(void); portENABLE_INTERRUPTS(void); portYIELD(void); )
that have inside microchip library macros:
_CP0_GET_STATUS();
_CP0_SET_STATUS( ulStatus ); These macros are different if __mip16 is defines, and this define is added for each file if project build option GENERATE 16 BIT CODE is set. It seems there is a problem when a 16 bit version for _CP0_xxx is used. So, i did the following changes: - all files are compiled using 16bit except port.c
- i changed portmacro.h: in my code (portDISABLE_INTERRUPTS(void); portENABLE_INTERRUPTS(void); portYIELD(void); ) became functions moved in port.c, so, all other files will use a 32bit version for these functions, that means that _CP0_xxx are always used in 32bit version i will provide to your personal email my modified files. Bye
Piero