|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
Error Parser for external compiler. How to?Hi,
In a lot of thread ask poor guys like me about how to add Error Parser to eclipse, i've spend the whole day today looking for the answer for this qustion, failed. Yes, this may seems to be a naiv question for thoes who knows how to do it, but unfortunately not for me. Confused Shocked I used to use CodeWright+Keil UV2 to devolep embedded C software. Now i want to change to Eclipse+Keil. Eclipse is the king of editor, without any question. So i use Eclipse as editor and invoke UV2 to compile the project: Project -> Proporties -> C/C++ Build -> Build Command: MyBuild.bat MyBuild.bat: -------------------------------------------------------- c:\keil\uv2\uv2 -b Rcv.Uv2 -o "BUILD.LOG" @echo off FOR %%G in (BUILD.LOG) DO type %%G -------------------------------------------------------- In this way i can get the project compiled and the build info showed in console. So far so good. However the logs showed in console is pure text, so i can't jump to the place by double-click. -------------------------------------------------------- Build target 'Target 1' compiling Tstopc.c... assembling .\MICRO_A\Tstopc.src... compiling Tstreg.c... assembling .\MICRO_A\Tstreg.src... compiling Scnsync.c... .\SRC\SCN.C(59): error C67: 'scn_T8idx': undefined identifier .\SRC\SCN.C(70): error C67: 'scn_timerReload': undefined identifier .\SRC\SCN.C(71): error C67: 'scn_T8idx': undefined identifier .\SRC\SCN.C(73): error C67: 'scn_searchForOld': undefined identifier .\SRC\SCN.C(78): error C67: 'sy_Sync': undefined identifier .\SRC\SCN.C(78): error C67: 'SY_FIRST': undefined identifier -------------------------------------------------------- Then i realize i must use a error parser to let the logs showed in "Problems view". Some nice EclipseR suggest me to use ErrorParser e.g. the one from iSystem. I've install it, but i doesn't work. This is what i understand about ErrorParser: ErrorParser get some text from somewhere, parse it and send the result to "Problem View". Is this correct? What i'm not understand is: From where ErrorParser (e.g. http://www.isystem.si/eclipseUpdate/regExErrorParser/) get the text to parse and who triggers the parser? Thousand of thanks, from me and from lots of new EclipseR like me. |
|
|
Re: Error Parser for external compiler. How to? There is an extension point org.eclipse.cdt.core.ErrorParser. For
unknown reason (I don't think it is deprecated) its description disappeared from on-line documentation. To add your error parser add extension of this extension point and implement interface org.eclipse.cdt.core.errorparsers.IErrorParser. There are many examples in cdt.core. On 09/11/2009 5:48 PM, Eclipse_Keil wrote: > Hi, > > In a lot of thread ask poor guys like me about how to add Error Parser to > eclipse, i've spend the whole day today looking for the answer for this > qustion, failed. > > Yes, this may seems to be a naiv question for thoes who knows how to do it, > but unfortunately not for me. Confused Shocked > > I used to use CodeWright+Keil UV2 to devolep embedded C software. Now i want > to change to Eclipse+Keil. Eclipse is the king of editor, without any > question. So i use Eclipse as editor and invoke UV2 to compile the project: > > Project -> Proporties -> C/C++ Build -> Build Command: MyBuild.bat > > MyBuild.bat: > -------------------------------------------------------- > c:\keil\uv2\uv2 -b Rcv.Uv2 -o "BUILD.LOG" > @echo off > FOR %%G in (BUILD.LOG) DO type %%G > -------------------------------------------------------- > > > In this way i can get the project compiled and the build info showed in > console. So far so good. > > However the logs showed in console is pure text, so i can't jump to the > place by double-click. > > -------------------------------------------------------- > Build target 'Target 1' > compiling Tstopc.c... > assembling .\MICRO_A\Tstopc.src... > compiling Tstreg.c... > assembling .\MICRO_A\Tstreg.src... > compiling Scnsync.c... > .\SRC\SCN.C(59): error C67: 'scn_T8idx': undefined identifier > .\SRC\SCN.C(70): error C67: 'scn_timerReload': undefined identifier > .\SRC\SCN.C(71): error C67: 'scn_T8idx': undefined identifier > .\SRC\SCN.C(73): error C67: 'scn_searchForOld': undefined identifier > .\SRC\SCN.C(78): error C67: 'sy_Sync': undefined identifier > .\SRC\SCN.C(78): error C67: 'SY_FIRST': undefined identifier > -------------------------------------------------------- > > Then i realize i must use a error parser to let the logs showed in "Problems > view". Some nice EclipseR suggest me to use ErrorParser e.g. the one from > iSystem. I've install it, but i doesn't work. > > This is what i understand about ErrorParser: ErrorParser get some text from > somewhere, parse it and send the result to "Problem View". Is this correct? > > What i'm not understand is: From where ErrorParser (e.g. > http://www.isystem.si/eclipseUpdate/regExErrorParser/) get the text to parse > and who triggers the parser? > > Thousand of thanks, from me and from lots of new EclipseR like me. _______________________________________________ cdt-dev mailing list cdt-dev@... https://dev.eclipse.org/mailman/listinfo/cdt-dev |
|
|
Re: Error Parser for external compiler. How to?Hello, In CDT user forum I suggested to use CDT Regular Expression Error Parser which is now part of CDT 6.1. Did you try that?Andrew
On Mon, Nov 9, 2009 at 5:48 PM, Eclipse_Keil <llw2go@...> wrote:
_______________________________________________ cdt-dev mailing list cdt-dev@... https://dev.eclipse.org/mailman/listinfo/cdt-dev |
|
|
Re: Error Parser for external compiler. How to?Hi Andrew,
i've try the ErrorParser from CDT (I only have CDT 6.0.1). All the option in Project -> Proporties -> C/C++ Build -> Settings -> Error Parsers are checked, however nothing happens. From where get ErrorParser the input? Thanks Mike
|
|
|
Re: Error Parser for external compiler. How to?On Tue, Nov 10, 2009 at 10:50 AM, Eclipse_Keil <llw2go@...> wrote:
Well, it is not available in CDT 6.0.1. I'd recommend to install latest 6.1 build from http://download.eclipse.org/tools/cdt/builds/. CDT 6.1 is pretty stable.
>From where get ErrorParser the input? Granted that you checked ErrorParser on Settings page and configured your regex patterns properly - it will parse output that is generated in Console during build. The errors will appear in Problems View and in editor.
Andrew Thanks _______________________________________________ cdt-dev mailing list cdt-dev@... https://dev.eclipse.org/mailman/listinfo/cdt-dev |
|
|
Re: Error Parser for external compiler. How to?Hi, I have found regex error parser for CDT 6 at this address and it
seems to work well: http://www.isystem.com/content/0/288/ I had some difficult to write the correct regex expression. I don't work with keil, but I have worked with codewright in the past, so I know very well your problem, then I have changed because I want to work with an open source editor and Eclipse is a great open source editor. Best Regards Paolo Eclipse_Keil ha scritto: > Hi, > > In a lot of thread ask poor guys like me about how to add Error Parser to > eclipse, i've spend the whole day today looking for the answer for this > qustion, failed. > > Yes, this may seems to be a naiv question for thoes who knows how to do it, > but unfortunately not for me. Confused Shocked > > I used to use CodeWright+Keil UV2 to devolep embedded C software. Now i want > to change to Eclipse+Keil. Eclipse is the king of editor, without any > question. So i use Eclipse as editor and invoke UV2 to compile the project: > > Project -> Proporties -> C/C++ Build -> Build Command: MyBuild.bat > > MyBuild.bat: > -------------------------------------------------------- > c:\keil\uv2\uv2 -b Rcv.Uv2 -o "BUILD.LOG" > @echo off > FOR %%G in (BUILD.LOG) DO type %%G > -------------------------------------------------------- > > > In this way i can get the project compiled and the build info showed in > console. So far so good. > > However the logs showed in console is pure text, so i can't jump to the > place by double-click. > > -------------------------------------------------------- > Build target 'Target 1' > compiling Tstopc.c... > assembling .\MICRO_A\Tstopc.src... > compiling Tstreg.c... > assembling .\MICRO_A\Tstreg.src... > compiling Scnsync.c... > .\SRC\SCN.C(59): error C67: 'scn_T8idx': undefined identifier > .\SRC\SCN.C(70): error C67: 'scn_timerReload': undefined identifier > .\SRC\SCN.C(71): error C67: 'scn_T8idx': undefined identifier > .\SRC\SCN.C(73): error C67: 'scn_searchForOld': undefined identifier > .\SRC\SCN.C(78): error C67: 'sy_Sync': undefined identifier > .\SRC\SCN.C(78): error C67: 'SY_FIRST': undefined identifier > -------------------------------------------------------- > > Then i realize i must use a error parser to let the logs showed in "Problems > view". Some nice EclipseR suggest me to use ErrorParser e.g. the one from > iSystem. I've install it, but i doesn't work. > > This is what i understand about ErrorParser: ErrorParser get some text from > somewhere, parse it and send the result to "Problem View". Is this correct? > > What i'm not understand is: From where ErrorParser (e.g. > http://www.isystem.si/eclipseUpdate/regExErrorParser/) get the text to parse > and who triggers the parser? > > Thousand of thanks, from me and from lots of new EclipseR like me. > cdt-dev mailing list cdt-dev@... https://dev.eclipse.org/mailman/listinfo/cdt-dev |
|
|
Re: Error Parser for external compiler. How to?Hi Paolo,
how did you get RegexErrorParser from isystem to work? Thanks Mike
|
|
|
Re: Error Parser for external compiler. How to?Hi, Andrew,
i've install CDT 6.1 1 minute ago. I can use "CDT Regular Expression Error Parser" to point to the "BUILD.LOG" and something is displayed in "Problems View", PERFECT! Now i have to edit the Syntax so that only the right thing will be displayed. Be back soon... |
|
|
Re: Error Parser for external compiler. How to?.\SRC\SCN.C(78): error C67: 'SY_FIRST': undefined identifier
Someone help me to extract this line: .\SRC\SCN.C -> File 78 -> Line error -> Error or Warning Thanks Mike |
|
|
Re: Error Parser for external compiler. How to?haha,
i get it done (.*)\((\d+)\)\: \berror\b(.*)
|
|
|
Re: Error Parser for external compiler. How to?Hi Mike Thanks for trying and for the feedback. I am glad to hear that it works and self-explanatory enough for a smart person to figure out.Andrew
On Wed, Nov 11, 2009 at 8:44 AM, Eclipse_Keil <llw2go@...> wrote:
_______________________________________________ cdt-dev mailing list cdt-dev@... https://dev.eclipse.org/mailman/listinfo/cdt-dev |
|
|
Re: Error Parser for external compiler. How to?Hi Mike,
I have followed step by step the instruction on the link that I sent you. After this you need to write your own regex expression. For example for compiler renesas (R8C) I wrote as follows in the file: c:\Programmi\eclipse\plugins\si.isystem.regExErrorParser_1.0.8.i9_9_72_20090403_134038\plugin.xml <extension id="mitsubishi.id.for.err.parser" name="MITSUBISHI Error Parser" point="org.eclipse.cdt.core.ErrorParser"> <errorparser class="si.isystem.regexerrparser.RegExErrorParser" config="regex/MITSUBISHIExpresions.properties"/> </extension> then in the file c:\Programmi\eclipse\plugins\si.isystem.regExErrorParser_1.0.8.i9_9_72_20090403_134038\regex\MITSUBISHIExpresions.properties I wrote (for errors): error = 1, 2, 3:Error[a-z0-9\.\(\)]*:(.+), *line ([0-9]+)\](.*) Regards Paolo Il 11/11/2009 10.43, Eclipse_Keil ha scritto: > Hi Paolo, > > how did you get RegexErrorParser from isystem to work? > > Thanks > Mike > > > Paolo Nenna wrote: > >> Hi, I have found regex error parser for CDT 6 at this address and it >> seems to work well: >> >> http://www.isystem.com/content/0/288/ >> >> I had some difficult to write the correct regex expression. I don't work >> with keil, but I have worked with codewright in the past, so I know very >> well your problem, then I have changed because I want to work with an >> open source editor and Eclipse is a great open source editor. >> >> Best Regards >> Paolo >> >> Eclipse_Keil ha scritto: >> >>> Hi, >>> >>> In a lot of thread ask poor guys like me about how to add Error Parser to >>> eclipse, i've spend the whole day today looking for the answer for this >>> qustion, failed. >>> >>> Yes, this may seems to be a naiv question for thoes who knows how to do >>> it, >>> but unfortunately not for me. Confused Shocked >>> >>> I used to use CodeWright+Keil UV2 to devolep embedded C software. Now i >>> want >>> to change to Eclipse+Keil. Eclipse is the king of editor, without any >>> question. So i use Eclipse as editor and invoke UV2 to compile the >>> project: >>> >>> Project -> Proporties -> C/C++ Build -> Build Command: MyBuild.bat >>> >>> MyBuild.bat: >>> -------------------------------------------------------- >>> c:\keil\uv2\uv2 -b Rcv.Uv2 -o "BUILD.LOG" >>> @echo off >>> FOR %%G in (BUILD.LOG) DO type %%G >>> -------------------------------------------------------- >>> >>> >>> In this way i can get the project compiled and the build info showed in >>> console. So far so good. >>> >>> However the logs showed in console is pure text, so i can't jump to the >>> place by double-click. >>> >>> -------------------------------------------------------- >>> Build target 'Target 1' >>> compiling Tstopc.c... >>> assembling .\MICRO_A\Tstopc.src... >>> compiling Tstreg.c... >>> assembling .\MICRO_A\Tstreg.src... >>> compiling Scnsync.c... >>> .\SRC\SCN.C(59): error C67: 'scn_T8idx': undefined identifier >>> .\SRC\SCN.C(70): error C67: 'scn_timerReload': undefined identifier >>> .\SRC\SCN.C(71): error C67: 'scn_T8idx': undefined identifier >>> .\SRC\SCN.C(73): error C67: 'scn_searchForOld': undefined identifier >>> .\SRC\SCN.C(78): error C67: 'sy_Sync': undefined identifier >>> .\SRC\SCN.C(78): error C67: 'SY_FIRST': undefined identifier >>> -------------------------------------------------------- >>> >>> Then i realize i must use a error parser to let the logs showed in >>> "Problems >>> view". Some nice EclipseR suggest me to use ErrorParser e.g. the one from >>> iSystem. I've install it, but i doesn't work. >>> >>> This is what i understand about ErrorParser: ErrorParser get some text >>> from >>> somewhere, parse it and send the result to "Problem View". Is this >>> correct? >>> >>> What i'm not understand is: From where ErrorParser (e.g. >>> http://www.isystem.si/eclipseUpdate/regExErrorParser/) get the text to >>> parse >>> and who triggers the parser? >>> >>> Thousand of thanks, from me and from lots of new EclipseR like me. >>> >>> >> _______________________________________________ >> cdt-dev mailing list >> cdt-dev@... >> https://dev.eclipse.org/mailman/listinfo/cdt-dev >> >> >> > _______________________________________________ cdt-dev mailing list cdt-dev@... https://dev.eclipse.org/mailman/listinfo/cdt-dev |
|
|
Re: Error Parser for external compiler. How to?Thanks Paolo,
i'm now happy with CDT 6.1, but i think your reply must be helpful for many others.
|
|
|
Re: Error Parser for external compiler. How to?Sum up:
How to install ErrorParser for external compiler 1. Install Eclipse (minimal 3.5, Galileo), install CDT 6.1 from http://download.eclipse.org/tools/cdt/builds/ 2. Go to project properties->C/C++ Build->Settings-> tab Error Parsers to enable the parser (CDT Regular Expression Error Parser). You can set up the rules/patterns in Workspace Preferences->Build Settings. 3. The content of your console view is now the input of the parser, adjust the pattern to get the input parsed. Example (Eclipse 3.5 + CDT 6.1 + Keil UV2): 1. Invoke the compiler and get the build logs display at the console Project -> Proporties -> C/C++ Build -> Build Command: MyBuild.bat MyBuild.bat: -------------------------------------------------------- c:\keil\uv2\uv2 -b Rcv.Uv2 -o "BUILD.LOG" @echo off FOR %%G in (BUILD.LOG) DO type %%G -------------------------------------------------------- 2. Logs displayed at the console -------------------------------------------------------- Build target 'Target 1' compiling Tstopc.c... assembling .\MICRO_A\Tstopc.src... compiling Tstreg.c... assembling .\MICRO_A\Tstreg.src... compiling Scnsync.c... .\SRC\SCN.C(59): error C67: 'scn_T8idx': undefined identifier .\SRC\SCN.C(70): error C67: 'scn_timerReload': undefined identifier .\SRC\SCN.C(71): error C67: 'scn_T8idx': undefined identifier .\SRC\SCN.C(73): error C67: 'scn_searchForOld': undefined identifier .\SRC\SCN.C(78): error C67: 'sy_Sync': undefined identifier .\SRC\SCN.C(78): error C67: 'SY_FIRST': undefined identifier -------------------------------------------------------- 3. Adjust the error parser option: Severity: Error Pattern: (.*)\((\d+)\)\: \berror\b(.*) File: $1 Line: $2 Description: Error: $1, line $2,$3 4. Compiler the project, you will see the results in the "Problem", :) I hope i can save the time for those who face the same problem. Many many thanks to Andrew and the to CDT team Mike |
| Free embeddable forum powered by Nabble | Forum Help |