The attached patch should allow building CHDK using ARM GCC 4.8 - I've only tested this on OS/X and Windows 8.1 so far.
Quote from: philmoz on 05 / December / 2014, 21:58:04The attached patch should allow building CHDK using ARM GCC 4.8 - I've only tested this on OS/X and Windows 8.1 so far.Linux 32bit is OK too.The resulting diskboot is smaller than the one built with arm-elf 4.6.4, but some modules are bigger (lua.flt is significantly bigger, +3.3kB) with the current options.
Version 2 - should fix the module size issue (modules should now be smaller).
If I set -march=armv5te globally on the entire build then it does not generate correct wrapper code for calling the firmware functions.
Edit: After a bit more investigation it seems everything can be compiled as armv5te except the code in platform/camera. I need to compile this as armv4 in order to get safe wrappers for the calls to the firmware functions.
CFLAGS+=-DLOW_LEVEL $(ARCH)
CFLAGS+=-DLOW_LEVEL -march=armv4t
Quote from: philmoz on 06 / December / 2014, 18:40:36Version 2 - should fix the module size issue (modules should now be smaller).They are smaller indeed.QuoteIf I set -march=armv5te globally on the entire build then it does not generate correct wrapper code for calling the firmware functions.Can you illustrate this with some examples?
003e176c <stat_get_vbatt>: 3e176c: e92d4008 push {r3, lr} 3e1770: ebffb811 bl 3cf7bc <_VbattGet> 3e1774: e8bd4008 pop {r3, lr} 3e1778: e12fff1e bx lr
003e1680 <stat_get_vbatt>: 3e1680: eaffb83d b 3cf77c <_VbattGet>
QuoteEdit: After a bit more investigation it seems everything can be compiled as armv5te except the code in platform/camera. I need to compile this as armv4 in order to get safe wrappers for the calls to the firmware functions.If you mean replacingCode: [Select]CFLAGS+=-DLOW_LEVEL $(ARCH)withCode: [Select]CFLAGS+=-DLOW_LEVEL -march=armv4tat the top of platform/makefile_sub.inc, that doesn't work for ports which have any BLX instructions in their copied ARM asm code.
V3 patch.Sets armv5te architecture for all files, except the code in platform/camera.Also adds an architecture type check to the module headers to prevent trying to load incorrect version.This may also be useful for Digic6 cameras.
Quote from: philmoz on 06 / December / 2014, 21:12:37V3 patch.Sets armv5te architecture for all files, except the code in platform/camera.Also adds an architecture type check to the module headers to prevent trying to load incorrect version.This may also be useful for Digic6 cameras.Working, thanks. Perhaps someone should check compilation with the autobuild's toolchain before the check-in (I don't see clearly whether arm-elf is affected by the changes).Not strictly related, but can you add GEN_MODULE_DUMPS (perhaps as OPT_) to buildconf.inc when checking this in? I remember where to find it, but others may not find it easily.
Does it make sense to standardize 1.4.0 on this change and leave the previous versions in the old tool chain?
Started by reyalp General Discussion and Assistance
Started by carl1864 General Help and Assistance on using CHDK stable releases
Started by waterwingz « 1 2 3 4 » General Discussion and Assistance
Started by KenO « 1 2 » RAW Shooting and Processing
Started by Razor512 General Help and Assistance on using CHDK stable releases