Page 1 of 1

V7 project to V8 Weirdness

Posted: Mon Apr 27, 2020 3:25 pm
by anzacinexile
Hears one to make you think - its certainly driving me crazy.
The scenario is I brought in a successful V7 project into V8 as I could use a lot of the previously written code in my new project. I deleted a lot of macros and variables that I didn't need, recompiled but apart from the main block which ran fine, no macros were being called. After many hours of banging my head against the wall I completely deleted all macros and then rebuilt them exactly as before (same names, same calls etc) and the program now runs fine.
In an effort to make sure I wasn't losing the plot completely, I tried the same with another project with the same results - I had to delete all macros and rebuild before any macro calls would work.
......or have I lost the plot :shock:
Chris

Re: V7 project to V8 Weirdness

Posted: Mon Apr 27, 2020 5:54 pm
by Steve
Thanks for letting us know about this. Could you please post some simple examples that illustrate the problem and we will look to see what's going wrong.

Re: V7 project to V8 Weirdness

Posted: Tue Apr 28, 2020 11:14 am
by anzacinexile
Steve,
Many thanks for getting back, much appreciated.
I attach the original V7 project to which in V8, I removed the Eeprom, Display and Button macros and equivalent variables but after compilation, none of the remaining macro's were being called. I added a simple 1 second loop in the main body which ran fine but adding the same 1 second test to any of the maco's showed none were being called.
I deleted the boot macro completely and then rebuilt the macro exactly as before and it was then called successfully. I did the same with the remaining macros and the program is now running fine.
Weird :?
Dash Mk8a Left (18F46K22).fcfx
(24.67 KiB) Downloaded 154 times

Re: V7 project to V8 Weirdness

Posted: Tue Apr 28, 2020 11:55 am
by Steve
I followed your steps (deleted the calls to those 3 macros and then deleted the macros) and I couldn't see anything wrong. The simulation enters the "Boot" macro correctly and the generated C code seems ok to me. I don't have your hardware so I can't test the actual execution.

Did the V8 version of the program work ok before you deleted those macros?

You seem to have a solution, but I'm happy to investigate further if you want me to. If you do, then it will help if you send 3 FCFX files (the original v7, the imported v8 before deleting the macros, and the v8 after you deleted the macros) as well as the C code files each of these generates when you select "compile to C".

Re: V7 project to V8 Weirdness

Posted: Tue Apr 28, 2020 1:22 pm
by anzacinexile
Don't sweat it Steve, I don't want to take up your valuable time any further. I've got a work-around so lets put it down to the wind blowing in the wrong direction!
Interestingly, I did the same exercise but in V7 and it worked without issue so it is something to do importing into V8.
Thanks for looking into it - who said software was coldly logical!!!!
Chris