path: root/utils/hwstub/lib
AgeCommit message (Collapse)AuthorFilesLines
2017-11-12hwstub: fix horrible bugAmaury Pouly1-1/+1
It's a wonder it worked, basically any big transfer returned garbage Change-Id: Ic2b2fc1805423c70db8eac40692ba842c72462ab
2017-08-28qeditor: fix compile error and some commentsAmaury Pouly1-3/+3
Change-Id: I157c83fea8173adc53254f15aa49e41ee1ba7549
2017-01-24hwstub: fix memory leak in net backendAmaury Pouly1-0/+2
Change-Id: I98bef5aa0c518e698c42761d02899adde8bc4aca
2017-01-24hwstub: fix long transfers failing because of control xfer size of libusbAmaury Pouly1-2/+19
libusb limits control transfer sizes to 4k, see diff for details. Change-Id: Id2e638010274009ea641d06e9040a8b9ab9d54a9
2017-01-24hwstub: fix library sending wrong data on long transfersAmaury Pouly1-1/+1
Change-Id: I886b8dc28e306f631389dbed41451eb086fea4fc
2017-01-24hwstub: fix bug in jz4760B boot rom backend probeAmaury Pouly1-1/+3
Change-Id: Idb2b3b3903d88c8f6b494d5c9f04778daf3aaed0
2017-01-24hwstub: add support for coprocessor operationsAmaury Pouly4-0/+122
At the moment the stub only implement them for MIPS. Change-Id: Ica835a0e9c70fa5675c3d655eae986e812a47de8
2017-01-24hwstub: implement EXEC command over netAmaury Pouly1-3/+46
Apparently I completely forgot to implement it so using hwstub over net would just fail all EXEC commands :-s Change-Id: I0d0506cbbce9b86c9a4f19036dacc922d1e51338
2016-12-12hwstub: various cleanupsAmaury Pouly2-2/+23
- 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-10-19fix typoAmaury Pouly1-1/+1
Change-Id: Ia69e5ff941549ca98b23b40927137bb29876b8f9
2016-04-08hwstub: remove the old libraryAmaury Pouly2-265/+3
Change-Id: I94d0f67cfd0d636407cd9cf3afbe0db4064de28e
2016-04-08hwstub: rewrite and expand libraryAmaury Pouly8-75/+3382
Rewrite the hwstub library in C++, with a clean and modular design. The library was designed from the ground up to be aware of multithreading issues and to handle memory allocation nicely with shared pointers. Compared to the original library, it brings the following major features: - support for JZ boot devices, it is very easy to add support for others - support for network transparent operations (through sockets): both tcp and unix domains are support Change-Id: I75899cb9c7aa938c17ede2bb3f468e7a55d625b4
2014-11-18hwstub/qeditor: add support for atomic read/writesMarcin Bukat2-9/+36
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-09-08hwstub: add support for jump/call in libraryAmaury Pouly2-20/+16
Change-Id: Ia57ca613609a5e89e41ff927d7fc137c6841046a
2014-09-08hwstub: trivial changesAmaury Pouly1-1/+2
Change-Id: Iacb1721db1ae59d5f359d244fd68234915e611cf
2014-09-07hwstub: library now check version on openAmaury Pouly2-3/+14
Change-Id: I672a882ad06780da93c1d811af2b28ff60d07469
2014-09-07hwstub: fix library to actually work and compile, still miss some functionsAmaury Pouly1-3/+50
Change-Id: I968dafb4dca7d674165a43e3a435762fe38ed37f
2014-09-07hwstub: remove protocol to make it use its own interfaceAmaury Pouly2-31/+102
This way, hwstub can be implemented along with other usb features/interfaces. Change-Id: I7148cab845049cc0a8b8e740fa0d52d3a385eaed
2014-02-10utils/hwstub: completely rework the protocol, drop unused featuresAmaury Pouly2-109/+35
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-07-16hwstub: enhance exit protocol and implement on stmpAmaury Pouly2-12/+14
Rename STOP command to EXIT, introduce ATEXIT, this gives better control over the exit of the stub. Add stmp implementation. Change-Id: I45442c8b88b9330d12ef439417ca5ffa1520477a
2013-06-13hwstub: major improvement in the stub and the toolsAmaury Pouly5-50/+49
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
2013-06-12imxtools: move hwemul to its own directoryAmaury Pouly4-0/+266
The hwemul is only partly imx specific: the stub is stmp specific but could be ported to other targets, the computer side and the protocol are mostly stmp independent (or should be). Change-Id: If88febffe591b0de86ea11cb740455ba20ddc401