As your project was created by somebody else’s tool I can’t support it directly, but suspect your problem will be that the MCU is in the wrong mode. Make sure the MCU is in Supervisor mode when main() is called.
Thanks for the fast reply Richard, but I’ve already tried that.
main is called:-
LDR r3, .def__main
CMP r3, #0
BEQ .newlib_main
LDR r10,=__main
B .call_app
.newlib_main:
LDR r10,=main
.call_app:
// Change to user mode (interrupts enabled) before calling main application
//MSR CPSR_c,#MODE_USR
// change to Supervisor mode
msr CPSR_c, #MODE_SVC|I_BIT|F_BIT
MOV lr,pc
BX r10 // enter main() - could be ARM or Thumb
So, I am over that problem, but now I have that the ticks are not being incremented. Where are the interrupts re-enabled after the disable in vTaskStartScheduler?
Is it the portRESTORE_CONTEXT in vPortISRStartFirstTask?
If interrupts are not disabled, then it sounds like the tick interrupt is simply not executing for some reason. Put a break point in the vPreemptiveTick() function (portISR.c). If it never gets hit, but other interrupts are executing, then check the function vPreemptiveTick() (port.c) is correct for your derivative of the chip.