Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/micropython/micropython i…
Browse files Browse the repository at this point in the history
…nto ports/psoc6
  • Loading branch information
actions-user committed Feb 1, 2023
2 parents 5689ec7 + 850f09b commit e73e216
Show file tree
Hide file tree
Showing 52 changed files with 118 additions and 33 deletions.
2 changes: 1 addition & 1 deletion lib/micropython-lib
Submodule micropython-lib updated 40 files
+16 −0 .github/workflows/build_packages.yml
+1 −0 CODEOFCONDUCT.md
+70 −2 CONTRIBUTING.md
+130 −20 README.md
+5 −9 micropython/README.md
+12 −4 micropython/bluetooth/aioble/README.md
+7 −0 micropython/bundles/README.md
+9 −0 micropython/bundles/bundle-networking/manifest.py
+28 −30 micropython/drivers/radio/nrf24l01/nrf24l01test.py
+2 −0 micropython/drivers/sensor/dht/dht.py
+3 −0 micropython/drivers/sensor/mhz19/manifest.py
+48 −0 micropython/drivers/sensor/mhz19/mhz19.py
+8 −0 micropython/drivers/storage/sdcard/sdcard.py
+10 −0 python-ecosys/README.md
+8 −12 python-stdlib/README.md
+7 −0 python-stdlib/logging/examples/basic_example.py
+0 −0 python-stdlib/logging/examples/example_logging_1.py
+47 −0 python-stdlib/logging/examples/example_logging_2.py
+8 −0 python-stdlib/logging/examples/root_logger.py
+181 −64 python-stdlib/logging/logging.py
+1 −1 python-stdlib/logging/manifest.py
+3 −0 python-stdlib/pathlib/manifest.py
+207 −0 python-stdlib/pathlib/pathlib.py
+324 −0 python-stdlib/pathlib/tests/test_pathlib.py
+1 −1 python-stdlib/shutil/manifest.py
+11 −5 python-stdlib/shutil/shutil.py
+56 −0 python-stdlib/shutil/test_shutil.py
+3 −0 python-stdlib/tempfile/manifest.py
+59 −0 python-stdlib/tempfile/tempfile.py
+50 −0 python-stdlib/tempfile/test_tempfile.py
+3 −0 python-stdlib/time/manifest.py
+42 −0 python-stdlib/time/test_time.py
+79 −0 python-stdlib/time/time.py
+1 −1 python-stdlib/unittest/manifest.py
+13 −0 python-stdlib/unittest/tests/test_exception.py
+3 −3 python-stdlib/unittest/unittest/__init__.py
+26 −0 tools/ci.sh
+5 −8 unix-ffi/README.md
+1 −1 unix-ffi/glob/manifest.py
+1 −1 unix-ffi/urllib.parse/manifest.py
13 changes: 11 additions & 2 deletions mpy-cross/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@ STATIC void pre_process_options(int argc, char **argv) {
}
}

STATIC char *backslash_to_forwardslash(char *path) {
for (char *p = path; p != NULL && *p != '\0'; ++p) {
if (*p == '\\') {
*p = '/';
}
}
return path;
}

MP_NOINLINE int main_(int argc, char **argv) {
mp_stack_set_limit(40000 * (sizeof(void *) / 4));

Expand Down Expand Up @@ -242,7 +251,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
exit(usage(argv));
}
a += 1;
source_file = argv[a];
source_file = backslash_to_forwardslash(argv[a]);
} else if (strncmp(argv[a], "-msmall-int-bits=", sizeof("-msmall-int-bits=") - 1) == 0) {
char *end;
mp_dynamic_compiler.small_int_bits =
Expand Down Expand Up @@ -308,7 +317,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
mp_printf(&mp_stderr_print, "multiple input files\n");
exit(1);
}
input_file = argv[a];
input_file = backslash_to_forwardslash(argv[a]);
}
}

Expand Down
7 changes: 3 additions & 4 deletions ports/esp32/boards/manifest.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
freeze("$(PORT_DIR)/modules")
include("$(MPY_DIR)/extmod/uasyncio")

# Useful networking-related packages.
require("bundle-networking")

# Require some micropython-lib modules.
require("dht")
require("ds18x20")
require("mip")
require("neopixel")
require("ntptime")
require("onewire")
require("umqtt.robust")
require("umqtt.simple")
require("upysh")
require("urequests")
require("webrepl")
4 changes: 1 addition & 3 deletions ports/esp8266/boards/manifest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
freeze("$(PORT_DIR)/modules")
require("bundle-networking")
require("dht")
require("ds18x20")
require("mip")
require("neopixel")
require("ntptime")
require("onewire")
require("webrepl")
3 changes: 3 additions & 0 deletions ports/mimxrt/boards/MIMXRT1020_EVK/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("../manifest.py")

require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/mimxrt/boards/MIMXRT1020_EVK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

JLINK_PATH ?= /media/RT1020-EVK/
JLINK_COMMANDER_SCRIPT = $(BUILD)/script.jlink

