ELPH300HS aka IXUS220HS - Porting Thread - page 89 - DryOS Development - CHDK Forum

ELPH300HS aka IXUS220HS - Porting Thread

  • 899 Replies
  • 428192 Views
*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #880 on: 17 / November / 2019, 17:23:24 »
Advertisements
The new version boots into play with both short presses to Play and Rec, goes into Rec if Rec button is being held during power on, turns off if Play is being held. So seems you did not break anything in the clean-up.
Thanks. I checked those changes in.

I also removed KEY_DISPLAY from the keyboard definition and ALT options. This was defined as an alias for the down button which really makes no sense. down arrow as an alt button would be quite unusable.

I'm at a bit of a loss for the PTP crash.
* The platform ASM code is mostly code-gen, so risk of typos should be low
* The USB bit is correctly identified, add_ptp_handler is correctly identified.
* Loader code seems normal. It had the "SD card power cycle" logic, incorrectly referencing an LED MMIO. Taking that out had no impact on the crash
* Free memory was reported to be reasonable in earlier posts.

Other ideas:
* Disable CHDK tasks and see if the effect is still there
* Maybe there's something in the function commented out for diskboot that needs to be called, similar to some SD card issues? However, it looks pretty normal to other cameras of the same era (2011, Digic 4, Dry 47, propset 4) as does the rest of the boot / restart code
* Try to figure out where the HardwareDefect call originates and work back from that
* something bad elsewhere trashing memory

c1oud seemed to report that it was fixed in https://chdk.setepontos.com/index.php?topic=6341.msg81752#msg81752 but the relevant changes were apparently committed.

I feel like it should be something headslappingly obvious, but I don't see it yet...
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #881 on: 17 / November / 2019, 17:42:11 »
Quote
* Disable CHDK tasks and see if the effect is still there
Here's a test build for this one. It has *all* CHDK hooks disabled, so there will be no CHDK splash screen or UI, and it will show card locked for autoboot. The play/rec behavior at power on should still be CHDK.
Don't forget what the H stands for.

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #882 on: 17 / November / 2019, 18:23:00 »
Quote
* Disable CHDK tasks and see if the effect is still there
Here's a test build for this one. It has *all* CHDK hooks disabled, so there will be no CHDK splash screen or UI, and it will show card locked for autoboot. The play/rec behavior at power on should still be CHDK.
Yes it does show card is locked. It still crashes on USB 5V Power. The remote cable is enough it does not need data lines, shows play briefly and then the restart camera error message - did I show a pic of that before?
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #883 on: 17 / November / 2019, 18:24:41 »
Could we be chasing ghosts? I'll re-dump the firmware. If there is a difference either mine is broken or the archived one is.

Edit: FW deleted.
« Last Edit: 17 / November / 2019, 19:31:11 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #884 on: 17 / November / 2019, 18:34:47 »
Here we go, other half added to previous post.
Forum did not accept *.oo1 *.002 hence compressed again...

Edit: FW deleted.
« Last Edit: 17 / November / 2019, 19:30:54 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #885 on: 17 / November / 2019, 19:12:44 »
Yes it does show card is locked. It still crashes on USB 5V Power. The remote cable is enough it does not need data lines
Thanks. That's a useful data point. Suggests either something is wrong in the loader/boot code, or this model has some particular requirements for the USB hardware initialization.

Could we be chasing ghosts? I'll re-dump the firmware. If there is a difference either mine is broken or the archived one is.
I don't think so, multiple people reported this exact error for this model (on multiple different fw versions) going back to 2011 https://chdk.setepontos.com/index.php?topic=6341.msg77822#msg77822

You can upload dumps to a file hosting site (google drive, dropbox, box.com whatever) rather than posting multiple parts here.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #886 on: 21 / November / 2019, 19:03:05 »
* Maybe there's something in the function commented out for diskboot that needs to be called, similar to some SD card issues? However, it looks pretty normal to other cameras of the same era (2011, Digic 4, Dry 47, propset 4) as does the rest of the boot / restart code
@koshy Low hopes for this one, but here's a test of it anyway.
Don't forget what the H stands for.

*

Offline koshy

  • *****
  • 1096
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #887 on: 21 / November / 2019, 19:35:06 »
Low hopes for this one, but here's a test of it anyway.
Yes, sadly the remote shutter cable is still enough to kill it. All as before in that regard.
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #888 on: 21 / November / 2019, 23:18:58 »
Yes, sadly the remote shutter cable is still enough to kill it. All as before in that regard.
Thanks. Moving on to
Quote
* Try to figure out where the HardwareDefect call originates and work back from that
Can you check on a trunk build:
Under CHDK Miscellaneous -> tools -> Memory browser, set the address to 0x2488.
Report the value after DWORD

HardwareDefect(0x00290000) is only called from one function I could find: ff85d730 (ixus220 101a). That function is called by two different functions ff831b38 and ff85908c. Both of these are clearly related to the USB layer, referencing "DiUSB20DM.c" and interrupt handler "DiUSB20Hal" respectively. They are eventually called from TrnsCtrlTask and the function that creates it.

Equivalent functions on elph130 are ff178e68 (calls HardwareDefect) ff07cccc ("DiUSB20DM.c")  and  ff07c3cc ("DiUSB20Hal"). Incidentally, elph180 appears to use a different driver, the strings are "DaUSB20..."

ff85d730 checks if the variable at 0x2488 is and returns if it is, otherwise, sets it to 0 can calls HardwareDefect. On elph130, the equivalent variable (0x6558) seems to be zero both before and after USB is plugged in.

edit:
There are a couple functions that set the 0x2488 variable: ff85d6f4 and ff85d720. The second one is called from ff85908c, which also conditionally calls the one the triggers HardwareDefect later.
« Last Edit: 22 / November / 2019, 00:10:25 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: ELPH300HS aka IXUS220HS - Porting Thread
« Reply #889 on: 23 / November / 2019, 00:01:15 »
@koshy:
Looking back, I'm not clear if the PTP crash bug was confirmed when loading CHDK using firm update, from an unlocked card. Initially, there were [urlhttps://chdk.setepontos.com/index.php?topic=6341.msg141800#msg141800]issues with the camera switching to rec[/url] but that should be fixed now.

So if it isn't isn't confirmed, can you try on the current trunk:
CHDK installed, card unlocked.
Run firm update to start CHDK
Plug in USB
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal