Memory overflow issue with 9 axis motion sensor module
Hello everybody,
I am a french student in internship at university of Miami , who is using an activitybot robot kit in the context of a project.
I bought an LSM9DS1 9-axis motion sensor module in order to get accelerations of my robot.
However, when i am calling function to read accelerations (imu_readAccelCalculated(&ax, &ay, &az)) , i got a memory overflow issue during compilation.
The issue that i got is :
Project Directory: /Users/deniz/Desktop/Robot project/
/Applications/SimpleIDE.app/Contents/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: cmm/V3_9AXIS.elf section `.bss' will not fit in region `hub'
/Applications/SimpleIDE.app/Contents/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: region `hub' overflowed by 944 bytes
collect2: ld returned 1 exit status
Done. Build Failed!
Your program is too big for the memory model selected in the project.
Could you help me about this issue ?
Furthermore , I would like to know where are saved library/function files and how to recompile them if I modify them.
Thanks in advance,
Alex
I am a french student in internship at university of Miami , who is using an activitybot robot kit in the context of a project.
I bought an LSM9DS1 9-axis motion sensor module in order to get accelerations of my robot.
However, when i am calling function to read accelerations (imu_readAccelCalculated(&ax, &ay, &az)) , i got a memory overflow issue during compilation.
The issue that i got is :
Project Directory: /Users/deniz/Desktop/Robot project/
/Applications/SimpleIDE.app/Contents/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: cmm/V3_9AXIS.elf section `.bss' will not fit in region `hub'
/Applications/SimpleIDE.app/Contents/propeller-gcc/bin/../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld: region `hub' overflowed by 944 bytes
collect2: ld returned 1 exit status
Done. Build Failed!
Your program is too big for the memory model selected in the project.
Could you help me about this issue ?
Furthermore , I would like to know where are saved library/function files and how to recompile them if I modify them.
Thanks in advance,
Alex
Comments
Floating point should be avoided if possible. If you do need floating point make sure you select "32bit Double" in the compiler options.
The size for SD file I/O can be reduced by using code based on the FSRW Spin object.
If you post a zip file of your project we can get a better idea of where you can save memory.
The fact is that I need and I am using all the points you quoted : SD file I/O , fprintf.
To explain quickly , I have to record distance reached by each wheel , datas from motion sensor (accelerometer , magnetometer and gyroscope) into the SD card , and avoid all obstacles.
Actually , the first part is working well , i am avoiding obstacles , recording distance reached by each wheel in ticks number.
Now , the problem is the datas recording from the motion sensor.
The purpose of the project is to create a 2D map of the environment of the robot .
Please find attached my project.
Thank you for your help.
Alex
However , now when i am reading datas into SDcard , the display in the text file is bugged.
The display is like this :
distLeft[ (lot of space)1] = (lot of space) 224, distRight[(lot of space) 1] =(lot of space) 224
left rotation = (lot of space) 1, right rotation =(lot of space) 0
Whereas it was like this before :
distLeft[1] = 224, distRight[1] = 224
left rotation = 1, right rotation = 0
I guess it is due to your print.c file , have you an idea please for this issue ?
Thanks again
Thank you very much Dave Hein