?

Log in

No account? Create an account
And again I learn about bad tools... - Adventures in Engineering — LiveJournal
The wanderings of a modern ronin.

Ben Cantrick
  Date: 2006-04-24 20:21
  Subject:   And again I learn about bad tools...
Public
  Mood:forehead smashing desktop
  Music:"Bring me the heads of Pavel Baranov and David Hobday..."
Remember when I ranted about bad tools? Well, the same damn bad tool came back and bit me again. Basically, most of last week I'd been frustrated as hell that previously working code had somehow "rotted" and no longer worked. This is spite of the fact that the code hadn't changed, the timestamp on the source file hadn't changed, etc...

It turns out that I had gone past the expiration period of the compiler's shareware license. It also turns out that when the compiler is past its expiration, it doesn't stop, throw an error, and halt the build... as any sane person would expect. Instead it automatically changes your project settings(!) to a different kind of microcontroller than you told it to(!!) and merrily builds the wrong code(!!!) then happily passes that code off to the assembler for final creation(!!!!). Even worse, the code is close enough that it works about 3/4 of the time.

In particular, there's a general purpose register at address 0x0D that is not implemented in the chip I'm using, but is functional in the one the expired compiler decided to use. The compiler uses this register to hold temporary values that are halfway computed. So, for example, when you have a non-trivial expression on the right hand side of an equals sign, the bad code either flubs the calculation, or else does the calc correctly but then stores the result into a register that isn't actually there. So when you go back to look at result, it always comes out as 0. Which, actually, is the correct and expected value a fair bit of the time! The assembley code looks fine, and you don't know that anything's wrong until some interesting or extraordinary condition comes along. And then the chip just lies silent, not responding to what it's supposed to respond to! (Like, say when a gear count sensor notices a gear tooth rotating by. Kinda bad to miss that. You know, kinda throws your gear count off a little bit when you never see the gear teeth going by...)

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!

Must. Restrain. Stark. Fist! Of! DEATH!!
Post A Comment | 4 Comments | | Link






  User: jigenm4c
  Date: 2006-04-24 21:32 (UTC)
  Subject:   (no subject)
Is GCC an option? I know I asked about this once, but I don't remember what the response was ^_^; There may be an XGCC for a cross compiler library for GCC to allow for output to your system. Maybe even an ld-suite or a gas suite for that same chipset?

You can't beat the price, of course, but then again, it may be as stable as the tools you currently use. And then, it may take a day-and-a-half to figure out how to get the shit to even work...

"Software is only free if your time has no value..."
Reply | Thread | Link



Ben Cantrick
  User: mackys
  Date: 2006-04-24 21:56 (UTC)
  Subject:   (no subject)
That might be an option if we weren't going to the customer site again tomorrow for yet another demo...
Reply | Parent | Thread | Link



osmium_ocelot
  User: osmium_ocelot
  Date: 2006-04-25 00:59 (UTC)
  Subject:   LJ ate this the first time...
... so here we go again.

Anywho, what I was trying to say : Software is dumb, it only knows what you tell it, so tell it what it wants to know to be happy. Or, in other words : trick it into thinking it's just been installed. For windows systems (somehow I doubt you're working with one of these) it's usually as simple as uninstalling the program, running regedit to root out any markers, and reinstalling. I don't know how to go about this on any other platform, but I imagine it can be done.

Also, registration codes can usually be found on the 'net. Feed it a registration code and let it think it's been paid for if you can. Just don't let it phone home.
Reply | Thread | Link



Ben Cantrick
  User: mackys
  Date: 2006-04-25 05:22 (UTC)
  Subject:   (no subject)
We have a license, so it's no big deal. It's just that I didn't even know that the trial period was over!

The behavior seems totally weird to me - what's more likely to make the users of your software give you money. Silently continuing to work wrong... or stopping working and telling them the trial period is over?
Reply | Parent | Thread | Link



browse
May 2015