Printing Line Numbers

I am a AVR “newbee”, maybe a stupid question, but I have been looking through “STUDIO 4” for a switch to set that will enable source code to be printed with line numbers!

In my last life, I used an Motorola 68HC11 ImageCraft compiler running in DOS, and it was nice to generate a “source code” print-out that did include line numbers.

All the AVR (red dot) error flags generated by “build” are linked to the source file and a line number. Counting down to line 254, for example, is hopeless. Maybe my only option is to tape pages together and measure with a tape calibrated in lines/page.

Forty years ago, I wrote machine code on fan-folded paper and measured relative branches with a 256 line tape numbered in hex from 00 to FF. The good old days before compilers!

1 Like

I think you may be out of luck.

AVR Studio displays the line number of the cursor on the bottom right, and jumps to the line of a compilation error when you double click on it (it will even open included source files this way, very nice), but I don’t think there is any way to make it display or print line numbers, which is a shame.

If I wanted to print AVR code out with line numbers I would open it in another editor, like Programmer’s Notepad, which does line numbers and format coloring (and which should have installed itself with WinAVR, assuming you’re writing in C).


P.S. Counting lines with a hex-measuring tape, hard core!