← index #15662Issue #17034
Off-topic · high · value 2.429
QUERY · ISSUE

Frozen modules in the embed port does not generate frozen_content.c

openby tailoredsoftopened 2024-08-14updated 2024-08-14
bug

Port, board and/or hardware

embed

MicroPython version

1.23.0

Reproduction

make -f micropython_embed.mk

This file is part of the MicroPython project, http://micropython.org/

The MIT License (MIT)

Copyright (c) 2022-2023 Damien P. George

Set the location of the top of the MicroPython repository.

MICROPYTHON_TOP = ../upstream

add the custom modules to the build

SRC_QSTR += modules/.c
SRC_QSTR += modules/
/.c
//SRC_QSTR += modules_poc/
.c
//SRC_QSTR += modules_poc//.c

#add the uwb applicatioon folder as an include
CFLAGS += -I../../devkit-uwb-ses/uwbiot-top/apps/app_sunway_devkit

FROZEN_MANIFEST = manifest.py

Include the main makefile fragment to build the MicroPython component.

include $(MICROPYTHON_TOP)/ports/embed/embed.mk

Expected behaviour

frozen_content.c should be generated in the BUILD folder

Observed behaviour

When building on a Windows PC the manifest.py does not get invoked. I know this because added a syntax error and there is no complaint so it never got invoked.

Additional Information

I managed to find that bug which is down to requiring a make variable defining mpy-cross instead of mpy-cross.exe.
I can generate the frozen_content.c and it builds into my firmware but it always gets to fail the import

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

FreezeError("unable to freeze code with relocations") with frozen code

openby bhcuong2008opened 2025-03-29updated 2025-04-15
bug

Port, board and/or hardware

ESP32

MicroPython version

Hi,

I'd like to include frozen files from emlearn, https://github.com/emlearn/emlearn-micropython/tree/gh-pages/builds/0.7.0/xtensawin_6.3, to my build, but it reports FreezeError("unable to freeze code with relocations")

My command in manifest file is: freeze_mpy("$(PORT_DIR)/modules_mpy/emlearn")

The frozen codes from emlearn are compatible with MicroPython 1.24.
My custom build based on MicroPython 1.24.1, ESP32S3

Reproduction

  1. Add command to the main manifest file: freeze_mpy("$(PORT_DIR)/modules_mpy/emlearn")
  2. Copy all files .mpy from the link https://github.com/emlearn/emlearn-micropython/tree/gh-pages/builds/0.7.0/xtensawin_6.3 to directory $(PORT_DIR)/modules_mpy/emlearn/
  3. Then build the port.

Expected behaviour

Successfully built frozen code to MicroPython firmware.

Observed behaviour

FreezeError("unable to freeze code with relocations")

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied