greatscottgadgets / apollo

microcontroller-based FPGA / JTAG programmer
BSD 3-Clause "New" or "Revised" License
54 stars 28 forks source link

`apollo info` and `flash-info` error when stub is found #81

Open mossmann opened 1 month ago

mossmann commented 1 month ago
$ apollo info
Traceback (most recent call last):
  File "/home/mossmann/src/cynthion/cynthion/python/venv/bin/apollo", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/mossmann/src/apollo/apollo_fpga/commands/cli.py", line 405, in main
    device = ApolloDebugger(force_offline=force_offline)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mossmann/src/apollo/apollo_fpga/__init__.py", line 99, in __init__
    raise DebuggerNotFound("Apollo stub interface found. "
apollo_fpga.DebuggerNotFound: Apollo stub interface found. Switch the device to Apollo mode or add the `--force-offline` option.

I think it would be nicer to output the USB product, manufacturer, and serial strings, provide the information about --force-offline, and exit normally.