Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: emfcamp/esp_idf
IDF_VERSION: v5.2.1
IDF_VERSION: v5.4.1

jobs:
build-and-push-image:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: espressif/esp-idf
ref: v5.2.1
ref: v5.4.1
path: esp-idf
submodules: true
- name: Submodules
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG IDF_VERSION=v5.2.1
ARG IDF_VERSION=v5.4.1
FROM espressif/idf:$IDF_VERSION

# Mark the firmware as a safe include directory for git
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ To build with a consistent toolchain, use docker.

Pull the firmware build image:

docker pull ghcr.io/emfcamp/esp_idf:v5.2.1
docker pull ghcr.io/emfcamp/esp_idf:v5.4.1

(Or build it yourself, if you prefer):

docker build . -t ghcr.io/emfcamp/esp_idf:v5.2.1
docker build . -t ghcr.io/emfcamp/esp_idf:v5.4.1

Initialize submodules:

Expand All @@ -41,12 +41,12 @@ Before you build the first time, apply any patches to vendored content:

Then to build the images run:

docker run -it --rm --env "TARGET=esp32s3" -v "$(pwd)"/:/firmware ghcr.io/emfcamp/esp_idf:v5.2.1
docker run -it --rm --env "TARGET=esp32s3" -v "$(pwd)"/:/firmware -u $UID -e HOME=/tmp ghcr.io/emfcamp/esp_idf:v5.4.1

Alternatively, to flash a badge:
put the badge into bootloader by disconnecting the usb in, press and hold bat and boop buttons for 20 seconds then reconnect the usb in and run:

docker run -it --rm --device /dev/ttyACM0:/dev/ttyUSB0 --env "TARGET=esp32s3" -v "$(pwd)"/:/firmware ghcr.io/emfcamp/esp_idf:v5.2.1 deploy
docker run -it --rm --device /dev/ttyACM0:/dev/ttyUSB0 --env "TARGET=esp32s3" -v "$(pwd)"/:/firmware -u $UID -e HOME=/tmp ghcr.io/emfcamp/esp_idf:v5.4.1 deploy

where /dev/ttyACM0 is the device's endpoint. This value is correct on Linux.

Expand Down
2 changes: 1 addition & 1 deletion components/flow3r_bmi270/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ idf_component_register(
.
../st3m
REQUIRES
main_esp32s3
main
)
2 changes: 1 addition & 1 deletion components/flow3r_bsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ idf_component_register(
REQUIRES
driver
vfs
main_esp32s3
main
)
1 change: 1 addition & 0 deletions drivers/tildagon_usb/tildagon_usb.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "driver/gpio.h"

#include "freertos/FreeRTOS.h"
#include "freertos/idf_additions.h"
#include "freertos/task.h"

#define DEBUG_LED GPIO_NUM_35
Expand Down
2 changes: 1 addition & 1 deletion flasher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

First, create a merged firmware binary. This can be done by building as normal, then using:

docker run -it --entrypoint /firmware/scripts/merge-firmwares.sh --env "TARGET=esp32s3" -v "$(pwd)"/:/firmware matthewwilkes/esp_idf:5.2.1
docker run -it --entrypoint /firmware/scripts/merge-firmwares.sh --env "TARGET=esp32s3" -v "$(pwd)"/:/firmware -u $UID -e HOME=/tmp ghcr.io/emfcamp/esp_idf:5.4.1

Then, copy the merged firmware to this directory:

