Very interesting indeed. So do I have to put everything in wrappers.c? I never really understood the whole ARM code aspect, what's the difference?
The ARM CPU in the camera understands two instruction sets: 'ARM' and 'Thumb'. Switching between the two requires specific instructions. The CHDK core and the modules are compiled as Thumb to save some space (Thumb instructions are mostly 2 bytes long, ARM instructions are always 4), the firmware on the camera is compiled as ARM. Calling firmware functions from CHDK core directly is not possible, because no code is generated there to allow safe Thumb-ARM switch. Parts of CHDK under platform/ are compiled as ARM, CHDK core can call these safely. So, if you need to call firmware routines from core, or you want to make a routine that will be called from the firmware, you need to place the interfacing code under platform/.
If you want to learn more, search for ARM thumb interworking
Also would you recommend using the HP ones or the standard ones?
If possible, I'd use the standard ones.
And what's meant by a 20 bit hw counter?
There is a hardware counter in the DIGIC chip that is used for high-precision timing. I think
it increments every 1us (microsecond).
We can retrieve some data related to white balance, but we can't currently set