#--- Ajout de PM # Ce script est inspire de target/lpc2294.cfg, qui comporte des manques. set _CHIPNAME lpc2294 set _ENDIAN little #--- Ajout de PM # Dans target/lpc2294.cfg l'identification du micro-controleur manque, # le _CPUTAPID est fixe a 0xffffffff. le message suivant fournit # la bonne valeur : 0x4f1f0f0f # Voir http://forum.sparkfun.com/viewtopic.php?t=17630&sid=f13d2b5736f51f8f2d21f065e3b9331b set _CPUTAPID 0x4f1f0f0f adapter_nsrst_delay 200 #--- Ajout de PM # Par defaut, l'horloge JTAG est a 6 MHz, ce qui trop rapide. # Le manuel de OpenOCD indique : "For most ARM-based processors the fastest # JTAG clock1 is one sixth of the CPU clock; or one eighth for ARM11 cores. # Consult chip documentation to determine the peak JTAG clock rate, which might be less than that. # Voir http://forum.sparkfun.com/viewtopic.php?t=17630&sid=f13d2b5736f51f8f2d21f065e3b9331b # Cette instruction permet de la fixer a 1 MHz jtag_rclk 1000 #use combined on interfaces or targets that can't set TRST/SRST separately reset_config trst_and_srst srst_pulls_trst #jtag scan chain jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4 $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0 #flash configuration #flash bank lpc2000 0 0 set _FLASHNAME $_CHIPNAME.flash #--- Ajout de PM # Dans target/lpc2294.cfg, la frequence du quartz (avant dernier argument), # n'est pas celle qdu quartz présent sur la carte : 14,7456 MHz ; # Comme la frequence doit etre indiquee en kHz, le parametre est : 14746. flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14746 calc_checksum # For more information about the configuration files, take a look at: # openocd.texi