summaryrefslogtreecommitdiff
path: root/utils/regtools (follow)
Commit message (Collapse)AuthorAge
* regtools: fix library bug when checking if a reference is valid or notAmaury Pouly2016-09-21
| | | | Change-Id: I8adea40d2fa7c1a26f1975d987233249f61af8ef
* regtools: rename error_t to err_t to avoid name clashAmaury Pouly2016-09-21
| | | | Change-Id: Ib8d34e4f58f3225b1dafc533ce7e1b7867ad053b
* headergen_v1: remove warnings with newer GCCsAmaury Pouly2016-09-21
| | | | Change-Id: I90ed3a0c911014eee013cbea0e98a85f4310471d
* regtools: add headergen_v2Amaury Pouly2016-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* qeditor: port to the new hwstub library and add featuresAmaury Pouly2016-04-08
| | | | | | | | | 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
* regtools: add register access to soc descAmaury Pouly2016-04-08
| | | | | | | | | | | 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
* soc_desc: add default constructors to most structuresAmaury Pouly2016-04-08
| | | | | | | 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
* regtools: Convert rk27xx register description file to v2 formatMarcin Bukat2016-03-14
| | | | Change-Id: I60a764567d2fc73ed87fca2a8b0eaf643d4984bc
* regtools: make description file parser stricterAmaury Pouly2016-02-07
| | | | | | | 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
* regtools/desc: convert v1 stmp description files to v2Amaury Pouly2016-02-06
| | | | | | | 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
* regtools/desc: rename v1 stmp filesAmaury Pouly2016-02-06
| | | | Change-Id: Ib66a404acf1f640e19b30b35d6a976094ae4264a
* regtoosl/qeditor: port to the new description formatAmaury Pouly2016-02-06
| | | | | | | | | | | 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
* regtools: update v2 specification, library and toolsAmaury Pouly2016-02-06
| | | | | | | | | | | | | | | 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
* qeditor: fix uninitialised variableAmaury Pouly2015-10-03
| | | | Change-Id: I12a785e554b7d598b91e526af1b7ebc1fc44f610
* soc_desc: new version of the desc file formatAmaury Pouly2015-09-11
| | | | | | | Fix qeditor to use the old soc_desc_v1. Port hwstub_shell to the new description format. Change-Id: I9fefbff534bfaa5c3603bb3dd8307a2b76e88cfc
* qeditor: introduce new "sexy register display"Amaury Pouly2015-09-11
| | | | Change-Id: Ib938b4be71d2c7623851dbc3c211f96105077d7d
* qeditor: use delegate to show bit range informationAmaury Pouly2015-09-10
| | | | Change-Id: I314365c3a2cb9d230c412f24d2a8034a12c43444
* qeditor: Add external static libraries to build dependeciesMarcin Bukat2015-03-04
| | | | | | | 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
* atj213x: Fix DMAC block in description fileMarcin Bukat2015-01-23
| | | | Change-Id: I4afc17b06f85d552248c0248e6b4b921ffc1e7a7
* atj213x: fix desc file errorsMarcin Bukat2015-01-22
| | | | | | | Catched by swiss_knife check there are some overlaping fields and invalid characters in some names. Change-Id: Ia26ffd2e29452f4ddd9f8229f78bb2a2cc325ab4
* regtools/headergen: Make generator more flexibleMarcin Bukat2015-01-12
| | | | Change-Id: I2328ec021ed990a40257d4ce6f4fc5b3db2ba998
* regtools/qeditor: use the new model, drop unused codeAmaury Pouly2014-12-15
| | | | | | Change-Id: Ic4e2e201f6d055c85d52b7fe15d25980386df5b8 Reviewed-on: http://gerrit.rockbox.org/1023 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* regtools/qeditor: introduce custom table model for reg fieldsAmaury Pouly2014-12-15
| | | | | | | | This one is much more efficient than using a generic table widget. Change-Id: I3578964eead746e656f6b0a8dcec0f8442deb13d Reviewed-on: http://gerrit.rockbox.org/1022 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* regtoosl/qeditor: remove unused codeAmaury Pouly2014-12-15
| | | | | | Change-Id: I79ad3151d6a500903786b3467c271b43741f8fee Reviewed-on: http://gerrit.rockbox.org/1021 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* regtools/qeditor: fix field editor not updating the validator on changeAmaury Pouly2014-12-15
| | | | | | Change-Id: Ib8df47c8b7cfe0beb486e45542e3fcc9187bcc54 Reviewed-on: http://gerrit.rockbox.org/1020 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* regtools/qeditor: fix backend dump bug, be more correct on readAmaury Pouly2014-12-15
| | | | | | Change-Id: I581c033435f553f092b61144c4b68b05ab931dd8 Reviewed-on: http://gerrit.rockbox.org/1019 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* regtools/socdesc: update library with a field useful functionsAmaury Pouly2014-12-15
| | | | | | Change-Id: Ib2891fe36b0594e8554bb354a29bc8b3485de20d Reviewed-on: http://gerrit.rockbox.org/1018 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: message widget now supports IDs, useful to clear messagesAmaury Pouly2014-12-15
| | | | | | Change-Id: Ibe0a8909128469a71a25415761860e06fc9f1e67 Reviewed-on: http://gerrit.rockbox.org/1006 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: change setting names, they were inconsistentAmaury Pouly2014-12-15
| | | | | | Change-Id: I47c94520749d0cef1e602c7c62c685a8a3703258 Reviewed-on: http://gerrit.rockbox.org/1000 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: rework register dump to be more general and flexibleAmaury Pouly2014-12-15
| | | | | | Change-Id: I2fb7a2813c93f0804ed1ca6223625706d0dff9a5 Reviewed-on: http://gerrit.rockbox.org/998 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: introduce a new "RAM" backend, and refactor file backendAmaury Pouly2014-12-15
| | | | | | Change-Id: Icfbbc01b83d3592041803387e35f5aa6fb0fa813 Reviewed-on: http://gerrit.rockbox.org/997 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: display message on "Nothing" backend selectionAmaury Pouly2014-12-15
| | | | | | Change-Id: I071c79500f55afe0b6342cbb5a26a9fddba35d94 Reviewed-on: http://gerrit.rockbox.org/996 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: backends can now report validity statusAmaury Pouly2014-12-15
| | | | | | Change-Id: Iefedc9cee10a8c7457d972e5a60d151a6cb38aa8 Reviewed-on: http://gerrit.rockbox.org/995 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: introduce a message widget to display non-interactive messagesAmaury Pouly2014-12-15
| | | | | | Change-Id: Iad43efa1f09428389fbd09403c1ae20d2805f1c5 Reviewed-on: http://gerrit.rockbox.org/987 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: rework mainwindow tab names handlingAmaury Pouly2014-12-15
| | | | | | | | | With the previous code, tab names would be ignored if tab is detached which can happen early on. Change-Id: I9eac4202850f3e79a04590a4ba1444850ec6a583 Reviewed-on: http://gerrit.rockbox.org/986 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: add copyrightAmaury Pouly2014-12-15
| | | | | | Change-Id: I7834bc09b21f2a2d84b1c9edbbe1188372809c63 Reviewed-on: http://gerrit.rockbox.org/983 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Revert "regtools/qeditor: use the new model, drop unused code"Amaury Pouly2014-12-15
| | | | | This reverts commit 3b3d9bf725a5b04e4cd9bc4254fbd2594b518e89. Gerrit did crap on this one.
* regtools/qeditor: use the new model, drop unused codeAmaury Pouly2014-12-15
| | | | | | Change-Id: Ic4e2e201f6d055c85d52b7fe15d25980386df5b8 Reviewed-on: http://gerrit.rockbox.org/1023 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: add clock analyser for ATJ213xMarcin Bukat2014-11-28
| | | | | | Change-Id: I5f5a3537d1ddf6b02684dd4c1dd13be862d3a918 Reviewed-on: http://gerrit.rockbox.org/1054 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* hwstub: lua functions for atj213x/irivere150Marcin Bukat2014-11-28
| | | | | | | Change-Id: I3ab32996b4b6603fd7d66eee5b3bfd795b79eee1 Reviewed-on: http://gerrit.rockbox.org/1049 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com> Tested: Marcin Bukat <marcin.bukat@gmail.com>
* regs-atj213x.xml upadteMarcin Bukat2014-11-18
| | | | Change-Id: Ia34dcf651e68ea66baebdeb8c056db86799ea33c
* hwstub/qeditor: add support for atomic read/writesMarcin Bukat2014-11-18
| | | | | | | | | | 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
* regtools: ATJ213x description fileMarcin Bukat2014-11-06
| | | | Change-Id: I5b4d29e0808c57e252f5b6c3b9ba26a52c1bd112
* regtools/socdesc: fix redAmaury Pouly2014-10-08
| | | | Change-Id: If40c52168eb5cd2d194c90c3f65263d2b9da0451
* regtools: reg-rk27xx.xml description file rework and cleanupMarcin Bukat2014-09-19
| | | | Change-Id: I0a2e45eb1b4aa03122382cc93bbc0c292b3249be
* qeditor: Implement clock analyzer for rk27xxMarcin Bukat2014-09-19
| | | | | | Change-Id: Ib8f53d32120893b6c1054299ed434a6650a0d7c2 Reviewed-on: http://gerrit.rockbox.org/971 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* qeditor: rework modified indicator, register tab names depend on contentAmaury Pouly2014-09-19
| | | | | | | | | | | | Because Qt doesn't support QObject multiple inherance, it is a bit tricky to have a base class which interact with the UI. The register tab name now display: - file dump name (for dumps) - hwstub device path (for hwstub) And the register editor display the filename Change-Id: If2579992098c02627c67d560c824f1668e73bc45 Reviewed-on: http://gerrit.rockbox.org/979 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: implement usb device list refresh (if supported)Amaury Pouly2014-09-19
| | | | | | Change-Id: Iaf05cad0e057f767dcde963d194027b2e290dbea Reviewed-on: http://gerrit.rockbox.org/978 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: fix UI to update register/analyser view on each tree/list clickAmaury Pouly2014-09-19
| | | | | | Change-Id: Idaceb7ffaf33c2184a43353dd9d7dee20ac807a9 Reviewed-on: http://gerrit.rockbox.org/972 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* qeditor: fix horrible out of bound bugAmaury Pouly2014-09-19
| | | | | | Change-Id: I1b34b1cd7be83d90e38559e386d0c6c64797b707 Reviewed-on: http://gerrit.rockbox.org/977 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>