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

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?

Postby Niro » Tue Feb 08, 2011 5:47 pm

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: 3111
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 89 times
Been thanked: 398 times
Contact:

Re: How to simulate custom IRQ macros?

Postby Steve » Wed Feb 09, 2011 7:49 am

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.
These users thanked the author Steve for the post:
Niro (Wed Feb 09, 2011 11:45 am)
Rating: 5%
 

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?

Postby Niro » Wed Feb 09, 2011 11:47 am

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

Niro