heliflieger / a-culfw

Alternative culfw
Other
124 stars 64 forks source link

Firmware too large for Type 4 / CUL_V3 868MHZ #12

Open derjohn opened 6 years ago

derjohn commented 6 years ago

Since several releases there is a too large firmware shipped. ( Iooked into the last 5 releases)

E.G: I see:
-rw-r--r--  1 aj aj  73K Mär 30  2017 CUL_V3_433MHZ.hex
-rw-r--r--  1 aj aj  80K Mär 30  2017 CUL_V3_868MHZ.hex

I can flash the CUL_V3_433MHZ.hex without issues, but the CUL_V3_868MHZ.hex gives me:

Flash now device
Call: dfu-programmer atmega32u4 erase
Call: dfu-programmer atmega32u4 flash CUL_V3_868MHZ.hex
Bootloader and code overlap.
Use --suppress-bootloader-mem to ignore
Call: dfu-programmer atmega32u4 start

Can you reduce the code size (features?) for the particular FW? I look like 73K fits into the CUL, but 80K is too much. Could you add an test in the build step that fails, it the foo get too big?

rgds, j

derjohn commented 6 years ago

This one is small enough:

$ git diff
diff --git a/culfw/Devices/CUL/board.h b/culfw/Devices/CUL/board.h
index 6871c05..f20775d 100644
--- a/culfw/Devices/CUL/board.h
+++ b/culfw/Devices/CUL/board.h
@@ -37,8 +37,8 @@
 #  define HAS_RAWSEND                   //
 #  define HAS_ASKSIN                    // PROGMEM: 1314
 #  define HAS_ASKSIN_FUP                // PROGMEM:   78
-#  define HAS_KOPP_FC
-#  define HAS_RWE
+//#  define HAS_KOPP_FC
+//#  define HAS_RWE
 #  define HAS_TX3                       // PROGMEM:  168
 #  define HAS_INTERTECHNO               // PROGMEM: 1352
 #  define HAS_UNIROLL                   // PROGMEM:   92
@@ -80,7 +80,7 @@
 #  define MBUS_NO_TX                       // PROGMEM:  962
 #  define HAS_RFNATIVE                  // PROGMEM:  580
 //#  define LACROSSE_HMS_EMU              // PROGMEM: 2206
-#  define HAS_KOPP_FC                   // PROGMEM: 3370
+//#  define HAS_KOPP_FC                   // PROGMEM: 3370
 #endif
 #endif
petjek commented 6 years ago

Same problem here. Current version is 81.4 KB. Your second post seems to be a solution but to be honest I do not understand a single word. Can you pls explain what to do?

Regards, Arne

derjohn commented 6 years ago

@petjek There is a file culfw/Devices/CUL/board.h b/culfw/Devices/CUL/board.h, remove the lines marked with "-" and compile the new rom. Yes, you need to compile. If you can't, I can provide you a binary.

petjek commented 6 years ago

@derjohn Never really compiled before so if you can provide the binary I'd use that instead.

EDIT: now that I installed make and all the other dependencies I think I can compile the binary. Running the flash.sh script will do that job I guess?