How to simulate custom IRQ macros?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

How to simulate custom IRQ macros?

Post by Niro »

Hello all,

I know, the simulation capabilities of flowcode (FC4 for AVR) doesn't include custom interrupts. But using the step-into simulation mode, does anyone know a way to jump into a macro depending on a custom IRQ. I just want to simulate the logical behaviour of the macro and change the variable values manually while stepping. There is no need to check the IRQ itsef, only the macro code.
Last time I need to set up separate flowcode programs including each one marco of the main program to check with simulation. But this is really annoying...

Thanks,
Niro

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: How to simulate custom IRQ macros?

Post by Steve »

The macro called by an IRQ can also be called using a "call macro" icon. What I would do is to create a global variable (called "Call_IRQ" or similar) which is initially set to zero. Then, at convenient points in your program place a Decision icon that uses this variable as the expression and in the "Yes" branch have a Call Macro icon to the IRQ routine. Then in simulation, you can pause your program, set the variable Call_IRQ to non-zero and then continue running the program (which will then call the IRQ routine).

I hope this explanation gives a useful workaround.

Niro
Posts: 77
Joined: Mon Jan 03, 2011 8:58 pm
Has thanked: 29 times
Been thanked: 10 times
Contact:

Re: How to simulate custom IRQ macros?

Post by Niro »

Thanks a lot, Steve! This seems to be an acceptable workaround and helps much for debugging...

Niro

Post Reply