MCF52233 CW7.2 Error: Exception Vector Name: Address Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF52233 CW7.2 Error: Exception Vector Name: Address Error

Jump to solution
3,683 Views
sili
Contributor I

Hello,

 

I'm using board with MCF52233 80 LQFP + CW7.2 + ColdFire Lite TCP/IP stack 3.2.

 

Trying to compile and debug the m5223x_evb project. "Make" the project and upload it to MCU goes without any problems.

But after few seconds of debugging CW throws me an error  "Exception Vector Name: Address Error" and show me the instruction that most probably cause it.

 

asm_set_ipl:
_asm_set_ipl:
    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  */
    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

 

 

Routine change the IPL to anither vaule pased as parameter and return the old IPL value.

 

Data and code size a way below maximum values.

Did somebody know where can be a problem ?

Thank you.

Labels (1)
1 Solution
1,493 Views
vier_kuifjes
Senior Contributor I

Coldfire Lite in it's original version will not work when compiled with Codewarrior 7.2.

I had the same issue, and made some modifications to the assembly language routines to make them compatible with the register parameter passing (REG_ABI) used by the Codewarrior 7.2 compiler.

 

You can download the modified version from this web page:

 

http://www.mvdh.be/cf_lite_patched.html

 

I hope this helps...

View solution in original post

0 Kudos
10 Replies
1,493 Views
sili
Contributor I

Thank you.

 

Problem was with passing parameters to asm routines via registers.

Improved ColdFire TCP/IP stact works good.

0 Kudos
1,493 Views
ak_mnpp
Contributor I
Hello! I have a similar problem! Can i get a ColdFire TCP/IP stack for CW7.2?
0 Kudos
1,493 Views
vier_kuifjes
Senior Contributor I

Here's the latest version, see attachment. Remember that this version of Coldfire Lite is NOT supported by Freescale.

0 Kudos
1,493 Views
Britti1982
Contributor I

I would have the same problem, you can not get the file attached in this discussion?

Why the link above is no longer available and I have a great need for these indications.

thank you very much

0 Kudos
1,493 Views
oloft
Contributor I

Hi.

I have a Elektor::smileyvery-happy:igibutler board and buildt the 7.2 REG_ABI 20110524 with CW7.2. There is a CF52231 mounted on the board and I have change from the CF52235 used in the project file to the right processor. Checked the link script so that 128k flash is used.

 

What happens is that after boot the board gets an IP address from the DHCP server. It also responds to Ping/ICMP and

the command shell avaliable on serial port seems to work.

 

Then when I try to fetch index.htm on port 80. After that the CPU craches and the serial port repests spitting out some exception message.

 

I suppose the problem can be some compiler/linker settings but no change I made so far has proven successful.

 

Then I have tried to single step in the code from freescale_process_header(...)  what seems to happen is the FEC interrupt can occur which changes contents of stack stroed varialbles I am observing.  If I set break points just before the entrance to emg_web_open(..) and single steps into that function single stepping behaves really strange and the adress exception occurs when I release execution. I don't really know if I trust the debugger in the context of task switches and interrupts  but this is the what I have observed.

 

Regards

 

Olof

0 Kudos
1,493 Views
vier_kuifjes
Senior Contributor I

Hi Olof,

 

It seems like I missed your post somehow.

Unfortunately I have no experience with the web server in Coldfire Lite as I have never used that...

0 Kudos
1,494 Views
vier_kuifjes
Senior Contributor I

Coldfire Lite in it's original version will not work when compiled with Codewarrior 7.2.

I had the same issue, and made some modifications to the assembly language routines to make them compatible with the register parameter passing (REG_ABI) used by the Codewarrior 7.2 compiler.

 

You can download the modified version from this web page:

 

http://www.mvdh.be/cf_lite_patched.html

 

I hope this helps...

0 Kudos
1,493 Views
mjbcswitzerland
Specialist V

Hi

 

Make sure that the watchdog is not active when debugging: see http://www.utasker.com/forum/index.php?topic=268.0

 

If the problem is due to a real exception there are more details of debugging this at : http://www.utasker.com/forum/index.php?topic=123.msg468#msg468

 

Regards

 

Mark

 

www.uTasker.com

0 Kudos
1,493 Views
HLaidet
Contributor I

Hello

 

i think the problem comes from CodeWarrior 7.2 and "parameter passing".

 

CW7.1 passes parameters via registers or via the stack(standard).


CW7.2 only passes parameters via registers(best benchmark):
Settings-> Code Generation-> ColdFire Processor-> Parameter Passing = Register

 

all functions in assembly language must be adapted.

 

see TN268: "Converting Projects to CodeWarrior ColdFire V7.2.

 

we can see that the function "asm_set_ipl"  takes a parameter on the stack.
it is not good with CW 7.2

 

Regards,
Henri

 

0 Kudos