Commit graph

793 commits

Author SHA1 Message Date
Thomas Martitz
dda54b85da ypr1: Add some commands to rockbox.sh which are needed for playback
Change-Id: I2772e218174b5d1fbc7c066fee41d6fb06c01900
2014-03-09 23:25:50 +01:00
Marcin Bukat
c64b59fc5e atj213x: various fixes in sample code snippets
Change-Id: I78781e1a56cb6705d011ee2296f1789b497a566a
2014-03-04 11:07:07 +01:00
Amaury Pouly
c02bc1afd2 imxtools/scsitools: increase SCSI delay to 10 seconds
On some OSes like Windows or if running in a virtual machine, the one second
timeout might be too short.

Change-Id: I717f7a2aaed1cb3d40e8fbe6f9b1081b43ceea95
2014-02-22 20:27:32 +01:00
Amaury Pouly
9517bd86b0 imxtools/scsitool: add progress indicator
Change-Id: I061ddac4f882156139e38fa6d495fee86271a6aa
2014-02-22 18:12:00 +01:00
Amaury Pouly
4e1a043cf0 imxtools/scsitool: improve output formatting
Change-Id: Ifc5b5252e1342f381356f7bd5c2fed5ad8beddfe
2014-02-22 18:11:30 +01:00
Amaury Pouly
49db199a36 regtools: fix headergen variadic macro generation
Change-Id: I5e2439e5dcbeaaafda75c6ea457e53ee1ba26463
2014-02-18 18:14:08 +01:00
Marcin Bukat
101d10ff6c atj213x: rework crt0.S in test code
Rework init code so relocation is safe for binaries linked
into cached unmapped KSEG0 region.

Change-Id: I705ee3f0334f8998237f249a2c3059d6dbe78a43
2014-02-14 08:37:01 +01:00
Marcin Bukat
44afbd3ac2 regtools: Add rk27xx register description file
Change-Id: I27101876d031cbcbb00e741ea742a6f64a7baad7
2014-02-13 21:55:43 +01:00
Amaury Pouly
1210de217e regtools/qeditor: fix crash when hwstub device fails to open
Change-Id: Ica2fd201f2ae8ee63b1ae81f27433c841d2f22cd
2014-02-13 11:51:48 +01:00
Amaury Pouly
c35e4a4b7d Fix red
Change-Id: Ib64eb3539e33d4336c298612b4508c4611b80c9e
2014-02-12 13:14:02 +01:00
Amaury Pouly
04fc97b362 regtools/qeditor: implement UI code to write registers
The UI now has a "read-only" check box to prevent accidently changes: once
unchecked, the UI can do write to register (only full register writes are
supported for now). If the register supports it, the UI provides SCT writes
as well. The display register panel was moved to its own class to cleanup
things a bit.

Change-Id: I0fc6aab3b351f9080076102ee6fad0037ab5353b
2014-02-10 23:14:27 +01:00
Amaury Pouly
6e132b48d5 regtools/qeditor: enhance backend write with write mode (SCT)
Change-Id: I723bce7a60fb08c1d1d5f894a225c36bc1ba4394
2014-02-10 23:14:27 +01:00
Amaury Pouly
b8bad8412f regtools/qeditor: clean-up
Free the backend when closing a tab to release some memory. Implement about
dialogs.

Change-Id: Ic8c500a23d38e6c3dd4de6a4ba862012925968be
2014-02-10 23:14:26 +01:00
Amaury Pouly
a66a5af4db regtools/qeditor: prepare support for register writing
Change-Id: Ifef36a3ddb1604db63ec974da2d6a77a5540ff42
2014-02-10 23:14:26 +01:00
Amaury Pouly
3d07706c05 regtools/qeditor: rewrite soc handling
The code was a mess with respect to soc handling: some code just plain copied
the SoC descriptor which are big objects, some was using indexes. The new soc
factor out everything in a few classes which hide these ugly details so that
descriptors are never copied.

Change-Id: I17af8b47f997a528b58221621389d42d24fded93
2014-02-10 23:14:26 +01:00
Amaury Pouly
8358707d82 hwstub/regtools/qeditor: put soc descriptors in a list instead of a vector
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-10 23:14:26 +01:00
Amaury Pouly
f982ea6398 utils/regtools: slight rework of tab management in qeditor
Change-Id: Iaf41defb79bb76010f3ff5269c28e4bad991ebc3
2014-02-10 23:14:26 +01:00
Amaury Pouly
0e0c610df0 utils/regtools: make qeditor able to poke directly at a hwstub device
This commit add the very handy feature of being able to read registers
directly from a device using hwstub. This is mostly trivial using the hwstub
library and the biggest change here is actually:
- being able to read registers by name and/or addresses
- being able to enumerate devives
The UI code currently doesn't handle hotplug but the backend does so it should
be trivial to add in the future. It also opens up the possibility the write
registers from hwstub or save the register values to a file.
Since it relies on both hwstub and libusb, a switch has been introduced in
qmake to disable it (use -config nohwstub).

