New Studio - Syntax error in IDE on working code

Discussions and support about ChibiStudio, the free development environment for ARM.
AmperCZ
Posts: 15
Joined: Fri Jan 25, 2019 11:46 pm
Been thanked: 1 time

New Studio - Syntax error in IDE on working code

Postby AmperCZ » Mon May 04, 2020 6:12 pm

Solving one issue with latest Studio, GCC7 or 9 and Chibios 2.0.3

I can compile and run program without issues, I can breakpoint. Chibios debug view doesn't

but all thread code like

static THD_WORKING_AREA(AdcThreadWorkingArea, 128);
or
static THD_FUNCTION(AdcThread, arg) { }

have mark as Syntax error in IDE. It compiles but show this and thus I am unable to inspect properties with mouse over. On other places it works.

Anyone have idea what is wrong ? In Problems is listed
Description Resource Path Location Type
Program "g++" not found in PATH BB8v2 Project Properties, C++ Preprocessor Include.../Providers, [CDT Cross GCC Built-in Compiler Settings] options C/C++ Scanner Discovery Problem
Description Resource Path Location Type
Program "g++" not found in PATH BB8v2 [Discovery Options] page in project properties C/C++ Problem

but it was there in old studio too and didn't made that problems.

Using C++ for build

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: New Studio - Syntax error in IDE on working code

Postby Giovanni » Mon May 04, 2020 7:19 pm

Hi,

It is possible that g++.exe is missing, in the compiler also gcc.exe is missing but we add it manually, probably we need to add g++.exe too.

Locate where gcc.exe is under /tools and in the same location add g++.exe obtained by renaming arm-none-eabi-g++.exe.

We may have missed it because g++ is also in some other place in system path on our PCs.

Giovanni

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: New Studio - Syntax error in IDE on working code

Postby RoccoMarco » Mon May 04, 2020 7:30 pm

Hello,
I am trying to reproduce your issue with no luck on my side. I have a clean version of ChibiStudio 2020-04 and no extra stuff in the path.

Could you try to build the project index to see if the issue disappears? Could you share a screenshot fo your ChibiStudio?
Ciao,
RM

AmperCZ
Posts: 15
Joined: Fri Jan 25, 2019 11:46 pm
Been thanked: 1 time

Re: New Studio - Syntax error in IDE on working code

Postby AmperCZ » Mon May 18, 2020 7:03 pm

copy g++ fixed one error (but second stays). I tried to expand Index resettings, tried couple of others settings in IDE and not help.

I moved my working code out to simple function so I am 100% sure that it is not made by code inside of thread macro.

GCC is 9

Image

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: New Studio - Syntax error in IDE on working code

Postby Giovanni » Mon May 18, 2020 7:18 pm

HI,

Have you tried to re-index the project?

Right click on project -> Index -> Rebuild.

Giovanni

AmperCZ
Posts: 15
Joined: Fri Jan 25, 2019 11:46 pm
Been thanked: 1 time

Re: New Studio - Syntax error in IDE on working code

Postby AmperCZ » Mon May 18, 2020 10:23 pm

yes, without change :-(

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: New Studio - Syntax error in IDE on working code

Postby Giovanni » Tue May 19, 2020 5:01 am

Strange, it is something specific in your project setup I think, does that happen also with the demo applications in ChibiStudio?

Giovanni

steved
Posts: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: New Studio - Syntax error in IDE on working code

Postby steved » Tue May 19, 2020 8:28 am

Not really used the latest IDE yet, but on earlier ones the problem has sometimes been that the IDE syntax checker doesn't know the path of the macro definition.
I've seen it mostly when including compiler libraries.
I have a vague recollection of a maximum file nesting depth which meant that some definitions were missed.
Maybe a link to the Chibi sources within the project will fix it?

AmperCZ
Posts: 15
Joined: Fri Jan 25, 2019 11:46 pm
Been thanked: 1 time

Re: New Studio - Syntax error in IDE on working code

Postby AmperCZ » Tue May 19, 2020 8:33 am

ok, so I used fresh Chibistudio and imported project into User workspace and problem is fixed.

Maybe something with update or messed by me.

Thanks for help


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 4 guests