Move vPortRestoreContext, vTaskSwitchContext and other freertos definitions to portASM.S
stackSmasher294 opened this issue · comments
Hi,
Is it possible to move the definitions of the above FreeRTOS functions from exceptionhandler.S to portable/GCC/portASM.S ? Because it seems that the modified libsystem_config.a seems to mess with the startup of the app when I tried to add other initializations like enabling L3L4 cache and lwip. However, the bare basic blinky example works just fine. Problem arises only when I start adding more libraries to it.
My application gets stuck at "Jumping to Starterware Application..." when I just added t core_init()
after 'configure_platform()' in the example code given (definition attached below).
void core_init(void)
{
CP15BranchPredictionEnable();
L3L4_init();
CacheEnable(CACHE_ALL);
/* Enable IRQ for ARM (in CPSR)*/
IntMasterIRQEnable();
IntAINTCInit();
}
I think only exceptionhandler.S is modified so I don't see how that would affect cache initialization. IntMasterIRQEnable and IntAINTCInit aren't necessary because configure platform initializes interrupts. You can move definitions to portASM.S, but I don't see how that can change anything. I never tested multiple interrupts, I had only tick interrupt so there could be issues.
True, even I was wondering the same but since I am quite new to ARM assembly, the changes in the exception.S from the original prompted me to create this issue.
Anyways, it seems that the problem was in the Makefile I was using, which was basically the modified version of the one on this repo to include the other third party libraries. I wrote a fresh Makefile and so far, it works like a charm! :)
And thank you so much for posting this port on Github. I was struggling to find a stable and decent AM335x port for quite a while till I found this.
Closing this issue.