Commit Graph

34626 Commits

Author SHA1 Message Date
Jeff Epler dc277f0aff
fix HEAP_PTR macro 2023-09-20 11:20:39 -05:00
Jeff Epler 36371fe757
fix compiling gc.c 2023-09-20 11:20:29 -05:00
Jeff Epler 0c64275cc6
Add header for PLACE_IN_ITCM 2023-09-20 11:19:57 -05:00
Jeff Epler e05f79a9c0
update pre-commit 2023-09-20 11:15:13 -05:00
Jeff Epler 5eb7320ae1
fix conditional compliation 2023-09-20 11:10:56 -05:00
Jeff Epler b6722c30a2
update translations 2023-09-20 11:08:50 -05:00
Jeff Epler 02e54e5f4e
extmod: don't list files that don't exist in our tree 2023-09-20 11:08:12 -05:00
Damien George a3862e7267 stm32/powerctrlboot: Allow PLL1 Q and R outputs to be enabled on H5.
If a board needs these outputs then it can define MICROPY_HW_CLK_PLLQ/R.

It saves power to not enable them if they are not needed.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-20 18:56:52 +10:00
Angus Gratton fa68523968 py/nlrx64: Mark nlr_push() as naked function when possible.
Supported from GCC 8 and up, and Compiler Explorer suggests it works as
expected with Clang since 3.6 (2014).

- Fixes situation where building embedded MicroPython with -O0 and
  MICROPY_NLR_X64 crashes at runtime (due to nlr_push pushing the
  frame pointer register EBP). Closes #12421.

- Allows removing the macOS tweak to undo pushing EBP onto the stack
  in the generated function prelude.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-20 11:48:36 +10:00
Dan Halbert 4d175ab41a convert to MP_DEFINED_CONST_OBJ_TYPE() 2023-09-19 21:09:29 -04:00
Scott Shawcroft 40a5313589
Merge pull request #8414 from dhalbert/samd51g-fixes
fix CPU on Monster M4SK; turn off audiobusio by default on SAMD51G
2023-09-19 09:52:29 -07:00
Dan Halbert 2c0fa0f7dc initial merge from v1.20.0; just satisifying conflicts 2023-09-19 11:10:12 -04:00
Dan Halbert 931a6adb81 fix CPU on Monster M4SK; turn off audiobusio by default on SAMD51G 2023-09-18 21:28:00 -04:00
Dan Halbert 9e9dff4bf2
Merge pull request #8400 from jepler/update-rgbmatrix-docs
rgbmatrix: more small doc improvements
2023-09-18 18:31:39 -04:00
Scott Shawcroft e39fbf1b26
Merge pull request #8401 from jepler/i2c-expander-init
Fast(ish) special purpose bitbang spi over i2c
2023-09-18 13:19:49 -07:00
Scott Shawcroft c86b3ae19f
Update to merged idf changes 2023-09-18 11:18:04 -07:00
Jeff Epler faa6887050
Use faster bus & remove final delay
this pushes the LCD initialization down to about 1.3s.
2023-09-18 13:00:18 -05:00
Jeff Epler 5a60b8d573
Only delay when explicitly called for 2023-09-18 12:58:54 -05:00
Jeff Epler 67e15bb6a2
makerfabs_tft7: rename properties to match docs 2023-09-18 10:35:49 -05:00
Jeff Epler 75ba82cdb0
lcd_ev: add timings; rename TFT -> TFT_PINS 2023-09-18 10:35:36 -05:00
Jeff Epler 4c682262e6
lcd_ev: fix compile error 2023-09-18 10:35:05 -05:00
Jeff Epler ee86c7649f
fix markup, that's not a link 2023-09-18 10:23:01 -05:00
IhorNehrutsa 00930b213e esp32/mphalport: Add function/line/file info to check_esp_err exception.
Currently, check_esp_err() raises an exception without a location in the
source code, eg:

    Traceback (most recent call last):
      File "<stdin>", line 8, in <module>
    OSError: (-258, 'ESP_ERR_INVALID_ARG')

This commit allows additional error reporting (function, line and file) to
be enabled via detailed exceptions.  Change the error reporting config to

    #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)

