add romlog.lua functionality to the Miscellaneous Stuff menu - Feature Requests - CHDK Forum  

add romlog.lua functionality to the Miscellaneous Stuff menu

  • 10 Replies
  • 4160 Views
add romlog.lua functionality to the Miscellaneous Stuff menu
« on: 24 / November / 2011, 11:58:08 »
Advertisements
This is just to capture something discussed on IRC the other day so I don't forget.

One possible reasons to changing the autobuild and use OPT_LUA_CALL_NATIVE=1 is so that romlog.lua can be run when a user finds a problem.  Changing the autobuild that way opens up some potential dangers - which is why its not set that way in the first place.

Adding a "ROM Log Dump" menu item (and the underlying code) to the Miscellaneous Stuff menu would get around that issue and would be nice to have regardless.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #1 on: 25 / November / 2011, 19:02:38 »
The attached patch work on the G12, SX30, SX40 and IXUS310 (all dryos based).
Does not work on IXUS700 (vxworks) - GetLogToFile returns -1 (romlog.lua also fails on this camera).
IXUS700 works if there is a crash dump to be saved; shuts down camera after writing the log file.

Needs to be tested on other cameras before adding to trunk.

Menu option added at the bottom of the 'Debug Parameters' menu.

Phil.
« Last Edit: 26 / November / 2011, 00:24:00 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #2 on: 25 / November / 2011, 23:55:25 »
Needs to be tested on other cameras before adding to trunk.
Very nice.  Works fine on both my G10 and SD940.  Both DryOS / DigicIV cameras though.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4426
Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #3 on: 26 / November / 2011, 06:37:14 »
IXUS700 works if there is a crash dump to be saved; shuts down camera after writing the log file.

Needs to be tested on other cameras before adding to trunk.
Works fine on
A410 VxWorks
Ixus65 VxWorks (confirmed that no ROMLOG gets written when camera hasn't crashed before, fortunately we have a memory browser ;) )
SX100IS DryOS release #0023

No shutdown after writing with these models, the VxWorks ones have the usual binary+text logs.
One more thing to note: the function failed silently in case of the Ixus65 with no previous crash.
« Last Edit: 26 / November / 2011, 09:12:25 by srsa_4c »


*

Offline whim

  • ******
  • 2041
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #4 on: 26 / November / 2011, 08:03:12 »
... Needs to be tested on other cameras before adding to trunk ...
- works as advertised on:
                 A620 rev 100 F (VxWorks)
                 A630 rev 100 C (VxWorks)
                 IXUS70_SD1000 rev 101 B (VxWorks)

                 A590 rev 101 B (DryOS)
                 IXUS300_SD4000 rev 100 D(DryOS)
                 A495 rev 100 E(DryOS)
                 S95 rev 100 H(DryOS)

- used 1429 + patch (lua call native -> OFF)
- no shutdown after writing, log can be loaded in text viewer right after dumping

wim

[edit: added 2 more cams]  Also tested S95 and A495: "RomLogErr.txt" with "Log Not Saved"
          I suppose that means there's nothing to show ?
[edit 2: added S95 and A495]
« Last Edit: 26 / November / 2011, 11:37:35 by whim »

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #5 on: 26 / November / 2011, 08:41:33 »
-Works fine on

A720 1.00c
SX220 1.01a

-Tested with revision 1431 + patch

-ROMlog was readable with CHDK text viewer.

msl
CHDK-DE:  CHDK-DE links

Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #6 on: 26 / November / 2011, 10:53:27 »
[edit: added 2 more cams]  Also tested S95 and A495: "RomLogErr.txt" with "Log Not Saved"
          I suppose that means there's nothing to show ?
reyalp suggested using the debugger to access non-existent memory as an easy way to make your camera "crash" so that it will product a log file.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline whim

  • ******
  • 2041
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #7 on: 26 / November / 2011, 11:39:00 »
reyalp suggested using the debugger to access non-existent memory as an easy way to make your camera "crash" so that it will product a log file.
Thanks - updated previous post

wim

PS: did it this way
     - Miscellaneous Stuff -> Debug Parameters -> Memory Browser
     - use zoom buttons to set "Incr:" to 0x10000000
     - keep button "right" pressed until crash occurs
« Last Edit: 26 / November / 2011, 11:52:57 by whim »


*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #8 on: 26 / November / 2011, 16:44:29 »
So it's probably safe to commit this to SVN then. I'll add it later today.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline dvip

  • ****
  • 451
Re: add romlog.lua functionality to the Miscellaneous Stuff menu
« Reply #9 on: 26 / November / 2011, 20:56:37 »
romlog.log was created without problems in my A590IS (101 B).


 

Related Topics