>
(Lee) wrote in message news:<. com>...
>
>>Hello,
>>
>>I am writing the flash burnner program for my own board. I can debug
>>it by using ARM SDT2.51, i.e. load my program to RAM (0x0c000000) and
>>execute it. "Hello World" (LED-blinking) is working. Currently I try
>>to burn the "hello world" to flash (0x00000000). My method is to load
>>the flash burnner to RAM and run it and copy "hello world" to flash.
>>
>>But when I want writing the sequence to flash, like following, I
>>always failed. The debugger told me "This instruction refer to memory
>>"0x00000000" ... that memory is read only...". (This similiar error
>>imformation is got when uninitialized pointer is refered. But I don't
>>refer an uninitialized pointer)
>>
>>What could be the problem?
>>
>> /* Erase the whole chip SST39VF160*/
>> WRITEREGW(0x5555, 0xaaaa);
>> WRITEREGW(0x2aaa, 0x5555);
>> WRITEREGW(0x5555, 0x8080);
>> WRITEREGW(0x5555, 0xaaaa);
>> WRITEREGW(0x2aaa, 0x5555);
>> WRITEREGW(0x5555, 0x1010);
>>
>>Thanks,
>>
>>Adrian
Your problems may be missing startup code for the Flash start.
When running from RAM, the Flash monitor has initialized
certain parts of the hardware, but you do not show that
the same is done for the burned-in code.
Which ARM-based chip you're using?
What kind of start-up code there is (Angel) ?
How is the address space divided to different uses?
Tauno Voipio
tauno voipio (at) iki fi