Hello,I have an A580-100c and interested in porting CHDK.I have little asm experience, and would appriciate any advice you can give.This is what I've got so far:1. setup a build environment (on linux)2. got the firmware from http://chdk.wikia.com/wiki/A5803. created 'A580' platform+loader sub-trees based on A590 (which I think is the closest model).
I was thinking of using the same A590is base and wanted to ask you guys if there is any chance I could permanently damage the camera experimenting with chdk? I shouldn't be able to, right?
Depending on the spare time I have, I think I'm going to try to do some porting, but unlike the original poster my camera is 101b.
The only problem is that it's years since I've done any C programming and I hated it at that time. I'm mostly programming in VB6 and PHP/ASP/JS.
Hello,I've re-created the a580 loader/platform tree based on a720, but didn't get better results.
Here's what I've got so far;1. the value for The MEMIOSSTART (0xA47E0) also appears in the begining of the PRIMARY.BIN file (offset 0x194) and is used in a loop which writes zeros (BSS initialization?). I don't have IDA, and my ARM assembly skills as severely lacking, but here's what I gathered from the PRIMARY.BIN file.If somebody can comment on that, it'll be helpful:The loop code starts at offset 0x130.First, a loop copies data from 0xffebfb4c (ROM?) to 0x1900 -> 0xD700.Then, a second loop zeros data from 0xD700 -> 0xA47E0.2. The boot loader part ( copy_and_restart() in loader/a580/resetcode/main.c ) works OK, led is blinking.3. I've created a short assembly code which flashes the led, and put it inside ./core/entry.S - but no led is blinking.(I've verified that the code is correct and working).Unless I'm missing something, it means the loader is working, including 'copy_and_restart', but jumping to the chdk core doesn't work. Maybe copying the wrong region, or jumping to the wrong position?Any ideas are welcomed...
$ PATH=/arm-elf/bin:$PATH make fir**** Build: 0.9.1>> Entering to tools<< Leaving tools>> Entering to lib>> Entering to lib/font<< Leaving lib/font>> Entering to lib/math<< Leaving lib/math>> Entering to lib/ubasic<< Leaving lib/ubasic>> Entering to lib/lang<< Leaving lib/lang>> Entering to lib/lua<< Leaving lib/lua<< Leaving lib>> Entering to platform>> Entering to platform/a580>> Entering to platform/a580/sub>> Entering to platform/a580/sub/101b<< Leaving platform/a580/sub/101b<< Leaving platform/a580/sub<< Leaving platform/a580<< Leaving platform>> Entering to coregui.c -> gui.o-> main.elf/arm-elf/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: ERROR: gui.o uses FPA instructions, whereas main.elf does not/arm-elf/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file gui.o/arm-elf/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: ERROR: /arm-elf/lib/gcc/arm-elf/4.3.2/thumb/interwork/libgcc.a(_udivsi3.o) uses FPA instructions, whereas main.elf does not[...]/arm-elf/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: ERROR: /arm-elf/lib/gcc/arm-elf/4.3.2/thumb/interwork/libgcc.a(_fixsfsi.o) uses FPA instructions, whereas main.elf does not/arm-elf/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file /arm-elf/lib/gcc/arm-elf/4.3.2/thumb/interwork/libgcc.a(_fixsfsi.o)/arm-elf/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: ERROR: /arm-elf/lib/gcc/arm-elf/4.3.2/thumb/interwork/libgcc.a(_fixunssfsi.o) uses FPA instructions,whereas main.elf does not/arm-elf/lib/gcc/arm-elf/4.3.2/../../../../arm-elf/bin/ld: failed to merge target specific data of file /arm-elf/lib/gcc/arm-elf/4.3.2/thumb/interwork/libgcc.a(_fixunssfsi.o)collect2: ld returned 1 exit statusmake[1]: *** [main.elf] Error 1make: *** [all-recursive] Error 1
I would suggest using the pre-built gcc 3.x win32 environment.Otherwise, read this thread: http://chdk.setepontos.com/index.php/topic,2500.0.html