Problem programming in Eclipse in VM

Discussions about all things Bitcraze
Post Reply
NickCong
Beginner
Posts: 29
Joined: Sun Oct 15, 2017 12:24 pm

Problem programming in Eclipse in VM

Post by NickCong »

Hi

I am using Eclipse to programming by first time.when i wanted to see the code in the .c file in src/drives/src in crazyflie-firmware ,for example when i click to enter the led_f405.c and i2c_drv.c ,i get a lot problem messages.(Symbol 'GPIOD' could no be resolved .
Symbol 'GPIOD_Pin_0' could no be resolved
.....
and so on)
However, when I build the project, everything seems to work fine.
How can i solve these error. I guess the problem is the ARM environment not set up,it is true?

thank you for your time and support
Last edited by NickCong on Wed Nov 15, 2017 2:46 pm, edited 4 times in total.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Problem programming in Eclipse in VM

Post by tobias »

As you figured out it is a problem of eclipse not finding all symbols and such for the code analysis. I tried to fix it a while ago but never managed to and gave up. Must admit I did not put much time into it. If you manage to fix it please let us know how! If not you can turn it off in "Preferences->C/C++->Code Analysis"
linlin2017
Beginner
Posts: 16
Joined: Tue Oct 17, 2017 2:05 am

Re: Problem programming in Eclipse in VM

Post by linlin2017 »

Hi tobias,
I have encountered the same problems. According what you answered, I have turn off Code Analysis, however, there are several problems left, such as "Unresolved inclusion:<stdbool.h>","Unresolved inclusion:<string.h>",and so on.
Are these problems fatal errors that affect our program development?
If it is, how to fix it?
Thank you! :)
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem programming in Eclipse in VM

Post by arnaud »

These problems are not affecting the development in the sense that this is only static analysis aimed at helping the developer, the compiler is already well configured and compiles the code well.

Can you compile the Crazyflie firmware without problems?
linlin2017
Beginner
Posts: 16
Joined: Tue Oct 17, 2017 2:05 am

Re: Problem programming in Eclipse in VM

Post by linlin2017 »

Thanks arnaud!
There is no problem when compiling the Crazyflie firmware. Then I still have a question: Generally when I hold down 'control ' key, and click on a variable, the variable definition can be presented. However, several variables' definitions can't be presented, for example 'true', 'false', 'int16_t', and so on. When clicking, a hint that "could not find symbol '~' in index" is presented in the lower left corner. Meanwhile several variables, for instance 'INT16_MAX', have many definitions. when clicking, I have to select one definition from a presented window.
I want to know the reason for the two cases above. Thank you. :)
Last edited by linlin2017 on Wed Oct 18, 2017 2:19 am, edited 1 time in total.
NickCong
Beginner
Posts: 29
Joined: Sun Oct 15, 2017 12:24 pm

Re: Problem programming in Eclipse in VM

Post by NickCong »

tobias wrote: Mon Oct 16, 2017 12:29 pm As you figured out it is a problem of eclipse not finding all symbols and such for the code analysis. I tried to fix it a while ago but never managed to and gave up. Must admit I did not put much time into it. If you manage to fix it please let us know how! If not you can turn it off in "Preferences->C/C++->Code Analysis"
thank you very much!! :D
linlin2017
Beginner
Posts: 16
Joined: Tue Oct 17, 2017 2:05 am

Re: Problem programming in Eclipse in VM

Post by linlin2017 »

arnaud wrote: Tue Oct 17, 2017 9:16 am These problems are not affecting the development in the sense that this is only static analysis aimed at helping the developer, the compiler is already well configured and compiles the code well.

Can you compile the Crazyflie firmware without problems?
Thanks arnaud!
There is no problem when compiling the Crazyflie firmware. Then I still have a question: Generally when I hold down 'control ' key, and click on a variable, the variable definition can be presented. However, several variables' definitions can't be presented, for example 'true', 'false', 'int16_t', and so on. When clicking, a hint that "could not find symbol '~' in index" is presented in the lower left corner. Meanwhile several variables, for instance 'INT16_MAX', have many definitions. when clicking, I have to select one definition from a presented window.
I want to know the reason for the two cases above. Thank you. :)
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem programming in Eclipse in VM

Post by arnaud »

The reason is most likely that eclipse does not know the path the the libc headers. In the VM arm-none-eabi-gcc is installed in the home folder so you can find the include folder there that contains stdio.h and all other libc headers. Though the symbol you are talking about are standard and already well documented on the internet so you should not have much use for them.
linlin2017
Beginner
Posts: 16
Joined: Tue Oct 17, 2017 2:05 am

Re: Problem programming in Eclipse in VM

Post by linlin2017 »

arnaud wrote: Wed Oct 18, 2017 11:25 am The reason is most likely that eclipse does not know the path the the libc headers. In the VM arm-none-eabi-gcc is installed in the home folder so you can find the include folder there that contains stdio.h and all other libc headers. Though the symbol you are talking about are standard and already well documented on the internet so you should not have much use for them.
Thank you. I have found the include folder. And I found the setting path: 'project' ->'properties' ->'c/c++ general' ->'preprocessor include path, macros etc.' ->'entries'->'setting entries' ->'CDT user setting entries' . I add the path 'home/bitcraze/arm-none-eabi/include'. Then I found some symbols work, for example 'int16_t', however, there are some symbols don't work, such as 'true' and 'false'.
I want to know how to configure eclipse to solve the problem. Thank you.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Problem programming in Eclipse in VM

Post by arnaud »

This is as much as I know about, lets hope someone that knows more about eclipse CDT passes by this forum.

If you ever solve the problem please share is with us :-).
Post Reply