AnsweredAssumed Answered

Exception vector name: Address Error

Question asked by matthewthomson on Oct 29, 2012
Latest reply on Oct 31, 2012 by matthewthomson

I am working on modifying an existing project (rewrite/redesign) for an MCF52211 and I started with stripping out a bunch of the code from the project so I can focus on a few sections at a time.  All of the startup code, project configuration, linker file are all unchanged and when attempting to run the new code I get an "Exception vector name: Address Error" during part of the start up.

 

The error occurs in the function that is run from the reset vector after initializing memory and doing some hardware initialization.

 

    lea           _SDA_BASE, a5

 

_SDA_BASE is externed at the top of the file

extern unsigned long far _SDA_BASE;

 

And is defined in the *.lcf file

 

.data : AT(___ROM_AT)

  ___DATA_RAM = .;

...

  ___DATA_END = .;
  __SDA_BASE = .;
  . = ALIGN (0x4);
} >> userram

 

and userram is defined as

userram     (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00003C00

 

_SDA_BASE shows in the xmap file as

#>20002088          __SDA_BASE (linker command file)

 

Originally the .data section of the new stripped down code was much smaller than the old version so _SDA_BASE was at 20000A48 but after looking for a reason I decided to try adding data to the section to push it to the same value as the old code just to see if that changed anything but it still doesn't work.  Currently the project settings, *.lcf file and the location of _SDA_BASE are all the same between the two programs but the new one gets that error on the line specified.  The "a5" register isn't even used in the startup code so I could just remove it but I'd like to figure out why the same line works in one situation and not in the other.  Anyone have any ideas?

Outcomes