Expand Down
3 changes: 3 additions & 0 deletions ports/mimxrt/boards/MIMXRT1050_EVK/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("../manifest.py")

require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/mimxrt/boards/MIMXRT1050_EVK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
3 changes: 3 additions & 0 deletions ports/mimxrt/boards/MIMXRT1060_EVK/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("../manifest.py")

require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/mimxrt/boards/MIMXRT1060_EVK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

JLINK_PATH ?= /media/RT1060-EVK/
JLINK_COMMANDER_SCRIPT = $(BUILD)/script.jlink

Expand Down
3 changes: 3 additions & 0 deletions ports/mimxrt/boards/MIMXRT1064_EVK/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("../manifest.py")

require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/mimxrt/boards/MIMXRT1064_EVK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

JLINK_PATH ?= /media/RT1064-EVK/

deploy: $(BUILD)/firmware.bin
Expand Down
3 changes: 3 additions & 0 deletions ports/mimxrt/boards/MIMXRT1170_EVK/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("../manifest.py")

require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/mimxrt/boards/MIMXRT1170_EVK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

CFLAGS += -DCPU_MIMXRT1176DVMAA_cm7 \
-DMIMXRT117x_SERIES \
-DENET_ENHANCEDBUFFERDESCRIPTOR_MODE=1 \
Expand Down
3 changes: 3 additions & 0 deletions ports/mimxrt/boards/SEEED_ARCH_MIX/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("../manifest.py")

require("bundle-networking")
4 changes: 3 additions & 1 deletion ports/mimxrt/boards/SEEED_ARCH_MIX/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

CFLAGS += -DSPI_RETRY_TIMES=1000000
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

CFLAGS += -DSPI_RETRY_TIMES=1000000
3 changes: 3 additions & 0 deletions ports/mimxrt/boards/TEENSY41/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("../manifest.py")

require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/mimxrt/boards/TEENSY41/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

deploy: $(BUILD)/firmware.hex
teensy_loader_cli --mcu=imxrt1062 -v -w $<
4 changes: 1 addition & 3 deletions ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/manifest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
include("$(PORT_DIR)/boards/manifest.py")

# Networking
require("webrepl")
require("urequests")
require("ntptime")
require("bundle-networking")

# Drivers
require("lsm6dsox")
Expand Down
6 changes: 2 additions & 4 deletions ports/rp2/boards/PICO_W/manifest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include("../manifest.py")
include("$(PORT_DIR)/boards/manifest.py")

require("mip")
require("ntptime")
require("urequests")
require("bundle-networking")
2 changes: 1 addition & 1 deletion ports/rp2/boards/PICO_W/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set(MICROPY_PY_LWIP ON)
set(MICROPY_PY_NETWORK_CYW43 ON)

# Board specific version of the frozen manifest
set(MICROPY_FROZEN_MANIFEST ${CMAKE_SOURCE_DIR}/boards/PICO_W/manifest.py)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
3 changes: 3 additions & 0 deletions ports/rp2/boards/W5100S_EVB_PICO/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("$(PORT_DIR)/boards/manifest.py")

require("bundle-networking")
1 change: 1 addition & 0 deletions ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
set(PICO_BOARD wiznet_w5100s_evb_pico)
set(MICROPY_PY_NETWORK_WIZNET5K W5100S)
set(MICROPY_PY_LWIP 1)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
3 changes: 3 additions & 0 deletions ports/rp2/boards/W5500_EVB_PICO/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("$(PORT_DIR)/boards/manifest.py")

require("bundle-networking")
1 change: 1 addition & 0 deletions ports/rp2/boards/W5500_EVB_PICO/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
set(PICO_BOARD wiznet_w5100s_evb_pico)
set(MICROPY_PY_NETWORK_WIZNET5K W5500)
set(MICROPY_PY_LWIP 1)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
4 changes: 1 addition & 3 deletions ports/stm32/boards/ARDUINO_PORTENTA_H7/manifest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
include("$(PORT_DIR)/boards/manifest.py")

# Networking
require("webrepl")
require("urequests")
require("ntptime")
require("bundle-networking")

