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] [July 2012 Threads] Coldfire V2 : parameter passing problemPosted by pavel on July 6, 2012 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
RE: Coldfire V2 : parameter passing problemPosted by Erich Styger on July 6, 2012 Hello, The ColdFire compiler has changed the register passing. CodeWarrior 7.2 is rather old and it looks you mix up the old compiler with a newer port. So you probably better move up to the actual 10.2 version of the tools, or you need to backport or use an older FreeRTOS port. I believe there is a __registerABI or similar pragma you could use as well.
Hope this helps, Erich
RE: Coldfire V2 : parameter passing problemPosted by Richard on July 7, 2012 See the firs item here for a fix: http://www.freertos.org/a00104.html?1#knownissues
Regards.
RE: Coldfire V2 : parameter passing problemPosted by pavel on July 8, 2012 Hello guys Thank you both for the help. I fixed the code according to the known issues.
As to the codewarrior, is version 10.2 also available for free as the version 7.2? (to 128KB) I downloaded cw for coldfire family from freescale site so I supposed it was the latest version.
pa
RE: Coldfire V2 : parameter passing problemPosted by Erich Styger on July 9, 2012 Yes, MCU10.2 comes as well with a free special edition with a code limitation. In case you consider using it with Processor Expert: http://mcuoneclipse.wordpress.com/2012/05/27/freertos-v7-1-1-released/ describes the latest embedded component port for it. Also available from the FreeRTOS community/interactive web site.
Hope this helps, Erich
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|