Hello,
I'm having trouble finding out what's wrong with this program.
In simulation (FC8) it works fine, but when we try to convert it to a hex-file we get this message:
running_light_recursive_problem.c: 1642: (1089) recursive function call to "_FCM_rechts_links"
running_light_recursive_problem.c: 1708: (1089) recursive function call to "_FCM_links_rechts"
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1
Autoclose turned off
FINISHED
Greetings,
Theo
Running light in FC8 gives error recursive function call
Moderator: Benj
-
- Posts: 10
- Joined: Thu Jan 29, 2015 11:45 am
- Been thanked: 3 times
- Contact:
Running light in FC8 gives error recursive function call
- Attachments
-
- running_light_recursive_problem.fcfx
- (16.48 KiB) Downloaded 86 times
- Steve
- Matrix Staff
- Posts: 3422
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: Running light in FC8 gives error recursive function call
This error shows your program could fail because those two functions could call each other and you could cause an internal overflow. In fact you can simulate this by changing your switches to "latching" and then setting them both on. Your program will eventually crash even in simulation because the call stack overflows.
You will need to change how your program operates so that this recursion cannot happen.
You will need to change how your program operates so that this recursion cannot happen.