Generating Expanded Code Without Macros in IDF Project Using idf.py
Posted: Tue May 02, 2023 2:38 pm
by pablogventura
I have an IDF project where I need to generate the expanded code without macros, so that I can automatically process it with Python. Is there any way to generate the expanded code without macros using idf.py? I appreciate any suggestions or help on this matter. Thank you!
Re: Generating Expanded Code Without Macros in IDF Project Using idf.py
Posted: Thu May 04, 2023 8:33 pm
by MicroController
You can
add the
"save-temps" compiler option, e.g. "-save-temps=obj", to your cmake file, which upon building will make gcc leave you, among binaries and other files, with a "*.ii" file per compilation unit.
You can also invoke the gcc preprocessor only, via
gcc -E.