Porting a camera sx530hs - page 15 - DryOS Development - CHDK Forum

Porting a camera sx530hs

  • 300 Replies
  • 153601 Views
*

Offline blackhole

  • *****
  • 946
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #140 on: 29 / April / 2016, 06:22:27 »
Advertisements
Quote
FWIW, I'm still working on the SD card issue - trying to track back WriteSDCard and ReadSDCard calls.

In the meantime, some questions:
- is it possible to format the 'bad' card while CHDK is running?
The card can be formatted, but at the end of the process appears 'Memory card error'. The card is formatted and the boot sector of the card includes Canon's signature. The only difference is what the card is not labeled as CANON_DC,what is usual after formatting the cards in the camera.
Quote
- what happens if you comment out the task_InitFileModules replacement in CreateTask_my()? (probably nothing, but might be worth a try)
No changes,everything remains the same.

*

Offline reyalp

  • ******
  • 14128
Re: Porting a camera sx530hs
« Reply #141 on: 29 / April / 2016, 21:21:27 »
@blackhole can you check PROCASE_RESOLUTION ? It should change when you change the jpeg size in the canon menu.

SX60, which appears to otherwise use the same propset appears to use a different value  (224 rather than 222) https://chdk.setepontos.com/index.php?topic=12532.230
Don't forget what the H stands for.

*

Offline blackhole

  • *****
  • 946
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #142 on: 30 / April / 2016, 03:33:04 »
#define PROPCASE_RESOLUTION 224 is correct.

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #143 on: 30 / April / 2016, 11:23:20 »
The card can be formatted, but at the end of the process appears 'Memory card error'. The card is formatted and the boot sector of the card includes Canon's signature. The only difference is what the card is not labeled as CANON_DC,what is usual after formatting the cards in the camera.
Thanks, useful info.

Next try of debug code. You need the ReadSDCard stub in stubs_entry_2.S (take it from one of the earlier files).

Replace boot.c with the attached one.

See the end of boot.c for a chdkptp command that saves both buffers to file.

Now comes the difficult part: it tries to log a part of the card formatting process. That means you need to be careful and save any useful card content before you start.

Start the cam without USB connection, format the card in the Canon menu (just a quick format). Connect USB, start chdkptp, execute the command that gets the buffers. That's it.
(This code is mostly untested, let's hope I got it right.)


*

Offline blackhole

  • *****
  • 946
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #144 on: 30 / April / 2016, 13:30:55 »
I can not compile with this boot.c
err.txt file is attached.

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #145 on: 30 / April / 2016, 13:37:59 »
I can not compile with this boot.c
err.txt file is attached.
Erase stubs_auto.S in platform/sx530hs/sub/100c , make clean and try again.

*

Offline blackhole

  • *****
  • 946
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #146 on: 30 / April / 2016, 14:13:31 »
Dumps attached.

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #147 on: 30 / April / 2016, 14:40:05 »
Dumps attached.
Thx. I assume this was a 'bad' card.
I only see 2 CHDK tasks (or overridden tasks) reading from the card. I'm pretty sure that none of them is the format task. If formatting is at least partially doing something to the card, I would expect to see card reads and writes.
I don't see any debug logs from the format task (that would be the second dump). Did you run a card format prior to getting the dumps?

To check, can you do the same procedure on a good card (and upload main.bin.dump too)?

*

Offline blackhole

  • *****
  • 946
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #148 on: 30 / April / 2016, 15:05:18 »
After formatting the 'bad' cards, the camera turns off, it is probably the reason for empty files.
Attached files are from 'good' cards.
main.bin.dump  https://drive.google.com/open?id=0B2NRqqO9AOURcEpDSFhIY2RPalU
« Last Edit: 30 / April / 2016, 15:10:17 by blackhole »

*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #149 on: 30 / April / 2016, 15:19:22 »
After formatting the 'bad' cards, the camera turns off, it is probably the reason for empty files.
That explains it. Assuming it's the most recent camera crash, can you make a romlog (using a good card of course) and upload it here?
Quote
Attached files are from 'good' cards.
Thanks, that proves that all parts of the debug hack are working.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal