Initial work is done, see:
https://bitbucket.org/coutts/1000d_dev/overviewThat code can be used to set the botoflag and enable autoexec.bin booting (first step). The next step is to start writing some sort of 400plus or Magic Lantern port for the 1000d.
Note: I finally figured out why my code did not work with autoboot before, one tweak should fix things:
in link.script, change:
first 0x800120 :
to:
first 0x7F0000 :
Also, add this function to main.c:
void COPY() {
int i;
long *from = (long*) 0x800000;
long *to = (long*) 0x7F0000;
for (i = 0; i < 0x100000; i++) {
to = from;
}
}
and in entry.S modify it to look like this(I have bolded the one addition):
.text
.org 0
.globl _start, start
start:
_start:
BL COPY
BL my_LedBlueOn
B loc_FF810054
The problem was that before, the link script said to link the code to 0x800120, but the makefile linked it to 0x7F0000. This doesn't work because the code is actually loaded to 0x800000 by the bootloader. We first need to copy our code from 0x800000 to 0x7F0000 (a safe spot in memory, 0x800000 will be overwritten by the canon firmware during the boot process). Then our code will be executed from there.
Let me know if this works.