Macro's are often used in 3 contexts
- to reuse a block of code more than once and maintain this code in 1 place only
- a block of code called by an interupt. This is just a special case of the above
- help structuring your code regardless of the fact you are calling this macro only once. Personally i often (re)use a macro INIT which is called only once.
My question is mainly related to the 3th case.
It would be nice to have an option somewhere to tell FC to unwrap macros prior to start compilation.
This would make sence to minimize the call stack as a lot of pics can handle only 8... and some components already use more than 1 level on their own.
I know there is some software call stack you can use to increase the max stack size above 8, but it remains a waiste of scare pic resources not to unwrap single used macros.
One could consider to only unwrap single used macros, but even for simple macros used 2 or 3 times, it could be a way to balance between code size and call stack.
Now you have to do this manually.
The unwrap option could be a macro property and/or a project option. On project level one could foresee 3 options
- no unwrap (default)
- unwrap single used macros only
- unwrap all macros
I'm curious to see if other users find this usefull.
Regards,
Ivan
Macro unwrap to reduce call stack usage.
Moderator: Benj
Return to “Flowcode V5 Suggestions”
Jump to
- Announcements
- ↳ Announcements
- The Knowledge Exchange
- ↳ Programming Tips & Tricks
- ↳ Freelance Embedded Engineers
- ↳ Article Discussion
- Microcontroller Programming
- ↳ General Programming
- ↳ Flowcode V9
- ↳ Flowcode V8
- ↳ Feature Requests
- ↳ Bug Reports
- ↳ User Components
- ↳ Flowcode V7
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Fixed bugs
- ↳ 8-Bit PIC
- ↳ 16-Bit PIC
- ↳ 32-Bit PIC
- ↳ AVR & Arduino
- ↳ 32-Bit ARM
- ↳ Poll Discussion
- ↳ Flowcode V6
- ↳ Flowcode v6 Beta
- ↳ Bug reports
- ↳ Getting Started
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Flowcode V5
- ↳ Flowcode V5 Issues
- ↳ Flowcode V5 Suggestions
- ↳ Flowcode V5 Free Edition
- ↳ Flowcode V4
- ↳ Flowcode 4 Bugs
- ↳ Flowcode 4 Suggestions
- ↳ Flowcode V2 & V3
- ↳ General / Misc
- ↳ Components (Comms)
- ↳ Components (Other)
- ↳ Bugs / Application Errors
- ↳ Suggestions
- ↳ BTEC Unit 6
- ↳ C and ASM Programming
- ↳ E-blocks
- ↳ Formula AllCode
- ↳ Formula Flowcode
- ↳ MIAC
- Language Support Forums
- ↳ Deutsch Support-Forum
- ↳ Forums d'aide en français
- ↳ Foro de soporte español
- Other Matrix products
- ↳ Electronics products
- ↳ Matrix Online Courses
- ↳ Other products
- ↳ CoCo
- Hidden