-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PPAGE handling in FreeRTOS port for HCS12X banked memory model #42
Comments
Hi Grzegorz, Thanks, |
Hi Erich,
Solution would be to move portSAVE_CONTEXT macro to primary ISR handler - before function call(attached files), or move everything to ISR handler (and then remove code that fixes stack with LEAS instructions). BR |
Hi Grzegorz, Thanks, |
Hi Erich,
Of course it's not urgent, everything works fine with present
workaround. The only downside is that it has to be applied each time
after every freertos code generation (obviously).
Best Regards
Grzegorz Sobczyk
W dniu 2019-02-25 07:46, Erich Styger napisał(a):
Hi Grzegorz,
thanks for the extra details. I wanted to investigate this last weekend, but did not find the time. I hope because you have found a solution it is not that urgent?
Thanks,
Erich
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [1], or mute the thread [2].
|
You can disable the overwrite if you disable code generation for a component, see https://mcuoneclipse.com/2012/03/23/disable-my-code-generation/ |
closing issue: for now disabling code generation should do it. |
Hi Erich,
I tried to run your FreeRTOS port on MC9 S12XEQ512 with CodeWarrior v5.1 and PE 3.06.
I'm using banked memory model for flash and I've encountered possible issue during context switching. In interrupt from TickCntr1_Interrupt there is call to TickCntr1_OnInterrupt() function. After this call PPAGE register value is changed to the flash page where TickCntr1_OnInterrupt() is located and then portSAVE_CONTEXT macro is called. In effect wrong PPAGE value might be saved and then restored.
In my case issue was fixed by moving portSAVE_CONTEXT macro earlier - to ISR, before call to the TickCntr1_OnInterrupt().
I've checked project settings with example provided by you and they are similar (ie compiler flags that may influence this behaviour).
I'm fairly new to FreeRTOS and S12 family so it's possible that this issue is caused by something else and port unrelated. BTW thanks for all the projects and instructions you share, they all have been incredibly helpful in porting my application and using this IDE.
BR
Grzegorz Sobczyk
The text was updated successfully, but these errors were encountered: