From 995ae517cd87898cd8ecdfac015d7c14eb70f737 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 10 Apr 2017 16:40:41 +0200 Subject: [PATCH] build: add make bloaty --- Makefile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d291cbb5a..d7731d4af 100644 --- a/Makefile +++ b/Makefile @@ -24,15 +24,6 @@ vendor: ## update git submodules res: ## update resources ./tools/res_collect -vendorheader: ## construct default vendor header - ./tools/build_vendorheader 'db995fe25169d141cab9bbba92baa01f9f2e1ece7df4cb2ac05190f37fcc1f9d:2152f8d19b791d24453242e15f2eab6cb7cffa7b6a5ed30097960e069881db12:22fc297792f0b6ffc0bfcfdb7edb0c0aa14e025a365ec0e342e86e3829cb74b6' 1 0.0 SatoshiLabs assets/satoshilabs_120.toif micropython/firmware/vendorheader.bin - ./tools/binctl micropython/firmware/vendorheader.bin -s 1 4141414141414141414141414141414141414141414141414141414141414141 - -binctl: ## print info about binary files - ./tools/binctl micropython/loader/build/loader.bin - ./tools/binctl micropython/firmware/vendorheader.bin - ./tools/binctl micropython/firmware/build/firmware.bin - ## emulator commands: run: ## run unix port @@ -111,3 +102,18 @@ openocd: ## start openocd which connects to the device gdb: ## start remote gdb session which connects to the openocd arm-none-eabi-gdb $(FIRMWARE_BUILD_DIR)/firmware.elf -ex 'target remote localhost:3333' + +## misc commands: + +vendorheader: ## construct default vendor header + ./tools/build_vendorheader 'db995fe25169d141cab9bbba92baa01f9f2e1ece7df4cb2ac05190f37fcc1f9d:2152f8d19b791d24453242e15f2eab6cb7cffa7b6a5ed30097960e069881db12:22fc297792f0b6ffc0bfcfdb7edb0c0aa14e025a365ec0e342e86e3829cb74b6' 1 0.0 SatoshiLabs assets/satoshilabs_120.toif micropython/firmware/vendorheader.bin + ./tools/binctl micropython/firmware/vendorheader.bin -s 1 4141414141414141414141414141414141414141414141414141414141414141 + +binctl: ## print info about binary files + ./tools/binctl micropython/loader/build/loader.bin + ./tools/binctl micropython/firmware/vendorheader.bin + ./tools/binctl micropython/firmware/build/firmware.bin + +bloaty: ## run bloaty size profiler + bloaty -d symbols -n 0 -s file micropython/firmware/build/firmware.elf | less + bloaty -d compileunits -n 0 -s file micropython/firmware/build/firmware.elf | less