UART question: Rescue Loader / UART loopback switch - page 3 - General Discussion and Assistance - CHDK Forum supplierdeeply

UART question: Rescue Loader / UART loopback switch

  • 51 Replies
  • 16688 Views
Re: UART question: Rescue Loader / UART loopback switch
« Reply #20 on: 25 / October / 2017, 14:42:28 »
Advertisements


I have tried to connect those pins:


« Last Edit: 25 / October / 2017, 14:50:40 by hardlock »

*

Offline reyalp

  • ******
  • 13622
Re: UART question: Rescue Loader / UART loopback switch
« Reply #21 on: 25 / October / 2017, 16:35:12 »

Sorry,  my mistake. It _did_ start  diskboot.bin before (and I already recovered from my faults once), but this time I can't turn it on. I press a button and nothing happens. 
Did you have an LED blink loop early in the diskboot (preferably in loader)? Otherwise, this isn't definitive, because it could crash after boot without any obvious sign of booting.

If you tell us what range of ROM you think you damaged, we would have a better idea of the impacts.

Quote
I doubt I can solder any wires to those tiny pins.  I don't have such a skill.
Maybe you have some old hardware lying around with as similar board you can practice on?
Don't forget what the H stands for.

Re: UART question: Rescue Loader / UART loopback switch
« Reply #22 on: 25 / October / 2017, 17:34:13 »

Did you have an LED blink loop early in the diskboot (preferably in loader)? Otherwise, this isn't definitive, because it could crash after boot without any obvious sign of booting.

there was definitely a blink code right before before bss copy. But I am not sure about the loader. most probably yes, i will check.

Quote
Maybe you have some old hardware lying around with as similar board you can practice on?

if you are talking  about Canon P&S camera, I doubt I can find an _old_ DIGIC 6 hardware. but the connector looks the same as for DIGIC 4, i will try to find something to practice. it is a good idea.

for me it looks like a place for left a debugger connector, maybe there is a standard part that will fit this place perfectly.

i know nothing about  hardware, and i think in a very direct way.

Canon Digic is  a modified Texas Instruments ARM single board computer. 
it should have same JTAG interface and connectors as a corresponding TI developer board with similar ARM
CPU/DRAM/FLASH/SD configuration.



*

Offline reyalp

  • ******
  • 13622
Re: UART question: Rescue Loader / UART loopback switch
« Reply #23 on: 25 / October / 2017, 23:20:39 »
there was definitely a blink code right before before bss copy. But I am not sure about the loader. most probably yes, i will check.
That should be good enough, it would have to get to the point where diskboot is loaded in the original firmware.

Quote
if you are talking  about Canon P&S camera, I doubt I can find an _old_ DIGIC 6 hardware. but the connector looks the same as for DIGIC 4, i will try to find something to practice. it is a good idea.
I actually meant anything with a similar board, could be on old router or video card or HD logic board. Just something dead/obsolete to practice the mechanics on enough to decide whether you can safely do it on your camera.

Quote
Canon Digic is  a modified Texas Instruments ARM single board computer. 
I was not aware of this. Do you have a specific source or evidence? ARM based DIGIC have been at Canon since 2004 (and my impression is the imaging part of the X86 ones carried over from even earlier), so depending how much they follow their upstream vendors, it could have diverged a lot.
Don't forget what the H stands for.


Re: UART question: Rescue Loader / UART loopback switch
« Reply #24 on: 26 / October / 2017, 04:11:18 »
it start definitely  (e.g. I can blink a led, call some funcs from the firmware) but i did not try to return from it.

You did not tell us how you did it.
Maybe it's right time to start porting the CHDK on sx710?

In my case(erased sector with adjustment data) it was enough to use CHDK with modified "boot.c"...

Sorry,  my mistake. It _did_ start  diskboot.bin before (and I already recovered from my faults once), but this time I can't turn it on. I press a button and nothing happens.

about porting: at the moment CHDK looks too overhelming for me.  100s of functions to map?  ......  but I can help someone who is in progress, e.g. i can manually find a function that was already  mapped in one camera in another one. Will be glad to help.
Re Sx710:- Maybe it's right time to start porting the CHDK on sx710?
Ref Sx700:-  ...  It looks like the Sx700 porting attempt is based on the Sx280 and only "boot.c" has been attempted. ...

Re:- 100s of (Sx280 & Sx700) functions to (re) map? to the Sx710. With your version boot.c how many did you attempt and what software tools did you use.

Could you post a copy of your version boot.c.

It might not be so "overwelming", as you think, to finish off the Sx710 boot.c.
Another thing, about the abandoned Sx700 porting attempt, is that the CHDK sig-find is now much more advanced.

H-H
« Last Edit: 26 / October / 2017, 04:22:11 by Hardware_Hacker »

Re: UART question: Rescue Loader / UART loopback switch
« Reply #25 on: 26 / October / 2017, 17:07:40 »

Did you have an LED blink loop early in the diskboot (preferably in loader)? Otherwise, this isn't definitive, because it could crash after boot without any obvious sign of booting.

If you tell us what range of ROM you think you damaged, we would have a better idea of the impacts.

Maybe you have some old hardware lying around with as similar board you can practice on?
I  tried to put a blink loop into the loader, it did not help. I was trying to modify button presses processing code. No wonder that buttons does not work anymore.
Two big and covinient soldering spots under the unpopulated connector are Tx and Rx(i am an idiot, it was so on every picture posted here about UART).  Loopback trick does not obviously start diskboot.bin, but at least i now have wires connected and I hope to see some console output after  I receive Usb ttl serial connector.

*

Offline reyalp

  • ******
  • 13622
Re: UART question: Rescue Loader / UART loopback switch
« Reply #26 on: 26 / October / 2017, 17:16:31 »
Loopback trick does not obviously start diskboot.bin
Was it encoded? I may be wrong, but I suspect the rescue loader expects an unencoded diskboot, in which case a normal dancingbits'd one would fail. Might be worth a try if you haven't already.

Also note Digic 6 loaders mostly call a cache related function in ROM, which would fail if that part of ROM is damaged. You can copy it inline like the M3 port.

Don't forget what the H stands for.

Re: UART question: Rescue Loader / UART loopback switch
« Reply #27 on: 26 / October / 2017, 17:19:36 »
there was definitely a blink code right before before bss copy. But I am not sure about the loader. most probably yes, i will check.
That should be good enough, it would have to get to the point where diskboot is loaded in the original firmware.

Quote
if you are talking  about Canon P&S camera, I doubt I can find an _old_ DIGIC 6 hardware. but the connector looks the same as for DIGIC 4, i will try to find something to practice. it is a good idea.
I actually meant anything with a similar board, could be on old router or video card or HD logic board. Just something dead/obsolete to practice the mechanics on enough to decide whether you can safely do it on your camera.

Quote
Canon Digic is  a modified Texas Instruments ARM single board computer. 
I was not aware of this. Do you have a specific source or evidence?

Nothing definitive, just a speculation on wikipedia phrase:

DIGIC 5 was co-designed with Texas Instruments (TI) and manufactured by TI through foundry partnership in Asia using 45 nm node technology fanned out by TI.[11][12]

Moreover, i have reviewed TI boards (keep in mind that my hardware knowledge is very limited) and they all use a standard JTAG connector. I found no obvious similarities.


Re: UART question: Rescue Loader / UART loopback switch
« Reply #28 on: 26 / October / 2017, 17:39:29 »


Ref Sx700:-  ...  It looks like the Sx700 porting attempt is based on the Sx280 and only "boot.c" has been attemp
Re:- 100s of (Sx280 & Sx700) functions to (re) map? to the Sx710. With your version boot.c how many did you attempt and what software tools did you use.

Could you post a copy of your version boot.c.

It might not be so "overwelming", as you think, to finish off the Sx710 boot.c.
Another thing, about the abandoned Sx700 porting attempt, is that the CHDK sig-find is now much more advanced.

H-H
I did not need a working boot.c, just a minimal fix for a loader. my code worked earlier in platform/main.c and i finish with infinite loop (it hangs before any code in boot.c). Ok, when i fix the camera I will try to port boot.c functionality to sx710 using sx280 and other digic6 cameras as a reference.

Re: UART question: Rescue Loader / UART loopback switch
« Reply #29 on: 26 / October / 2017, 18:10:05 »

Was it encoded? I may be wrong, but I suspect the rescue loader expects an unencoded diskboot, in which case a normal dancingbits'd one would fail. Might be worth a try if you haven't already.
I do agree, booloader should have some simplifications. There is a lot of questions.
does it support Fat16 only? Partitions? Fragmented file? 2gb max SD cards?
I can't be sure that i made a correct unencoded diskboot.bin because how do i test one? Using additionAgent("a/unencoded.bin")?
I think i must examine the bootloader code to clarify what it expects, i will report my findings.
Quote
Also note Digic 6 loaders mostly call a cache related function in ROM, which would fail if that part of ROM is damaged. You can copy it inline like the M3 port.
Yes, it was the first thing i checked. The cache related function should not be damaged.  And I tried to blink before the call.

 

Related Topics