PIC compiler bugs…

June 1st, 2005 at 10:51 pm

It’s not often one runs into compiler bugs when working with mature compilers on common platforms.

But when you’re working on an embedded platform with a compiler less popular and used than gcc or visual, the danger of running into bugs is much greater.

This morning, for instance, we spent two hours hunting a bug that turned out to be in the assembly optimizer of our compiler - HiTECH C for PIC18.

After unrolling a function call and gasping at the sight of it returning different results from a direct call, I finally tried to fiddle with the disassembly and turn off the optimizations. Then, it just worked.

A detailed bug report was sent to the compiler’s support team, of course. Hope they can fix it - for now we won’t use optimizations.

Related posts:

  1. weather-induced bugs

One Response to “PIC compiler bugs…”

  1. Allen KellyNo Gravatar Says:

    Hi Tech C has always been over-priced, over-rated, buggy and just not worth the money…

    If you want a C compiler that is no more buggy than Hi TEch, has good IC specific procedures an costs a lot less, look at CCS C

    ADK

Leave a Reply

To post code with preserved formatting, enclose it in `backticks` (even multiple lines)