Skip to content

Commit

Permalink
Fixes build so it works with micropython 1.24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kdschlosser committed Dec 17, 2024
1 parent 3ee150d commit 130eb3c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
13 changes: 4 additions & 9 deletions builder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def get_micropython():
'git submodule update --init --depth=1 -- lib/micropython',
]
print()
print('collecting MicroPython 1.23.0')
print('collecting MicroPython 1.24.1')
result, _ = spawn(cmd_, spinner=True)
if result != 0:
sys.exit(result)
Expand All @@ -346,17 +346,12 @@ def get_micropython():
with open(mkrules_path, 'rb') as f:
data = f.read().decode('utf-8')

pattern = (
'$(Q)git submodule update --init '
'$(addprefix $(TOP)/,$(GIT_SUBMODULES))'
)
pattern = '$(Q)cd $(TOP) && git submodule update --init $(GIT_SUBMODULES)'

if pattern in data:
data = data.replace(
pattern,
(
'$(Q)git submodule update --init --depth=1 '
'$(addprefix $(TOP)/,$(GIT_SUBMODULES))'
)
'$(Q)cd $(TOP) && git submodule update --init --depth=1 $(GIT_SUBMODULES)'
)
with open(mkrules_path, 'wb') as f:
f.write(data.encode('utf-8'))
Expand Down
21 changes: 18 additions & 3 deletions builder/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def get_espidf():
]
]
print()
print(f'collecting ESP-IDF v{IDF_VER}')
print(f'collecting ESP-IDF v5.2.3')
print('this might take a while...')
result, _ = spawn(cmd, spinner=True)
if result != 0:
Expand Down Expand Up @@ -883,7 +883,7 @@ def submodules():
['./install.sh', 'all']
]

print(f'setting up ESP-IDF v{IDF_VER}')
print(f'setting up ESP-IDF v5.2.3')
print('this might take a while...')
env = {k: v for k, v in os.environ.items()}
env['IDF_PATH'] = os.path.abspath(idf_path)
Expand All @@ -898,7 +898,22 @@ def submodules():
berkeley_db = os.path.abspath('lib/micropython/lib/berkeley-db-1.xx/README')

if not os.path.exists(berkeley_db) or not os.path.exists(wifi_lib):
cmds.append(submodules_cmd)
cmds.append(['cd lib/micropython'])
for dep in (
'tinyusb',
'micropython-lib',
'protobuf-c',
'wiznet5k',
'lwip',
'mbedtls',
'axtls',
'berkeley-db-1.xx',
'btstack'
):
path = f"lib/{dep}"

cmds.append([f'git submodule sync {path}'])
cmds.append([f'git submodule update --init --depth=1 {path}'])

return_code, _ = spawn(cmds, env=env)
if return_code != 0:
Expand Down
1 change: 1 addition & 0 deletions ext_mod/lcd_bus/esp32_src/rgb_bus_rotation.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "py/obj.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "py/stackctrl.h"

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
Expand Down
1 change: 0 additions & 1 deletion make.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@


def get_submodules():

if not os.path.exists(
os.path.join(SCRIPT_DIR, 'lib/micropython/mpy-cross')
):
Expand Down

0 comments on commit 130eb3c

Please sign in to comment.