Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparkfun icm 20498 arduino libraries migration problem for msp430fr5994 #135

Open
tarunrtes opened this issue Sep 30, 2021 · 12 comments
Open

Comments

@tarunrtes
Copy link

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:548:17: error: expected unqualified-id before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:548:17: error: expected ')' before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:558:17: error: expected unqualified-id before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:558:17: error: expected ')' before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:571:17: error: expected unqualified-id before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:571:17: error: expected ')' before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:634:17: error: expected unqualified-id before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:634:17: error: expected ')' before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:644:17: error: expected unqualified-id before numeric constant

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/util/ICM_20948_DMP.h:644:17: error: expected ')' before numeric constant

In file included from C:\Users\TARUN KARAK\Documents\Energia\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\examples\Arduino\Example1_Basics\Example1_Basics.ino:12:0:

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/ICM_20948.h:24:22: error: ISO C++ forbids initialization of member '_printDebug' [-fpermissive]

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/ICM_20948.h:24:22: error: making '_printDebug' static [-fpermissive]

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/ICM_20948.h:24:22: error: ISO C++ forbids in-class initialization of non-const static member '_printDebug'

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/ICM_20948.h:26:43: error: ISO C++ forbids initialization of member 'MAX_MAGNETOMETER_STARTS' [-fpermissive]

E:\Tarun Karak\Energia\Energia_software\energia-1.8.7E21\libraries\SparkFun_9DoF_IMU_Breakout___ICM_20948___Arduino_Library-1.2.7\src/ICM_20948.h:26:43: error: making 'MAX_MAGNETOMETER_STARTS' static [-fpermissive]

exit status 1
Error compiling for board MSP-EXP430FR5994LP.

I am migrating a project from Arduino to energia. Why I am getting these errors? please help.

@StefanSch
Copy link
Contributor

the official version of Energia for the MSP430 is using a quite old compiler and it might be an issue due to the compatibility int he compiler versions.
There is a beta version available with the newer compiler version.
You can import MSP430 with the newer compiler into Energia (or Arduino).

Open the menu: Preferences | Additional Board Manager URLs
Just add
http://s3.amazonaws.com/energiaUS/packages/package_msp430_elf_GCC_index.json
Open the Board Manager and install the MSP430 elf-GCC package.

Then you also find a elf-GCC section in the board selection menu.

@tarunrtes
Copy link
Author

Dear sir,
I have done everything as you suggested. But didn't get the MSP430 elf-GCC beta version. So I installed 2.0.10 and get these errors. Please help me out.
msp430-elf-gcc: fatal error: switch 'KARAK/AppData/Local/Energia15/packages/energia/tools/msp430-elf-gcc/9.2.0.50/msp430-gcc-support-files/include/devices.csv' does not start with '-'
compilation terminated.

exit status 1
Error compiling for board MSP-EXP430FR5994LP.

@tarunrtes
Copy link
Author

Dear sir, please provide MSP430 elf-GCC beta version. I have gone through your steps but didn't succeed to compile the program.

Thanks & Regards
Tarun Karak

@StefanSch
Copy link
Contributor

Hi, it is right to install 2.0.10 - this is still handled as beta and therefore not the the standard release available. So only by adding the additional install path.
Not sure about your issue, i have not seen this so far.
Can you provide more details: operating system, full log message also set Compiler warnings to all in the preferences.
Can you try with the simple blink LED demo?

@tarunrtes
Copy link
Author

tarunrtes commented Oct 4, 2021 via email

@StefanSch
Copy link
Contributor

This is really strange.
Can you make a copy of your file
'KARAK/AppData/Local/Energia15/packages/energia/tools/msp430-elf-gcc/
9.2.0.50/msp430-gcc-support-files/include/devices.csv'

and replace it with the attached one.
(If this does fix the problem please send me send the original file.)

devices.csv

@tarunrtes
Copy link
Author

tarunrtes commented Oct 6, 2021 via email

@StefanSch
Copy link
Contributor

Looks like that the ICM 20948 libraries uses some definitions which are also used by the MSP430 device header file.

If you add this two lines before the ICM_20948.h include
#undef ID
#undef Z
#include "ICM_20948.h" // Click here to get the library: http://librarymanager/All#SparkFun_ICM_20948_IMU

it should work.
By the way what was required to get the devices.csv error solved.

@tarunrtes
Copy link
Author

tarunrtes commented Oct 6, 2021 via email

@StefanSch
Copy link
Contributor

Have you made a copy of the broken devices.csv file as requested. Would be great if you can attached it here.
Really would like to know what did went wrong on your side.

For getting the application to work now, this is normal debugging.
First i suggest to go step by step:
See if the application starts and come up: blink an LED 3 or three times at the beginning - add a delay between on and off.
Then see if the application cycles through the loop function.
Continue to blink the LED (note: you may need to add a delay)
Then you say you do not get a response - should this be UART - if so, print some string at the start. Like "Hello"
If this does not work go back to the simple demo (You said that the blink LED is working, so then start with a UART demo)
.....

@tarunrtes
Copy link
Author

tarunrtes commented Oct 8, 2021 via email

@tarunrtes
Copy link
Author

tarunrtes commented Nov 5, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants