12F675 Won't compile (C code warning!)

Moderator: Benj

Post Reply
pic-newbie

12F675 Won't compile (C code warning!)

Post by pic-newbie »

After spending many hours trying to get a program containing an interrupt working with no luck. I trimmed the program to its bare bones still no luck, then I found an entry in the forum stating that while the program will not simulate the interrupt but it is there in real life (And it was) proved by building a test rig,but when I went on to add more to the program it stoped compiling altogether with the warning

"Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please revew this carefully. If your flowchart contains no C code or you have thoroughly reviewed the code, contact Technical Support."

The only C code block in the program contained sleep(); which I have used many times before. I removed this but it made no difference,My only thought is that I may have exceeded the capacity of this chip but I find it difficult to judge this aspect of programing, some guidence on this subject would be of help,

A second warning in C code relating to interrupts that I have come across is

"This interrupt has previously been enabled, so the macro <interupt> may never get called"

I congratulate you on a wonderful program! but one does tend to get a Love/Hate relationship with it (in hate mode at the moment). Has the interrupt not simulating problem been sorted?

Any help gratefully received.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 12F675 Won't compile (C code warning!)

Post by Benj »

Hello,

I know the interrupt simulation is not great but this is generally very tricky to nail down and get perfect. This is why we released the FlowKIT device so users could debug via their hardware instead of simply relying on the Flowcode simulation.

The non compilation problem is something else I have come across before and is not related to interrupts. It is more to do with Windows 7 permissions. You have not said what OS you are using but I am fairly confident that you are using Win 7.

Please see this FAQ topic for help for your problem.
http://www.matrixmultimedia.com/support ... f=22&t=610
"This interrupt has previously been enabled, so the macro <interupt> may never get called"
This simply means that the interrupt is being enabled by more then one interrupt icon and that if they contain calls to different macros then only the first one will be accepted.

Eg.

enable interrupt timer 0 calls macro ben1

then later in your program

disable interrupt timer 0
enable interrupt timer 0 calls macro ben2

The way the interrupt C code works means that macro ben1 will only ever be called by the interrupt and macro ben2 will never be called.

pic-newbie

Re: 12F675 Won't compile (C code warning!)

Post by pic-newbie »

Hi Ben
Thanks for such a fast reply,

In response to the Op System, I am running on Windows XP,
I am going to have a look at your FlowKit suggestion. I assume that there is a reasonable amount of printed info available to allow one to get to grips with it with the least amount of hassle.
As far as the non simulation of interrupts is concerned, was the same problem in V3? and is it that all interrupts do not simulate or is it dependent on say the chip chosen? As far as my program is concerned only one icon was used.
I intend to play with it a little longer in case it's me that's got it wrong.
Once again thanks for the prompt reply, Probably will speak later.

Regards
Brian

Post Reply