Commit Graph

14196 Commits

Author SHA1 Message Date
Lephenixnoir c1d2ca5048
pe: debugging tools 2022-11-10 22:37:04 +01:00
Lephenixnoir 524562e8bc
pe: casioplot: make the final argument of draw_string() optional
(note: it is currently ignored even when specified)
2022-11-09 21:21:34 +01:00
Lephenixnoir ab0f70effc
pe: fix clear_screeb typo in modcasioplot 2022-11-09 13:57:13 +01:00
Lephenixnoir 99f2156e5e
pe: interrupt computations with AC/ON 2022-11-08 22:24:18 +01:00
Lephenixnoir bfa5de2cf9
meta: exclude ports/sh/exclude from git 2022-11-08 22:24:17 +01:00
Lephenixnoir 9ea4c17112
pe: import modules selected in file browser 2022-11-08 22:21:42 +01:00
Lephenixnoir 5f1a066c94
pe: add rough casioplot module 2022-11-08 22:20:18 +01:00
Lephenixnoir 6c2aa39e56
pe: show shell modifier state in GUI 2022-11-06 17:08:17 +01:00
Lephenixnoir 404d69aea4
pe: smaller, proportional 4x6 font on fx 2022-11-06 00:08:57 +01:00
Lephenixnoir 27822c2461
pe: make the GUI friendly on the fx-9860G 2022-11-05 20:58:18 +01:00
Lephenixnoir fa6aa00dae
pe: basic GUI setup
Adds a file browser (selected files are not loaded yet) and a shell
widget with an input system that is still better than the previous
VT-100 emulation scheme (with locked modifiers mainly).

A lot of small things still need to be done to make the UI functional.
2022-11-05 18:25:54 +01:00
Lephenixnoir 4e529b5788
meta: add project headers
On all but a few files that are not going to stay there.
2022-10-30 18:52:54 +01:00
Lephenixnoir 2c238906e7
pe: enable the time module
Based on the UNIX port version, and extmod/utime_mphal.c.
2022-10-30 18:37:02 +01:00
Lephenixnoir 8809f3eee4
pe: cap shell refresh rate at 30 FPS 2022-10-30 17:53:13 +01:00
Lephenixnoir d0654fc5e7
meta: basic build instructions 2022-10-30 11:07:33 +01:00
Lephenixnoir d6334be488
meta: cleanup 2022-10-29 21:48:01 +02:00
Lephenixnoir 3431000d2f
meta: README file with basic TODO list 2022-10-29 20:56:10 +02:00
Lephenixnoir ce4fefebbe
pe: split fx-CG 50 and fx-9860G III versions
Both working although with terrible UI.
2022-10-29 20:42:43 +02:00
Lephenixnoir e1df7e5f0b
ports/sh: enable split GC 2022-10-29 11:32:43 +02:00
Lephenixnoir f930ff95db
modgint: basic gint module with some of <gint/keyboard.h> 2022-10-29 10:57:15 +02:00
Lephenixnoir 1992ec0a49
ports/sh: module loading and first attempt at open()
But I'm pretty sure there should be a ready-to-use POSIX version of
open() that I can enable instead of rewriting it.
2022-10-29 10:55:57 +02:00
Lephenixnoir c237e9874f
ports/sh: clean mpconfigport.h and enable modules 2022-10-27 19:07:22 +02:00
Lephenixnoir a0d6c33275
meta: move original README.md 2022-10-27 17:20:32 +02:00
Lephenixnoir f9b4c1f844
pe: decent console with erasing, scrolling and more unused potential 2022-10-24 00:53:53 +02:00
Lephenixnoir e33d85b1de
ports/sh: first functional version, can compute in REPL 2022-10-24 00:48:14 +02:00
Damien George 68f166dae9 extmod/mbedtls: Remove brainpool curves from config.
They are much slower than NIST (SECP) curves and shouldn't be needed.

Reduces rp2 PICO_W firmware by 1328 bytes.

Thanks to @Carglglz for the information.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-22 19:12:46 +11:00
Damien George e24159dec9 extmod/mbedtls: Remove MBEDTLS_ECP_DP_CURVE25519_ENABLED config.
Curve25519 arithmetic is supported in mbedtls, but it's not used for TLS.
So there's no need to have this option enabled.

Reduces rp2 PICO_W firmware by 2440 bytes.

Thanks to @Carglglz for the information.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-22 19:12:46 +11:00
Damien George 8874a09119 extmod/mbedtls: Enable elliptic curve DH and DSA cryptography.
This is necessary to access sites that only support these protocols.

The rp2 port already has ECDH enabled, so this just adds ECDSA there.  The
other ports now gain both ECDH and ECDSA.  The code size increase is:

- rp2 (PICO_W): +2916 bytes flash, +24 bytes BSS
- stm32 (PYBD_SF6): +20480 bytes flash, +32 bytes data, +48 bytes BSS
- mimxrt (TEENSY41): +20708 bytes flash, +32 bytes data, +48 bytes BSS
- unix (standard x86-64): +39344 executable, +1744 bytes data, +96 BSS

This is obviously a large increase in code size.  But there doesn't seem to
be any other option because without elliptic curve cryptography devices are
partially cut off from the internet.  For use cases that require small
firmware size, they'll need to build custom firmware with a custom mbedtls
config.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-22 19:08:21 +11:00
Damien George 9347545f9e extmod/mbedtls: Enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE.
This was already enabled on all ports except mimxrt.  Now it's enabled on
all of them.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-22 19:06:21 +11:00
Damien George b337678964 extmod/mbedtls: Add common configuration file, and use it in all ports.
This is a no-op change.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-22 19:06:21 +11:00
Damien George 67f98ba10c extmod/btstack: Update BTstack bindings to work with latest BTstack.
The following multi-tests pass (eg with PYBD_SF6+LEGO_HUB_NO6):

    ble_gap_advertise.py
    ble_gap_connect.py
    ble_gap_device_name.py
    ble_gattc_discover_services.py
    ble_gatt_data_transfer.py
    perf_gatt_char_write.py
    perf_gatt_notify.py
    stress_log_filesystem.py

