nucleo
diff --git a/Makefile b/Makefile index f1f6dd5..92df884 100644 --- a/Makefile +++ b/Makefile
@@ -11,6 +11,8 @@ @echo "libtock-rs currently includes support for the following platforms:" @echo " - hail" @echo " - nrf52840" + @echo " - nucleo_f429zi" + @echo " - nucleo_f446re" @echo " - opentitan" @echo " - hifive1" @echo " - nrf52" @@ -75,6 +77,22 @@ flash-hail: PLATFORM=hail cargo run $(release) --target=thumbv7em-none-eabi --example $(EXAMPLE) $(features) +.PHONY: nucleo_f429zi +nucleo_f429zi: + PLATFORM=nucleo_f429zi cargo build $(release) --target=thumbv7em-none-eabi --examples $(features) + +.PHONY: flash-nucleo_f429zi +flash-nucleo_f429zi: + PLATFORM=nucleo_f429zi cargo run $(release) --target=thumbv7em-none-eabi --example $(EXAMPLE) $(features) + +.PHONY: nucleo_f446re +nucleo_f446re: + PLATFORM=nucleo_f446re cargo build $(release) --target=thumbv7em-none-eabi --examples $(features) + +.PHONY: flash-nucleo_f446re +flash-nucleo_f446re: + PLATFORM=nucleo_f446re cargo run $(release) --target=thumbv7em-none-eabi --example $(EXAMPLE) $(features) + .PHONY: nrf52840 nrf52840: PLATFORM=nrf52840 cargo build $(release) --target=thumbv7em-none-eabi --examples $(features)
diff --git a/boards/layout_nucleo_f429zi.ld b/boards/layout_nucleo_f429zi.ld new file mode 100644 index 0000000..719dfca --- /dev/null +++ b/boards/layout_nucleo_f429zi.ld
@@ -0,0 +1,17 @@ +/* Layout for the NucleoF429zi, used by the examples in this repository. */ + +MEMORY { + /* The application region is 64 bytes (0x40) */ + FLASH (rx) : ORIGIN = 0x08040040, LENGTH = 255K + SRAM (rwx) : ORIGIN = 0x20004000, LENGTH = 112K +} + +/* + * Any change to STACK_SIZE should be accompanied by a corresponding change to + * `elf2tab`'s `--stack` option + */ +STACK_SIZE = 2048; + +MPU_MIN_ALIGN = 8K; + +INCLUDE layout_generic.ld
diff --git a/boards/layout_nucleo_f446re.ld b/boards/layout_nucleo_f446re.ld new file mode 100644 index 0000000..3e9e3ce --- /dev/null +++ b/boards/layout_nucleo_f446re.ld
@@ -0,0 +1,17 @@ +/* Layout for the NucleoF429zi, used by the examples in this repository. */ + +MEMORY { + /* The application region is 64 bytes (0x40) */ + FLASH (rx) : ORIGIN = 0x08040040, LENGTH = 255K + SRAM (rwx) : ORIGIN = 0x20004000, LENGTH = 176K +} + +/* + * Any change to STACK_SIZE should be accompanied by a corresponding change to + * `elf2tab`'s `--stack` option + */ +STACK_SIZE = 2048; + +MPU_MIN_ALIGN = 8K; + +INCLUDE layout_generic.ld
diff --git a/tools/flash.sh b/tools/flash.sh index f24127e..c2e27a5 100755 --- a/tools/flash.sh +++ b/tools/flash.sh
@@ -20,6 +20,11 @@ binary_name=cortex-m4.elf tockload=n ;; + "nucleo_f429zi"|"nucleo_f446re") + tockloader_flags="" + binary_name=cortex-m4.elf + tockload=n + ;; "nrf52"|"nrf52840") tockloader_flags="--jlink --arch cortex-m4 --board nrf52dk --jtag-device nrf52" binary_name=cortex-m4.elf