Skip to content

Commit d2f8b5e

Browse files
committed
tinyuf2 working well with rt1176
1 parent dda895f commit d2f8b5e

File tree

12 files changed

+25
-8
lines changed

12 files changed

+25
-8
lines changed

ports/mimxrt10xx/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ UF2_ADDR = $(UF2_$(MCU)_ADDR)
7676

7777
DBL_TAP_REG_ADDR = 0x400D410C
7878

79-
# extract _fcfb_origin and _ivt_origin from linker file
79+
# extract _fcfb_origin from linker file
8080
ifeq ($(FLASH_BUILD),1)
8181
FCFB_ORIGIN := $(shell sed -n 's/_fcfb_origin.*\(0x.*\);/\1/p' $(TOP)/$(PORT_DIR)/linker/$(MCU)_flash.ld)
8282
else
8383
FCFB_ORIGIN := $(shell sed -n 's/_fcfb_origin.*\(0x.*\);/\1/p' $(TOP)/$(PORT_DIR)/linker/$(MCU)_ram.ld)
8484
endif
8585
IVT_ORIGIN := $(shell printf "0x%X\n" $$(( ($(FCFB_ORIGIN) & ~0xFFF) + 0x1000 )))
86+
$(info FCFB_ORIGIN=$(FCFB_ORIGIN) IVT_ORIGIN=$(IVT_ORIGIN))
8687

8788
$(BUILD)/$(OUTNAME).hex: $(BUILD)/$(OUTNAME).elf
8889
@echo CREATE $@
@@ -130,9 +131,9 @@ flash-sdp: $(BUILD)/$(OUTNAME).bin
130131
else
131132
# RAM build: direct load-image (TinyUF2 runs from RAM and self-programs to flash)
132133
flash-sdp: $(BUILD)/$(OUTNAME).bin
133-
@echo "RT1176 RAM Build: Loading TinyUF2 via blhost load-image..."
134-
@echo "TinyUF2 will self-program to flash, then enumerate as USB mass storage."
135-
$(BLHOST) -u 0x1fc9,$(SDP_PID) load-image $<
134+
@if [ -z "$(BLHOST)" ]; then echo SDPHOST is not found for this machine; exit 1; fi
135+
$(PYTHON3) tools/make_ivt0_image.py $< $(BUILD)/$(OUTNAME)_ivt0.bin
136+
$(BLHOST) -u 0x1fc9,$(SDP_PID) load-image $(BUILD)/$(OUTNAME)_ivt0.bin
136137
endif
137138
else
138139
flash-sdp: $(BUILD)/$(OUTNAME).bin

ports/mimxrt10xx/family.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ set(SDP_MIMXRT1062_PID 0x0135)
3636
set(SDP_MIMXRT1064_PID 0x0135)
3737
set(SDP_MIMXRT1176_PID 0x013d)
3838

39-
set(FLASHLOADER_MIMXRT1176_PID 0x0073)
40-
4139
set(UF2_MIMXRT1011_ADDR 0x60000400)
4240
set(UF2_MIMXRT1015_ADDR 0x60000000)
4341
set(UF2_MIMXRT1021_ADDR 0x60000000)

ports/mimxrt10xx/linker/MIMXRT1011_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _ocram_size = 64K;
1111
_fcfb_origin = 0x20206400;
1212
_text_length = 32K - 0x400;
1313

14+
_flash_base = 0x60000000;
15+
1416
/*
1517
* MIMXRT1011 Memory Layout
1618
*

ports/mimxrt10xx/linker/MIMXRT1015_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _ocram_size = 64K;
1111
_fcfb_origin = 0x20208000;
1212
_text_length = 32K - 0x2400;
1313

14+
_flash_base = 0x60000000;
15+
1416
/*
1517
* MIMXRT1015 Memory Layout
1618
*

ports/mimxrt10xx/linker/MIMXRT1021_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _ocram_size = 128K;
1111
/* The bootrom uses up to 0x20207FFF */
1212
_fcfb_origin = 0x20208000;
1313

14+
_flash_base = 0x60000000;
15+
1416
/*
1517
* MIMXRT1021 Memory Layout
1618
*

ports/mimxrt10xx/linker/MIMXRT1024_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _ocram_size = 128K;
1111
/* The bootrom uses up to 0x20207FFF */
1212
_fcfb_origin = 0x20208000;
1313

14+
_flash_base = 0x60000000;
15+
1416
/*
1517
* MIMXRT1024 Memory Layout
1618
*

ports/mimxrt10xx/linker/MIMXRT1042_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _ocram_size = 256K;
1111
/* The bootrom uses up to 0x20207FFF */
1212
_fcfb_origin = 0x20208000;
1313

14+
_flash_base = 0x60000000;
15+
1416
/*
1517
* MIMXRT1042 Memory Layout
1618
*

ports/mimxrt10xx/linker/MIMXRT1052_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _ocram_size = 256K;
1111
/* The bootrom uses up to 0x20207FFF */
1212
_fcfb_origin = 0x20208000;
1313

14+
_flash_base = 0x60000000;
15+
1416
/*
1517
* MIMXRT1052 Memory Layout
1618
*

ports/mimxrt10xx/linker/MIMXRT1062_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ _ocram_size = 256K;
1515
/* in section 9.6.1.2, so start at 0x1000 */
1616
_fcfb_origin = 0x20208000;
1717

18+
_flash_base = 0x60000000;
19+
1820
/*
1921
* MIMXRT1062 Memory Layout
2022
*

ports/mimxrt10xx/linker/MIMXRT1064_ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ _ocram_size = 256K;
1515
/* in section 9.6.1.2, so start at 0x1000 */
1616
_fcfb_origin = 0x20208000;
1717

18+
_flash_base = 0x70000000;
19+
1820
/*
1921
* MIMXRT1064 Memory Layout
2022
*

0 commit comments

Comments
 (0)