Question 1:Where can I configure the generated .map file (memory map)?
Question 2:I want to count the size of ROM and RAM occupied by each file. How to set Modus Toolbox 2.3?
Question 3:How to configure Modus Toolbox 2.3 like the .map file generated by Keil ？
Hello @JCD ,
ModusToolbox is make based and the makefiles control how the build flows and what output files get generated. When your application is created, a mtb_shared folder will be created in the workspace with it. Navigate to "mtb_shared\core-make\release-v1.8.0\make\core\" and open the build.mk file.
This makefile controls the build and what output files get generated. You can find variables that are used to generate the map file like $(CY_TOOLCHAIN_MAPFILE) which will take the values based on the toolchain specified and the toolchain makefiles are in the path: "recipe-make-cat1a\release-v1.8.0\make\toolchains\".
You can add your own set of arguments and create your own phony targets in the makefile and make them run along with the main build. Or you could just customize the main build as well.
I am not sure what the different configurations are or what's done in Keil, but there is no GUI based interface for you to do this. You need to implement this via code written in makefiles.
To learn more about makefiles refer to this KBA: https://community.cypress.com/t5/Knowledge-Base-Articles/Managing-the-Makefile-for-ModusToolbox-v2-x...
Hope this helps 🙂
I also noticed this “CY_TOOLCHAIN_MAPFILE”.
But I don't know how to configure，Can you tell me how to configure it？
It seems that there is no description about it in the link below .
Thanks again for your help！
Hello @JCD ,
I think it is easier to create a bat script that will go through all your .o files and generate the map file rather than editing some of the internal files. Once you have created the script, you can run this script in the POSTBUILD of the Makefile.
Basically, you can run objdump on each of the .o files that are generated. You could use this command:
>> objdump -x <samplefile>.o
objdump can be found at this path: "ModusToolbox\tools_2.3\gcc\arm-none-eabi\bin"
Many of the symbols may be unresolved at this point because they aren't linked.
Hope this helps!
Thank you very much for your reply.
still have a question.I want to reiterate that my purpose is to display the total RAM and ROM size used by each .c file in a mapfile file, instead of separately displaying the RAM and ROM size used by each function in a certain .c file .
My expectations are as follows.