summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-10-13 00:57:45 +0700
committerGitHub <[email protected]>2021-10-13 00:57:45 +0700
commitb26cc2cc4694d883cc060c03c57d201753b4c72a (patch)
tree3d4fc6a647f388c7526cb6282e013081c7e0a9c7 /docs/reference
parent2ba690d31df6e2908cb683494171aa3739bd8991 (diff)
Add linkermap for size analysis (#1136)
* add NO_LTO option to make * add linkermap submodule and linkermap target * add linkermap to ci build * linkermap doesn't work with esp32sx map file yet * add note for linkermap target
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/getting_started.rst15
1 files changed, 12 insertions, 3 deletions
diff --git a/docs/reference/getting_started.rst b/docs/reference/getting_started.rst
index be2e1b5ea..044792993 100644
--- a/docs/reference/getting_started.rst
+++ b/docs/reference/getting_started.rst
@@ -89,6 +89,15 @@ A MCU can support multiple operational speed. By default, the example build syst
$ make BOARD=stm32f746disco SPEED=full all
+Size Analysis
+~~~~~~~~~~~~~
+
+First install `linkermap tool <https://github.com/hathach/linkermap>`_ then ``linkermap`` target can be used to analyze code size. You may want to compile with ``NO_LTO=1`` since -flto merges code across .o files and make it difficult to analyze.
+
+.. code-block::
+
+ $ make BOARD=feather_nrf52840_express NO_LTO=1 all linkermap
+
Debug
^^^^^
@@ -153,7 +162,7 @@ Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can
$ make BOARD=feather_nrf52840_express all uf2
IAR Support
------------
+^^^^^^^^^^^
IAR Project Connection files are provided to import TinyUSB stack into your project.
@@ -171,12 +180,12 @@ IAR Project Connection files are provided to import TinyUSB stack into your proj
for example `C:\\tinyusb`
Import stack only
-^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~
1. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\tools\\iar_template.ipcf`.
Run examples
-^^^^^^^^^^^^
+~~~~~~~~~~~~
1. (Python3 is needed) Run `iar_gen.py` to generate .ipcf files of examples: