physical-computation / Warp-firmware

Firmware for the Cambridge Physical Computation Laboratory's Warp Embedded Multi-Sensor Platform.
http://physcomp.eng.cam.ac.uk
BSD 3-Clause "New" or "Revised" License
5 stars 198 forks source link

region `m_text' overflowed by 604 bytes #130

Open David-GERARD opened 9 months ago

David-GERARD commented 9 months ago

Describe the bug After following the instructions on the README.md and in this document, when running make warp, I get the following error message:

/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: release/Warp.elf section `.text' will not fit in region `m_text'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region `m_text' overflowed by 604 bytes

Furthermore, no Warp.srec file is created in work/demos/Warp/armgcc/Warp/release/

To reproduce Follow the instructions on the main README.md in this document up to running make warp

Expected behavior

Host OS (please complete the following information):

You local changes (please complete the following information):

diff --git a/src/boot/ksdk1.1.0/boot.c b/src/boot/ksdk1.1.0/boot.c
index 53fe893..1e70bb7 100644
--- a/src/boot/ksdk1.1.0/boot.c
+++ b/src/boot/ksdk1.1.0/boot.c
@@ -1674,7 +1674,7 @@ main(void)
 #endif

 #if (WARP_BUILD_ENABLE_DEVMMA8451Q)
-               initMMA8451Q(   0x1C    /* i2cAddress */,       kWarpDefaultSupplyVoltageMillivoltsMMA8451Q     );
+               initMMA8451Q(   0x1D    /* i2cAddress */,       kWarpDefaultSupplyVoltageMillivoltsMMA8451Q     );^M
 #endif

 #if (WARP_BUILD_ENABLE_DEVLPS25H)
@@ -5035,4 +5035,4 @@ flashDecodeSensorBitField(uint16_t sensorBitField, uint8_t sensorIndex, uint8_t*
                }
        }
 }
-#endif
\ No newline at end of file
+#endif^M

diff --git a/tools/scripts/glaux.jlink.commands b/tools/scripts/glaux.jlink.commands
index 944324e..2d5be38 100644
--- a/tools/scripts/glaux.jlink.commands
+++ b/tools/scripts/glaux.jlink.commands
@@ -1,6 +1,6 @@
 power on perm
 exec EnableRemarks
 unlock kinetis
-loadfile <full-path-to-warp-firmware>/build/ksdk1.1/work/demos/Glaux/armgcc/Glaux/release/Glaux.srec
+loadfile /home/students/dsg44/Warp-firmware/build/ksdk1.1/work/demos/Glaux/armgcc/Glaux/release/Glaux.srec
 r
 go
diff --git a/tools/scripts/warp.jlink.commands b/tools/scripts/warp.jlink.commands
index da5814a..1839fbe 100644
--- a/tools/scripts/warp.jlink.commands
+++ b/tools/scripts/warp.jlink.commands
@@ -1,6 +1,6 @@
 power on perm
 exec EnableRemarks
 unlock kinetis
-loadfile <full-path-to-warp-firmware>/build/ksdk1.1/work/demos/Warp/armgcc/Warp/release/Warp.srec
+loadfile /home/students/dsg44/Warp-firmware/build/ksdk1.1/work/demos/Warp/armgcc/Warp/release/Warp.srec
 r
 go
KomaGR commented 7 months ago

Could you share your GCC version? We have observed that for some versions GCC produced a slightly larger map for m_text that makes the firmware not fit in the flash.