cancel
Showing results for 
Search instead for 
Did you mean: 

writing WMS into FLASH_CR0 causes undefined instruction exception.

msartori
Associate II
Posted on November 22, 2005 at 12:21

writing WMS into FLASH_CR0 causes undefined instruction exception.

16 REPLIES 16
anis2
Associate II
Posted on September 09, 2005 at 13:27

Its difficult to debug an elf file!!!

msartori
Associate II
Posted on September 09, 2005 at 13:39

Unfortunately to build it yourself you'd need the sources for all of eCos/Redboot which is 170MB. I guess the only thing you can properly check is whether it causes an exception or not. :(

anis2
Associate II
Posted on September 09, 2005 at 14:09

After runnig the elf file, it does not causes an exception.

msartori
Associate II
Posted on September 09, 2005 at 14:26

How very strange.

What board do you have? I use the STR710FZ2T6 and I use the Keil ulink to upload the elf to the board through the JTAG.

I have made a version of the elf which, if not interrupted by the exception, should 1) erase one sector (8k) of flash memory at 0x400c0000, write the pattern 0x11112222 at flash location 0x400c0000 and then just sit in an infinite loop.

The function that does this is called flash_hwr_init and sits at memory location 0x400039f4. If you could check if this is successful on your board I'd be very grateful.

Thanks,

m@

anis2
Associate II
Posted on September 09, 2005 at 14:53

I'm sorry but the code seems not working! it do nothing!!

I'm using RVDK to load your elf file to the board via JTAG.

msartori
Associate II
Posted on September 09, 2005 at 14:57

Ok, well thanks for trying.

What hardware did you try it on?

m@

sjo
Associate II
Posted on November 22, 2005 at 12:11

The library will need initialising in the debug build.

The function debug needs calling to setup the peripheral pointers.

Regards

sjo