Change-Id: I5d7d7a2a7c97ecd7407227357c8553c2773ea6cc
2014-02-10 23:14:25 +01:00
Amaury Pouly
81dfed27cf utils/hwstub: make stmp stub able to load in a MMU'ed environement
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-10 23:14:25 +01:00
Amaury Pouly
c17d30f204 utils/hwstub: completely rework the protocol, drop unused features
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
2014-02-10 23:14:24 +01:00
Marcin Bukat
7552542288 atj213x: Simple test exploring irq handling
This test software setups timer T0 periodic interrupt.
In ISR it changes backlight level. The interrupt handler
does not support nesting and the whole ISR is run in interrupt
context. Exceptions are not handled yet.

Change-Id: Idc5d622991c7257b4577448d8be08ddd1c24c745
2014-02-09 22:29:30 +01:00
Lorenzo Miori
e876f4df6d Samsung YP-R1 target port
This is the basic port to the new target Samsung
YP-R1, which runs on a similar platform as YP-R0.
Port is usable, although there are still
some optimizations that have to be done.

Change-Id: If83a8e386369e413581753780c159026d9e41f04
2014-02-05 09:56:21 +01:00
Thomas Martitz
b828b9d99b samsung ypr0: Include getty service in the patched firmware for usb serial shell access.
The getty service mointors /dev/ttyGS0 (also created by the patched firmware).
When the g_serial.ko module is loaded this automatically enables shell access
via usb. It exposes a cdc-acm device to the host which is compatible to linux
(usb_serial.ko) and windows.

The g_serial.ko is not included module can be build from the YP-R0 open source
package provided by samsung. It can be loaded via rc.user on the internal memory.

Change-Id: I4903a635fd2e2f0ce6f5e91589a31d72bba2776b
2014-02-04 22:26:06 +01:00
Amaury Pouly
7272a95b9c rk27utils: improve command line parsing, allow arbitrary USB ids in rkusbtool
Change-Id: I884fe29c10dede7823721c2cac5dc627d6ab25c6
Reviewed-on: http://gerrit.rockbox.org/731
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-01-30 21:20:06 +01:00
Marcin Bukat
51d8a45057 adfuload: add atj213x timer0 test program
This simple program shows how to setup timer for periodic
operation. Interrupts are not used yet and simply pending
irq bit is polled and cleared when set. This program
supports my understanding of disassm of ADEC_N63.BIN that
P_CLK is configured for 7.5MHz and timer clock source is P_CLK
directly.

Change-Id: Idd6461bf847c763b78b8c324012ec2515f65dd41
2014-01-08 08:56:09 +01:00
Thomas Martitz
98d2121eaa bloat-o-meter.py: Now compatible to python 3.
Change-Id: Id617aa6304a5a9263ef6ceed7d9c3010b47e73a8
2014-01-07 10:35:59 +01:00
Marcin Bukat
062801e3ed atj213x: obtain PC value in more elegant way
Change-Id: I2e6ffb3b58ddda0ea62ce5d4cd71ac5475b34495
2014-01-03 09:00:11 +01:00
Amaury Pouly
8566cd7ebf regtools/qeditor: always open a register tab at init
Change-Id: I47a1413ca648c7166571e6b0ba88c7ebb5ce86a8
2013-12-24 15:25:42 +01:00
Amaury Pouly
a0fd5e8547 hwstub: update zenxfistyle code
Change-Id: I7e85101eca7dfc0f68c215936be4aa19749923ad
2013-12-24 15:25:32 +01:00
Amaury Pouly
16de558b36 hwstub: use delay in zenxfistyle code
Change-Id: Ia9576162b3b28d3778fe479cc321c879d73247c6
2013-12-24 15:25:09 +01:00
Amaury Pouly
01475e724b hwstub: fix lcdif pin setup for 18-bit bus
Change-Id: I30a2cedb1170abbee5a80c33206c147eb4207ca5
2013-12-24 15:24:50 +01:00
Amaury Pouly
5b865de73a hwstub: add delay function
Change-Id: Iab208ed59a9a2540a64b190357411d3de28f288e
2013-12-24 15:24:40 +01:00
Amaury Pouly
1dc91b4560 hwstub: add ZEN X-Fi Style code (preliminary)
Change-Id: I535d54bc3fb2263c174b7ae983ea4f5ed68e6390
2013-12-24 12:39:58 +01:00
Amaury Pouly
84f1a0af3b imxtools/scsitools: tool can now write a firmware using SCSI
Change-Id: Iac803d4b2d48319a1a32d1101f5041d20174c7a1
2013-12-24 12:39:58 +01:00
Amaury Pouly
e0636afed2 hwstub: fix lcdif code for 18-bit word length
Change-Id: I38cf0b5808443d5c19ebddb329c2a1636bcc4b28
2013-12-24 12:39:58 +01:00
Marcin Bukat
87c6df98a3 adfuload: add test program
This test program. I add it mainly to document somehow my work:
1) atj213x.h    lists registers addresses
2) crt0.S       exploits self relocation of the binary
3) test_bl.c    documents how to control backlight on e150