# Utils
require("logging")
Expand Down
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F429ZI/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F439ZI/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F439ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F746ZG/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F756ZG/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F756ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F767ZI/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_H743ZI/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_H743ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/OLIMEX_E407/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 1 addition & 1 deletion ports/stm32/boards/PYBD_SF2/manifest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include("$(PORT_DIR)/boards/manifest.py")
include("$(PORT_DIR)/boards/manifest_pyboard.py")
require("webrepl")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32F769DISC/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32F769DISC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ endif
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32F7DISC/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32F7DISC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/VCC_GND_F407ZG/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include("$(PORT_DIR)/boards/manifest.py")
require("bundle-networking")
2 changes: 2 additions & 0 deletions ports/stm32/boards/VCC_GND_F407ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1
MICROPY_SSL_MBEDTLS = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 1 addition & 1 deletion ports/windows/.appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ before_build:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
<MsBuild BuildInParallel="True" Projects="mpy-cross\mpy-cross.vcxproj;ports\windows\micropython.vcxproj"/>
<MsBuild Projects="mpy-cross\mpy-cross.vcxproj;ports\windows\micropython.vcxproj"/>
</Target>
</Project>
"@ | Set-Content build.proj
Expand Down
5 changes: 3 additions & 2 deletions ports/windows/msvc/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
<!-- Variant support. For compatibility with how it works for the other ports, this gets imported
early so variants cannot override build options like the ones specified in the rest of this file.
Use CustomPropsFile (see the .vcxproj file) for that. -->
<PropertyGroup>
<PropertyGroup Condition="'$(PyBuildingMpyCross)' != 'True'">
<PyVariant Condition="'$(PyVariant)' == ''">standard</PyVariant>
<PyBuild Condition="'$(PyBuild)' == ''">build-$(PyVariant)</PyBuild>
<PyProg Condition="'$(PyProg)' == ''">micropython</PyProg>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="paths.props" Condition="'$(PyPathsIncluded)' != 'True'"/>
<Import Project="$(PyVariantDir)mpconfigvariant.props"/>
<Import Condition="'$(PyBuildingMpyCross)' != 'True'" Project="$(PyVariantDir)mpconfigvariant.props"/>
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
Expand Down
8 changes: 5 additions & 3 deletions ports/windows/msvc/genhdr.targets
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) {
</ItemGroup>

<!-- Preprocess changed files, concatenate and feed into makeqstrdefs.py split/cat-->
<Target Name="MakeQstrDefs" DependsOnTargets="MakeDestDir" Inputs="@(ClCompile);@(QstrDependencies)" Outputs="$(QstrDefsCollected)">
<Target Name="MakeQstrDefs" DependsOnTargets="MakeDestDir;MakeVersionHdr" Inputs="@(ClCompile);@(QstrDependencies)" Outputs="$(QstrDefsCollected)">
<ItemGroup>
<PyIncDirs Include="$(PyIncDirs)"/>
<PreProcDefs Include="%(ClCompile.PreProcessorDefinitions);NO_QSTR"/>
Expand Down Expand Up @@ -150,7 +150,9 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) {
<TmpFile>$(QstrGen).tmp</TmpFile>
</PropertyGroup>
<Exec Command="$(PyClTool) /nologo /I@(PyIncDirs, ' /I') /D@(PreProcDefs, ' /D') /E $(PyQstrDefs) $(QstrDefs) > $(DestDir)qstrdefs.preprocessed.h"/>
<Exec Command="$(PyPython) $(PySrcDir)makeqstrdata.py $(DestDir)qstrdefs.preprocessed.h $(QstrDefsCollected) > $(TmpFile)"/>
<!--Because makemanifest.py relies on this file to have all Q() and QCFG() entries.-->
<Exec Command="type $(QstrDefsCollected) >> $(DestDir)qstrdefs.preprocessed.h"/>
<Exec Command="$(PyPython) $(PySrcDir)makeqstrdata.py $(DestDir)qstrdefs.preprocessed.h > $(TmpFile)"/>
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="CopyFileIfDifferent" Properties="SourceFile=$(TmpFile);DestFile=$(QstrGen)"/>
</Target>

Expand All @@ -167,7 +169,7 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) {
<ItemGroup>
<ClCompile Include="$(PyBuildDir)frozen_content.c"/>
<ClCompile>
<PreprocessorDefinitions>MICROPY_MODULE_FROZEN_MPY=1;MICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>MICROPY_MODULE_FROZEN_MPY=1;MICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool;MPZ_DIG_SIZE=16;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<Exec Command="$(PyPython) $(PyBaseDir)tools\makemanifest.py -v MPY_DIR=$(PyBaseDir) -v MPY_LIB_DIR=$(PyBaseDir)/lib/micropython-lib -v PORT_DIR=$(PyWinDir) -o $(PyBuildDir)frozen_content.c -b $(PyBuildDir) $(FrozenManifest)"/>
Expand Down
2 changes: 1 addition & 1 deletion ports/windows/variants/dev/mpconfigvariant.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<PyProg>micropython-dev</PyProg>
<FrozenManifest>$(PyVariantDir)manifest.py</FrozenManifest>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
Expand Down
3 changes: 0 additions & 3 deletions ports/windows/variants/standard/mpconfigvariant.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<PyProg>micropython</PyProg>
</PropertyGroup>
</Project>
4 changes: 4 additions & 0 deletions tools/mpy-tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,10 @@ def freeze_raw_code(self, prelude_ptr=None, type_sig=0):
" .line_info = fun_data_%s + %u,"
% (self.escaped_name, self.offset_line_info)
)
print(
" .line_info_top = fun_data_%s + %u,"
% (self.escaped_name, self.offset_closure_info)
)
print(
" .opcodes = fun_data_%s + %u," % (self.escaped_name, self.offset_opcodes)
)
Expand Down

0 comments on commit e73e216

Please sign in to comment.