Øyvind Harboe wrote: > You have to create the target before the init command. > > One could talk about allowing targets to be created/deleted > on the fly, but OpenOCD isn't at that stage today. > > > This works: > > openocd -s lib/openocd/ -f interface/dummy.cfg -f target/omap3530.cfg > -c "target create omap3.cpu cortex_m3 -endian little -chain-position > omap3.cpu" -c init -c "ocd_mem2array dataval 32 [expr \"0x54011000 + > 0 * 4\"] 1" > > Move init and it fails: > > openocd -s lib/openocd/ -f interface/dummy.cfg -f target/omap3530.cfg > -c init -c "target create omap3.cpu cortex_m3 -endian little > -chain-position omap3.cpu" -c "ocd_mem2array dataval 32 [expr > \"0x54011000 + 0 * 4\"] 1"
Hmm, ok, on the command line this seems to be the difference. Any idea what might be different doing it at (telnet) command prompt: -- cut -- openocd -s lib/openocd/ -f interface/dummy.cfg -f target/omap3530.cfg Open On-Chip Debugger > targets CmdName Type Endian AbsChainPos Name State -- ---------- ---------- ---------- ----------- ------------- ---------- > init > target create omap3.cpu cortex_m3 -endian little -chain-position omap3.cpu > targets CmdName Type Endian AbsChainPos Name State -- ---------- ---------- ---------- ----------- ------------- ---------- 0: omap3.cpu cortex_m3 little 0 omap3.cpu unknown > ocd_mem2array dataval 32 [expr \"0x54011000 + 0 * 4\"] 1 invalid command name "ocd_mem2array_dataval" called at file "command.c", line 453 called at file "embedded:startup.tcl", line 89 called at file "embedded:startup.tcl", line 93 > -- cut -- vs. -- cut -- openocd -s lib/openocd/ -f interface/dummy.cfg -f target/omap3530.cfg Open On-Chip Debugger > targets CmdName Type Endian AbsChainPos Name State -- ---------- ---------- ---------- ----------- ------------- ---------- > target create omap3.cpu cortex_m3 -endian little -chain-position omap3.cpu > targets CmdName Type Endian AbsChainPos Name State -- ---------- ---------- ---------- ----------- ------------- ---------- 0: omap3.cpu cortex_m3 little 0 omap3.cpu unknown > init > ocd_mem2array dataval 32 [expr \"0x54011000 + 0 * 4\"] 1 invalid command name "ocd_mem2array_dataval" called at file "command.c", line 453 called at file "embedded:startup.tcl", line 89 called at file "embedded:startup.tcl", line 93 > -- cut -- ? Independent of init and target create order, both give the same result: Failing ocd_mem2array. Best regards Dirk _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development