Hi ya'll,

It will be a while before I have time to submit a real patch, but I've
recently created some functions that might be useful for other users of the
Stellaris series parts.  By including these in my OCD config I'm able to
program flash directly from GDB at the beginning of a debug cycle.

proc init_stellaris {} {
     init
     poll
     flash probe 0
}

init_stellaris

# IMPORTANT - there seems to be a bug in OpenOCD or the Stellaris that means
that
# erase_sector 0 0 last
# will not work, you have to split the erase into separate ranges.

proc program_flash { filename } {

     # Erase the whole flash (FIXME, someday just erase the appload and only
upload
     # that)

     halt 10
     # Tell flash controller we are running at 50MHz
     #mww 0x400fe140 49
     # Make sure the ROM is not mapped in at address 0
     mww 0x400fe0f0 1
     # First unprotect the flash
     mww 0x400fe404 0xffffffff
     mww 0x400fe408 0xffffffff
     mww 0x400fe40c 0xffffffff
     mww 0x400fe204 0xffffffff
     mww 0x400fe208 0xffffffff
     mww 0x400fe20c 0xffffffff
     flash erase_sector 0 0 63
     flash erase_sector 0 64 127
     flash erase_check 0
     flash write_image $filename 0
}
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to