Had some experiments with camera native stdout/stderr IO, and got it work in kind of a portable way.
Probably it'll be useful for development and OS internals investigations.
Right now it is enabled only for ixus65_sd630 (CAM_CONSOLE_LOG_ENABLED).
To port it only the "iosDevFind" entry point is required. I've added it into the findsig, it seems to be reckognized quite good.
To use the logger, create "A/stdout.txt" empty file, this'll enable logging.
Camera by default logs only error conditions, so you normally see no much information there.
However! You may use "ShowCameraLog" event procedure (scan-event-procedures.idc and scan-event-procedures-list.idc to findout all event procedures), it'll dump a kind of internal status log with some information.
And finally, the most useful point for me - vxworks will automatically dump any exception information before shutdown with registers , task and stack dump!
Looks like:
=== CAMERA LOG STATUS ===
CAMERA LOG is started.
CameraLogLevel = 0xffff
CameraLogBufferSize = 0x2710
NotifyMask 95-64 |0x0003b6f0| 63-32 |0x0f000000| 31-0 |0x00000000|
SwitchMask 95-64 |0x0003b7ff| 63-32 |0x0f000000| 31-0 |0x00000000|
InvertData 95-64 |0x000117ff| 63-32 |0x02000000| 31-0 |0x00000000|
GpioStatus 95-64 |0x000296ff| 63-32 |0xf3c0c900| 31-0 |0x08000080|
SwitchStatus 95-64 |0x00018000| 63-32 |0x01000000| 31-0 |0x00000000|
Exception!! Vector 0x04
Occured Time 2008:03:24 11:35:06
TCB: 00275B78
Task: tPhySw
Exc Registers:
0x00000929
0x00000047
0x00000000
0x00000090
0x000D03BC
0x00000080
0x00000000
0x000C5B24
0x00000000
0x00000000
0x00000000
0x00000000
0x000001FC
0x000D033C
0x000A0CE8
0x000A0CE8
0x60000013
StackDump:
0x60000013
0x00000929
0x00000047
0x00000000
0x00000090
0x000A0CE8
0x4A00303D
0x00009FFF
0x0000007F
0xABB44EFF
0x3A8CB2FF
0xFFB23418
0x50A99AFF
0xB05069FF
0xD43D4BFF
0x0000287F
0xE27B007F
0x000034FF
0x00000000
0x00000000
0x00000000
0xFF81DCA8
0xFF8212E0
0x00006B20
0x00000000
0x000C4D0C
0xFF814F1C
0x00000005
0x000CE42C
0x00000000
0x000AFD28
0x00001EC8
00007880: *** Camera Log Start ***
Log Write to ROM... Successful.
Technically, you may use regular "printf" to write your own logging into this file. However for now printf may only be called from ARM code (platform) - not THUMB (core)
The actual changes are here:
Changeset 343 - chdk - TracIt'll be great if someone could test this - probably I could break something :)