adafruit / tinyuf2

UF2 bootloader based on TinyUSB for embedded devices such as ESP32S2, STM32F4 and iMX RT10xx
MIT License
310 stars 170 forks source link

iMXRT10xx Linker Issues #287

Closed gsteiert closed 1 year ago

gsteiert commented 1 year ago

Operating System

Linux

INFO_UF2.TXT

NA

What happened ?

The .hex file generated by the linker script has the virtual memory addresses, not the load addresses, so it is not useful for loading the flash, with the Teensy loader for example. This is my mistake, if I had made the linker scripts correctly, it should be able to create a valid .hex file with the correct flash addresses.

How to reproduce ?

These instructions are for the Teensy 4.x board

  1. Attempt to load the generated .hex file with Teensy Loader. This will corrupt the flash so the board gets stuck in serial download mode.
  2. Convert the .bin to .hex with this command arm-none-eabi-objcopy -I binary -O ihex --change-addresses 0x60000000 tinyuf2-teensy41.bin tinyuf2-teensy41-fix.hex This will generate a .hex file with the proper addresses.

Debug Log

No response

Screenshots

No response

hathach commented 1 year ago

it is totally not your mistake nor anyone mistake. We just simply have not tested the hex file just since migrated bootloader to SRAM. And the sdphost works perfectly since then. Let me pull out my rt1011 since it has on-board daplink that I can flash the hex file with pyocd to test out your suggestion of adding --change-address

hathach commented 1 year ago

fixed by #291