Expand Down
2 changes: 1 addition & 1 deletion micropython
Submodule micropython updated 1688 files
12 changes: 6 additions & 6 deletions patches/micropython-lib.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/python-ecosys/requests/requests/__init__.py b/python-ecosys/requests/requests/__init__.py
index 7401029..e55840b 100644
index 4ca7489..04481e3 100644
--- a/python-ecosys/requests/requests/__init__.py
+++ b/python-ecosys/requests/requests/__init__.py
@@ -43,6 +43,7 @@ def request(
Expand All @@ -8,14 +8,14 @@ index 7401029..e55840b 100644
parse_headers=True,
+ allow_redirects=True,
):
redirect = None # redirection url, None means no redirection
chunked_data = data and getattr(data, "__next__", None) and not getattr(data, "__len__", None)
@@ -159,7 +160,7 @@ def request(
if headers is None:
headers = {}
@@ -180,7 +181,7 @@ def request(
s.close()
raise

- if redirect:
+ if redirect and allow_redirects:
s.close()
if status in [301, 302, 303]:
return request("GET", redirect, None, None, headers, stream)
# Use the host specified in the redirect URL, as it may not be the same as the original URL.
headers.pop("Host", None)
16 changes: 13 additions & 3 deletions patches/micropython.diff
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile
index 7f31ea691..1eb783685 100644
--- a/ports/esp32/Makefile
+++ b/ports/esp32/Makefile
@@ -112,4 +112,4 @@ size-files:
# This is done in a dedicated build directory as some CMake cache values are not
# set correctly if not all submodules are loaded yet.
submodules:
- $(Q)IDF_COMPONENT_MANAGER=0 idf.py $(IDFPY_FLAGS) -B $(BUILD)/submodules -D UPDATE_SUBMODULES=1 reconfigure
+ $(Q)idf.py $(IDFPY_FLAGS) -B $(BUILD)/submodules -D UPDATE_SUBMODULES=1 reconfigure
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index e928fb439..fde5160a5 100644
index dedef6d78..f1fbb5897 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -11,6 +11,9 @@ endif()
@@ -31,6 +31,9 @@ endif()
# Include core source components.
include(${MICROPY_DIR}/py/py.cmake)

Expand All @@ -12,7 +22,7 @@ index e928fb439..fde5160a5 100644
# CMAKE_BUILD_EARLY_EXPANSION is set during the component-discovery phase of
# `idf.py build`, so none of the extmod/usermod (and in reality, most of the
# micropython) rules need to happen. Specifically, you cannot invoke add_library.
@@ -69,7 +72,7 @@ list(APPEND MICROPY_SOURCE_PORT
@@ -122,7 +125,7 @@ list(APPEND MICROPY_SOURCE_PORT
machine_pin.c
machine_touchpad.c
machine_dac.c
Expand Down
2 changes: 0 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash
set -e -o pipefail

source ~/.profile

find /firmware -name '.git' -exec bash -c 'git config --global --add safe.directory ${0%/.git}' {} \;

cd /firmware
Expand Down
14 changes: 14 additions & 0 deletions scripts/hard-reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Hard resets micropython submodules. Should not touch changes to this repository itself.
# Assumes submodules are initialised.
# scripts/firstTime.sh will need to be rerun after this.

# Use: sudo scripts/hard-reset.sh

cd micropython
git submodule foreach git clean -fdx
git clean -fdx
git reset --hard --recurse-submodules

echo "NOTE: Remember to run scripts/firstTime.sh before trying to compile!"
2 changes: 0 additions & 2 deletions tildagon/sdkconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ CONFIG_APP_EXCLUDE_PROJECT_VER_VAR=n
CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=n
CONFIG_APP_PROJECT_VER_FROM_CONFIG=y

CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am personally unsure on the ramifications of this change to the sdkconfig. It was required to make the compile work, and the firmware appears to behave, but I can't help but feel that this is needed somewhere.
All changes made as part of this review were to fix existing features during the upgrade rather than remove them, but no matter what I did this did not seem to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at documentation, this config setting only seems to be useful if the function vPortCleanUpTCB is defined, and as far as I am aware this project does not do that.

Copy link
Contributor

@ChrisDick ChrisDick Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a warning when building with previous: #warning "CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is deprecated. Use CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK instead." for mp1.25 the pre deletion hook is set to y in sdkconfig.base. I think it's right to remove the task clean up one.


CONFIG_COMPILER_OPTIMIZATION_DEBUG=n
CONFIG_COMPILER_OPTIMIZATION_PERF=n
CONFIG_COMPILER_OPTIMIZATION_NONE=n
Expand Down
Loading