S1debug

From S1MP3 Wiki

Jump to: navigation, search

Contents

About

S1debug is a debug console running on the host (PC), much more then s1giveio. But instead using the USB to controll the device, this one uses a self-build Debug interface attached to the mp3 players I²C bus. To drive this interface on the client side, a s1Debug API is needed to be present in memory.

The debug console provides following features:

  • display debug output (putch, puts, ...)
  • single command tracing/stepping
  • reading/writing registers/ports/memory
  • support for breakpoints
  • upload/execute code
  • disassembler

Download it

Run it

Before you could use the software part you'll need to build a Debug interface and connect it between your pc's parallel port and the s1mp3 player. If you wish you can buy a ready-mounted pcb board from Wire at his site: (buy now). If the hardware works (red light on) then upload the client part to your mp3 player. For this reason you could use s1giveio and upload the \s1debug\client\test.bin file from the client folder of the archive. Finally run the \s1debug\host\s1debug\release\s1debug.exe (win32 only) or compile and run the code inside the host folder for any target system you want.

Snapshot

s1debug v1.0 - copyright (c)2006 wiRe
debug interface base address: 0x378
debug interface i2c address: 0x70
press ctrl+c to leave debug console


Hello world from the S1MP3 player!
-12345,0xA0FF

<BREAKPOINT@0418>
AF=FFAC BC=0000 DE=046B HL=A00A IX=4CFF IY=C6FE PC=0419 SP=4000  I=00  R=6F
[0419]    18 FA          JR -06h                          FLAGS: [S....P..]

use '?' command to display help

-t

AF=FFAC BC=0000 DE=046B HL=A00A IX=4CFF IY=C6FE PC=0415 SP=4000  I=00  R=19
[0415]    CD 1B 04       CALL 041Bh                       FLAGS: [S....P..]

-u
[0415]    CD 1B 04       CALL 041Bh
[0418]    FF             RST 38h  ;BREAKPOINT
[0419]    18 FA          JR -06h
[041B]    AF             XOR A
[041C]    21 46 04       LD HL,0446h
[041F]    F7             RST 30h  ;DEBUG API
[0420]    B7             OR A
[0421]    28 FC          JR Z,-04h
[0423]    3E 02          LD A,02h
[0425]    21 C7 CF       LD HL,CFC7h
[0428]    F7             RST 30h  ;DEBUG API
[0429]    B7             OR A
[042A]    28 FC          JR Z,-04h
[042C]    3E 01          LD A,01h
[042E]    2E 2C          LD L,2Ch
[0430]    F7             RST 30h  ;DEBUG API
[0431]    B7             OR A
[0432]    28 FC          JR Z,-04h
[0434]    6F             LD L,A

-t

AF=FFAC BC=0000 DE=046B HL=A00A IX=4CFF IY=C6FE PC=041B SP=3FFE  I=00  R=36
[041B]    AF             XOR A                            FLAGS: [S....P..]

-t

AF=0044 BC=0000 DE=046B HL=A00A IX=4CFF IY=C6FE PC=041C SP=3FFE  I=00  R=48
[041C]    21 46 04       LD HL,0446h                      FLAGS: [.Z...P..]

-t

AF=0044 BC=0000 DE=046B HL=0446 IX=4CFF IY=C6FE PC=041F SP=3FFE  I=00  R=58
[041F]    F7             RST 30h  ;DEBUG API              FLAGS: [.Z...P..]

-x

Hello world from the S1MP3 player!
-12345,0xA0FF

<BREAKPOINT@0418>
AF=FFAC BC=0000 DE=046B HL=A00A IX=4CFF IY=C6FE PC=0419 SP=4000  I=00  R=54
[0419]    18 FA          JR -06h                          FLAGS: [S....P..]

-

Related pages

  • Debug interface - the piece of hardware needed to connect client and host for debugging
  • s1Debug API - the software on the client side
Personal tools
about this site