'Exclude From Build' options for build error debug

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
Brendan
Posts: 58
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 45 times
Been thanked: 12 times

'Exclude From Build' options for build error debug

Post by Brendan »

Quite often it can be somewhat frustrating getting to the bottom of build errors, whether they be embedded in macros, conflicts in var types, interrupts, etc.

It's certainly possible to copy the project to a new file, deleting macros and variables (etc) until a successful exploratory build points at the problem, though would be nice to be able to simply right-click macros and select 'Exclude from build', as though they weren't there (for build purposes) but remaining available for reinstatement within the project. Naturally, validation must still apply, in the same way that it would if attempting to delete macros and variables with existing dependencies for example.

I believe such feature might save a lot of time to debug some problem projects.

Just a thought - Don't ask me "why" :)

All the best,
Brendan

Steve-Matrix
Matrix Staff
Posts: 1513
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 212 times
Been thanked: 351 times

Re: 'Exclude From Build' options for build error debug

Post by Steve-Matrix »

Thanks for the suggestion. I have added it to my list.

Brendan
Posts: 58
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 45 times
Been thanked: 12 times

Re: 'Exclude From Build' options for build error debug

Post by Brendan »

Thank you Steve - Entirely appreciated.

jay_dee
Posts: 220
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 82 times
Been thanked: 58 times

Re: 'Exclude From Build' options for build error debug

Post by jay_dee »

Any tool that helps with de-bugging are always great additions.

mnfisher
Valued Contributor
Posts: 1554
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 741 times

Re: 'Exclude From Build' options for build error debug

Post by mnfisher »

In a way, you can mimic this using a global constant let's call DEBUG and then in each macro have a code block at the start with

Code: Select all

#ifdef DEBUG 
And sat the end of the macro

Code: Select all

#endif
The problem might be that the macro will call other macros - dsi knocking out one actually might mean a while chain of macros are not compiled.

I would also suggest looking at a form of 'test driven development' - test that each function compiles (and for the full TDD effect runs passing appropriate tests) before creating another test etc -there is a book called Test Driven Development for microcontrollers on this.

Making small macros (functions) with no side effects that perform a single function of key.

Martin

Post Reply