← index #7517PR #15158
Likely Duplicate · high · value 0.424
QUERY · ISSUE

Issues with nrf52 port

openby mtk11opened 2021-07-09updated 2024-10-01
port-nrf

When enable Bluetooth LE REPL (MICROPY_PY_BLE_NUS (1)), get the following errors:

LINK build-pca10059-s140/firmware.elf
/home/deb/esp/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: build-pca10059-s140/drivers/usb/usb_cdc.o (symbol from plugin): in function usb_cdc_init': (.text+0x0): multiple definition of mp_hal_stdin_rx_chr'; build-pca10059-s140/drivers/bluetooth/ble_uart.o (symbol from plugin):(.text+0x0): first defined here
/home/deb/esp/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: build-pca10059-s140/drivers/usb/usb_cdc.o (symbol from plugin): in function usb_cdc_init': (.text+0x0): multiple definition of mp_hal_stdout_tx_strn'; build-pca10059-s140/drivers/bluetooth/ble_uart.o (symbol from plugin):(.text+0x0): first defined here
/home/deb/esp/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: build-pca10059-s140/drivers/usb/usb_cdc.o (symbol from plugin): in function usb_cdc_init': (.text+0x0): multiple definition of mp_hal_stdout_tx_strn_cooked'; build-pca10059-s140/drivers/bluetooth/ble_uart.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:497: build-pca10059-s140/firmware.elf] Error 1

Possibility to have Bluetooth and USB CDC REPL working simultaneously ?

My board has no ext. 32 kHz crystal and needs the following: CFLAGS += -DBLUETOOTH_LFCLK_RC to work properly, should this be an option in mpconfigboard.h ?

Micropython support for the SPIM — Serial peripheral interface master with EasyDMA ? Also, looked at the micropython examples, but was not able to find examples for controlling the peripherals in C/C++ - Pins, PWM, Timers … Any available ?

In, micropython/ports/nrf/modules/machine/adc.c in nrfx_saadc_simple_mode_set instead of NRF_SAADC_INPUT_DISABLED isn't supposed to be SAADC_OVERSAMPLE_OVERSAMPLE_Bypass ?

CANDIDATE · PULL REQUEST

ports/nrf: Consolidate stdio functions.

mergedby andrewleechopened 2024-05-29updated 2024-08-23
port-nrf

Consolidate CDC, UART and NUS stdio interfaces into the one handler.
Allows any/all of them to be enabled separately.

Note there are some conflicts between UART and CDC REPL handling, particularly if hwfc is enabled on the UART.
This can block for long enough to cause the CDC connection to be broken. This is not a new bug as such, the current release of nrf port is restricted to not allow both CDC and UART to be enabled at the same time at all.

Updates UART REPL to use similar define to other platforms:
MICROPY_HW_ENABLE_UART_REPL

Uses shared/tinyusb cdc implementation.

Thie PR builds upon (and therefore include commits from) https://github.com/micropython/micropython/pull/14462 and https://github.com/micropython/micropython/pull/14485

It has currently only been tested on a nrf52840 dongle, however uart, cdc and nus support have individually all worked on this board.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied