- dowloaded gcc-hdk and sources from https://tools.assembla.com/chdk/browser/branches/grand
Use trunk:
https://tools.assembla.com/chdk/browser/trunkThis is the current state.
Check that a currently supported device compiles, then duplicate the device-dependent directories and rename them accordingly. As source-directories for duplication I recommend the A720-code.
Device-dependent directories are are in loader/ and platform/
Also modify makefile.inc and add new PLATFORM and PLATFORMSUB lines.
Then check if code for your pseudo-platform compiles. If it does, you can continue with the reset-code. Good news is: you will probably not need to change much.
For testing two lines need changing. In resetcode/main.c:94 you find
//"LDR R0, =0xFFC00000\n" // original jump-vector
"MOV R0, %0\n" // new jump-vector
For testing we need to continue at the official firmware-start. So change them to:
"LDR R0, =0xFF810000\n" // original jump-vector
// "MOV R0, %0\n" // new jump-vector (disabled for test)
A few lines later, execution is branched to R0, so for testing we point R0 to the regular start. If this works we point it to
our code and revert the changes.
What happens so far is:
1. the camera starts, initializes some stuff
2. checks the card for diskboot.bin, loads it to 0x1900 and jumps there
3. at 0x1900 is the resetcode we copied from the original firmware (from my A720) which will restart the device => goto 1.
To break the loop and see if the device starts properly we need to prevent diskboot.bin from loading. Easiest method at this point is removing the card. So you need a minor hardware-hack to take out the card while the cam is on.
If you did this and the cam starts properly, you can continue with platform/.../main.c
I'm in a little hurry, right now, so if anything is unclear: ask.
Cheers.