have tried to use A51 with Codewright (V5.1 to V7) and found that the _KeilC51ErrorInfo error parser contained in errpar32.dll cannot do the job with A51 output. Expression suggested by codewright support application is ^\**[ \t]+(error|warning).*line[ \t]+([0-9]+)[ \t]+of[ \t]+(.*): (.*)$ and is definitely wrong for my A51 version. That is somewhat confusing because even my A51 output is not identical with the current Keil documentaion what list Error numbers dezimal. My output is: A51 MACRO ASSEMBLER V6.02 - SN: A1S3P-U5074E COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2000 MACRO ASSEMBLER A51 V6.02 NO OBJECT MODULE REQUESTED ASSEMBLER INVOKED BY: d:\programme\keil\c51\bin\a51.exe eeprom.a51 EP LOC OBJ LINE SOURCE 428 rts ;-> es liegt kein Kommando fuer das Eeprom an *** _________________________________^ *** ERROR #A9 IN 428 (eeprom.a51, LINE 115): SYNTAX ERROR ASSEMBLY COMPLETE. 0 WARNING(S), 1 ERROR(S) make: *** [eeprom.obj] Error 2 Cannot find #A9 in manual and whats the 428? Somebody knows the correct regular expression for that Keil Message ?
here is the solution I found: ^\*\*\* +(ERROR|WARNING) #+([0-9A-F]*) IN +([0-9]*) \x28+(.*), LINE +([0-9]*)\x29: +(.*)\xd$ - First characters in Error lines start with 3 stars (***). (The expression \*{3} should also work but regex seems also buggy?) - after that followed by a blank and either the - Keywords error or warning in capital letters followed by - a blank and the # with a hexadezimal error number - followed by a blank and the Keyword "IN" - followed by a dezimal number followed by a blank - followed by a opening bracket - followed by the filename what consists of any characters - followed by a comma separator and a blank - followed by the Keyword "LINE" and a blank - followed by the line numer in dezimal format - followed by a closing bracket, a colon an a blank - followed by a error message string what constists of any characters - followed by a formfeed at the end of the line (\f should also work) Filename is position 4 Linenumber is position 5 and Error Message is positon 6 Another (more easy feasable) way is to use the similar syntax of _FRANKASM51_494 what can be found in err32.dll
I was wondering how to employ error parsing with Keil. I am using Keil C167 Professional Development Kit. Compiler uVision2 V2.38. Compiler V4.27, Assembler V4.26 Linker 4.28. I am using Windows XP Professional. I wish to have Codewright 7.5 as an editor with Keil error parser. How do I set this up? What is the name of the Keil error parser for my version of Keil?
I still use Codewright 5.1. For the last mail bug report to the new owner (Borland) was no response from the support at all. Seems anybody without money for latest versions is the f***er - another reason not to buy an update. To your problem: There seems no parser for Keil included. For this reason you can setup your own parser using regular expressions. Therefore use the project-erros tab and search for a button "Custom Error Parsers". Here you can enter a new name (e.g. Keil166) and a Pattern what is the above mentioned regex. The "group specifications" tell codewright how to use the parsed data to trigger the editor sync. One of the CW bugs is, that the sync does not work proper for 4 digit line numbers. With other words, of your file exceeds 999 lines, you should split it to a new one. Think I can solve this with compiling the parser but I only use Keil occasionally. If you have further CW questions, dont hesitate to drop me a private message janvi@despammed.com
I still use Codewright 5.1. For the last mail bug report to the new owner (Borland) Borland killed the last champ (brief) did they now kill CodeWright too? Erik
Hi Jurgen, Thanks for your input. I will have to try the syntax in you previous posts. However, I have found that the default CodeWright error parser, _ErrorInfoDefault, works well with the Keil compiler. I simply added the parser, and everything is well. Don't know if _ErrorInfoDefault will work with older versions.