Exception vector name:Address Error on MCF52235 MCF5223x

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

Exception vector name:Address Error on MCF52235 MCF5223x

1,806 Views
royjf
Contributor I
Hi all,

I am trying to build a redirected interrupt vector. the idea is to have a bootloader that will be able to change the application code. so to manage the variable address location of the ISR function, I directed the std vector to the beginning of the dynamic application where I have created a new vector in the form on jump instruction array.

the problem is that I get an error saying "Exception vector name:Address Error" when I start in debug mode. When I just press the reset button to start without the debug feature, nothing seems to start...

Everything was working ok before the duplication of my vector tables.

My aplication (and the second vector) start à 0x00006000 I have a bootloader at 0x00004000

+ attached, my vector.s placed starting at 0x0 Note : I changed the extension from .s to .c for forum compatibility
+ also, applicationvector.s placed starting at 0x6000 Note : I changed the extension from .s to .c for forum compatibility
+ also, MCF52235Linkef.lcf - Could be usefull for your help.... Note : I changed the extension from .lcf to .c for forum compatibility

Any ideas why I get that error and why it is not working ?

Thanks



Labels (1)
0 Kudos
4 Replies

532 Views
mjbcswitzerland
Specialist V
Hi royjf

Your method looks as though it should work.

However are you sure that your boot loader code is not copying its vectors to SRAM and configuring the controller (mcf5xxx_wr_vbr() command)  to get them from there rather than from FLASH?

You may also like to look at the uTasker boot loader which supports Ethernet firmware uploads via FTP or HTTP port (and USB uploads on M5221x/M5222x). It also allows encrypted uploads to allow distributing code in a non-readable form. It supports also safe transfers to external SPI FLASH and requires either 0x800 or 0x1000 bytes of FLASH space, depending on options.

http://www.utasker.com/docs/uTasker/BM-Booloader_for_M5223X.PDF

Regards

Mark

www.uTasker.com



0 Kudos

532 Views
royjf
Contributor I
Hi mjbcswitzerland,

My bootloader is actually only a jump to the application. It will eventually support flashing of the application through various methods but right now it is doing nothing. I heard that it is of common useage to make it double vector with a redirection to the second one. maybe someone can help me with the way I tried to implement it.

uTasker seems to have realy nice features built in a very small package. that seems perfect for the kind of bootloader I want. I'll explore the website more to get more information regarding integration and test that I can perform to qualify this implementation. Thanks for the hint about this bootloader.

Thanks
0 Kudos

532 Views
mjbcswitzerland
Specialist V
Hi

Note that the uTasker boot loader doesn't use the jump table method but rather the SRAM vector method.
Both have their advantages and disadvantages as follows:

- jump vectors require the boot to have 1k of re-directions and the application to have a fixed 1k set of vectors. This means that 2k of FLASH is occupied for the vectors and the application can not change them during operation (unless it moves over to the SRAM vector method - but this involves all resources being used and therefore doesn't make much sense). There is a small speed reduction in the interrupt handling due to the extra jump, but this is more academic than serious.

- RAM vectors are more flexible since the application can enter them and change them as required during operation. There is no need to have 2k of FLASH defined for the re-direction and fixed vectors, but the first 1k of SRAM needs to be reserved (or sacrificed?).

In my opinion, as long as SRAM is not so critical that 1k causes a project to fail, the SRAM vector approach is the most flexible and efficient (speed and FLASH).

Regards

Mark



0 Kudos

532 Views
royjf
Contributor I
AH ! I finally figured out what was the problem !

I did not initialised the CFM Configuration Fields

I attach the new corrected field to help other user with the same kind of difficulties (also renamed from .s to .c for forum compatibility)

royjf
0 Kudos