#tinyuf2

1 messages · Page 3 of 1

rocky ridgeBOT
nocturne trench
#

Any guidance for debugging MSC configuration issues? I'm working on a new port and the drive does not appear. Looks like some MSC control transfers are stalling based on the logs

#

Log level 1:

TinyUF2
Start DFU mode
DCD XFER fail 0 0 40 80088
usbd_control_xfer_cb 216: ASSERT FAILED

#

Log level 2 is busy, but here is where it looks suspicious

USBD Setup Received 80 06 05 03 09 04 10 00
Get Descriptor String[5]
Queue EP 80 with 16 bytes ...
USBD Xfer Complete on EP 80 with 16 bytes
Queue EP 00 with 0 bytes ...
USBD Xfer Complete on EP 00 with 0 bytes

USBD Setup Received A1 21 00 00 00 00 07 00
MSC control request
Stall EP0

USBD Setup Received 21 22 00 00 00 00 00 00
MSC control request
Stall EP0

USBD Setup Received 21 20 00 00 00 00 07 00
MSC control request
Stall EP0

USBD Setup Received A1 21 00 00 00 00 07 00
MSC control request
Stall EP0

USBD Setup Received 21 0A 00 00 01 00 00 00
HID control request
Queue EP 80 with 0 bytes ...
USBD Xfer Complete on EP 80 with 0 bytes

sinful patrol
#

@nocturne trench my guess is that the stall occurs because the data read in is wrong

#

(I highly recommend having a beagle usb sniffer when debugging usb)

nocturne trench
#

I've got a Luna on order. I'll take another look at the reads.

rocky ridgeBOT
rocky ridgeBOT
#

Apologies for not running a test build to catch the ifndef/endif; test build has been run on these changes.

While we're testing firmware bring-up on this board (CircuitPython), it will be very handy to use a wired-up NeoPixel. I can later remove it from board.h.

Sounds fine. You should probably add the LED that is on the board to the board.h file. It does provide feedback when in UF2 mode (a breathing/pulsing)
I have built and tested tinyuf2 and circuitpython and both w...

rocky ridgeBOT
rocky ridgeBOT
#

Apologies for not running a test build to catch the ifndef/endif; test build has been run on these changes.

While we're testing firmware bring-up on this board (CircuitPython), it will be very handy to use a wired-up NeoPixel. I can later remove it from board.h.

If the board does not come with neopixel in production, please comment out these line, you could keep an local modified copy for testing.

rocky ridgeBOT
rocky ridgeBOT
#

f60d484 Add board Lolin S2 Mini - durapensa
d595df0 Add board Lolin S2 Mini - fix compile error in ... - durapensa
4c1b934 Add board Lolin S2 Mini - fix for onboard LED i... - durapensa
0eb4dac Add board Lolin S2 Mini - add pragma in board.h - durapensa
56d34a4 Add board Lolin S2 Mini - comment out NeoPixel ... - durapensa

civic wyvern
#

Can verify the S2 Mini tinyuf2 build works on actual hardware (which is just now starting to arrive for early orders, @jade solar and @obtuse wraith still haven't gotten theirs yet as far as I'm aware)

jade solar
# civic wyvern Can verify the S2 Mini tinyuf2 build works on actual hardware (which is just now...

still waiting on my board to arrive. do you know the process for the s2mini-built tinyuf2 to be incorporated into the .BIN download at https://circuitpython.org/board/lolin_s2_mini/ ? (makermelissa added the board today in a big pr. And flashing instructions?

Features based ESP32-S2FN4R2 WIFI IC Type-C USB 4MB Flash 2MB PSRAM 27x IO ADC, DAC, I2C, SPI, UART, USB OTG Compatible with LOLIN D1 mini shields Compatible with MicroPython, Arduino and ESP-IDF Default firmware: MicroPythonPurchase AliExpressContributeHave some info to add for this bo...

jade solar
jade solar
rocky ridgeBOT
#

I'm trying to add support for WeAct MiniSTM32H7xx

The device has 128K internal flash and 8MB QSPI flash and I cannot figure out how to implement flash routines to accommodate all the flash memories.

Pending

  • [ ] board_self_update
  • [ ] board_flash_erase_app
  • [ ] board_flash_write
  • [ ] board_flash_read
  • [ ] board_flash_flush
  • [ ] board_flash_init
  • [ ] board_flash_size
  • [ ] board_app_valid

tinyusb enumeration and display works but...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

I would appreciate any help I can get.

For external flash partition make sure you follow the circuitpython stm32 partition scheme https://github.com/adafruit/circuitpython/tree/main/ports/stm/boards

Looking at the circuitpython repo, I am still quite unsure of what the stm32 partition scheme is and how it would affect tinyuf2. I'm going to try and get the QSPI and SPI memories working first and then continue with the backlog. Ideally I would want all of the memory devices to be avai...

rocky ridgeBOT
rocky ridgeBOT
#

@petejohanson when I copy a zephyr generated uf2 file to blackpill 401 flashed with tinyuf2 bootloader it seems to somehow overwrite the bootloader as the copied uf2 nor the bootloader seems to work anymore until I flash the bootloader again with stlink.
Any idea what might be going on?

The key thing is to update the board definition (or add an overlay to do so), that adds the right flash partition layout to account for the bootloader. Example here: https://github.com/petejohanson/zmk...

rocky ridgeBOT
jade solar
#

Will a new release for TinyUF2 happen before CircuitPython 7.0.0? Asking because of the new ESP32-S2 boards.

rocky ridgeBOT
#

@petejohanson many thanks for the detailed steps. I am using the latest Zephyr and made the changes you have suggested and build it after deleting the build folder. The uf2 bootloader is not getting overwritten anymore, which is a step forward.
However the code also does not seem to be running - I am building the sample/basic/blinky from the zephyr.

Very odd. Can you post a gist w/ the final .config you end up with?

sinful patrol
#

@jade solar is there a reason to do it? I thought they were separate

jade solar
#

for users of the ESP32-S2 boards released since July 30, there's no available TinyUF2 firmware (for some it was factory installed)

