On Thu, Feb 09, 2006 at 05:53:56PM -0000, Dave VanHorn wrote: > > > Also spend a lot of time looking at the generated assembly output. > > Is not so important as to be able to write assembly as it is to be > > able to read and understand what the compiler thought of your > > instructions. This way you know how expensive it is to attempt to > > abstract the UART via indirection in a structure. You know that 16 > > bit values require two accesses which an interrupt may jump in > > between. All those little things that differentiate code which > > happens to work vs. solid code which always works and is easy to > > maintain. > > I know a lot of people use C, and yet I see this sort of thing, and > compiler bugs, and rather bad code optimization, and I think.. "and > this is better?" I didn't say anything about compiler bugs. My concern was in understanding how what one writes in C turns into machine instructions. I know a code generation error crops up now and then in avr-gcc, but those are rare. As for optimization, if the code runs correctly then a few extra instructions here and there do not matter. This time last year avr-gcc emitted extra RET instructions in some situations. I knew because I was looking at the output. I didn't fret about my project being 55 RET's longer than it needed to be. > > One parting note, use some sort of version system. CVS, Subversion, > > something, anything, from the start. Get used to frequently updating > > your repository with concise comments as to what you were doing or > > what motivated the changes. Comments in the code are important but > > the quality of comments in your commits are just as important. > > Tortoise CVS makes that pretty painless. I have an offsite CVS server > which helps protect me from any little disasters. There are other issues if one uses Windows file sharing to "network" a CVS repository among Windows users. This is the usual brain-dead method that comes to mind of many IT staff. Is better to install CVS as a "service" so that one has true client/server networking, that the server is the only one to read or write the repository directly. Even better use FreeBSD as the CVS server. I agree, TortoiseCVS and WinMerge are essentials if working from Windows. -- David Kelly N4HHE, dkelly@HiWAAY.net ======================================================================== Whom computers would destroy, they must first drive mad.
Message
Re: [AVR-Chat] Re: Best language for learning AVRs (was forth)
2006-02-09 by David Kelly
Attachments
- No local attachments were found for this message.