Hello everyone. I compiled a project in platformIO. I asked the compiler to generate a “test.map” file. I found that some of my things were discarded by the compiler, but I want to keep it. How do I do it in platformIO?
I added “attribute((used))” but it doesn’t seem to work
Mr. maxgerhardt said “attribute (( used))” has no problem. So I think there is a problem with the compile option. The RT-Thread real-time operating system has a GCC build environment. I started to view its Python script, found the relevant compile options, and then wrote “platformio.ini”. The compilation works fine, but the system still doesn’t work.
I am sorry, I don’t want to show you a wrong solution.
The “RT-Thread” real-time operating system is similar to “UNIX.” I originally thought that I only need to put its source code file into “platformIO” to compile it. It seems that my thoughts are wrong now.