Quote from: philmoz on 11 / May / 2019, 06:10:43There appears to be another boot block at 0xE1200000. The fw update does contain a ~266kB blob that goes to this address, but I did not disassemble it yet.Have you tried starting the main firmware without running any CHDK code, like this:entry.S in loader:Code: [Select].section .entry// ordinary startup....code 16.align 2.syntax unified mov r0, 0x300000 // some uninitialized RAM, hopefully retaining content after restart ldr r1, [r0] mov r2, 0xd15c // marker cmp r2, r1 beq already str r2, [r0] ldr r0, =0xe0020001 bx r0already: mrc p15, 0, r0, c0, c0, 5 // read current core id ands r0, r0, #0xf b blinkmain.c in loader:Code: [Select]void blink(int c){ // GPIO base = 0xD2080000 // 0xD20801E4 - SD led // 0xD20801E8 - AF led volatile int* p = (int*)0xD20801E4; if (c) { p = (int*)0xD20801E8; } *p = 0x24D0002; // blinker int i; while (1) { *p = 0x24D0002; for(i=0;i<10000000;i++) { asm volatile( "nop\n" ); } *p = 0x24C0003; for(i=0;i<10000000;i++) { asm volatile( "nop\n" ); } }}The marker is for protection against a diskboot boot-loop (address chosen seems uninitialized in RAM-dump, may need to be uncached), both named LEDs should blink if test is successful.
There appears to be another boot block at 0xE1200000.
.section .entry// ordinary startup....code 16.align 2.syntax unified mov r0, 0x300000 // some uninitialized RAM, hopefully retaining content after restart ldr r1, [r0] mov r2, 0xd15c // marker cmp r2, r1 beq already str r2, [r0] ldr r0, =0xe0020001 bx r0already: mrc p15, 0, r0, c0, c0, 5 // read current core id ands r0, r0, #0xf b blink
void blink(int c){ // GPIO base = 0xD2080000 // 0xD20801E4 - SD led // 0xD20801E8 - AF led volatile int* p = (int*)0xD20801E4; if (c) { p = (int*)0xD20801E8; } *p = 0x24D0002; // blinker int i; while (1) { *p = 0x24D0002; for(i=0;i<10000000;i++) { asm volatile( "nop\n" ); } *p = 0x24C0003; for(i=0;i<10000000;i++) { asm volatile( "nop\n" ); } }}
Thanks for the suggestion, unfortunately it hangs the camera with no LED activity at all.
mrc p15, 0, r0, c0, c0, 5 // read current core id ands r0, r0, #0xf b blink
Same result that I get with my boot code, if I don't bypass the store instruction in the function at 0xe04f0d9c.
For example, the updater's taskcreate_Startup doesn't call an equivalent of sub_E0020848.
Quote from: philmoz on 18 / May / 2019, 17:24:23Thanks for the suggestion, unfortunately it hangs the camera with no LED activity at all.That at least suggests that it's the main fw's startup that can't be executed without making some changes.If you only keep the following asm lines in entry.S, do you get activity on both LEDs?Code: [Select] mrc p15, 0, r0, c0, c0, 5 // read current core id ands r0, r0, #0xf b blink
QuoteSame result that I get with my boot code, if I don't bypass the store instruction in the function at 0xe04f0d9c.What happens if you remove the function call I mentioned earlier?Quote from: srsa_4c on 09 / May / 2019, 12:34:26For example, the updater's taskcreate_Startup doesn't call an equivalent of sub_E0020848.
Only the green SD LED blinks (core 0).
Quote from: philmoz on 19 / May / 2019, 01:35:21Only the green SD LED blinks (core 0).Thanks, that's useful to know. Can you repeat the test with fi2 boot? I'd expect that to match.
Have you been able to get this to work on other Digic6 cameras? On the G5X I just get an 'Update file error!!!' message on the LCD.
Quote from: philmoz on 19 / May / 2019, 18:36:18Have you been able to get this to work on other Digic6 cameras? On the G5X I just get an 'Update file error!!!' message on the LCD.It boots on most, although some have unresolved problems: https://chdk.setepontos.com/index.php?topic=11316.msg137400#msg137400"Update file error" sounds like an FI2 key issue, or maybe Canon added something to the format again.
no luck with the G7X2 (gives the "Update file error" message).
About the g5x: I see you enabled fi2 generation in autobuild, but I don't see the related workaround in the source.If CHDK via fi2 boot is unreliable (crashes on anything movie related or has the orientation sensor issue), it might be better to disable it.
The '-x W' option worked for the G5X; but no luck with the G7X2 (gives the "Update file error" message).
Started by photonoob « 1 2 » General Discussion and Assistance
Started by lireboy CHDK Releases
Started by Skumgummifabriken « 1 2 3 » General Help and Assistance on using CHDK stable releases
Started by pigeonhill General Help and Assistance on using CHDK stable releases
Started by oPryzeLP General Discussion and Assistance