Rockbox Technical Forums

Rockbox Development => New Ports => Topic started by: shivramk on February 07, 2008, 02:36:58 AM

Title: iaudio7
Post by: shivramk on February 07, 2008, 02:36:58 AM
Hi,

I downloaded the latest source and saw that there is some code for the tcc77xx series chip used by the iaudio 7. I'm wondering if somebody is working on the iaudio7 port?

I would like to help.
Title: Re: iaudio7
Post by: linuxstb on February 07, 2008, 03:57:23 AM
There has been a little bit of work, but it seems to have stalled for now.

What's required now is someone with C and ARM assembler skills to continue the low-level work of writing drivers for the hardware (the LCD driver is probably the part that should be done next).  

Do you have any C/ARM experience?
Title: Re: iaudio7
Post by: shivramk on February 07, 2008, 04:25:02 AM
I'm a fairly competent C programmer and know a bit about the ARM architecture. Haven't done any ARM assembly programming though. But I'm willing to learn.
Title: Re: iaudio7
Post by: linuxstb on February 07, 2008, 09:44:41 AM
You probably want to start by downloading the TCC77x related files/datasheets from these links:

http://forums.rockbox.org/index.php?topic=10164.msg109942#msg109942

You'll also want to grab a copy of the Cowon firmware update for your device, and an ARM disassembler (arm-elf-objdump does a basic job), and start reading that...

For further pointers, probably best to come to IRC and talk to me, or (if he's around), "TMM", who has been working on the port so far.

Title: iaudio 7
Post by: vitja on July 30, 2008, 01:48:12 AM
Hi!

I've recently started playing with my iaudio7, with writting very simple asm code.
Now I know something about GPIO assignment: hold, usb-charger, backlight, beeper.

So my simple code can beep and flash while hold button is pressed, then let OF go.
Today I'm going to find some time to play with LCD.

You probably want to start by downloading the TCC77x related files/datasheets from these links:

http://forums.rockbox.org/index.php?topic=10164.msg109942#msg109942


The links you point at doesn't work for me, has anyone mirrored them?

ps: I've started a new topic, as forum engine sad to me.

Thanks,
vitja.
Title: Re: iaudio7
Post by: vitja on July 30, 2008, 04:36:19 PM
I'm now trying to understand how does original firmware work with LCD, how it is connected and so on.
I want to adopt softgun or skyeye emulator to reverse-engineering  some HW configuration, does anyone have success here?
Title: Re: iaudio7
Post by: saratoga on July 30, 2008, 04:41:56 PM
I'm now trying to understand how does original firmware work with LCD, how it is connected and so on.
I want to adopt softgun or skyeye emulator to reverse-engineering  some HW configuration, does anyone have success here?

We had a project to do this over the summer, but the student working on it ended up quitting.  The closest thing we have to an emulator is an older PortalPlayer ARM emulator in the patch tracker, but its not 100% working and is somewhat specific to PP hardware.
Title: Re: iaudio7
Post by: linuxstb on July 30, 2008, 09:12:35 PM
vitja,

Regarding the LCD:

http://www.rockbox.org/irc/log-20071028#01:43:31
Title: Re: iaudio7
Post by: vitja on July 31, 2008, 05:21:26 AM
I've written simple program that splits arm-objdump listings into several html files
it colorizes output and adds references for some addresses. I did't find a tool to browse large asm listings (>15M)
Ordinary text viewer/editor was too slow for me

example usage: arm-elf-objdump  -b binary -m arm --adjust-vma 0x20000000 -D fw.bin | python ref.py
That will create files in ./out/

hope it could be useful: ftp://stop.qc.to/vitja/ref.tar.bz2

vitja.
Title: Re: iaudio7
Post by: linuxstb on July 31, 2008, 09:04:08 AM
You could also check out the ARM disassembler in the Rockbox SVN - utils/disassembler/arm/

This is still very basic, but is a small improvement on objdump.  Patches to that would be welcome...
Title: First success
Post by: vitja on August 01, 2008, 02:28:26 AM
First success.

I've replaced LCD lcd initialization in original firmware with my own hook,
now I can init lcd display, thanks to TMM. The problem is CS1 configuration, when it will be solved, original firmware will not be needed to display things.


update:

I've compiled iaudio7 bootloader, it starts and shows me debug screen, that seems that all the tops buttons are on ADC0. Power on/off/hold is on GPIO_A.
Title: Re: iaudio7
Post by: mcuelenaere on August 11, 2008, 05:49:28 AM
Just as a reference:

a Flyspray patch is available here (http://www.rockbox.org/tracker/task/9245).
Title: Re: iaudio7
Post by: moneytoo on September 07, 2008, 06:24:09 AM
Great progress, vitja.

I wanted to try it on my iAudio 7 (16 GB) but I wasn't much successful. I used the latest revision (18435) with commited patches from vitja.
Uploading via tcctool is ok (the original firmware I7_FW.BIN is loaded and ran). If I upload rockbox.bin, the backlight of the touch sensor goes on but the display keeps off.
Is there something specific for iAudio 7, unlike D2? (What should I set when running ../tools/configure?)
Title: Re: iaudio7
Post by: vitja on September 08, 2008, 02:34:32 AM
This bug really exist: when bootloader loads firmware it can hang on startup, but not allways.
Using tcctool works ok. Try to boot it few times

or using tcc tool:
Code: [Select]
../tools/scramble -tcc=crc apps/rockbox.bin I7_FW.BIN
../utils/tcctool/tcctool -d iaudio7 I7_FW.BIN
Title: Re: iaudio7
Post by: vitja on September 16, 2008, 05:04:37 AM
Just for reference, tool I've used for analyzing large binary blobs:

Here is code:
ftp://stop.qc.to/vitja/arm-disasm-ref/arm-disasm-ref-0.1.tar.bz2

And here is example output for rockbox binary
ftp://stop.qc.to/vitja/arm-disasm-ref/arm-disasm-ref/out/disasm0000.html

vitja.
Title: Re: iaudio7
Post by: xavi on January 24, 2009, 05:07:18 PM
Hello,

Ihave a IAudio 7 and I’m very interesting in Rockbox support on it.

Yesterday I compiled sources from svn and after solve some problems, some plugins didn’t compile, I got one Rockbox.zip and Rockbox.bin.
First, I tried to unzip Rockbox.zip on to IAudio and copy Rockbox.bin but IAudio didn’t recognize new firmware and I decided to rename Rockbox.bin to I7_FW.bin. Then I turn off and turn on, and IAudio seems to install new firmware. But after reboot it nothing have been changed. After I turn off another time and it won’t turn on, :-(
I have tried to push the reset button but nothing happens, any light turn on, :-(. And Windows and Linux doesn’t recognize as usb disk.
Anyone know how I can restore or reset it ?

Any help will be appreciated.

Thank you much.
Title: Re: iaudio7
Post by: vitja on January 25, 2009, 02:21:06 AM
Hi!

For now the best way to go is to use, bootloader that will run rockbox if hold button is pressed, see D2 wiki for more info.

How to restore OF: upload OF using tcctool, then copy I7_FW.BIN to player, then reset player, and upload OF again. It will write OF to the flash.

Title: Re: iaudio7
Post by: xavi on January 26, 2009, 02:26:22 PM
Thanks Vitja,

I've done your steps and OF seems to be restored but when I start show "empty lists" all texts have been dissapear and all user interface are "strange". I don't understand.

Then I have tried another time to upload rockbox firmware.

I generate bootloader and I upload with tcctool, and it seems to install. When I start IAudio7, it shows a list with two items but without text, :-( so I don't know what are ask me. I suppose that it is asking me to start OF or Rockbox firmware. But I never get to start rockbox firmware. There is only one way to start Rockbox firmware, pressing Hold button and plugin it by usb into computer, then it starts. But if I disconnect and turn off, after if I try to turn on, IAudio7 shows me another time a list with two items without text, :-(.

Do you know what I do wrong ? Is there any tutorial or documentation specific for IAudio7 ? Excuse me for my english, I hope you understand me.

Thank you very much.
Title: Re: iaudio7
Post by: vitja on January 27, 2009, 01:59:01 AM
Hi!


I have same problem with OF: after flashing bad firmware OF doesn't work as expected. Now I can play music with rockbox only, while OF still can handle usb uploads.  If you want to flash rockbox the better way now is to create dual-boot fw with mktccboot tool:

Code: [Select]
../tools/mktccboot I7_FW.BIN bootloader/bootloader.bin I7_FW-dual-boot.BIN

And flash I7_FW-dual-boot.BIN

vitja.
Title: Re: iaudio7
Post by: MarcGuay on January 27, 2009, 08:35:03 AM
The Sansa c100 reacts similarly (no strings) when you flash the wrong firmware version.  Perhaps there are multiple models/versions of the iAudio7 as well?
Title: Re: iaudio7
Post by: cholero on February 02, 2009, 02:25:56 PM
@xavi

I also had once the problem with the "empty list". I think the reason for this is a overwritten missing font in the memory of your Ia7. I don't remeber from where exactly, but once I got from a forum a font-file which i guess was part of an older official update. Copy this to your Iaudio7 and after a restart it will upgrade only the font part of the memory and it shows the text again:

http://www.waebibar.ch/sponsoren/cowon_iaudio7/1_17/I7_FO.BIN

I've only tested this with the version 1.17.

Good luck!

cholero.
Title: Re: iaudio7
Post by: xavi on February 03, 2009, 03:53:48 AM
Hi cholero,

I'll try to install new firmware with I7_FO.bin.

I though that my IAudio was dead.

Thank you very much.

Title: Re: iaudio7
Post by: Hironiemus on February 18, 2009, 10:53:06 AM
Hi there,

I was watching this players rockbox development from the beginning.
You did a great job so far, I hope there will be full support soon.

Now for the more interesting part:

I have just found out, there is a another connecting mode which i stumbled upon by chance. 

After playing with it for a while the only reproducible way to get into that mode seems to be the following:

1. Switch on the player
2. Press and hold VOL. - button for a few seconds
3. Press and hold PLAY button
4. Plug in USB-cable
5. Release PLAY button
6. Release VOL. - button

Now the player should stay on, and a little USB-sign is shown instead of battery status symbol.
 
What I found out so far:

- All functions are usable
- Device manager detects as normal, but says no driver installed,
  data can't be accessed through explorer
- Mode seems to ignore charging mode setting
- If the player stays untouched for about a minute it restores to normal
  connecting mode

I don't know wheter this is sort of a monitoring mode or just a bug, but thought it might help.

So long
Title: Re: iaudio7
Post by: cdleonard on July 17, 2009, 12:41:53 PM
I tried to run rockbox on the iAudio7. I encountered some compilation issues but they were fixed in svn. I got the bootloader to run but the lcd doesn't work (it doesn't display anything). I modified show_debug_screen from bootloader/telechips.c to blink the keypad leds and lcd backlight on button presses; so at least something works.

I tried with trunk and two older revision (r18435 and r19597) but I got the same result. I also tried both OF-1.17 and OF-1.18 (released in 2009).

I tested with a bootloader build; mktccboot to create a dual-boot image and tcctool to upload.

Device is an iAudio7 16GB model. Bottom has a model number 'CWS-iAudio7 (B)'. This might be different enough to make the lcd stop working. It would help me if someone else would test the version in trunk and check if the lcd works.
Title: Re: iaudio7
Post by: Akranis on January 19, 2010, 02:06:14 PM
I got an iAudio 7 16gb for christmas. It's the same one as yours, CWS-iAUDIO-7(B)

Although the regular build causes mine to panic at boot (it doesn't find the partition) , making it run show_debug_screen() seems to go well.

I'm currently running r24284

On other notes, I'm probably going to be unemployed for the next 6 months until I continue my stuyding this fall, and I could probably pick up a book on C, refresh my knowledge and help a little with porting the iAudio7, as I already have some knowledge on C++ and Java and did a basic course in C a couple of years ago.
Title: Re: iaudio7
Post by: ppawel on November 13, 2010, 12:10:51 PM
Hey, I managed to compile RB for my iAudio 7 and boot it using tcctool. It always hangs at boot. I diagnosed the problem using splash/splashf and it turns out that the problem is in nand_init() function which calls read_random_writes_cache() and this function in turn scans the storage to build write cache page map and during the loop one of the nand_read_raw invocations hangs/blocks.

My iAudio is 16 GB version with symbol CWS-iAUDIO-7(B). I may do some work to fix it but from what I can see this is a really tough challenge - http://www.rockbox.org/wiki/TelechipsNAND wiki page mentions a lot of unanswered questions regarding this NAND.