On 2011/04/18 9:24 PM, Rogan Dawes wrote:
> On 2011/04/18 8:51 PM, Alexandre Pereira da Silva wrote:
>> I couldn't see much wrong besides:
>> flash bank eightMB cfi 0xff800000 0x800000 1 2 feroceon.cpu
>>
>> This one is working for me:
>> flash bank extnor cfi 0x81000000 0x100000 1 1 $_TARGETNAME x16_as_x8
>> jedec_probe
>>
>> You should confirm the real bus witdh. Normally you can configure
>> either as x16 or x8. And you have to make sure your reset-init does
>> initialize it.
>>
>> You missed the x16_as_x8 parameter too.
>>
>> If that doesn't work, you will have to debug the source code in cfi.c
>>
>> Thanks.
> 
> Hi Alexandre,
> 
> Your working cfi definition worked for me, too, after adjusting
> addresses and sizes. Thanks you! Now the flash is recognized, and all
> the sectors are properly identified.
> 
> However, I am still not able to flash a replacement firmware to the
> part. It seem that the unprotect command fails, and thus the file cannot
> be written to the flash.
> 
> I placed a debug log of the following command:
> 
> openocd -f buspirate.cfg -f dns323.cfg -d3 -l openocd.log \
> -c "flash probe 0" \
> -c "flash info 0" \
> -c "flash erase_address pad unlock 0xfffd0000 0x30000" \
> -c "flash write_image erase unlock mtdblock4 0xfffd0000" \
> -c "shutdown"
> 
> at:
> 
> http://dawes.za.net/rogan/openocd-20110418-211900.log.gz
> 
> The only difference in config files is the flash definition changed to:
> 
> flash bank eightMB cfi 0xff800000 0x800000 1 1 $_TARGETNAME x16_as_x8
> jedec_probe
> 
> as suggested.
> 
> Any ideas why the flash unprotect might fail?
> 
> Thanks
> 
> Rogan

Bah, so it seems that flash unprotect is not supported/implemented for
the AMD/Spansion command set:

src/flash/nor/cfi.c:

        switch (cfi_info->pri_id)
        {
                case 1:
                case 3:
                        return cfi_intel_protect(bank, set, first, last);
                        break;
                default:
                        LOG_WARNING("protect: cfi primary command set %i
unsupported", cfi_info->pri_id);
                        return ERROR_OK;
        }

Drat!

Any suggestions on how to implement this?

Thanks

Rogan
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to