Debugging Console - page 2 - General Discussion and Assistance - CHDK Forum

Debugging Console

  • 13 Replies
  • 9838 Views
*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Debugging Console
« Reply #10 on: 20 / December / 2008, 04:37:15 »
Advertisements
A little update: the patch above may actually work after all... yesterday while cleaning the MMC card I used for this, I found that there was something in the log from 3 days later.

I had experimented with SSAPI::LcdBrightnessMenuIn. Nothing happened when calling it in PLAY or REC mode, but when in REC mode MENU, camera crashed if it was called twice in a row. It (on a570 100e) sets RAM 0xc614 = 2 (normally 0) when in REC MENU. The crash caused an assert that ended up in the log file.


*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: Debugging Console
« Reply #11 on: 30 / December / 2008, 09:53:43 »
I ported the Debug log stuff from fudgey and , or at least tried. However I don't get any output to stdout.txt. What sort of output should I be seeing there and when? I do get that one note from platform/main.c console_init() to chdklog.txt, but that's CHDK writing.

The firmware functions in my camera were identical to those in ixus40, memory addresses aside of course.

edit: the changes to trunk 592 attached, I tried to paste them to the message but the forum gives funky errors.

I've added console log code from fudgey & chr to my SD900 port and it worked!

looks like iosInit is the same (ROM:FF811A0C).
Code: [Select]
_iosInit(0x14, 0x32, "/null");
i'm not shure i found correct address of TTY_DRV_NUM yet:
Code: [Select]
int *TTY_DRV_NUM = (int*)0x00011a44;
Camera crashed after i enabled params show in chdk debug menu, result:

stout.txt

Code: [Select]
Event[1]>
Open Console Event[1]>...

Event[1]>
Open Console Event[1]>...

Code: [Select]
ASSERT!! ParameterManager.c Line 149
Occured Time  2008:12:30 03:17:52
TCB: 002FFDB8
Task: tSpyTask
SP: 0x002FFC88
StackDump:
0x00000000
0x38303032
0x3A32313A
0x30203033
0x37313A36
0x0032353A
0xFF9AE858
0xFF9AA79C
0x0007BABD
0x002FFD1C
0x002D78A4
0x00000000
0x00000000

Code: [Select]
ASSERT!! ParameterManager.c Line 149
Occured Time  2008:12:30 03:18:19
TCB: 002FFDB8
Task: tSpyTask
SP: 0x002FFC88
StackDump:
0x00000000
0x38303032
0x3A32313A
0x30203033
0x38313A36
0x0039313A

Code: [Select]
ASSERT!! ParameterManager.c Line 149
Occured Time  2008:12:30 03:19:55
TCB: 002FFDB8
Task: tSpyTask
SP: 0x002FFC88
StackDump:
0x00000000
0x38303032
0x3A32313A
0x30203033
0x39313A36
0x0035353A
0xFF9AE858
0xFF9AA79C
0x0007BABD
0x002FFD1C
0x002D78A4
0x00000000
0x00000000
0x002FFD04
0xFF813D94
0x0000001D
0x

chdklog.txt

Code: [Select]
tyWrite replaced, camera log enabled
 DRV_struct: 2f8e38, _tyWriteOrig: ffb5ec84
tyWrite replaced, camera log enabled
 DRV_struct: 2f8e38, _tyWriteOrig: ffb5ec84
tyWrite replaced, camera log enabled

Re: Debugging Console
« Reply #12 on: 22 / September / 2009, 17:27:58 »
@DataGhost
I would like to divert /_term to a file.  Where can get the experimental branch you speak of?  I looked in the svn and that experimental branch doesn't have /_term anywhere in it.

Anyone else know?

Harpo

FYI I diverted /_term to a file in my experimental branch and I also got the console to work... more or less. I couldn't easily put stuff into it so I decided to execute the functions it's got directly instead. It's perfectly possible to do that, even without the shell. It's not extremely useful, though, but it works.
Canon Models - SD300, SD780, & SX210

*

Offline RaduP

  • *****
  • 926
Re: Debugging Console
« Reply #13 on: 22 / September / 2009, 17:38:36 »
On my A530 toy board (just the mobo, the screen and the i/o stuff with the SD and buttons) there is a missing header, but the connectors are there. There are no labels or anything, which made me think that it could possibly be some debugging/development stuff. One day, when I will have some free time, I'll hook it up to the scope and see if i can 'light' them up by writing stuff in the memory, similar to the LED blinking.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal