[Solved] Adafruit HMC5883 on CT-ARM - compile error

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

[Solved] Adafruit HMC5883 on CT-ARM - compile error

Postby JayJoe » Mon Jan 01, 2018 1:43 pm

The error I received is:

arm-none-eabi-g++: error: C:\Users\user\AppData\Local\Temp\arduino_build_690720/core/syscalls.c.o: No such file or directory

exit status 1
Error compiling for board CT-ARM.


Please help
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: I am getting error on CT-ARM. Please help.

Postby JayJoe » Mon Jan 01, 2018 1:45 pm

And some time it shows this error






Archiving built core (caching) in: C:\Users\user\AppData\Local\Temp\arduino_cache_400013\core\core_cytron_arm_nuvoton_nuc131_f428395d98e2e5fc657ed1351776693a.a
c:/programdata/matlab/supportpackages/r2017a/3p.instrset/arduinoide.instrset/idepkgs/packages/cytron/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino_build_614778/MecanumRobotCoding.ino.elf section `.text' will not fit in region `rom'

c:/programdata/matlab/supportpackages/r2017a/3p.instrset/arduinoide.instrset/idepkgs/packages/cytron/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: region `rom' overflowed by 14108 bytes

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board CT-ARM.
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: I am getting error on CT-ARM. Please help.

Postby bengchet » Tue Jan 02, 2018 10:40 am

Hi,

Just go to File -> Preferences and disable 'Agressively cached compiled core'. Should be able to solve this issue.

screenshot.png
screenshot.png (23.87 KiB) Viewed 3232 times
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: I am getting error on CT-ARM. Please help.

Postby JayJoe » Tue Jan 02, 2018 10:57 am

Hi bengchet, thanks for your reply.

I have disabled the aggresively cache compiled core, but still I am getting the error :(



c:/programdata/matlab/supportpackages/r2017a/3p.instrset/arduinoide.instrset/idepkgs/packages/cytron/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino_build_730431/MecanumRobotCoding.ino.elf section `.text' will not fit in region `rom'

c:/programdata/matlab/supportpackages/r2017a/3p.instrset/arduinoide.instrset/idepkgs/packages/cytron/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: region `rom' overflowed by 14108 bytes

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board CT-ARM.
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: I am getting error on CT-ARM. Please help.

Postby JayJoe » Tue Jan 02, 2018 11:20 am

I have done some debug. When I clear my loop() and partially comment out two functions, it successfully compiled, but it says "Sketch uses 63668 bytes (97%) of program storage space. Maximum is 65536 bytes.", which I suspect that my sketch is too long to be fitted into CT-ARM?
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: I am getting error on CT-ARM. Please help.

Postby bengchet » Tue Jan 02, 2018 11:24 am

Hi

Yes, the above error shows not enough ROM for program space, which is mostly caused by library. I have tried one library before which gives me the same problem, turns out I have to rewrite library to fit with CT-ARM. May I know which library you are using in those 2 functions?

Thanks.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: I am getting error on CT-ARM. Please help.

Postby bengchet » Tue Jan 02, 2018 11:27 am

Hi,

Not necessary due to 2 functions you have commented out. There might be some other libraries which cause the issue. Try to find out which consumes a sudden huge amount of ROM, and see if we can work something out.
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: I am getting error on CT-ARM. Please help.

Postby JayJoe » Tue Jan 02, 2018 11:58 am

Hi,

Thanks to your informative reply, I have found the root of the problem. I am using this GY-80 module (https://www.youtube.com/watch?v=zsBmkO8wZ60)

Links to the libraries:
https://github.com/adafruit/Adafruit_HMC5883_Unified
https://github.com/adafruit/Adafruit_Sensor

Once installed with these libraries, from the example named 'magsensor', the sketch already uses 57240 bytes (87%) of CT-ARM program storage space. May I need your help to help me to rewrite the library so that it fits for CT-ARM? :|
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Re: I am getting error on CT-ARM. Please help.

Postby bengchet » Tue Jan 02, 2018 6:21 pm

Hi,

I took a look. Extract .h file from zip file attached to library folder, and remove the line #include <Adafruit_sensor.h> in your sketch.

Below is my compile result from example sketch magsensor.
compile result.png


Doesn't guarantee it works :) , you can share your result here after done the modification.

Thanks.
Attachments
Adafruit_HMC5883_U.h.zip
(2.95 KiB) Downloaded 61 times
bengchet
Moderator
 
Posts: 237
Joined: Tue Aug 25, 2015 8:29 am

Re: I am getting error on CT-ARM. Please help.

Postby JayJoe » Wed Jan 03, 2018 12:28 pm

Hi,

Problem solved ! Thanks so much to you. You are awesome :D

Anyway, I roughly read through the changes you have made. I noticed that you combined Adafruit_Sensor.h into Adafruit_HMC5883_U.h and then remove

#ifdef __AVR_ATtiny85__
#include "TinyWireM.h"
#define Wire TinyWireM

May I know Is it these lines are causing the problem? And what makes you think that it will works by combining both the .h files?
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

Next

Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 2 guests

cron