On 10/01/14 17:58, Robert P. J. Day wrote:
>
>    even though i'm testing on a beagle-xM which has no flash, i figured
> i'd read the flash chapter of the user's guide anyway, and a couple
> things puzzle me.
>

Thanks for spending time on this.

>    first, section 12.1 of UG lists four alleged configuration commands:
>
> * flash bank ...
> * flash banks
> * flash list
> * flash probe ...
>
>    however, running "usage flash" on the xm shows:
>
> flash
>    flash bank bank_id driver_name base_address size_bytes chip_width_bytes
>              bus_width_bytes target [driver_options ...]
>    flash banks
>    flash init
>    flash list
>
> and you can see the two lists don't exactly match. "flash probe" is
> mentioned only in the UG, while "flash init" shows up only in the
> output of "usage flash". are these lists supposed to match? it's a bit
> confusing that they don't.

If you do not have a configured flash bank then a lot of the commands 
that work on the flash will be missing, including probe.
>
>    next, i can also see, in the source file src/flash/nor/tcl.c, the
> definition of the main flash commands at the bottom, and higher up in
> that file, the definition of "flash_exec_command_handlers". i'm
> embarrassed to admit i don't know what the mode of COMMMAND_EXEC
> means. help?
>

OpenOCD has two stages - config (COMMAND_CONFIG) and run (COMMAND_EXEC). 
see 7.2 Entering the Run Stage.

The config stage is until the init command is executed.

>    finally, given that this xM has no flash, i fully expect that trying
> to access flash should fail, so i ran both:
>
>> flash list
>> flash banks
>
> and got no output, which i expected. but then i tried this:
>
>> flash probe 0
> flash probe 0: command requires more arguments
> in procedure 'flash'
>>
>
>    that's surprising -- why doesn't that just say that i have no flash?
> why suggest i need more arguments? am i misreading something?
>

Think it is related to http://sourceforge.net/apps/trac/openocd/ticket/54.

Unknown sub commands issue this error, in this case the flash bank has 
not been configured and so we have no probe command.

Spen

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to