Change-Id: I055e0fe065d926a5c3805b73cea3f537cb64bf52
2013-12-13 22:43:52 +01:00
Amaury Pouly
8666871cb3 hwstub/stmp: disable watchdog
Some targets like Sony NWZ use a watchdog, so we must disable it to prevent
spurious reboot when we take over

Change-Id: I138a8d7f9a1b089acb2d08d7f6c4a58e8b088b3a
2013-12-13 00:20:18 +01:00
Amaury Pouly
3bbe52bb85 hwstub/stmp: cleanup
Conditional no longer needed since ctr0.S is private to target, also setup
stack just before jumping to C code only

Change-Id: I74116239be9e87bbe53e8fa814c45f04f242f1c1
2013-12-13 00:20:18 +01:00
Marcin Bukat
b5ca0cffac adfuload: utility to upload and exec binary using brom adfu mode of atj213x SoC
Change-Id: If52aa34124be2801c2ac316641ff9aa0bbd837c6
2013-12-11 15:42:25 +01:00
Amaury Pouly
99835fa38b imxtools/sbtools/sb1: fix parsing/debug bug about jump/call arguments
Change-Id: Ib406cfc03ced6c8689ed467c154d6a7447a34e5c
2013-12-06 15:22:38 +01:00
Amaury Pouly
6eefc418dc imxtools/sbtools/elf: fix debug code
Change-Id: If043eb214417a41f71e6c05fc6a725eb8f983373
2013-12-06 15:22:38 +01:00
Marcin Bukat
3440f3518e hwstub: Prepare for multi arch support
Change-Id: Id38411ff95660e60ee23f99350b275b92b3e4578
Reviewed-on: http://gerrit.rockbox.org/690
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-12-06 11:46:01 +01:00
Amaury Pouly
c5b209f2d8 elftosb: fix crash on invalid command file
Change-Id: Ifef61b7ca6a391960d1d696ba455e0d14462c967
2013-12-06 11:37:49 +01:00
Amaury Pouly
f365a5123f hwstub: forgot the db command file for stmp
Change-Id: I08ca6be221d3633c5b6e5e4b023afca33713e428
2013-12-06 11:37:10 +01:00
Amaury Pouly
e43bfdd5e8 regtools: update STMP3600 descriptio (fix EMI block)
Change-Id: I654e3210c1050e3bd559c9e9b29707a6341b111b
2013-12-06 02:00:40 +01:00
Amaury Pouly
58bb4b9b4c hwstub: implement i2c and i2c eeprom dump
Change-Id: Iff1b4f40affb88c104e7322e25cdbe34f8886476
2013-12-06 01:56:04 +01:00
Amaury Pouly
a15a15ba61 hstub: add Sansa Express lcd code
Change-Id: I61fc58e3c97a3666eac98d21226865181b85eef1
2013-12-03 01:35:34 +01:00
Amaury Pouly
15155ed100 regtools: update xml format documentation
Change-Id: I7e293532983f350a6f7cd9c7bc2bc6633c8fd3f2
Reviewed-on: http://gerrit.rockbox.org/671
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-12-02 20:21:58 +01:00
Amaury Pouly
f04d3c518a regtools: add shortcut notation for simple register in the desc files
Change-Id: I2745287844ad0a47dd41ba4dae5e1f7218ae5814
Reviewed-on: http://gerrit.rockbox.org/679
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-11-26 00:29:48 +01:00
Amaury Pouly
ef2b6db066 regtools/qeditor: fix url
Change-Id: I9783ff809c69bb5617b2048d1e11374cd8f680ab
2013-11-25 22:52:21 +00:00