summaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)AuthorFilesLines
2016-10-26nwztools/plattools: add test_power, rework input, add test_ts (touchscreen)Amaury Pouly8-17/+685
Change-Id: I55ca29627801b5e760d1dbe407d96cd055f659ab
2016-10-22hwstub: fix compile and linking orderingAmaury Pouly2-5/+5
Change-Id: I0acd3db2f644f4521da715d4931315bdb7548eae
2016-10-19nwztools/plattools: add adc testAmaury Pouly6-2/+213
Change-Id: Ic3ef964e8b5cc7b8ca3f02f141e9e4436a4d41db
2016-10-19nwztools/plattools: add backlight testAmaury Pouly3-0/+146
Change-Id: I4bef0824eeed54238578d8b24a9845e8602d61af
2016-10-19nwztools: add a new plattools directory with code to run on the deviceAmaury Pouly7-0/+426
This is code is intended to development into a library of code for the NWZ that will be useful to write the "bootloader" on those device. At the same time, it comes with test programs that are easy to run in firmware upgrade mode and also provide a great test bench for the library. At the moment, two test programs are available: - test_display: simply prints two messages using /usr/bin/lcdmsg - test_keys: displays input key event Change-Id: I9d214894ffc9127b528fcdd3eb5d6b61f4e657a7
2016-10-19nwztools: update makefile and add scriptAmaury Pouly3-2/+76
The new script allows the upgrade to execute a file found on the user partition. Change-Id: I564941d01bcdbae050002e77cb119f3d95ecdc21
2016-10-19fix typoAmaury Pouly1-1/+1
Change-Id: Ia69e5ff941549ca98b23b40927137bb29876b8f9
2016-10-19nwztools: rework upg scriptsAmaury Pouly3-18/+117
The exec_file allows to embed a script/executable and run it on target. It takes of unpacking, remounting contents rw and redirect output to exec.txt at the root of the drive. More generally, rework how the makefile works. Change-Id: Iec719227be96e80701ad8f5398d2d34389f4da9e
2016-09-21regtools: fix library bug when checking if a reference is valid or notAmaury Pouly1-1/+1
Change-Id: I8adea40d2fa7c1a26f1975d987233249f61af8ef
2016-09-21regtools: rename error_t to err_t to avoid name clashAmaury Pouly5-39/+38
Change-Id: Ib8d34e4f58f3225b1dafc533ce7e1b7867ad053b
2016-09-21headergen_v1: remove warnings with newer GCCsAmaury Pouly1-15/+15
Change-Id: I90ed3a0c911014eee013cbea0e98a85f4310471d
2016-08-30nwztools: cleanup the codeAmaury Pouly6-274/+267
There was a lot of copy and paste, and the code was just crap. This commit tries to clarify the code and also document the encryption procedure. Hopefully I didn't break anything. Change-Id: I257793010e7cf94f2b090b30bb8608359d3886e3
2016-08-30upgtools: add NWZ-E45x Series key and signatureAmaury Pouly2-1/+2
Also fix a typo in the script makefile Change-Id: Ie747d8b99ca0f6a98bbcaf1c82e66c7788f00e6e
2016-08-30upgtools: small cleanupsAmaury Pouly1-32/+26
KAS was in its own structure for historical reasons, but it's stupid now. Change-Id: Ie8d69ac6d489337cd857ace1abe5b1e4b1177172
2016-08-17nwztools: upgrade upgtools and add dumping scriptAmaury Pouly4-20/+186
Change-Id: I315d1010ce5477c0112f4a890156b360e8123e11
2016-05-25regtools: add headergen_v2Amaury Pouly3-11/+2021
This new header generator works differently from the previous one: - it uses the new format - the generated macro follow a different style (see below) - the generated macro are highly documented! - it supports SCT-style platform or RMW-style ones Compared to the old style, the new one generate a big set of macros per register/field/enum (loosely related to iohw.h from Embedded C spec). The user then calls generic (names are customizable) macros to perform operations: reg_read(REG_A) reg_read(REG_B(3)) reg_read_field(REG_A, FIELD_X) reg_read_field(REG_B(3), COOL_FIELD) reg_write(REG_A, 0x42) reg_write_field(REG_A, FIELD_X(1), FIELD_Y(3), IRQ_V(FIQ)) reg_write_fielc(REG_B(3), COOL_FIELD_V(I_AM_COOL), BLA(42)) the following use RMW or SET/CLR variants, depending on target: reg_set_field(REG_A, FLAG_U, FLAG_V) reg_clr_field(REG_A, FIELD_X, FIELD_Y, IRQ) reg_clr_field(REG_B(3), COOL_FIELD, BLA) the following does clear followed by set, on SET/CLR targets: reg_cs(REG_A, 0xff, 0x42) reg_cs(REG_B(3), 0xaa, 0x55) reg_cs_field(REG_A, FIELD_X(1), FIELD_Y(3), IRQ_V(FIQ)) reg_cs_field(REG_B(3), COOL_FIELD_V(I_AM_COOL)) The generator code is pretty long but has lots of documentation and lots of macro names can be customized. Change-Id: I5d6c5ec2406e58b5da11a5240c3a409a5bb5239a
2016-04-08jz4670_tools: add usbboot tool, tweak Makefile and packtoolAmaury Pouly3-5/+357
Although the jz4740 contains a similar tool to usbboot, its command-line interface is not very useful, also it does not compile by default because it relies on some external code, and it contains code specific to some JZ4740 devices. Change-Id: I22688238d147e21fb0fd524466b333b6003d4ff1
2016-04-08hwstub: remove the old libraryAmaury Pouly3-335/+3
Change-Id: I94d0f67cfd0d636407cd9cf3afbe0db4064de28e
2016-04-08qeditor: port to the new hwstub library and add featuresAmaury Pouly11-329/+1394
This commit adds support for the version of the hwstub library, which requires a lot of changes. It also adds some editing features, such as register access and much better editing of fields using the mouse (double click on a field to be able to resize and move it). Change-Id: I3c4e4cc855cb44911c72bc8127bad841b68efe52
2016-04-08regtools: add register access to soc descAmaury Pouly3-6/+68
Registers (and variants) can now specify the type of access supported: - unspecified: for variant means same as register, for register defaults R/W - read/write - read only - write only Backward compatibility is preserved by setting access to unspecified by default. Change-Id: I3e84ae18f962a45db62f996a542d08405d05b895
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-04-08soc_desc: add default constructors to most structuresAmaury Pouly1-0/+24
After being caught by several bugs of the type "let's forgot to initialize a field to default value", I'm finally fixing this. Change-Id: I01c33e0611d4f697f767db66465e4fb30858cdab
2016-03-14regtools: Convert rk27xx register description file to v2 formatMarcin Bukat2-2765/+11320
Change-Id: I60a764567d2fc73ed87fca2a8b0eaf643d4984bc
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
2016-02-07regtools: make description file parser stricterAmaury Pouly1-2/+48
The parser would simply ignore unknown elements or attributes, which is bad on many levels. Now any unknown tag will trigger a fatal error. Change-Id: I32eead8e96c1567241cf2a565d9e20e62877c14d
2016-02-06regtools/desc: convert v1 stmp description files to v2Amaury Pouly3-0/+67193
Conversion done using swiss_knife as follows: ./swiss_knife convert --author "Amaury Pouly" --version "2.4.0" desc/regs-stmp3XXX-v1.xml desc/regs-stmp3XXX.xml Change-Id: Iad26e04f8f599cf25339a33aa65f231379434e98
2016-02-06regtools/desc: rename v1 stmp filesAmaury Pouly3-0/+0
Change-Id: Ib66a404acf1f640e19b30b35d6a976094ae4264a
2016-02-06regtoosl/qeditor: port to the new description formatAmaury Pouly18-1908/+2912
This big commit port qeditor from v1 to v2 register file format. Although the display code was much simplified, the edit code had to be rewritten. The new code also brings many improvement to the register display widget. The new code also compiles with both Qt4 and Qt5, although it is recommended to use Qt5 to get some improvements, especially in the layout of editor. Change-Id: I24633ac37a144f25d9e705b565654269ec9cfbd3
2016-02-06regtools: update v2 specification, library and toolsAmaury Pouly9-211/+1491
A v2 register description file can now include register variants and instances addresses can now be a list (previously it could only be a stride or a formula). Update the library to deal with that. The convert option of swiss_knife was updated and one incompatible change was introduce: if a v1 device has several addresses, those are converted to a single v2 instance with list (instead of several single instances). This should have been the behaviour from the start. Swiss_knife can now also convert regdumps, in which case it needs to be given both the dump and register description file. Also introduce two register descriptions files (vsoc1000 and vsoc2000) which give more complicated examples of v2 register description files. Change-Id: Id9415b8363269ffaf9216abfc6dd1bd1adbfcf8d
2016-01-17update deploy.py to recognize and use Qt5Cástor Muñoz1-1/+1
Change-Id: Ied8c9d153a34bd8b689a34e45708262cede5348d
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 https://github.com/wodz/as2181 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-10-03qeditor: fix uninitialised variableAmaury Pouly2-1/+7
Change-Id: I12a785e554b7d598b91e526af1b7ebc1fc44f610
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 Pouly22-861/+3959
Fix qeditor to use the old soc_desc_v1. Port hwstub_shell to the new description format. Change-Id: I9fefbff534bfaa5c3603bb3dd8307a2b76e88cfc
2015-09-11qeditor: introduce new "sexy register display"Amaury Pouly7-134/+286
Change-Id: Ib938b4be71d2c7623851dbc3c211f96105077d7d
2015-09-10qeditor: use delegate to show bit range informationAmaury Pouly2-8/+25
Change-Id: I314365c3a2cb9d230c412f24d2a8034a12c43444
2015-07-17utils/parse_testcodec.rb: add support for Opus filesCástor Muñoz1-0/+2
Change-Id: I19e59cfe86598c2e5a7b070ef72b5a12e88b7242
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 https://github.com/dpapavas/luaprompt for original. Change-Id: Iedddb79abae5809299322bc215722dd928c35cca
2015-06-07Append build date when building dev version from local foler.Dominik Riebeling1-1/+2
Change-Id: I1172cb0c4910f1d49b6a5d1125a809491a5aba9c
2015-05-30Make revision handling work when building from local folder.Dominik Riebeling1-3/+2
Change-Id: I8e6cc0eb8a5bff722bf5278ffa7685436c3d846a
2015-05-30Fix path creation for zip file names in current folder.Dominik Riebeling1-5/+1
When building in the current tree (i.e. buildfolder ending up as '.') creating the filename to use in the zip file stripped all '.' characters. Use a different way to create the filename to avoid this. Change-Id: I139c404d5e83a8bcb028a9a22b125f238911e405
2015-05-30Update findversion for change version.h format.Dominik Riebeling1-7/+6
version.h doesn't store the version number as string anymore. Update findversion to use the individual values instead. Change-Id: I6bf0fdd4420d41279b44cffd22b42febbfc778ce
2015-03-29Add jz4760 toolAmaury Pouly2-0/+584
This tool can pack/unpack a jz4760 archive (like the one used for the fiio x1/x3/x5), and can descramble/scramble (it's the same operation) a firmware file (the sys.bin file in the archive). I did my best to keep the compatibility with the leaked Fiio/Ingenic tool which has the same name. I wrote the tools from scratch, but here are some remarks: - the format used is a slightly modified IHFS used in the older JZ4640 series, I used the information on the wiki about the IHFS format - the CRC computation done was already reversed engineered by someone on the forums but I realised this later - There are a few unknown fields in the headers, see comments in the source code - The firmware scrambling was discovered by pure guess, I realised there were some repetitve sequences, some I guessed it was a rotative XOR and ran some analysis to find the most probable sequence Change-Id: Ib83735b3db8475be5de9c94231714e88668a0340
2015-03-04qeditor: Add external static libraries to build dependeciesMarcin Bukat1-0/+10
The solution is a bit hacky as it simply call make in libs directory as pre-dependency. Clean doesn't touch libs. Change-Id: Ib447a48fd87cc41228944f17444474a55d393543
2015-02-16Introduce a new analysis tool to detect which macros are defined in each build.Amaury Pouly1-0/+196
See the usage() for more information. Change-Id: I712ef4d6bd21eccefa18cec144e35b8161ca5b3a
2015-01-23atj213x: Fix DMAC block in description fileMarcin Bukat1-49/+55
Change-Id: I4afc17b06f85d552248c0248e6b4b921ffc1e7a7