mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-20 12:21:01 +00:00
cleanup makefile
This commit is contained in:
parent
79f7a2bfc3
commit
7e5d5a9164
@ -12,4 +12,4 @@ before_script:
|
|||||||
- make build_unix
|
- make build_unix
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd src/tests && bash ./runtests.sh
|
- make test
|
||||||
|
36
Makefile
36
Makefile
@ -9,29 +9,29 @@ vendor: ## update git submodules
|
|||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
|
||||||
res: ## update resources
|
res: ## update resources
|
||||||
python3 tools/res_collect.py
|
./tools/res_collect.py
|
||||||
|
|
||||||
build: build_stmhal build_unix build_cross ## build stmhal, unix and mpy-cross micropython ports
|
build: build_stmhal build_unix build_cross ## build stmhal, unix and mpy-cross micropython ports
|
||||||
|
|
||||||
build_stmhal: vendor res ## build stmhal port
|
build_stmhal: vendor ## build stmhal port
|
||||||
make -C vendor/micropython/stmhal
|
make -C vendor/micropython/stmhal
|
||||||
|
|
||||||
build_stmhal_debug: vendor res ## build stmhal port with debug symbols
|
build_stmhal_debug: vendor ## build stmhal port with debug symbols
|
||||||
make -C vendor/micropython/stmhal
|
make -C vendor/micropython/stmhal
|
||||||
|
|
||||||
build_stmhal_frozen: vendor res build_cross ## build stmhal port with frozen modules (from /src)
|
build_stmhal_frozen: vendor res build_cross ## build stmhal port with frozen modules (from /src)
|
||||||
make -C vendor/micropython/stmhal FROZEN_MPY_DIR=../../../src
|
make -C vendor/micropython/stmhal FROZEN_MPY_DIR=../../../src
|
||||||
|
|
||||||
build_unix: vendor res ## build unix port
|
build_unix: vendor ## build unix port
|
||||||
make -C vendor/micropython/unix MICROPY_FORCE_32BIT=1
|
make -C vendor/micropython/unix MICROPY_FORCE_32BIT=1
|
||||||
|
|
||||||
build_unix_debug: vendor res ## build unix port with debug symbols
|
build_unix_debug: vendor ## build unix port with debug symbols
|
||||||
make -C vendor/micropython/unix MICROPY_FORCE_32BIT=1 DEBUG=1
|
make -C vendor/micropython/unix MICROPY_FORCE_32BIT=1 DEBUG=1
|
||||||
|
|
||||||
build_unix_frozen: vendor res build_cross ## build unix port with frozen modules (from /src)
|
build_unix_frozen: vendor res build_cross ## build unix port with frozen modules (from /src)
|
||||||
make -C vendor/micropython/unix MICROPY_FORCE_32BIT=1 FROZEN_MPY_DIR=../../../src
|
make -C vendor/micropython/unix MICROPY_FORCE_32BIT=1 FROZEN_MPY_DIR=../../../src
|
||||||
|
|
||||||
build_cross: vendor res ## build mpy-cross port
|
build_cross: vendor ## build mpy-cross port
|
||||||
make -C vendor/micropython/mpy-cross MICROPY_FORCE_32BIT=1
|
make -C vendor/micropython/mpy-cross MICROPY_FORCE_32BIT=1
|
||||||
|
|
||||||
build_bootloader: vendor ## build bootloader
|
build_bootloader: vendor ## build bootloader
|
||||||
@ -62,21 +62,12 @@ flash: ## flash firmware using st-flash
|
|||||||
sleep 0.1
|
sleep 0.1
|
||||||
st-flash write $(STMHAL_BUILD_DIR)/firmware1.bin 0x8020000
|
st-flash write $(STMHAL_BUILD_DIR)/firmware1.bin 0x8020000
|
||||||
|
|
||||||
flash_bootloader: vendor ## flash bootloader using st-flash
|
flash_bl: vendor ## flash bootloader using st-flash
|
||||||
st-flash write $(STMHAL_BUILD_DIR)/bootloader0.bin 0x8000000
|
st-flash write $(STMHAL_BUILD_DIR)/bootloader0.bin 0x8000000
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
st-flash write $(STMHAL_BUILD_DIR)/bootloader1.bin 0x8020000
|
st-flash write $(STMHAL_BUILD_DIR)/bootloader1.bin 0x8020000
|
||||||
|
|
||||||
openocd_flash_bootloader: $(STMHAL_BUILD_DIR)/bootloader.hex ## flash bootloader using openocd
|
openocd_flash: $(STMHAL_BUILD_DIR)/firmware.hex ## flash firmware using openocd
|
||||||
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg \
|
|
||||||
-c "init" \
|
|
||||||
-c "reset init" \
|
|
||||||
-c "stm32f4x mass_erase 0" \
|
|
||||||
-c "flash write_image $(STMHAL_BUILD_DIR)/bootloader.hex" \
|
|
||||||
-c "reset" \
|
|
||||||
-c "shutdown"
|
|
||||||
|
|
||||||
openocd_flash_firmware: $(STMHAL_BUILD_DIR)/firmware.hex ## flash firmware using openocd
|
|
||||||
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg \
|
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg \
|
||||||
-c "init" \
|
-c "init" \
|
||||||
-c "reset init" \
|
-c "reset init" \
|
||||||
@ -85,13 +76,22 @@ openocd_flash_firmware: $(STMHAL_BUILD_DIR)/firmware.hex ## flash firmware using
|
|||||||
-c "reset" \
|
-c "reset" \
|
||||||
-c "shutdown"
|
-c "shutdown"
|
||||||
|
|
||||||
|
openocd_flash_bl: $(STMHAL_BUILD_DIR)/bootloader.hex ## flash bootloader using openocd
|
||||||
|
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg \
|
||||||
|
-c "init" \
|
||||||
|
-c "reset init" \
|
||||||
|
-c "stm32f4x mass_erase 0" \
|
||||||
|
-c "flash write_image $(STMHAL_BUILD_DIR)/bootloader.hex" \
|
||||||
|
-c "reset" \
|
||||||
|
-c "shutdown"
|
||||||
|
|
||||||
openocd: ## start openocd which connects to the device
|
openocd: ## start openocd which connects to the device
|
||||||
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg
|
openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg
|
||||||
|
|
||||||
gdb: ## start remote gdb session which connects to the openocd
|
gdb: ## start remote gdb session which connects to the openocd
|
||||||
arm-none-eabi-gdb $(STMHAL_BUILD_DIR)/firmware.elf -ex 'target remote localhost:3333'
|
arm-none-eabi-gdb $(STMHAL_BUILD_DIR)/firmware.elf -ex 'target remote localhost:3333'
|
||||||
|
|
||||||
gdb_bootloader: ## start remote gdb session which connects to the openocd
|
gdb_bl: ## start remote gdb session which connects to the openocd
|
||||||
arm-none-eabi-gdb $(STMHAL_BUILD_DIR)/bootloader.elf -ex 'target remote localhost:3333'
|
arm-none-eabi-gdb $(STMHAL_BUILD_DIR)/bootloader.elf -ex 'target remote localhost:3333'
|
||||||
|
|
||||||
load: ## load contents of src into mass storage of trezor
|
load: ## load contents of src into mass storage of trezor
|
||||||
|
Loading…
Reference in New Issue
Block a user