Merge #190 190: Added i.MX RT 1050 board support r=valexandru a=valexandru This adds the memory layout for building applications for the i.MX RT 1050 board support. Co-authored-by: Vochescu Alexandru <alexvochescu@gmail.com>
diff --git a/Makefile b/Makefile index 87b6a10..5218010 100644 --- a/Makefile +++ b/Makefile
@@ -16,6 +16,7 @@ @echo " - opentitan" @echo " - hifive1" @echo " - nrf52" + @echo " - imxrt1050" @echo " - apollo3" @echo @echo "Run 'make setup' to setup Rust to build libtock-rs." @@ -152,6 +153,15 @@ flash-nrf52: PLATFORM=nrf52 cargo run $(release) --target=thumbv7em-none-eabi --example $(EXAMPLE) $(features) +.PHONY: imxrt1050 +imxrt1050: + PLATFORM=imxrt1050 cargo build $(release) --target=thumbv7em-none-eabi --examples $(features) + +.PHONY: flash-imxrt1050 +flash-imxrt1050: + PLATFORM=imxrt1050 cargo run $(release) --target=thumbv7em-none-eabi --example $(EXAMPLE) $(features) + + .PHONY: clean clean: cargo clean
diff --git a/boards/layout_imxrt1050.ld b/boards/layout_imxrt1050.ld new file mode 100644 index 0000000..56ecf11 --- /dev/null +++ b/boards/layout_imxrt1050.ld
@@ -0,0 +1,17 @@ +/* Layout for the iMX.RT1050 board, used by the examples in this repository. */ + +MEMORY { + /* The application region is 64 bytes (0x40) */ + FLASH (rx) : ORIGIN = 0x63002040, LENGTH = 0xFFFFC0 + 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/tools/flash.sh b/tools/flash.sh index 1a7d74c..cee7571 100755 --- a/tools/flash.sh +++ b/tools/flash.sh
@@ -40,6 +40,11 @@ binary_name=rv32imac.elf tockload=n ;; + "imxrt1050") + tockloader_flags="" + binary_name=cortex-m7.elf + tockload=n + ;; "opentitan") tockloader_flags="" binary_name=rv32imc.elf