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] [February 2010 Threads]
“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.
“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
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.