These are the same tests that passed prior to this BTstack update.

Also tested on the unix port using H4 transport.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-22 14:28:25 +11:00
Damien George 4f946ba963 lib/btstack: Update to v1.5.3.
Signed-off-by: Damien George <damien@micropython.org>
2022-10-22 13:21:28 +11:00
iabdalkader 93f3910fe7 nrf: Rename machine I2C, PWM, SPI, UART types consistently across ports.
This renames:
- machine_hard_i2c_type -> machine_i2c_type
- machine_hard_pwm_type -> machine_pwm_type
- machine_hard_spi_type -> machine_spi_type
- machine_hard_uart_type -> machine_uart_type
2022-10-22 12:58:54 +11:00
iabdalkader 5e90ec2331 zephyr: Rename machine I2C and SPI types consistently across ports.
This renames:
- machine_hard_i2c_type -> machine_i2c_type
- machine_hard_spi_type -> machine_spi_type
2022-10-22 12:58:21 +11:00
iabdalkader bfa6f34404 renesas-ra: Rename machine SPI type consistently across ports.
This renames:
- machine_hard_spi_type -> machine_spi_type
2022-10-22 12:57:58 +11:00
iabdalkader e275a58ac1 samd: Rename machine I2C type consistently across ports.
This renames:
- machine_hw_i2c_type -> machine_i2c_type
2022-10-22 12:57:32 +11:00
iabdalkader 22ad45fda6 rp2: Rename machine I2C type consistently across ports.
This renames:
- machine_hw_i2c_type -> machine_i2c_type
2022-10-22 12:56:58 +11:00
iabdalkader 427670c210 esp32: Rename machine I2C and SPI types consistently across ports.
This renames:
- machine_hw_i2c_type -> machine_i2c_type
- machine_hw_spi_type -> machine_spi_type
2022-10-22 12:56:10 +11:00
iabdalkader af4ba6d1b4 stm32: Rename machine I2C and SPI types consistently across ports.
This renames:
- machine_hard_i2c_type -> machine_i2c_type
- machine_hard_spi_type -> machine_spi_type
2022-10-22 12:54:42 +11:00
Damien George 965a87b53c tests/extmod: Add test for sleep_ms value that overflows ticks.
Addresses #9516.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-14 16:10:38 +11:00
Damien George 815920c87f extmod/utime_mphal: Make ticks_add check for overflow of delta.
Work done in collaboration with @jimmo.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-14 15:54:53 +11:00
Damien George 89b3207376 unix/modffi: Move header includes inside MICROPY_PY_FFI guard.
So ffi.h is not needed if this module is disabled.

Signed-off-by: Damien George <damien@micropython.org>
2022-10-14 14:36:17 +11:00
David Lechner ab317a0d66 py/misc: Remove use of bitfield from vstr_t.
Since there is only one flag, we don't need to use a bitfield in vstr_t.
Compilers emit extra instructions to access a bitfield, so this should
reduce the binary size a small amount.

Signed-off-by: David Lechner <david@pybricks.com>
2022-10-12 00:33:09 +11:00
robert-hh 92d9118038 rp2/fatfs_port: Fix the modification date of files.
It was off by 2000 % 128 == 80 years.

Addresses issue #9535.
2022-10-12 00:31:38 +11:00
Jim Mussared b25087fc6f samd/Makefile: Split up SRC_C variables.
This improves clarity a bit, but also ensures that only the required files
are added to SRC_QSTR.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-12 00:10:18 +11:00
Jim Mussared a2aceb5007 nrf/Makefile: Split up SRC_C variables.
This improves clarity a bit, but also ensures that only the required files
are added to SRC_QSTR.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-12 00:09:55 +11:00
Jim Mussared 43bcfb148b mimxrt/Makefile: Split up SRC_C variables.
This improves clarity a bit, but also ensures that only the required files
are added to SRC_QSTR.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-12 00:08:49 +11:00
Jim Mussared d6d8722558 extmod: Make extmod.mk self-contained.
This makes it so that all a port needs to do is set the relevant variables
and "include extmod.mk" and doesn't need to worry about adding anything to
OBJ, CFLAGS, SRC_QSTR, etc.

Make all extmod variables (src, flags, etc) private to extmod.mk.

Also move common/shared, extmod-related fragments (e.g. wiznet, cyw43,
bluetooth) into extmod.mk.

Now that SRC_MOD, CFLAGS_MOD, CXXFLAGS_MOD are unused by both extmod.mk
(and user-C-modules in a previous commit), remove all uses of them from
port makefiles.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-11 23:31:49 +11:00
Jim Mussared 87011f6353 extmod/extmod.mk: Make extmod.mk handle GIT_SUBMODULES.
This applies to nimble, btstack, axtls, mbedtls, lwip.

Rather than having the ports individually manage GIT_SUBMODULES for these
components, make extmod.mk append them when the relevant feature is
enabled.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-11 23:29:09 +11:00
Jim Mussared 065af04a4e unix/Makefile: Don't use _MOD variable names.
This conflicts with the triple-usage of these variables for user-C-modules
and extmod source.

For CFLAGS_MOD, just use CFLAGS directly. For SRC, use SRC_C directly as
the relevant files are all guarded by the preprocessor anyway.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-11 23:27:01 +11:00