- 08 Jun, 2022 6 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This file is not executable so shouldn't have the shebang line. This line can cause issues when building on Windows msvc when the PyPython variable is set to something other than "python", because it reverts back to using the shebang line. The top comment is also changed to """ style which matches all other preprocessing scripts in the py/ directory. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Without this, newer versions of gcc (eg 11.2.0) used with -O2 can warn about `q_ptr` being maybe uninitialized, because it doesn't know that there is at least one qstr being written in to this (alloca'd) memory. As part of this, change the type of `n` to `size_t` so the compiler knows it's unsigned and can generate better code. Code size change for this commit: bare-arm: -28 -0.049% minimal x86: -4 -0.002% unix x64: +0 +0.000% unix nanbox: -16 -0.003% stm32: -24 -0.006% PYBV10 cc3200: -32 -0.017% esp8266: +8 +0.001% GENERIC esp32: -52 -0.003% GENERIC nrf: -24 -0.013% pca10040 rp2: -32 -0.006% PICO samd: -28 -0.020% ADAFRUIT_ITSYBITSY_M4_EXPRESS Signed-off-by: Damien George <damien@micropython.org>
-
iabdalkader authored
Unbound sockets in NEW state should return HUP|WR when polled, and return NVAL when in CLOSED state.
-
iabdalkader authored
-
Damien George authored
Otherwise include directories are added unconditionally to the build variables if the component (submodule) is checked out. This can lead to, eg, the esp32 build using lib/lwip header files, instead of lwip header files from the IDF. Fixes issue #8727. Signed-off-by: Damien George <damien@micropython.org>
-
- 07 Jun, 2022 21 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
stijn authored
Fix urandom not working on windows (there's no /dev/urandom) by using a proper cryptographic random function (same one as CPython >= 3.11).
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
robert-hh authored
With keyword arguments only or just a single non-keyword argument, UART.init() did not perform the settings.
-
Clayton Mills authored
System config block contains hardware unrelated to USB. So calling `__SYSCFG_CLK_DISABLE()` during `HAL_PCD_MspDeInit()` has an adverse effect on other system functionality. Removing call to `__SYSCFG_CLK_DISABLE()` to rectify this issue. This call was there since the beginning of the USB CDC code, added in b30c02af.
-
Clayton Mills authored
According to ST Errata ES0206 Rev 18, Section 2.2.1, on STM32F427x, STM32F437x, STM32F429x and STM32F439x. If the system tick interrupt is enabled during stop mode while certain bits are set in the DBGMCU_CR, then the system will immediately wake from stop mode. Suggested workaround is to disable system tick timer interrupt when entering stop mode. According to ST Errate ES0394 Rev 11, Section 2.2.17, on STM32WB55Cx and STM32WB35Cx. If the system tick interrupt is enabled during stop 0, stop 1 or stop 2 while certain bits are set in DBGMCU_CR, then system will immediately wake from stop mode but the system remains in low power state. The CPU therefore fetches incorrect data from inactive Flash, which can cause a hard fault. Suggested workaround is to disable system tick timer interrupt when entering stop mode.
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This was added by mistake in 8f68e26f when adding support for G4 MCUs, which does not using this get_bank() function. FLASH_OPTR_DBANK is only defined on G4 and L4 MCUs, so on H7 this FLASH_BANK_2 code was being wrongly excluded. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Frozen identifiers now include their full name hierarchy, eg their class name. This makes it easier to understand the generated code. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The sys.tracebacklimit feature has changed semantics a bit from CPython 3.7 (in the way it modifies the output), so provide a .exp file for the test so it doesn't rely on CPython. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
To match MICROPY_PY_NETWORK_CYW43 and MICROPY_PY_NETWORK_NINAW10. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Also remove redundant modusocket.c and modnetwork.c sources, they are already added by extmod/extmod.cmake. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The callback passed to add_alarm_in_ms must return microseconds, even though the initial delay is in milliseconds. Fix this use, and to avoid further confusion use the add_alarm_in_us function instead. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Now that the native qstr link table is gone, merging a native .mpy file with a bytecode .mpy file is not as simple as concatenating the .mpy data. The qstr_table and obj_table tables from all merged .mpy files must now be joined together, because they are global to the .mpy file (and hence global to the merged .mpy file). This means the bytecode needs to be be decoded, qstr_table and obj_table indices updated to point to the correct entries in the new tables, and then the bytecode re-encoded. This commit makes this change to the merging feature in mpy-tool.py. This can now merge an arbitrary number of bytecode .mpy files, and up to one native .mpy file. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This was made redundant by f2040bfc, which also did not update this function for the change to qstr-opcode encoding, so it does not work correctly anyway. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Support for architecture-specific qstr linking was removed in d4d53e9e, where native code was changed to access qstr values via qstr_table. The only remaining use for the special qstr link table in persistentcode.c is to support native module written in C, linked via mpy_ld.py. But native modules can also use the standard module-level qstr_table (and obj_table) which was introduced in the .mpy file reworking in f2040bfc. This commit removes the remaining native qstr liking support in persistentcode.c's load_raw_code function, and adds two new relocation options for constants.qstr_table and constants.obj_table. mpy_ld.py is updated to use these relocations options instead of the native qstr link table. Signed-off-by: Damien George <damien@micropython.org>
-
- 03 Jun, 2022 13 commits
-
-
iabdalkader authored
This PID is allocated for the Arduino Nano RP2040 running MicroPython.
-
Andrew Leech authored
This exercises the inclusion of a number of libraries in the rp2 port including mbedtls and lwip. Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
This works if your network is pre-configured in boot.py as an object called "nic". Without this, multitests expects to access the WLAN/LAN class which isn't always correct. Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Otherwise this is essentially an infinite loop on ports that do not use interrupts to service network interfaces. Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Uses the extmod/network_wiznet5k driver to provide network connectivity. Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Because the submodule list can be updated by cmake files. Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Originally based on both stm32/network_wiznet5k and stm32/modnwwiznet5k. If MICROPY_PY_LWIP is enabled it uses the lwIP TCP stack in MicroPython, communicating with the Wiznet controller in MACRAW mode. In this mode it supports using the INTN pin from Wiznet controller to receive data from an interrupt trigger. If lwIP is not enabled, it runs in modnetwork/socket mode providing an interface to the TCP stack running on the Wiznet controller chip. In this mode it includes some updates by @irinakim12 from #8021, most notably bringing in DHCP support. Supports defining hardware pins in board config or dynamically set at runtime. Sets a default MAC address in the random namespace from board unique-id. Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
Signed-off-by: Andrew Leech <andrew@alelec.net>
-
Andrew Leech authored
So C can can easily configure a pin interrupt and callback. Signed-off-by: Andrew Leech <andrew@alelec.net>
-