AVRco Compiler Error; better display/background error location visually.

AVRco Compiler Error; better display/background error location visually.

7

    Sep 12, 2022#1

    AVRco Compiler Error; better display/background error location visually.

    Hello, I'm using the UEStudio/UltraEdit for some years now and have adapted it for the AVRco compiler from E-Lab. Except for a few functions I'm quite satisfied with UeStudio/UltraEdit.

    One of the points I am missing is the color background of the error. On the picture you can see the error output,"(875,14)" (row, column).
    When clicking on the error, is it possible to jump directly to the column and somehow highlight the word in front of it?

    Thorsten
    12-09-2022_19-22-46.png (167.13KiB)

    6,686585
    Grand MasterGrand Master
    6,686585

      Sep 13, 2022#2

      Highlighting in source code file the string on which an error or warning was detected by another program is not supported by UEStudio/UltraEdit.

      But UEStudio and UltraEdit support several formats of error and warning messages with file name (best always with full path but supported is also a relative path), line number and column number to open the file if not already opened and position the caret on the line producing the error or warning and also at the column if the executed program outputs also the column number. That feature could be helpful for you.

      The AVRco compiler outputs the file names with a relative path. You have to right click into the output window to open the context menu and click on item Set default path for relative paths... to define the directory containing the files processed by the compiler via the batch file. Most compilers have also an option to output an error or warning always with fully qualified file name (drive + path + name + extension) which you might use in your batch file to avoid setting the path for file names with relative path (no path is also a relative path).

      UES/UE recognize PVS2018_SDCARD.pas as file name and 875 in the round brackets as line number. The number 14 is not recognized as column number by UES/UE. So using from context menu of the output window Next message or Previous message or Go to error/warning results in opening the file PVS2018_SDCARD.pas and positioning the caret at beginning of line 875.

      I use Next message or Previous message always with the hotkeys Ctrl+Shift+DOWN ARROW and Ctrl+Shift+UP ARROW which I assigned to the commands Next message and Previous message in the key mapping configuration dialog. That makes it possible for me to just press the hotkeys to get the next/previous line with an error/warning (or found string or ...) displayed in a document window with caret set on that line and perhaps even at correct column without the need to use a pointing device like a mouse at all.

      UES/UE do not recognize the comma as indicator for next number being the column number. There is no configuration setting to change that. The character / between line and column number is required by UES/UE to recognize the number 14 as column number.

      You are using a batch file to compile the source code. So I recommend to call the compiler with output redirected to a program/script which searches in every line for line and column number in round brackets separated with a comma after file name before the colon, replace the comma by a slash and output the line, i.e. use a filtering program/script to adapt the compiler output to the format recognized by UES/UE. Let me know if you don't know how to modify your batch file to get the errors and warnings finally output with a slash instead of a comma between line and column number and I will try to help you.

      Another possibility would be opening the compiler executable in UES/UE in hex edit mode, search for the format string responsible for the output of line and column number separated by a comma enclosed in round brackets, replace the comma by a slash, save the modified compiler executable and use this modified version of the compiler executable. That is a dirty hack as modifying an executable is usually not a good idea, but would be the most efficient solution to get the column number in errors and warnings output by the compiler also recognized by UES/UE.

      Last but not least you could send also an email to UltraEdit support which requests an enhancement in output window line parsing recognizing also a comma as separator between line and column number so that a future version of UES/UE could handle the errors and warnings of AVRco compiler without an additional modification.

      PS: The slash character is preferred as separator between line and column number as this character is not allowed in a file name on any operating system. It is really not easy to find out if an output line contains at beginning a file name at all, where the file name ends, if there is also a line number and where exactly is the line number and if there is also a column number and where exactly is the column number. The entire string "PVS2018_SDCARD.pas (875,14)" is on all operating systems also a valid file name. UES/UE supports "PVS2018_SDCARD.pas (875/14)" and also "PVS2018_SDCARD.pas 875/14" without the round brackets more difficult to read and some other variants.
      Best regards from an UC/UE/UES for Windows user from Austria