Forums

AVR compilers

Started by mc January 9, 2005
mc wrote:

>(You're giving great support for a product I haven't paid a cent for! :) > > >
My philosophy is that while I can't please everyone all the time, at least I should try with the reasonable requests. My experience is that one p*off (non-)user can do more damage than 10 happy customers. We just recently have a "lecturer" threatening to use us as a "bad example of customer support" on his book or something. It was a long story, may be one of these days we will put it up on the "Hall of Shame," especially if said person actually would use us as an example. There are two sides to every story... To get back on topic: that space in filename support was a PITA. Took forever to find all the places. I eventually got yet another bright idea that: Windows "windowed" programs handle spaces fine. It's when we write the paths to be used by command line programs that run into trouble. In our case, the IDE generates the makefile, to be used by make, to invoke the command line driver, which invokes different compiler passes (uh oh...), and no amount of quoting seems to be sufficient :-) So we just make sure that everywhere we may talk to a non-windowed program, we convert long file names to short file names when there are spaces in the names(ugh), and in the few places that we read info back from command line programs, we do the reverse conversion. There are some systems that don't support long/short name conversion, so we pop up a warning when something weird may happen - for example, you may end up opening a file twice, once with short name and once with long name, but it is rare to happen (long filename is fine, just spaces that are difficult to handle), and rare OS that has the problems (W98? I don't remember) -- // richard http://www.imagecraft.com
Meindert Sprang wrote:

>Imagecraft is just perfect. It doesn't even use pathnames in it's project >files, so you can just copy them to a different directory and recompile. A >big hand for Richard! > >Meindert > > >
The Salvo guy who ports his RTOS to lots of different compilers and chips said ours is one of the easiest to create new project examples precisely for this sort of reasons. We used to use absolute paths but customers said that relative paths would be much easier to move and share projects so I made the changes. A lot of the features of the products are customer driven in that sense. One way to look at it is that we have many times more customers than the companies that charge 20x our prices, so any ways to eliminate customers calling or emailing us is a good thing :-) -- // richard http://www.imagecraft.com
Can't you just put quotes around the filenames when they appear in command 
line arguments and makefiles?

c:> "C:\Program Files\myprog.exe" "this is a long filename.asm"

or the like?

UNIX allows spaces in filenames too -- isn't this how they do it?


"Richard M." <richard@imagecraft.com> wrote in message 
news:10ubgv2odct2e36@corp.supernews.com...
> mc wrote: > >>(You're giving great support for a product I haven't paid a cent for! :) >> > My philosophy is that while I can't please everyone all the time, at > least I should try with the reasonable requests.
Right... Also, I may have been of some use to you as a tester, being a total beginner, and thus not knowing what *not* to try! :) Keep up the good work.
>UNIX allows spaces in filenames too -- isn't this how they do it?
Spaces are escaped in UNIX, at least at the command line. e.g. "/My\ Long\ Directory/filename".
mc wrote:

>Can't you just put quotes around the filenames when they appear in command >line arguments and makefiles? > >c:> "C:\Program Files\myprog.exe" "this is a long filename.asm" > >or the like? > >UNIX allows spaces in filenames too -- isn't this how they do it? > > >
Yes, the problem we had was that if we put quotes around the filename in the makefile, the driver still needs to be modified to re-add the quotes when it calls the compiler passes. Then all the different programs, e.g. programs that look at the debug files, the map files etc. again have to be carefully with preserving the quotes. All in all, a big mess. -- // richard http://www.imagecraft.com
"Richard M." <richard@imagecraft.com> wrote in message 
news:10ubrnb5nst1202@corp.supernews.com...

> Yes, the problem we had was that if we put quotes around the filename in > the makefile, the driver still needs to be modified to re-add the quotes > when it calls the compiler passes. Then all the different programs, e.g. > programs that look at the debug files, the map files etc. again have to be > carefully with preserving the quotes. All in all, a big mess.
Yes, it is. Compared to DOS, Windows has changed the rules on us much more than is obvious. Fortunately, you are allowed to put quotes around all file names, not just those with blanks in them. As I said, keep up the good work. These things must be frustrating.
On Tue, 11 Jan 2005 11:22:20 -0500, mc wrote:

> > "David" <david.nospam@westcontrol.removethis.com> wrote in message > news:pan.2005.01.11.07.52.30.616000@westcontrol.removethis.com... >> On Mon, 10 Jan 2005 21:20:05 -0500, mc wrote: >> >>> >>> P.S. How about installing in C:\Program Files? Or do you have components >>> that don't like long filenames? In general, I'm pretty picky about >>> wanting >>> all my application software to follow Windows conventions. So far, I'm >> >> Just because "Program Files" is a convention, doesn't mean it is a good >> idea. In fact, it is an apallingly bad idea, and the microsoftie who >> thought of it should be strung up beside the even bigger halfwit who >> thought up the "my documents" scheme. > > I think naming it "Program Files" was a mistake. It should have been > "progs" for complete compatibility with software that doesn't recognize long > filenames, and for quicker typing. Likewise "Documents and Settings" should > have been "usr". Apart from that, I think it was a good idea. > > "My documents" was a good idea too.
The idea of having a single well-defined place (or a few places) for programs is a good one - it is only the name that is bad. It is also only half done - there is still endless piles of junk that gets installed under the windows directory. Similarly, the idea of "My documents" is good (infinitely better than the old "standard" of putting documents in the creating program's directory), but the name is terrible, especially when buried under several layers. Despite claims, desktop windows is still basically a single-user system. Directories on a server need to be seperated for different users, but on a desktop machine there are seldom more than a couple of different users (and that's only really for home machines). Why someone thought that a directory such as "d:\Documents and Settings\David.DAVID1700\My Documents" is a good idea, compared to just "d:\home\david" or even "d:\david" is beyond me.
> > A lot of people don't seem to realize that this isn't 1988 and Windows isn't > DOS. Windows is a multi-user operating system and the location of "My > Documents" depends on how you're set up. For instance, in our lab, it's on > a shared disk on the network. > > Also, ordinary users (non-administrators) don't have permission to write in > Program Files. > > All of this should be familiar in UNIX, where ~ points to your home > directory wherever it is, and ordinary users don't write in /usr/local/bin. > But some Windows software developers don't seem to understand these > concepts. They get it into their head that the program *has* to be in some > particular place and the user *has* to be able to write in the install > directory. > > Many Windows developers are also unaware that Windows has a command line and > that useful things can be done there. > > To see it all done right, try Microsoft Visual Studio. To read a brief but > technically detailed rant on the subject, see > www.covingtoninnovations.com/michael/blog/0404/index.html#040401. > > I hasten to add that ImageCraft C DOES NOT HAVE THESE FAULTS as far as I > can tell. Once I figured out that it doesn't select any processor by > default, I got it going just fine.
and after sending to support wait for a week before getting an answer.

"David" <david.nospam@westcontrol.removethis.com> wrote in message 
news:pan.2005.01.13.09.17.42.795000@westcontrol.removethis.com...

> Despite claims, desktop windows is still > basically a single-user system.
Not in my lab. We have roaming user profiles. Any user can sit down at any PC and get his own desktop and his own files. This quickly reveals to us which pieces of software don't follow Windows standards!
> Why someone thought that a directory such as > "d:\Documents and Settings\David.DAVID1700\My Documents" is a good idea, > compared to just "d:\home\david" or even "d:\david" is beyond me.
It becomes David.1700 only if you've logged in 1700 times and each time the machine crashed and didn't delete the previous one. But in any case you can easily identify this directory through an environment variable.