path: root/utils/hwstub
AgeCommit message (Collapse)AuthorFilesLines
2016-11-06hwstub_shell: fix a horrible bugAmaury Pouly1-1/+1
Change-Id: I4ac259e6cd7b707ca725c6ba1c526f5aeed56b71
2016-10-22hwstub: fix compile and linking orderingAmaury Pouly2-5/+5
Change-Id: I0acd3db2f644f4521da715d4931315bdb7548eae
2016-10-19fix typoAmaury Pouly1-1/+1
Change-Id: Ia69e5ff941549ca98b23b40927137bb29876b8f9
2016-04-08hwstub: remove the old libraryAmaury Pouly3-335/+3
Change-Id: I94d0f67cfd0d636407cd9cf3afbe0db4064de28e
2016-04-08hwstub: port hwstub_shell to the new libraryAmaury Pouly9-266/+740
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
2016-04-08hwstub: port hwstub_load to the new libraryAmaury Pouly1-51/+43
Change-Id: I7e8ae50907401a9480a0da809a4470f1728d3a57
2016-04-08hwstub: rewrite and expand libraryAmaury Pouly19-28/+5051
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
2016-03-14hwstub: fix warning: no newline at end of file with newer gccMarcin Bukat2-2/+4
Change-Id: Icb4233fb9b2b0d5b6f8c4a35dff300f38c8d3025
2016-03-14hwstub: rework usb driver for atj213xMarcin Bukat1-104/+142
Change-Id: I7b175103e567ae4375ff94e74ed1a06215f640c3
2015-11-17hwstub: fix atj213x dsp lua codeMarcin Bukat1-9/+9
Change-Id: I5fbd1799b958bedbe74f91bdcdd8a544e15d2a78
2015-11-17hwstub: Add ajt213x lua interface for DSP blockMarcin Bukat2-0/+159
With this you can upload and run code on DSP core in atj213x. The files can be produced using as2181. You can download this assembler from You should use extended mode (-x switch) since DSP core in atj is non standard and uses 24bit operands. PX register has different meaning as well and is used as MSB when loading other registers with immediates (immediate field is 16bit in instruction so to set register to 24bit value you need to store MSB in PX prior to this). MAC MR is 56bit accordingly. HIP interface seems to be mapped at standard addresses (except that regular 218x doesn't have HIP). Have a fun! Change-Id: I9a80ca0dd3718ba8435ae8579bfffa66e067e022
2015-09-29hwstub: make it possible to override toolchainAmaury Pouly4-16/+20
Default toolchain can be overriden using PREFIX, for example: PREFIX=arm-none-eabi- make Change-Id: I06f5ad0ad492b9f648ccba853a851918644f0500
2015-09-11soc_desc: new version of the desc file formatAmaury Pouly2-155/+224
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 Bukat5-18/+1724
This uses slightly hacked luaprompt to provide all the goodis. See for original. Change-Id: Iedddb79abae5809299322bc215722dd928c35cca
2015-01-13hwstub: implement read/write data abort recoveryAmaury Pouly11-39/+304
Change-Id: I1625873b6864584c40984723d82548ad242ee08e
2014-11-28hwstub/atj213x: add clock setup to crt0.SMarcin Bukat1-1/+29
Change-Id: I3b6e1b8ee1fa76396f7abe7df69af26e9599cfe9 Reviewed-on: Reviewed-by: Marcin Bukat <> Tested: Marcin Bukat <>
2014-11-28hwstub_shell: add support for call and jumpMarcin Bukat4-0/+54
Change-Id: Ie09d0db21831b79255da858bada7382a08ff4eef Reviewed-on: Reviewed-by: Marcin Bukat <> Tested: Marcin Bukat <>
2014-11-28hwstub: lua functions for atj213x/irivere150Marcin Bukat4-1/+214
Change-Id: I3ab32996b4b6603fd7d66eee5b3bfd795b79eee1 Reviewed-on: Reviewed-by: Marcin Bukat <> Tested: Marcin Bukat <>
2014-11-18hwstub/qeditor: add support for atomic read/writesMarcin Bukat11-22/+252
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 Pouly3-0/+12
Change-Id: I566694f19dfb110dbf245be7b7f139a4c616e16b Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-11-05hwstub: Add atj213x supportbootloader_zenxfi3_v1Marcin Bukat14-7/+4659
Change-Id: Ic32200f9ab2c6977e503307a9cbe43a1328d0341
2014-09-11hwstub: small fixup in rk27xx usb driverMarcin Bukat1-1/+1
Change-Id: Ibf3b91af11041834ce650f663b213bac0113f721
2014-09-08hwstub: add support for jump/call in libraryAmaury Pouly2-20/+16
Change-Id: Ia57ca613609a5e89e41ff927d7fc137c6841046a
2014-09-08hwstub: implement jump/call in stubAmaury Pouly1-6/+25
Change-Id: I876fa012c5ae1509e57f5816a8ed31dc69d62ca0
2014-09-08hwstub: trivial changesAmaury Pouly2-2/+3
Change-Id: Iacb1721db1ae59d5f359d244fd68234915e611cf
2014-09-07hwstub: fix compile issueAmaury Pouly1-1/+1
Change-Id: I939c05d3c1319b122fe64bff0f0ea300ecbd1180
2014-09-07hwstub: library now check version on openAmaury Pouly2-3/+14
Change-Id: I672a882ad06780da93c1d811af2b28ff60d07469
2014-09-07hwstub: add string versionAmaury Pouly1-0/+4
Change-Id: I919c27eb7ea69fdac7b3a65785a5a6eb3723a80e
2014-09-07hwstub_shell: add support for set/clr/tog without SCT using read and writeAmaury Pouly1-1/+41
Change-Id: Ib0a5123e5cc51ee193ef761c36af63467740c670
2014-09-07hwstub: fix missing \nAmaury Pouly1-3/+3
Change-Id: I077a38d8a8905b7ad686d0d00b2a8a48bd206ade
2014-09-07hwstub: fix horrible bugAmaury Pouly1-2/+1
Change-Id: I8042f692045a23dbb545d840e5169ce4b99fe5d2
2014-09-07hwstub: don't put revision in the protocol, it's specific to the implementationAmaury Pouly4-13/+8
Change-Id: I1311a22da41fe977f1613f1e313a864baa03027c
2014-09-07hwstub: fix library to actually work and compile, still miss some functionsAmaury Pouly2-6/+53
Change-Id: I968dafb4dca7d674165a43e3a435762fe38ed37f
2014-09-07hwstub: remove protocol to make it use its own interfaceAmaury Pouly5-135/+347
This way, hwstub can be implemented along with other usb features/interfaces. Change-Id: I7148cab845049cc0a8b8e740fa0d52d3a385eaed
2014-06-15hwstub: load rk27xx specific bitsMarcin Bukat1-0/+2
Change-Id: Ie0c68925f933aebeb9b3497800a29de2d69fead2
2014-06-15hwstub: Add support for rk27xx lradc blockMarcin Bukat2-0/+20
Change-Id: I8fe15ad8207ac7098944bb85d6b66b91b9858e8f
2014-06-15Add RKW build target in rk27xx hwstubMarcin Bukat1-0/+3
Change-Id: I5ad44916bc1ac5e8a9384db2369f07b137a1a715
2014-06-15hwstub: fix usb driver for rk27xxMarcin Bukat1-28/+50
Change-Id: I299e76837715c320987177eaea8459f8f199cb96
2014-05-11hwstub: add some PP and Sansa View codeAmaury Pouly3-0/+235
Change-Id: If188a01adee2a0e1c7a46c424a0a9cde9f666831
2014-05-11hwstub: hwstub_shell can now run files/cmd provides on command lineAmaury Pouly1-4/+31
Change-Id: Id5cb3bee52b39e2ddec95c646ca9b4a3334bdf92
2014-05-11qeditor: add support for deletion of itemsAmaury Pouly1-0/+4
Change-Id: I886e15585bd3bfed3303e4b845cd8960a9461277
2014-05-11hwstub: fix hwstub_shellAmaury Pouly2-2/+5
Change-Id: I008a55675054c86fd206cc5248f2bd9475e80b49
2014-04-12hwstub: add proper PP supportAmaury Pouly8-19/+182
- 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-04-12hwstub: fix error in config descriptor, cleanup some codeAmaury Pouly4-7/+2
Change-Id: I853340ed2c187a044726ca03ec52aed655707e27
2014-04-07Add hwstub support for portal player (manufacturer mode)Amaury Pouly7-0/+209
It is very similar to how e200tool from MrH works but uses the framework of hwstub which is makes it completely trivial since we already have the USB driver written. Change-Id: I61cdc245d3f828c2682bcd6ecfed5a1cc0094139
2014-02-12Fix redAmaury Pouly1-5/+5
Change-Id: Ib64eb3539e33d4336c298612b4508c4611b80c9e
2014-02-10hwstub/regtools/qeditor: put soc descriptors in a list instead of a vectorAmaury Pouly1-5/+5
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: make stmp stub able to load in a MMU'ed environementAmaury Pouly1-6/+10
In might be useful to load hwstub in an environment with the MMU active, in which case care must be taken on the order in which things are done. Mostly, one should not disable the MMU before moving stuff around. The code assumes the linking address (0 currently) is identity mapped. Change-Id: I8d54ce9e8cadcde2e08990353ca7a46803731ca7
2014-02-10utils/hwstub: completely rework the protocol, drop unused featuresAmaury Pouly10-652/+278
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: update zenxfistyle codeAmaury Pouly1-12/+8
Change-Id: I7e85101eca7dfc0f68c215936be4aa19749923ad