Skip to content

Commit 3e5448f

Browse files
committed
interpreters/python: set ROMFS-generated data to const char
This allows the data to be placed in the .rodata section, which can be allocated in the flash or other read-only storage, freeing the internal memory.
1 parent f3bcfc1 commit 3e5448f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interpreters/python/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ romfs_cpython_modules.img : $(TARGETLIBPYTHON) checkgenromfs
189189
@genromfs -f $@ -d $(TARGETMODULES) -V "ROMFS_Test" || { echo "genromfs failed" ; exit 1 ; }
190190

191191
romfs_cpython_modules.h : romfs_cpython_modules.img
192-
@xxd -i $< >$@ || { echo "xxd of $< failed" ; exit 1 ; }
192+
@xxd -i $< | sed -e "s/^unsigned/static const unsigned/g" >$@ || { echo "xxd of $< failed" ; exit 1 ; }
193193

194194
context:: $(CPYTHON_UNPACKNAME)
195195

0 commit comments

Comments
 (0)