Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Run Rockbox stub to debug original firmware
« previous next »
  • Print
Pages: [1]

Author Topic: Run Rockbox stub to debug original firmware  (Read 2748 times)

Offline taksato

  • Member
  • *
  • Posts: 4
Run Rockbox stub to debug original firmware
« on: January 25, 2010, 09:13:48 PM »
Hi!

I recently got the im413 dock plus remote for Sansa. I quite like the concept, so I bought two. I would have access to labs at work for scope analysis. However, I am no longer an engineer and would need to make a special badge access request to do that.

Instead, I would like to try to get the dock working by more difficult analysis methods. To that end, I wish to run a stub of code while the original sansa FW is running. My stub of code would be analyzing the GPIO and such while throttling the info to disk. While the stub is doing that in the background, I would be messing around with the remote with the sansa in original FW sitting in the dock.

I tried pulling up the debug screen with the Sansa seated in the dock with rockbox running and messing with the remote. I did not notice a consistent effect when mashing the buttons on the remote.

Then I would post analyze the dumped log file to see where things lead. Short question is: Has anyone run stubbed code for emitting logging while original sansa FW is running?

Thanks!

Keywords to help other searchers get matches: original FW, RB stub, dump GPIO
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Run Rockbox stub to debug original firmware
« Reply #1 on: January 25, 2010, 09:39:08 PM »
Quote from: taksato on January 25, 2010, 09:13:48 PM
I tried pulling up the debug screen with the Sansa seated in the dock with rockbox running and messing with the remote. I did not notice a consistent effect when mashing the buttons on the remote.

Its probably done over the RS232 port on the Sansas, and AFAIK that is only enabled on the ipods (for ipod accessories).

Quote from: taksato on January 25, 2010, 09:13:48 PM
Then I would post analyze the dumped log file to see where things lead. Short question is: Has anyone run stubbed code for emitting logging while original sansa FW is running?

We've done some JTAG stuff on the AMS sansas, and for the PP ones Sandisk gave us a JTAGed dev device, but we never did much with it.  Which Sansa are you talking about?
Logged

Offline taksato

  • Member
  • *
  • Posts: 4
Re: Run Rockbox stub to debug original firmware
« Reply #2 on: January 26, 2010, 12:18:32 AM »
Thanks for the further info! I am talking about Sansa c200 or e200 v1. Would be extremely lovely to use with remote on the im413. Serial is also my hunch after reading some other threads on the dock or docking stations in these forums.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Run Rockbox stub to debug original firmware
« Reply #3 on: January 26, 2010, 02:04:16 AM »
First I would try enabling the serial port driver for the Ipods (which use the same chip) and seeing if you can talk to the remote using it. 
Logged

Offline taksato

  • Member
  • *
  • Posts: 4
Re: Run Rockbox stub to debug original firmware
« Reply #4 on: February 21, 2010, 06:52:25 PM »
Thanks for the idea. Now working on it.

I did
#define IPOD_ACCESSORY_PROTOCOL
#define HAVE_SERIAL
 in sansae200.h

Got rid of some ipod remote specific stuff with some #define flag guards.

Put Debug screen into two lines due to small screen.

Tried both of these:
    outl(0x70000018, inl(0x70000018) & ~0xc00);
and
    (*(volatile unsigned long *)(0x7000008C)) &= ~0x0C;
    GPO32_ENABLE &= ~0x0C;

First one is always eight zeros. Second is always an 0xFF and then seven zeros.

Not sure what I will try next, but maybe I have to do some sequential reading in the procedures to see if there are any other areas where they have ipod version specific stuff in #if blocks that needs to be executed.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Run Rockbox stub to debug original firmware
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.063 seconds with 15 queries.