Hello
I’m trying to get the FreeRTOS running on our custom board with MCF5232 using CodeWarrior 7.2. I came out from Demo project “ColdFire_MCF52221_CodeWarrior”. After some debugging to find out why interrupts are not executed I run into function
ulPortSetIPL
in portasm.S which expects its argument on the stack but from the disasembly I could see that the paraemetr is passed in D0 register.
ulPortSetIPL:
_ulPortSetIPL:
link A6,#-8
movem.l D6-D7,(SP)
move.w SR,D7 /* current sr */
move.l D7,D0 /* prepare return value */
andi.l #0x0700,D0 /* mask out IPL */
lsr.l #8,D0 /* IPL */
move.l 8(A6),D6 /* get argument +++++++++++++++++++++++ expected value on stack */
andi.l #0x07,D6 /* least significant three bits */
lsl.l #8,D6 /* move over to make mask */
andi.l #0x0000F8FF,D7 /* zero out current IPL */
or.l D6,D7 /* place new IPL in sr */
move.w D7,SR
movem.l (SP),D6-D7
lea 8(SP),SP
unlk A6
rts
Code generated by compiler
moveq #4,d0 ; ulPortSetIPL( configMAX_SYSCALL_INTERRUPT_PRIORITY ) where argument is #4
jsr _@DummyFn1 ; I don't know why but ulPortSetIPL is also referenced as _@DummyFn1
Could anyone please help me how get over this problem and make the call properly? Maybe some settings in CodeWarrior are necessary but when I looked into the example project settings Code Generation -> Cold Fire Processor I could see that Parameter Passing is Register but the combobox is disabled. The same as in my project.
Thank you for any help
pavel