diff --git a/.gitignore b/.gitignore
index 977911dff..93d13503f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,7 @@ cov-int
*-build-dir
/_bin/
__pycache__
+cmake-build/
cmake-build-*
sdkconfig
.PVS-Studio
diff --git a/.idea/cmake.xml b/.idea/cmake.xml
index 677aaa662..0754253ad 100644
--- a/.idea/cmake.xml
+++ b/.idea/cmake.xml
@@ -124,6 +124,7 @@
+
diff --git a/examples/build_system/cmake/toolchain/arm_iar.cmake b/examples/build_system/cmake/toolchain/arm_iar.cmake
index 0b7e0b585..67d100bbc 100644
--- a/examples/build_system/cmake/toolchain/arm_iar.cmake
+++ b/examples/build_system/cmake/toolchain/arm_iar.cmake
@@ -24,7 +24,8 @@ set(CMAKE_C_ICSTAT ${CMAKE_IAR_CSTAT}
--checks=${CMAKE_CURRENT_LIST_DIR}/cstat_sel_checks.txt
--db=${CMAKE_BINARY_DIR}/cstat.db
--sarif_dir=${CMAKE_BINARY_DIR}/cstat_sarif
- --exclude ${TOP}/hw/mcu --exclude ${TOP}/lib
+ --exclude=${TOP}/hw/mcu
+ --exclude=${TOP}/lib
)
endif ()
diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake
index 2b9612186..5afec32c2 100644
--- a/hw/bsp/family_support.cmake
+++ b/hw/bsp/family_support.cmake
@@ -9,6 +9,7 @@ set(TOP "${CMAKE_CURRENT_LIST_DIR}/../..")
get_filename_component(TOP ${TOP} ABSOLUTE)
set(UF2CONV_PY ${TOP}/tools/uf2/utils/uf2conv.py)
+set(LINKERMAP_PY ${TOP}/tools/linkermap/linkermap.py)
function(family_resolve_board BOARD_NAME BOARD_PATH_OUT)
if ("${BOARD_NAME}" STREQUAL "")
@@ -223,6 +224,18 @@ function(family_initialize_project PROJECT DIR)
endif()
endfunction()
+# Add linkermap target (https://github.com/hathach/linkermap)
+function(family_add_linkermap TARGET)
+ set(LINKERMAP_OPTION "")
+ if (ARGC GREATER 1)
+ set(LINKERMAP_OPTION "${ARGV1}")
+ endif ()
+ add_custom_target(${TARGET}-linkermap
+ COMMAND python ${LINKERMAP_PY} -j -m ${LINKERMAP_OPTION} $.map
+ VERBATIM
+ )
+endfunction()
+
#-------------------------------------------------------------
# Common Target Configure
# Most families use these settings except rp2040 and espressif
@@ -332,6 +345,8 @@ function(family_configure_common TARGET RTOS)
endif ()
endif ()
+ family_add_linkermap(${TARGET})
+
# run size after build
# find_program(SIZE_EXE ${CMAKE_SIZE})
# if(NOT ${SIZE_EXE} STREQUAL SIZE_EXE-NOTFOUND)
diff --git a/src/portable/synopsys/dwc2/dwc2_info.py b/src/portable/synopsys/dwc2/dwc2_info.py
index f6bd2785a..8fbbc00a0 100755
--- a/src/portable/synopsys/dwc2/dwc2_info.py
+++ b/src/portable/synopsys/dwc2/dwc2_info.py
@@ -2,7 +2,6 @@
import ctypes
import argparse
-import click
import pandas as pd
# hex value for register: guid, gsnpsid, ghwcfg1, ghwcfg2, ghwcfg3, ghwcfg4
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index ba0826bd3..b2e883119 100755
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -662,7 +662,7 @@ def test_example(board, f1, example):
print(f'Flashing {fw_name}.elf')
# flash firmware. It may fail randomly, retry a few times
- max_rety = 1
+ max_rety = 3
start_s = time.time()
for i in range(max_rety):
ret = globals()[f'flash_{board["flasher"]["name"].lower()}'](board, fw_name)
diff --git a/tools/get_deps.py b/tools/get_deps.py
index d749e4c84..c60766e50 100755
--- a/tools/get_deps.py
+++ b/tools/get_deps.py
@@ -14,6 +14,9 @@ deps_mandatory = {
'lib/lwip': ['https://github.com/lwip-tcpip/lwip.git',
'159e31b689577dbf69cf0683bbaffbd71fa5ee10',
'all'],
+ 'tools/linkermap': ['https://github.com/hathach/linkermap.git',
+ 'e1a7a990fcd6eb1dbae13c2eb9fb0ca9db7ac483',
+ 'all'],
'tools/uf2': ['https://github.com/microsoft/uf2.git',
'c594542b2faa01cc33a2b97c9fbebc38549df80a',
'all'],