Fabio Utzig | d7f6c76 | 2017-07-27 20:50:50 -0300 | [diff] [blame] | 1 | BLINKY := k64f_blinky |
| 2 | BLINKY2 := k64f_blinky2 |
| 3 | |
| 4 | SLINKY := k64f_slinky |
| 5 | SLINKY2 := k64f_slinky2 |
| 6 | |
| 7 | BOOT_RSA := k64f_boot_rsa |
| 8 | BOOT_RSA_PSS := k64f_boot_rsa_pss |
| 9 | BOOT_EC := k64f_boot_ec |
| 10 | BOOT_EC256 := k64f_boot_ec256 |
| 11 | BOOT_RSA_EC := k64f_boot_rsa_ec |
| 12 | BOOT_RSA_VALIDATE0 := k64f_boot_rsa_validate0 |
| 13 | BOOT_RSA_NOSWAP := k64f_boot_rsa_noswap |
| 14 | |
| 15 | RSA_KEY_1 := key_rsa.pem |
| 16 | RSA_KEY_2 := key_rsa_2.pem |
| 17 | |
| 18 | BLINKY2_IMG := bin/targets/$(BLINKY2)/app/apps/blinky/blinky.img |
| 19 | |
| 20 | FLASH_ERASE := pyocd-flashtool -ce |
| 21 | |
| 22 | NEWTMGR_CONN := --conn k64f |
| 23 | NEWTMGR_IMG := newtmgr $(NEWTMGR_CONN) image |
| 24 | |
| 25 | all: build-apps build-mcuboot |
| 26 | |
| 27 | build-blinky: |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 28 | @echo "* Building blinky for the primary slot... \c" |
Fabio Utzig | d7f6c76 | 2017-07-27 20:50:50 -0300 | [diff] [blame] | 29 | @newt build -q $(BLINKY) |
| 30 | @echo "ok" |
| 31 | |
| 32 | build-blinky2: |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 33 | @echo "* Building blinky2 for the secondary slot... \c" |
Fabio Utzig | d7f6c76 | 2017-07-27 20:50:50 -0300 | [diff] [blame] | 34 | @newt build -q $(BLINKY2) |
| 35 | @echo "ok" |
| 36 | |
| 37 | build-slinky: |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 38 | @echo "* Building slinky for the primary slot... \c" |
Fabio Utzig | d7f6c76 | 2017-07-27 20:50:50 -0300 | [diff] [blame] | 39 | @newt build -q $(SLINKY) |
| 40 | @echo "ok" |
| 41 | |
| 42 | build-slinky2: |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 43 | @echo "* Building slinky2 for the secondary slot... \c" |
Fabio Utzig | d7f6c76 | 2017-07-27 20:50:50 -0300 | [diff] [blame] | 44 | @newt build -q $(SLINKY2) |
| 45 | @echo "ok" |
| 46 | |
| 47 | build-boot-rsa: |
| 48 | @echo "* Building mcuboot with RSA... \c" |
| 49 | @newt build -q $(BOOT_RSA) |
| 50 | @echo "ok" |
| 51 | |
| 52 | build-boot-rsa-pss: |
| 53 | @echo "* Building mcuboot with RSA/PSS... \c" |
| 54 | @newt build -q $(BOOT_RSA_PSS) |
| 55 | @echo "ok" |
| 56 | |
| 57 | build-boot-ec: |
| 58 | @echo "* Building mcuboot with EC... \c" |
| 59 | @newt build -q $(BOOT_EC) |
| 60 | @echo "ok" |
| 61 | |
| 62 | build-boot-ec256: |
| 63 | @echo "* Building mcuboot with EC256... \c" |
| 64 | @newt build -q $(BOOT_EC256) |
| 65 | @echo "ok" |
| 66 | |
| 67 | # FIXME: multi-key signing does not work yet... |
| 68 | build-boot-rsa-ec: |
| 69 | @echo "* Building mcuboot with RSA + EC... \c" |
| 70 | @newt build -q $(BOOT_RSA_EC) |
| 71 | @echo "ok" |
| 72 | |
| 73 | build-boot-rsa-validate0: |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 74 | @echo "* Building mcuboot with primary slot validation... \c" |
Fabio Utzig | d7f6c76 | 2017-07-27 20:50:50 -0300 | [diff] [blame] | 75 | @newt build -q $(BOOT_RSA_VALIDATE0) |
| 76 | @echo "ok" |
| 77 | |
| 78 | build-boot-rsa-noswap: |
| 79 | @echo "* Building mcuboot with overwrite only upgrade... \c" |
| 80 | @newt build -q $(BOOT_RSA_NOSWAP) |
| 81 | @echo "ok" |
| 82 | |
| 83 | build-apps: build-blinky build-blinky2 build-slinky build-slinky2 |
| 84 | |
| 85 | build-mcuboot: build-boot-rsa build-boot-rsa-pss build-boot-ec \ |
| 86 | build-boot-ec256 build-boot-rsa-validate0 build-boot-rsa-noswap |
| 87 | |
| 88 | clean: |
| 89 | rm -rf bin/ |
| 90 | |
| 91 | .PHONY: all clean |