#

having it available makes first-time use easier (i.e. need to use esptool, command line or web, only once, then all other CircuitPython upgrades are via UF2)

sinful patrol
#

👍 we should be able to do a release

#

is there an issue for it?

jade solar
#

I can make an issue if that would help

sinful patrol
#

ya, I think so. thach would do the release

jade solar
#

okay, will do.

rocky ridgeBOT
jade solar
#

Same could be done for uf2-samdx1 for the Proximity Trinkey (for the case of repairing a damaged/overwritten UF2 bootloader, like the in the MagTag & FunHouse guides)

rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Linux

INFO_UF2.TXT

TinyUF2 Bootloader 0.5.2 - tinyusb (0.10.1-109-g9b3ec69b)
Model: Lolin S2 Mini
Board-ID: ESP32S2FN4R2-S2Mini-1-0-0
Date: Sep  8 2021

What happened ?

When writing update-tinyuf2-lolin_s2_mini-0.5.2.uf2, OS reports WRITE I/O error, seemingly because of USB disconnect.

Board resets back to UF2 bootloader mode, with previously flashed firmware gone (user_fs FAT partitions seems okay).

Related #138 ?

How to reproduce ...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

I have added SPI and QSPI W25Qx drivers from the MiniSTM32H7xx repository. Still in early stages but you can somewhat load code into the QSPI memory and jump to it. I tried loading a simply blinky program to the QSPI flash. The interrupts seem to break after jumping to the QSPI code.

  1. Implemented: board_flash_init which initializes the SPI flash and disables memory mapped mode on the QSPI flash to allow writes
  2. Implemented: board_flash_size returns 8MB. (Even though the total flas...
rocky ridgeBOT
gleaming lantern
#

Having an issue on a ESP32S2 with CircuitPython not flashing properly, can anyone familiar with TinyUF2 lend a hand?

update.uf2 files are not currently working on ESP32-S2 boards. Oh.

jade solar
gleaming lantern
jade solar
#

Is that to flash a circuitpython.bin or a TinyUF2 combined.bin?

gleaming lantern
jade solar
#

And what's the error or fail mode?

#

note that CircuitPython expects a fat partition to store files, including code.py & any added libraries. TinyUF2's combined.bin provides that fat partition.

vagrant onyx
#

The flash command should be something like

#

Where COMn is whatever your board comes up as.

#

Board should be put in bootloader mode first

rocky ridgeBOT
#

Hi @hathach :)

I'm working on ESP32-S3 support for CPY and that means we'll also need support for S3 in TinyUF2 and that requires being on the latest master IDF branch - 4.4.bleeeeeeeeeding edge, and we'll also need to stay updated often.

I'm happy to do the work on this, but I wanted to check it's ok before I start as it may need a substantial change like CPY needed - where we seperate esp32s2 and esp32s3 stuff into partitioned folders.

So can you all let me know if there is a pre...

rocky ridgeBOT
#

Hi @hathach :)

I'm working on ESP32-S3 support for CPY and that means we'll also need support for S3 in TinyUF2 and that requires being on the latest master IDF branch - 4.4.bleeeeeeeeeding edge, and we'll also need to stay updated often.

That is great to hear, which branch/tag IDF you plan to make an upgrade, there is an new 4.3.1 which is released just a week ago. Once tested locally, please make PR to update IDF as standalone, it help to get it merged quickly.

I'm happy to...

#

That is great to hear, which branch/tag IDF you plan to make an upgrade, there is an new 4.3.1 which is released just a week ago. Once tested locally, please make PR to update IDF as standalone, it help to get it merged quickly.

It has to be latest master (4.4-dev), and it will need to kept updated constantly as work on the S3 IDF stuff continues.
S2 is also working fine in 4.4-dev - The CPY work I've done moved S2 to IDF 4.4-dev as well.

For folder changed, there is 2 ways w...

rocky ridgeBOT
#

It has to be latest master (4.4-dev), and it will need to kept updated constantly as work on the S3 IDF stuff continues.
S2 is also working fine in 4.4-dev - The CPY work I've done moved S2 to IDF 4.4-dev as well.

I have no issue with latest maser, though I still prefer to stick with tag/release since bootloader doesn't use much from IDF, mostly its peripherals and soc driver only. Anyway, please do update to whatever version that would work, eventual we will have an release/tag that wo...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

I have made some changes to the PR, but couldn't push it to your fork to update this PR due to permission. Please set your fork to allow maintainer to have write permission, or simply grant me write permission

I have invited you as a collaborator on my fork. Hopefully this is what you are asking for. Thanks for looking at the PR

thanks for the invitation, actually, I just fiugred out I made an typo in the push command previously. Anyway, I pushed the changes, mostly some format ...

rocky ridgeBOT
rocky ridgeBOT
#

Tested and is working but will need more thorough testing.

Known issues

  • Unsure what family ID we should use. Currently using the same ID as the F4 port.

  • Self updates not supported

  • The user button is currently unused, but could be used to trigger different modes.

  • corrupt application firmware is not detected. I'll address this, both in application binary files and in application firmware stored on device memory.

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
civic wyvern
# rocky ridge

Well, that saves me the bother of doing a pull request for my pico bringup.

rocky ridgeBOT
vagrant onyx
civic wyvern
#

And it seems like every one I've seen has a crooked OLED

#

Including the ones on Lolin's wiki and product page on Aliexpress

rocky ridgeBOT
rocky ridgeBOT
#

I have most things working and implemented now, but there are a few things to test (writing data to SPI flash, self-update and uf2 read). I could test them out along with the review.

The flash driver code isn't very pretty but it works, so I will leave it as is till I can find a portable working replacement. Also the port doesn't handle PFLASH right now (since my board only has the single sector, single bank variant)

hardy bridge
#

@coral wind So I'm trying to flash TinyUF2 on a FeatherS2, and it appears to flash successfully, but then when I reset I don't get a UF2 boot disk. Did I do something wrong?

errant plover
#

