summaryrefslogtreecommitdiff
path: root/utils/hwstub/tools/hwstub_shell.cpp (unfollow)
Commit message (Collapse)Author
2017-01-24hwstub: be more quiet about register description loading failureAmaury Pouly
Change-Id: I0edbb838022b71485179edec7361a6c554a1ab11
2017-01-24hwstub: small fixes to argument processing and usage()Amaury Pouly
Change-Id: I3daa5e0c3fa2e7eab6a3d75b4c8aa66254d72f3c
2017-01-24hwstub: add support for coprocessor operationsAmaury Pouly
At the moment the stub only implement them for MIPS. Change-Id: Ica835a0e9c70fa5675c3d655eae986e812a47de8
2016-12-12hwstub: various cleanupsAmaury Pouly
- hwstub load now properly stops reading the log when the device returns a 0 size buffer instead of STALLing - add debug output option to hwstub_load - correctly report transfered size on write error - add some debug error message in usb code so that some errors can be diagnosed more easily - add a batch mode to hwstub_shell to disable the interactive shell - increase usb control timeout to 1sec, 100ms was really tight - cap usb buffer size to ~4000 bytes because libusb has a hardwired limit of 4096 bytes for control transfers Change-Id: Id3200ab99ce70a7a3b09ce7faeaafa4a0fac64c7
2016-11-20hwstub/tools: fix compilation of shell against lua5.3Amaury Pouly
The unsigned function were deprecated and hidden begind a compat flag. Since they will get removed in the next version, I simply reimplemented them, those are mostly casts anyway. Change-Id: Ie5db81d7c8589b1e5e9b45a2a4ed41919aa07387
2016-11-06hwstub_shell: fix a horrible bugAmaury Pouly
Change-Id: I4ac259e6cd7b707ca725c6ba1c526f5aeed56b71
2016-10-22hwstub: fix compile and linking orderingAmaury Pouly
Change-Id: I0acd3db2f644f4521da715d4931315bdb7548eae
2016-04-08hwstub: port hwstub_shell to the new libraryAmaury Pouly
Also use this opportunity to cleanup support for multiple devices: the shell now supports dynamic changes in the device and will call init() everytime a new device is selected, to prepare a new environment. The shell now honors register width on register read/write. The shell also provides access to variants as follows by creating a subtable under the register using the variant type in UPPER case and having the same layout as a register. For example if register HW.GPIO.DIR has variants "set" and "clr", those can be used like this: HW.GPIO.DIR.SET.write(0xff) HW.GPIO.DIR.CLR.write(0xff00) Change-Id: I943947fa98bce875de0cba4338e8b7196a4c1165
2015-09-11soc_desc: new version of the desc file formatAmaury Pouly
Fix qeditor to use the old soc_desc_v1. Port hwstub_shell to the new description format. Change-Id: I9fefbff534bfaa5c3603bb3dd8307a2b76e88cfc
2015-06-28hwstub: Add completion and some pretty printing to the shellMarcin Bukat
This uses slightly hacked luaprompt to provide all the goodis. See https://github.com/dpapavas/luaprompt for original. Change-Id: Iedddb79abae5809299322bc215722dd928c35cca
2014-11-28hwstub_shell: add support for call and jumpMarcin Bukat
Change-Id: Ie09d0db21831b79255da858bada7382a08ff4eef Reviewed-on: http://gerrit.rockbox.org/1052 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com> Tested: Marcin Bukat <marcin.bukat@gmail.com>
2014-11-18hwstub/qeditor: add support for atomic read/writesMarcin Bukat
The current code assumed that READ/WRITE would produce atomic read/writes for 8/16/32-bit words, which in turned put assumption on the memcpy function. Since some memcpy implementation do not always guarantee such strong assumption, introduce two new operation READ/WRITE_ATOMIC which provide the necessary tools to do correct read and write to register in a single memory access. Change-Id: I37451bd5057bb0dcaf5a800d8aef8791c792a090
2014-11-15hwstub_shell: add atj targetAmaury Pouly
Change-Id: I566694f19dfb110dbf245be7b7f139a4c616e16b Reviewed-on: http://gerrit.rockbox.org/1041 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-07hwstub_shell: add support for set/clr/tog without SCT using read and writeAmaury Pouly
Change-Id: Ib0a5123e5cc51ee193ef761c36af63467740c670
2014-09-07hwstub: don't put revision in the protocol, it's specific to the implementationAmaury Pouly
Change-Id: I1311a22da41fe977f1613f1e313a864baa03027c
2014-09-07hwstub: remove protocol to make it use its own interfaceAmaury Pouly
This way, hwstub can be implemented along with other usb features/interfaces. Change-Id: I7148cab845049cc0a8b8e740fa0d52d3a385eaed
2014-05-11hwstub: hwstub_shell can now run files/cmd provides on command lineAmaury Pouly
Change-Id: Id5cb3bee52b39e2ddec95c646ca9b4a3334bdf92
2014-05-11hwstub: fix hwstub_shellAmaury Pouly
Change-Id: I008a55675054c86fd206cc5248f2bd9475e80b49
2014-04-12hwstub: add proper PP supportAmaury Pouly
- drop support for PP500x: it's very different from other PP and although it would be possible to support them, I don't have one to test the code - make sure only the CPU is started - add PP descriptor to report chip ID and revision - add code in shell and lua to support pp (no register description yet) - compile for ARMv4 because PP502x is an ARM7TDMI Change-Id: I36c4e465dfc2cfdfe7433b2f65cc8f6f0720fe62
2014-02-12Fix redAmaury Pouly
Change-Id: Ib64eb3539e33d4336c298612b4508c4611b80c9e
2014-02-10hwstub/regtools/qeditor: put soc descriptors in a list instead of a vectorAmaury Pouly
A SoC descriptor is not a small object: it can be as large as ~100KiB so it's better to avoid copying things over. Change-Id: I1ef862e1260299cdaa0c4d2822ac45968713498a
2014-02-10utils/hwstub: completely rework the protocol, drop unused featuresAmaury Pouly
The protocol has evolved a lot during the 2.x.y lifetime, bringing more features which later got unused. This commit removes all the unused stuff and simplifies everything: - drop the feature mask: everything is mandatory or stalled on error - remove the info request and put all static information in standard USB descriptors which are part of the configuration descriptor (and can be retrieved using the standard GetDescriptor request). - remove the USB interface, we had only one anyway - remove all endpoint descriptors - remove the exit/atexit stuff, it never worked as intended anyway - update the hwstub library and make it able to handle any device - update the tools (mostly renaming and removing of code) Change-Id: I1872bba7f4177fc3891180e8f944aab88f5bde31
2013-12-24hwstub: add delay functionAmaury Pouly
Change-Id: Iab208ed59a9a2540a64b190357411d3de28f288e
2013-11-24hwstub rk27xx portMarcin Bukat
Change-Id: I85ac57117911544b65ccd56eb16303e30be67cab
2013-11-20hwstub: only load stmp files on stmp targetsAmaury Pouly
Change-Id: I9266ec6db457b1d649cbdcb6c9bd1d0f3223b867
2013-08-11hwstub: add atexit and exit stub function to DEVAmaury Pouly
Change-Id: I17cfe52de3f6f546a46ace3252113024625f15d1
2013-07-13hwstub: allow to escape shell with a function callAmaury Pouly
Change-Id: I65b7b230d3b89a5014db134d3159861474fd889f
2013-07-13hwstub: enhance protocol with more functionsAmaury Pouly
Change-Id: I7944249c2f7ea3e180e7b79ee8ae402d1d0742d3
2013-06-13hwstub: major improvement in the stub and the toolsAmaury Pouly
Fix the stub in many way to correctly detect the STMP family and act upon that. Drop some unused commands and bump version. Rewrite the tool to allows scripting in lua and load the register description from an XML file using the regtools. Introduce a new tool to load and run code using the hwstub (either binary format or Rockbox additive scramble format). Also switch to an optimise version of the memcpy/move/set functions to correctly handle alignement issue (like writing a full word/half-word when possible for registers which is crucial) Change-Id: Id1d5cfe0b1b47e8b43900d32c5cd6eafae6414f6