I am reading a bit about chdk, and I read in some other thread that the repo (or at least the trunk) is intended to be compiled with GCC 4.6
The official trunk supports arm-elf toolchains (from gcc 3.4? to gcc 4.6.x)
while I am reading here that you are using GCC 4.8 to cross/compile on linux.
I chose to go with modern gcc because the ARM core in DIGIC 6 is a relatively recent one, and newer gcc/binutils has better support for new arm cores. Also, the arm-elf target was discontinued by gcc developers, gcc 4.8 no longer supports it.
Also, looking at the makefile.inc, there is CROSS_COMPILE=arm-elf-, while for GCC version equal or greater than 4.7 I would expect CROSS_COMPILE=arm-none-eabi-, or something like that. Am I wrong? Are there many other differences in order to compile the repo with GCC 4.8 instead of 4.6??
The CHDK tree in my repo currently requires
- arm-elf gcc toolchain for all DIGIC II, III, 4, 5 ports
- arm-none-eabi toolchain for DIGIC 6
Since your interest is a DIGIC 6 camera, you need arm-none-eabi. I mentioned several times that I'm using a precompiled binary toolchain from
https://launchpad.net/gcc-arm-embedded , so you can just download one from that site, uncompress it and add its /bin folder to your PATH. I have tested compilation with the 32-bit Linux and Win32 precompiled toolchains.
Actually I own a SX700 (I also posted the fw dump) that should not be so much different from sx280, and I know a bit about cortex-m4 and about programming... so I would like to have a starting point setting up the toolchain on linux to cross-compile, while I study the code a bit more (in parallel), and eventually try something more
Use
this script to disassemble your dump (to reduce file size, it's recommended that you cut off the data part of the dump, I'm using a 0x9530c0 bytes long dump for disassembly in case of the sx280 102b).
Since there is no sigfinder for thumb firmware, you'll have to find all stubs and fw variable addresses manually.