and then exception messages from IDF errors look like:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: (-258, "0x0102 ESP_ERR_INVALID_ARG in function 'set_duty_u16'
    at line 342 in file './machine_pwm.c'")

Signed-off-by: Ihor Nehrutsa <IhorNehrutsa@gmail.com>
2023-09-18 11:26:43 +10:00
Damien George b0e03b3e07 tools/autobuild: Include .bin firmware in renesas-ra build output.
Signed-off-by: Damien George <damien@micropython.org>
2023-09-18 11:05:14 +10:00
Damien George 9dd40d1b60 docs/conf.py: Add sphinxcontrib.jquery to extensions.
This is needed by recent versions of sphinx-rtd-theme.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-18 11:02:27 +10:00
Scott Shawcroft 0547ef61f9
Update dotclock for IDF 5.0 2023-09-15 14:43:37 -07:00
Jeff Epler 2a78d16b54
add board.DISPLAY 2023-09-15 14:49:29 -05:00
Jeff Epler 68af5543af
set up display at reset (yayay!) 2023-09-15 14:46:28 -05:00
Jeff Epler 91b98dc9d5
fix constness 2023-09-15 14:45:53 -05:00
Jeff Epler cff65bbbe2
esp32 lcd ev: fix pin assignments 2023-09-15 14:10:32 -05:00
Jeff Epler c7b7e22195
remove debug print 2023-09-15 11:16:43 -05:00
Scott Shawcroft 86990e9386
Merge pull request #8404 from BPI-STEAM/CircuitPython-main-PR
Update bpi_leaf_s3
2023-09-15 09:12:28 -07:00
Jeff Epler a8b81ce943
Enhance unexpected keyword argument detection
Before, incorrect use when calling a core function would just say
"extra keyword arguments given"; now, it will name the argument:

```python
>>> Synthesizer(bad_kwarg="boo")
TypeError: unexpected keyword argument 'bad_kwarg'
```
2023-09-15 10:39:14 -05:00
iabdalkader 5473200aab rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Use standard HCI UART baudrate.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:48:20 +10:00
iabdalkader d30f61ba0d drivers/ninaw10/nina_bt_hci: Make some minor fixes to HCI driver.
Fixes are:
- Reset the module first before changing GPIO1 direction.
- Skip spurious bytes received after reset.
- Use HCI UART ID and baudrate when reinitializing UART.
- Disable all printf output which causes unit-tests to fail.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:47:19 +10:00
iabdalkader 9ea9e04ef6 rp2/mpconfigport: Disable BLE locking when MICROPY_PY_BLUETOOTH enabled.
Bluetooth code runs in the scheduler, so no locking/mutex is required.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:44:07 +10:00
iabdalkader 1976781d33 rp2/mpbthciport: Fix HCI UART config.
Fixes are:
- The baudrate argument is a keyword arg, it was passed before as a
  positional arg.
- Use the port and baudrate arguments passed from higher level code instead
  of the hard-coded port ID and baudrate, which would allow HCI drivers to
  change baudrates.
- Increase UART char timeout and RX buffer size.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:43:15 +10:00
iabdalkader 6abe3e1714 rp2/mpbthciport: Switch to static scheduler nodes.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:42:50 +10:00
iabdalkader 7087880ce9 esp32/machine_pin: Fix null pointer access in machine_pin_find.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 13:44:50 +10:00
Wind-stormger 970e61c8b4 Update bpi_leaf_s3 2023-09-15 02:20:46 +00:00
Angus Gratton 92f379cce4 docs/library/gc: Clarify mem_alloc and mem_free only for Python heap.
As raised in discussions of the ESP32 memory management changes.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-15 12:19:13 +10:00
Angus Gratton 26160e8ed5 docs/library/esp32: Update ESP32 idf_heap_info docs to match behaviour.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-15 12:19:13 +10:00
Angus Gratton 3e8aed9fcc py/gc: Add "max new split" value in result of gc.mem_free().
Follow-up to 519c24dd48 when MICROPY_GC_SPLIT_HEAP_AUTO is enabled, based
on discussion at
https://github.com/orgs/micropython/discussions/12316#discussioncomment-6858007

gc.mem_free() is always a heuristic, but this makes it a more useful
heuristic for common use cases.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-15 12:19:13 +10:00
Scott Shawcroft 4087960dfd
Fix MDNS. C3 works 2023-09-14 15:04:07 -07:00
Jeff Epler ef9f75ead1
Correct idle status of SCK pin 2023-09-14 14:56:39 -05:00
Jeff Epler 4b41fdb586
Fast(ish) special purpose bitbang spi over i2c
with the i2c bus operating at 400kHz this achieves a 4.8kHz SPI clock
rate which could be worse.

It accepts the same style of init sequence as displayio.

tested by scoping the pins on the espressif lcd dev kit with a dummy init sequence:
```python
dotclockframebuffer.ioexpander_send_init_sequence(
    bus=bus,
    i2c_address=expander_addr,
    gpio_address=1,
    gpio_data_len=1,
    gpio_data=0xff,
    cs_bit=1,
    mosi_bit=3,
    clk_bit=2,
    init_sequence=init_sequence)
```
2023-09-14 14:42:48 -05:00
Scott Shawcroft 952118f6c3
Update new boards. Reduce memory use in S2 2023-09-14 11:19:38 -07:00
Scott Shawcroft 17ced21e04
Merge pull request #8397 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2023-09-14 09:25:38 -07:00
Jeff Epler 0e78ab6ed5
rgbmatrix: document MTX_ADDRESS and MTX_COMMON 2023-09-14 10:38:01 -05:00
Jeff Epler b61900f881
fixup! matrixportal_m4: Add board.MTX_ADDRESS and board.MTX_COMMON 2023-09-14 10:38:01 -05:00