(combined.bin from tinyuf2-unexpectedmaker_feathers2-0.5.2.zip in the release page of tinyuf2)

#

UF2 files are a special format for dropping on the UF2 bootloader drive, not flashing with esptool

#

(UM has put instructions here https://feathers2.io/install_uf2.html but the combined.bin file has been added more recently, and simplifies the command. Note how the original command puts multiple bin files in different places)

hardy bridge
#

Ahh, I feel dumb now XD somehow I missed that was the wrong file

hardy bridge
errant plover
#

no, it's just all the parts of tinyUF2

hardy bridge
#

Ohh, ok. Well, I can use it now, thanks!

coral wind
#

Thanks @errant plover 🙂

rocky ridgeBOT
#

For some reason, I can't compile for ESP32 S2 but I managed to get it fixed by changing this.

Original error

Traceback (most recent call last):
File "C:\esp-idf\components\partition_table\check_sizes.py", line 148, in
main()
File "C:\esp-idf\components\partition_table\check_sizes.py", line 142, in main
check_bootloader(args.offset, int(args.bootloader_offset, 0), args.bootloader_binary)
ValueError: invalid literal for int() with base 0: 'CONFIG_BOOTLOADER_OFFSET_IN_F...

rocky ridgeBOT
rocky ridgeBOT
#

could you provide the git hash of your esp-idf, make sure it is the same as one pointed by submodule under lib/ https://github.com/adafruit/tinyuf2/tree/master/lib

I was using the latest development branch because I was attempting port tinyuf2 to ESP32S3. I tried recompile with e9cf9e2978 but it won't even compile now.
I'm currently getting a lot of issues like those

/tinyuf2/lib/esp-idf/components/newlib/newlib_init.c:85:6: error: 'struct syscall_stub_table' has no member named '...

maiden hearth
#

If I understand correctly, for esp32s2, tinyuf2 will always update ota_0 and won't touch ota_1. Is there any reason that I need to keep ota_1 partition?

earnest sentinel
maiden hearth
#

So I can just remove it from my partition table?

earnest sentinel
#

I haven't tried removing it but just editing the partition table should probably work.

maiden hearth
#

Alright thx

#

I think have uf2 as a fallback is good enough

maiden hearth
#

Also is there a reason not to merge UF2 with second stage bootloader?

#

I assume for self update?

vagrant onyx
#

I've pulled the OTA1 out to make a larger partition for some debug builds. At that time (few months ago) I only changed the partition table. Memory being what it is i might be wrong

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
coral wind
#

I'm unable to build tinyuf2 (just grabbed latest) for esp32s2. Anyone else confirm this is really working with IDF4.4? @sinful patrol have you confirmed this builds?

#

getting stacks of usb hal compile errors

#

i've mad sure I've run submodule update --init --recursive and a submodule sync

#

i'm on the correct idf version (from lib/esp-idf)

#

I can build if I use my external idf (4.4) repo, but nothing I do to the included on in /lib allows me to build 😦

#

maybe something old/bad lingering in my tinyuf2 repo?

#

I did a reset --hard - but no help.

sinful patrol
#

no, I haven't tried it

vagrant onyx
#

I've built it here (a few minutes ago) for the UM Neo. WSL2. I usually do a fullclean when changing IDF versions.

#

Also for the feathers2

Generated /home/bsegal/Projects/tinyuf2/ports/esp32s2/_build/unexpectedmaker_feathers2/tinyuf2.bin
[1063/1063] cd /home/bsegal/Projects/tinyuf2/ports/esp32s2...ports/esp32s2/_build/unexpectedmaker_feathers2/tinyuf2.bin
tinyuf2.bin binary size 0x22d40 bytes. Smallest app partition is 0x40000 bytes. 0x1d2c0 bytes (46%) free.
rocky ridgeBOT
rocky ridgeBOT
maiden hearth
coral wind
maiden hearth
#

Oh

#

Yea I will try use my 4.4-release

#

Btw few days ago I saw adafruit posted a video with a featherS2 with a S3mini module swap and in the video mentioned you made a build of Micropython for S3. I don’t know anything about micropython but does that means you got tinyuf2 running on s3?

#

I don’t see anything about s3 in the repo yet

coral wind
#

MicroPython doesn't use U2F bootloaders.

maiden hearth
#

So it just have a MSC loader?

coral wind
#

No, it just presents itself as a serial device. MP doesn't offer a USB drive like CP.

rocky ridgeBOT
rocky ridgeBOT
vagrant onyx
civic wyvern
#

Once espressif idf issues are worked out are there plans to roll another release out? There's a few boards new since 7.0 that have dead links for tinyuf2 on their CP download pages.

vagrant onyx
#

Has some decision been made about changing the folder name to accommodate the esp32s3? Perhaps moving to espressif as circuitpyrhon has? Thanks

rocky ridgeBOT
#

A custom BOARD_DIR allows to use tinyuf2 for example as Git submodule in another project that has its own board.h and board.mk.
To set the (absolute or relative) path to your board directory just run:
make BOARD= BOARD_DIR= ...

A custom APP_START allows to use tinyuf2 for applications with other start vectors than the hard-coded default in tinyuf2.
To set the start vector of your application just run:
make APP_START=0x08020000 ...
or define it in your "board.h" with:
`#define BOA...

rocky ridgeBOT
#

Thank you for your PR though

  1. tinyuf2's internal makefile will continue to change and may not work with other project. It would be better that your application have its own makefile (by duplicating and modifying tinyuf2)
  2. BOARD_FLASH_APP_START can be defined per board within its board.h . We don't really need to introduce the APP_START, just wrap the BOARD_FLASH_APP_START with ifndef is good enough. This should be done in its own PR since (1) is not accepted.
rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Windows 10

INFO_UF2.TXT

N/A

What happened ?

The "download bootloader zip" link from the circuitpython.org board page for the Lolin Pico S2 (https://circuitpython.org/board/lolin_s2_pico/) indicates there should be a bin file for the board in the latest release, but the bin file does not exist and the link is broken.

How to reproduce ?

Go to https://circuitpython.org/board/lolin_s2_pico/
Click the "Download Bootloader Zip" button
The bin file is "not f...

rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Linux

INFO_UF2.TXT

There is no need of info_uf2.txt file.

What happened ?

I'm unable to build current release for stm32f4, also there is no update img in github release.

How to reproduce ?

  1. Make sure you are up to date with master branch and submodules
  2. Check if your gcc version is:
arm-none-eabi-gcc (Arch Repository) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions....
maiden hearth
#

Anyone know how I can fix the compile issue?

#

Could NOT find Perl (missing: PERL_EXECUTABLE)

#

Could this be the issue?

maiden hearth
#

That seems unrelated

maiden hearth
#

my own esp idf 4.4 works

rocky ridgeBOT
rocky ridgeBOT
maiden hearth
#

Anyone knows what does flashing purple means for TinyUF2?

#

I uploaded a UF2 but it doesn't enter the program

#

I guess it is waiting if user wants to enter uf2

#

but it won't stop flashing

normal tusk
#

I'm pretty sure, purple is for during the double tap wait

#

uint8_t const RGB_DOUBLE_TAP[] = { 0x80, 0x00, 0xff }; // Purple

#

Did you configure the wait time to be something big?

maiden hearth
#

Switching to another board fixed the issue

rocky ridgeBOT
rocky ridgeBOT
nocturne trench
sinful patrol
#

@nocturne trench it may be better to discuss in a PR to tinyuf2 where thach will see it

rocky ridgeBOT
rocky ridgeBOT
#

Adding support for two K32L2B3 based boards, the FRDM-K32L2B3 and the KUIIC board.

This required an update to TinyUSB to get support for the K32L2B and I had to make some edits to other ports to fix the build. One notable edit is that I removed net_device.c from the builds since this file has been replaced by two different files and it is not clear if it is required or which of the new files to use. The builds are working without this file included.

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Yes, that is the numbers they signed for this.
I can dm the message if that helps.
Thanks,
Greg

Get Outlook for iOShttps://aka.ms/o0ukef


From: Ha Thach @.***>
Sent: Monday, December 20, 2021 8:44 PM
To: adafruit/tinyuf2
Cc: Greg Steiert; Author
Subject: [EXT] Re: [adafruit/tinyuf2] Feature kuiic (PR #168)

Caution: EXT Email

@hathach commented on this pull request.


In ports/k32l2/boards/frdm-k32l2b/board.h<https://...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Oh that's crazy - I was working on trying to get S3 going on Tuesday, and got close, but was not able to get past the last few compile errors... and then today I see this!
Gonna give it a whirl now!

Let me know if you spot any issue

It's actually working great! I have created folders for my 3 new ESP32-S3 boards, and built all of them and they boot perfectly - except I've not been able to build CircuitPython for the S3, so I don't have anything to copy onto them to check th...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Operating System

MacOS

INFO_UF2.TXT

TinyUF2 Bootloader 0.6.2-29-g06a65c8 - esp-idf (v4.4-dev-3608-gbbe2a1bf34) tinyusb (0.12.0-203-ga4cfd1c6)
Model: Unexpected Maker TinyS3
Board-ID: ESP32S3-TinyS3-01
Date: Dec 27 2021

What happened ?

I'm using IO47 for my PIN_DOUBLE_RESET_RC and it's not working and I'm not sure why.

Datasheet shows that it's Reset mode is E1 (Input enabled) but it's default function is (F0) - SPICLK_P_DIFF which is O/T, not GPIO47 which is I/O/T - (F1...

rocky ridgeBOT
#

the JTAG pins are special, they cannot be used for the RC double-click because the boot in JTAG mode, i think pins 38 and below are ok

Hmm, ok, but 47 and 48 are not JTAG pins. They are the new pins on the S3 that you can connect an external XTAL to for SPI clock sync, but maybe because they are connected to the VDD_SPI power domain, that's why it's not working.. though VDD_SPI is 3v3 on my boards, and a common GND, and I can see it's the correct voltage on the scope.

And VDD_SPI is b...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Sorry for the delayed response. There are some issues with this update. The image runs after loaded but does not run from flash (RT1010 EVK). Let me try to clean this up. This PR should probably be reverted.

I tested with rt1010 evk and seems to work well. This PR essentially does not make any changes in the compile binary. It only add the sed script to extract the _fcfb_origin and _ivt_origin from the linker file. Which OS you are using, I haven't tested on windows, maybe adding thi...

rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Others

INFO_UF2.TXT

NA

What happened ?

There is a board naming inconsistency between Circuitpython and tinyuf2 for the Lolin S2 Pico. This is causing the templating for the tinyuf2 download on circuitpython.org board page to be a dead link.

CP: lolin_s2_pico tinyuf2: lolin_s2-pico - I think tinyuf2 is the inconsistent one here in that other tinyuf2 board names use all underscores.

How to reproduce ?

Go to https://circuitpython.org/board/lolin_s2_pico...

civic wyvern
#

I would try to fix this myself, but I don't know what the implications of changing a board name are.

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Sorry for the delay on replying here... I spent 2 full days on this, and the results are not good news.

I cannot get this to work on any final production silicon I have here, on any board of mine, on any IO - no matter if the components are onboard or connected externally on a breadboard or soldered directly to the header pins.

But... I can get it to work with any IO including IO47 on my S3-DevkitC on a breadboard... the thing is, my DevKitC is using pre-production silicon - not f...

rocky ridgeBOT
#

Just some extra info on things I tried....

  • I set the IO to Input instead of setting it to low at the end of the function, so try to prevent it from draining through the IO. Doesn't work as it seems resetting the S2 puts the IO into a specific starting state and it drains anyway.
  • I've removed the discharge resistor completely, meaning the cap can only discharge back into the IO and I can confirm the cap stays charged until reset it pressed again, but instantly drops.
  • Tried lots of ca...
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

fix double tap issue, fix #176 . Root cause: gpio_ll_set_level() is used in version 0.7.0 since S3 gpio rom does not have gpio_output_set_high(), unlike rom API, gpio_ll needs to explicitly enable output first.

@ladyada while working on thks issue, I figured out that esp_rom_gpio_pad_select_gpio() can also be used to get JTAG pin working as double tap pin. Therefore there is no restriction on JTAG pin after this got merged.

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#
  • favicon icon + autorun only work with windows, but nice to have
  • feature can be enable per board by adding #define TINYUF2_FAVICON 1. Enabled on esp32s2 saola 1 wrover as example
  • add adafruit logo as favicon.h (256x256 with only 7.5KB) as example for now. We could have a final per-project (tinyuf2 logo) or even per-board favicon later if needed.

@ladyada This PR took longer than expected since we need to update and extend the ghostfat to support static files with size larger tha...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Should favicon.h be in the common source directory, or should it instead be created in each board's subdirectory?

I think since the icon should be customizable on a per-board basis, it should be placed into each board's directory. Or, at the minimum, provide a way to override the default favicon.

This is just initial implementation. There would be an project-wide icon which is in the src directory. The board-specific icon will be supported as well. I am thinking to have TINYUF2_...

#

Because the new code allows for >1 sector per file, there is now higher risk of files having FAT chain beyond the first sector of each FAT.

I will look at either (1) adding necessary static_assert to ensure this is avoided, or (2) fixing the FAT chain code to work always.

You are right, I will update PR to include the check/warning or fix the code if I could do it quickly. I am off until next week, will do this in the next week.

Btw if you are making changes to your branch, w...

rocky ridgeBOT
rocky ridgeBOT
#

Operating System

MacOS

INFO_UF2.TXT

empty

What happened ?

just built latest from masterful my S3 boards, as a final test before I committed the to the repo, and though they work fine, the info_uf2.txt is empty.

How to reproduce ?

Not sure how you can repo this. I lent out my S3 devkit, so cant test it on that here, but it might also have the same issue.

Debug Log

No response

Screenshots

No response

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

.github/workflows/...

  • Moves self-test to new job runner (now ESP, ARM, self-test)

ports/test_ghostfat/boards/...

  • updated known-good images (Note: This was done BEFORE updating how FAT was generated)
  • add new boards to include a favorites icon
  • slightly updated debug output

src/ghostfat.c

  • Update macro UF2_DIV_CEIL -- avoid undefined behavior from overflow with signed inputs
  • Change TextContent to FileContent to reflect ability to store binary...
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

For chips that use a partition, perhaps it would be possible to update to expose each of the partitions as UF2 binaries?

This would require:

  1. ability for boards to indicate, at initialization time (uf2_init), at least:
    a. the number of partitions to expose
    b. the start and end address for each exposed partition
    c. optionally, an 8.3 fat-compliant filename for each exposed partition
  2. update ghostfat to:
    a. use embedded-safe C++11
    b. rework major portions to ...
rocky ridgeBOT
rocky ridgeBOT
#

The USB peripheral on the C3 is not usable for TinyUF2. From Espressif
"Note that, in contrast with the USB OTG peripheral in some Espressif chips, the USB Serial/JTAG Controller is a fixed function device, implemented entirely in hardware. This means it cannot be reconfigured to perform any function other than to provide a serial channel and JTAG debugging functionality."

rocky ridgeBOT
#

uf2 is separate from CircuitPython. You'll want the Absolute Newest version of CircuitPython because we've fixed some crashes last. Please note that it's for advanced users only right now because the CIRCUITPY drive cannot work without native USB. In the long term we want to support the BLE workflow but that isn't currently working.

rocky ridgeBOT
#

@henrygab thank you for your informative input, though, I think bootloader should just focus on updating the firmware anything that relates to firmware usages such as its file system should be done by firmware itself. For embedded C++, I don’t think we need to migrate to it since not all MCUs have C++ compiler for it and we actually don’t have to do complicated thing within bootloader. I agree with defensive coding style, but it is best to write as little code as possible.

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Thank you @henrygab for actively helping with PRs. I really appreciate your review and inut, the ghostfat is getting better and better and could support pre-defined large file size. I think it gets to the point we could make an Adafruit_GhostFAT arduino library to help exposing data/log/variable (read-only) on board that have limited space or just don't want to deal with file system and/or partitioning.

rocky ridgeBOT
rocky ridgeBOT
#

Driven by a remark that bootloader protection is still pending I implemented it for the STM32F4 family.

For broader use a new board level function is introduced board_flash_protect_bootloader(). All other ports are currently implemented as stubs.

On the STM32F4 family tinyuf2 occupies the first four flash sectors. The overwrite protection is enabled by setting the option bytes nWRP register in the flash peripheral. This is done when flashing has been finished and the app is about to b...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

@tannewt SAMD & nRF52 CURRENT.UF2 includes all internal flash contents therefore also include internal file system e.g nvm if available but not the file system on external flash. The S2/S3 has different partitions for firmware, nvm, file system and they may not be continuous, You probably understand this better than me.

For S2/S3, currently tinyuf2 limit itself within the firmware(ota) partition to prevent overwriting to other partitions. Therefore the address in uf2 is starting from ...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

FYI:

ESP32 appears to be hard-coded to only allow writes to the ota1 partition.

Moreover, the offset stored in existing .uf2 files is a relative offset for that ota partition.

Ghostfat has no concept of which file is being written to, and IO can be re-ordered by the time the device sees it (e.g., no guarantee that sector 0 will be seen as written by device before sector 10). Therefore, you cannot simply insert a "switch to partition X" (or any stateful) command into the he...

rocky ridgeBOT
rocky ridgeBOT
#

FYI:

ESP32 appears to be hard-coded to only allow writes to the ota1 partition.

Moreover, the offset stored in existing .uf2 files is a relative offset for that ota partition.

Yup, currently tinyuf2 for esp32s2/s3 is writing as offset to ota0 to prevent overflow to other partition.

In combination, these factors make it challenging to support writing more than a single target partition in ghostfat. However, if you simply want to expose additional .uf2...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Hmm, is reserving the whole 64KB block for the bootloader intended? Some of these 16KB flash sectors could be useful for storing some firmware settings (unfortunately, on STM32F4 other flash sectors are much larger, therefore rewriting them at runtime is problematic). One of recent QMK PRs actually tried to add a board which uses tinyuf2, but assumes that only sectors 0 and 1 are occupied by the bootloader, and therefore uses sector 2 for EEPROM emulation. Setting the protection flags for sec...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

@KarlK90 Thanks for this PR. I thought, the linker uses only 32 KB of flash which is first 2 sectors and use the next 2 sectors for EEPROM emu.

https://github.com/adafruit/tinyuf2/blob/master/ports/stm32f4/linker/stm32f4.ld#L47

Am i missing something ?

No you are completely right, I took the number from the [QMK linker file](https://github.com/qmk/qmk_firmware/blob/bc5d46aaadfdef5683d95e924e49ea6bc562c9f3/platforms/chibios/boards/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2....

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Operating System

MacOS

INFO_UF2.TXT

TinyUF2 Bootloader 0.8.0 - tinyusb (0.12.0-203-ga4cfd1c6)
Model: Espressif ESP32S3 DevKitC 1
Board-ID: ESP32S3-DevKitC-v1.0
Date: Jan 5 2022

What happened ?

After copy of cp 72x onto S3DKC1BOOT and reboot, device remains in boot mode.

see https://forums.adafruit.com/viewtopic.php?f=60&t=189819

How to reproduce ?

see https://forums.adafruit.com/viewtopic.php?f=60&t=189819

Debug Log

none

Screenshots

No response

rocky ridgeBOT
#

Make sure you

One of the difference is, I use the latest tinyuf2 instead of release version, maybe you should try to see if that fix the issue:

rocky ridgeBOT
rocky ridgeBOT
#

see https://forums.adafruit.com/viewtopic.php?f=60&t=189819
combined.bin fixed the issue, not cp724
FYI - initially tried drag copy update-tinyuf2.uf2, which did not resolve issue
did not try online serial tool
used esptool v3.3 to install combined.bin
first try failed - had not switched from USB to UART port
second try succeeded - connected to UART port
no plan to regression test cp720 .. 724

Any idea what changed in combined.bin

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

I’m trying to generate uf2 from an ESP-IDF project and I observe some weird behavior. When I use the uf2_conv.py to generate, a 595kb file is generated; however, when I do a certain action, a stack overflow happens. When I tried the idf.py build uf2, a 337kb file is generated. But when I uploaded it, it doesn't run at all.

I initially thought something wrong with my code is causing the overflow so I connected a Jtag debugger and tried to debug; then the stack overflow no longer occurs.

...

#

Is your feature request related to a problem? Please describe.
A custom animation system for boards that has more complex LED.

Describe the solution you'd like
I already made a solution for my own fork. https://github.com/203Electronics/Matrix-Bootloader/commit/5be0be79d0ea44c26edaed1cd995f1df341e1f5d
But I would prefer this is supported upstream.

Describe alternatives you've considered
Mentioned above,

Additional context
https://github.com/203Electronics/Matrix-...

rocky ridgeBOT
rocky ridgeBOT
#

custom animation is totally OK, but it should be per-board configuration and default to existing one. custom animation code/function must be in myboard/board.c since it is board specific.

Yes, that was the point. On my board.c I included #define CUSTOM_LED which overloads the animation system to the animation.c in the board folder.

rocky ridgeBOT
rocky ridgeBOT
#

feel free to submit pr when you think it is ready.

If I want to submit a PR that means I will have to submit a compatible device that uses this system. I don't think my devices are appropriate on this repo, so should I port my code to a device like esp32-s3-devkit-1 and specify a pin for the RGB matrix?

rocky ridgeBOT
#

My current implementation prevents self-update to be build

c:/users/caine/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld.exe: esp-idf/src/libsrc.a(main.c.obj): in function board_timer_handler': C:/Users/caine/Documents/GitHub/Matrix-Bootloader/src/main.c:257: multiple definition of board_timer_handler'; esp-idf/boards/libboards.a(animation.c.obj):c:\users\caine\documents\github\matri...

rocky ridgeBOT
#

feel free to submit pr when you think it is ready.

If I want to submit a PR that means I will have to submit a compatible device that uses this system. I don't think my devices are appropriate on this repo, so should I port my code to a device like esp32-s3-devkit-1 and specify a pin for the RGB matrix?

yes, since this is board specific, you should only apply this to board with rgb matrix like yours, the s3 devkit does not have this and could confuse other user. If your board is...

rocky ridgeBOT
#

If your board is not ready to submit an PR, no problem at all, just wait until it is ready.

My issue is that my board isn't a dev board so I don't think it should be on the tinyuf2 repo. But I'm pretty sure there are some dev boards with RGB matrix or someone wants to implement this on their own project.

rocky ridgeBOT
#

My issue is that my board isn't a dev board so I don't think it should be on the tinyuf2 repo. But I'm pretty sure there are some dev boards with RGB matrix or someone wants to implement this on their own project.

ah I see, your board is not in mass production as others. Yeah, in that case, using a popular devkit would be ideal, we will make it disabled by default.

rocky ridgeBOT
#

Is the ota_1 partition used by tinyUF2 in any way? If not, can we free it for other uses?

I know in the official documents, at least two OTA partitions are required but I don't think we really need two for tinyUF2.
When flashing fails, just revert back to TinyUF2 at the factory partition and let the user reflash it should be fine,

rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Windows 10

INFO_UF2.TXT

N/A

What happened ?

I am working on a port of tinyuf2 to an MIMXRT1021 based board. I saw in MIMXRT1021_ram.ld, I saw

_fcfb_origin = 0x0400;

I believe this is incorrect and should be 0x0000 based upon the 1020 user manual and my experience w/ the part. I noticed this after programming tinyuf2 to RAM and watching it copy to flash via RTT debug messasges. After a power cycle, the part would always enter ROM DFU boot mo...

rocky ridgeBOT
rocky ridgeBOT
#

So, I think having the FCFB offset at 0x1000 would still have the issue of the resultant image not being bootable after write_tinyuf2_to_flash() is called. Once the RAM version runs the 1st time, copies itself to the the QSPI flash. However, we need the boot header to be at a zero offset from the base of flexspi base address (0x60000000) per statement 1 in 9.6.1.2

Also, from the manual (9.7.1), It sounds IVT structure must be at 0x1000 when using FlexSPI NOR. From my understand...

rocky ridgeBOT
#

Please note the image runs from RAM not XIP. 0x1000 is the location in ITCM where the image will be running from.
The location in flash is adjusted based on the IVT offset so that it will be placed at the correct location in flash.
As long as the difference between _fcfb_origin and _ivt_origin is correct, the FCFB will be located at the correct location.
From ports/mimxrt10xx/boards.h:

// _ivt_origin is defined in linker script
// The FCFB has different offsets, but the IVT is cons...
rocky ridgeBOT
#

Thank you for the explanation of the Non-XIP boot, etc. Makes sense. I appreciate you taking the time!

I was able to verify that moving the fcfb_origin to 0x1000 and ivt_origin to 0x2000 works.

One piece that I overlooked when studying the code was the mask operation:

#define FCFB_START_ADDRESS (FLEXSPI_FLASH_BASE + (((uint32_t) &qspiflash_config) & 0xFFF))

I kept seeing 0xFFFF instead of 0xFFF and couldn't figure out how it could ever work. :-)

Everything look...

rocky ridgeBOT
#

Thanks, now I understand the rationale behind the RC pin.

I have a couple of questions to get a more complete picture.

  1. after looking at the code for the grandcentral bootloader it saves the magic number in RAM (in the last address). Isn't RAM always cleared between resets by definition. or resetting using the reset pin doesn't actually cut power to the RAM? The ESP reset pin does cut power to the RAM?
  2. Why not simply store it in NVM? Is it too slow? Will it decrease the life span of...
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#
  1. after looking at the code for the grandcentral bootloader it saves the magic number in RAM (in the last address). Isn't RAM always cleared between resets by definition. or resetting using the reset pin doesn't actually cut power to the RAM? The ESP reset pin does cut power to the RAM?

not possible since whole power for the chip is cut off

  1. Why not simply store it in NVM? Is it too slow? Will it decrease the life span of the flash chip? all of the above?

only answer is giving...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Windows 10

INFO_UF2.TXT

n/a

What happened ?

Summary:

I believe the value use for BOARD_BOOT_LENGTH is incorrect. In ports/mimxrt10xx/boards.h

#define BOARD_BOOT_START        (((uint32_t) _ivt_origin) - 0x1000)

#define BOARD_BOOT_LENGTH       (0x8800) 

0x8800 is the value used for _text_length in ports/mimxrt10xx/linker/memory.ld

Since the ROM boot loader is copying down BOARD_BOOT_LENGTH from (((uint32_t) _ivt_origin) - 0x10...

rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Windows 10

INFO_UF2.TXT

not relevant

What happened ?

I have a custom board that implements the esp32-s2 solo module.
I've attempted resetting the board into bootloader mode using the following snippet from the readme:
`#include "esp_private/system_internal.h"
void reboot_to_uf2(void)
{
// Check out esp_reset_reason_t for other Espressif pre-defined values
enum { APP_REQUEST_UF2_RESET_HINT = 0x11F2 };

// call esp_reset_reason() is required for i...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Sorry for the long delay! Finally I had time to upgrade my project using tinyuf2 0.9.2.

You are right about (1). I can use make BOARD_DIR="<path>"while I don't like that <path> has to be relative to $(TOP) of tinyuf2. I tried to solve this with PR #162. But I use tinyuf2 as a git submodule in my project, so its relative path never changes ⇒ problem solved.

As for (2) I opened PR #212.

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Sorry for late response, after TET, I kind of forget about this. This is a great PR, everything look great. And can be merged as it is, though I would like to include the tinyuf2-unlocker in this PR as well if possible.

The reason is for self-update via uf2, basically an special that contains bootloader binary in an array bytes and write that to the bootloader flash region. Currently it is not supported on stm32f4 port, but I think this is a good chance to also include it to

  • http...
rocky ridgeBOT
#

This PR implements a port of tinyuf2 to the STM32L4 family, specifically the L4R5.

The code has been tested for a few months and is considered fairly stable.

The implementation is mostly a copy and paste of the existing STM32F4 port, updated with the most recent changes. In the longer run, the common elements of F4 and L4 ports may benefit from being merged to avoid code duplication.

I tested the bootloader using this test plan on Swan R5:

  • start with a fully erased device
    *...
rocky ridgeBOT
#

If you are considering to make board_flash_protect_bootloader(false) a generic API, note that it is actually impossible to implement for some MCUs. In fact, STM32F4xx almost looks like an outlier, because for many other STM32 chips (F103, F303, L4xx, L072, probably some more) the only way to make new option bytes take effect is to perform a system reset (or an “option byte reload” procedure, which itself does a system reset); at least that's what the official documentation says. So the impl...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Thank you for your PR, I actually don't mind to have a bit of code duplication with f4, most stm32 families will have some shared code with each other. But they will have some difference especially flash API sooner or later. Also that make it easier to test/maintain, since the last thing we want with bootloader is unexpected behavior on L4 while doing some work with unrelated F4 mcu.

I could merge this PR as it is, but it would be nicer if you could

  1. add your board to ci, to make sure w...
rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Windows 10

INFO_UF2.TXT

TinyUF2 Bootloader 0.9.0-5-g71a22e5-dirty - esp-idf (v4.4-dev-3608-gbbe2a1bf34) tinyusb (0.12.0-203-ga4cfd1c6)
Model: Adafruit Metro ESP32-S2
Board-ID: ESP32S2-Metro-revC
Date: Jun 15 2022

What happened ?

I'm working on a custom board with the ESP32-S2 and I've used the same neopixel pin as in the adafruit metro esp32-s2 board. I've used the bootloader definition for the metro board, however I've commented out the line:
#define P...

rocky ridgeBOT
rocky ridgeBOT
#

I have a great deal of confidence that I'm indeed flashing the correct bootloader because I've also tried changing the UF2_VOLUME_LABEL and it does take effect.

I'm flashing the newly compiled bootloader by simply plugging in the new tinyuf2.bin into the existing arduino flashing command. should I change anything else besides that?

I will try to poke around the serial output and post it here.

storm burrow
#

Hello wise ones 🙂

#

I am having trouble getting to the IOpins. (I'm new)

#

I cannot find amongst my (now enormous) collection of libraries an "RPi.GPIO".

#

This is on a Pimoroni Tiny2040.

rocky ridgeBOT
#

can you elaborate what you do exactly ?

  1. what is your testing board, and what is its pre-flashing layout
  2. which binary is flashed to which parittion, and your flashing command
  3. what is the layout after flashing command.
  1. I'm using my own board but we can treat it as esp32-s3-devkitm-1.
  2. I'm flashing them via ESP32's flash download tool for testing. I flashed the bootloader manually with the following configuration generate by the build.

--flash_mode dio --flash...

rocky ridgeBOT
#

Then, I flash my firmware directly into the ota_0 partition at 0x10000.

It won't be enough, you also need to set otadata (parition) to indicate the ota0 is valid partition. please check the esp doc for detail. TinyUF2 does also set this at the end of DFU if you are wondering on the code.

Thank you, that was what I was wondering. I'm not sure did TinyUF2 write something custom into otadata/NVS or is that something standard.

rocky ridgeBOT
#

Operating System

Windows 10

INFO_UF2.TXT

TinyUF2 Bootloader 0.9.4 - st/cmsis_device_f4 (v2.6.4-1-g2615e86) st/stm32f4xx_hal_driver (v1.7.9) tinyusb (0.12.0-203-ga4cfd1c69)
Model: Adafruit Feather STM32F405 Express
Board-ID: STM32F405-Feather-revB
Date: May 30 2022

What happened ?

TinyUF2 doesnt seem to be running programs copied over to the MSC.

How to reproduce ?

  1. Compile blink example for feather_stm32f405_express
  2. Convert bin to uf2 `uf2conv -c ...
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

I tried it now with a proper metro esp32-s2 board - I commented out the PIN_DOUBLE_RESET_RC and changed the volume label to make sure I'm flashing the correct bootloader.
The volume label does change, but I still have the double tap to enter bootloader capability. I have no explanation for that.
could anyone else try to reproduce it?

I might be flashing my custom bootloader incorrectly. What I did is just to copy the command line from the Arduino ide and replaced the tinyuf2.bin on addr...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

I should have asked this before, but can you also share your simplest test project as github repo viewable and commentable for review. Make sure you got the linker correctly setup with flash layout for application (staring at correct address). It is probably better to convert with hex file than bin file.

I will find one example that works as well for your reference when I got time to pull out the board to test with.

rocky ridgeBOT
rocky ridgeBOT
#

OK. Done.

FYI, My port has been working good. It is now integrated in the latest model of some fireworks equipment:

https://fireone.com/

The new 2022 hardware has tinyuf2 built in 😊

From: Ha Thach @.>
Sent: Monday, June 20, 2022 1:10 PM
To: adafruit/tinyuf2 @.
>
Cc: Eli Hughes @.>; Author @.>
Subject: Re: [adafruit/tinyuf2] MIMXRT Port - Possible incorrect BOARD_BOOT_LENGTH being stuffed into boot_data struct (Issue #208)

if...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

I have updated the board_flash_protect_bootloader to take bool argument for protect/un-protect. I am trying to also get self-update to work with boot protection as well, however, I realize that self-update need quite a bit of additional changes and requires an cmsis f4 update to address the issue with vector table. I will merge this first and make an PR for self-update afterwards. Thank you very much for your effort and patience on this PR.

rocky ridgeBOT
#

Sorry for late response, after TET, I kind of forget about this.

No problem, hope you had a good TET :tada:

I will merge this first and make an PR for self-update afterwards. Thank you very much for your effort and patience on this PR.

I was pretty busy in the last weeks that is why I didn't respond earlier. Thanks for the merge and taking over from here! Happy that I could provide a good starting point for the self-update feature.

rocky ridgeBOT
#

@KarlK90 no problem at all, I fully understand the busy with other works well enough. Btw, I struggled a bit with old cmsis f4, since its system_stm32f4xx.c reset the vector table (SCB->VTOR) to default 0x08000000 (incorrect). Just update to latest cmsis, the later skip statement if not defined

https://github.com/STMicroelectronics/cmsis_device_f4/blob/2615e866fa48fe1ff1af9e31c348813f2b19e7ec/Source/Templates/system_stm32f4xx.c#L181

I am putting thing up together, self-update may no...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Though OTA is cool, I'd hazard to guess that fewer CircuitPython users would use OTA in general, and even be confident enough to guess hardly any use it all.

I'd like to see, not only a second UF2 option for ESP32-SX boards that has no OTA partitions laid out at all, and just a much bigger user file system partition, but also have that be the new default partition layout/binary and have OTA as a second option for those that want to use OTA.

I've spoken a few times with @tannewt about th...

rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
rocky ridgeBOT
#

Operating System

Linux

INFO_UF2.TXT

TinyUF2 Bootloader 0.10.2-21-g71a89e4-dirty - nxp/mcux-sdk (MCUX_2.10.0-25-ga242602a) tinyusb (0.12.0-203-ga4cfd1c6)
Model: NXP RT1024 EVK
Board-ID: MIMXRT1024-EVK-revA
Date: Jul 15 2022

What happened ?

  • flash-sdp work, bootloader seems to run well on SRAM, and seems to write to flash
  • however when reset, the booROM run again instead of the tinyuf2 even though the boot switch is set to normal 10

This seems to indicate there is ...

rocky ridgeBOT
rocky ridgeBOT