8 years, 5 months ago.

How to add compile flag -fstack-usage to a make file?

I want to compile the program with flag "-fstack-usage" through ARM GCC compiler, but I don't know where to add it in make file generated by mbed automatically. The "-fstack-usage" generates an extra file that specifies the maximum amount of stack used, on a per-function basis. The file should have the same basename as the target object file with a .su extension. I have placed "-fstack-usage" at several different places in the make file but didn't able to generate .su file.

I would be very grateful if anybody can give me any feedback on this.

Be the first to answer this question.