Skip to main content
msartori
Associate II
November 22, 2005
Question

writing WMS into FLASH_CR0 causes undefined instruction exception.

  • November 22, 2005
  • 16 replies
  • 2730 views
Posted on November 22, 2005 at 12:21

writing WMS into FLASH_CR0 causes undefined instruction exception.

This topic has been closed for replies.

16 replies

msartori
msartoriAuthor
Associate II
September 9, 2005
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
Visitor II
September 9, 2005
Posted on September 09, 2005 at 14:09

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

msartori
msartoriAuthor
Associate II
September 9, 2005
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
Visitor II
September 9, 2005
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
msartoriAuthor
Associate II
September 9, 2005
Posted on September 09, 2005 at 14:57

Ok, well thanks for trying.

What hardware did you try it on?

m@

sjo
Associate III
November 22, 2005
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