← index #7517Issue #5162
Related · high · value 0.091
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 · ISSUE

[nRF port] Unable to activate MICROPY_PY_SYS_STDFILES in mpconfigport.h

openby sebi5361opened 2019-09-30updated 2021-06-08
port-nrf

I was unable to turn on some of the features in mpconfigport.h, such as MICROPY_PY_SYS_STDFILES, MICROPY_PY_MATH_SPECIAL_FUNCTIONS, MICROPY_PY_IO_FILEIO and MICROPY_PY_MACHINE_SPI, as make would fail with those features on (nRF port).

Below are the error messages:

  • Error when #define MICROPY_PY_SYS_STDFILES (1):
LINK build-pca10040-s132/firmware.elf
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccCsRh6Z.ltrans2.ltrans.o: in function `mp_sys_print_exception.lto_priv.992':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modsys.c:110: undefined reference to `mp_sys_stdout_obj'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccCsRh6Z.ltrans2.ltrans.o:(.rodata+0xb4): undefined reference to `mp_sys_stdout_obj'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccCsRh6Z.ltrans2.ltrans.o:(.rodata+0x1c8): undefined reference to `mp_sys_stdout_obj'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccCsRh6Z.ltrans2.ltrans.o:(.rodata+0x246c): undefined reference to `mp_sys_stdin_obj'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccCsRh6Z.ltrans2.ltrans.o:(.rodata+0x2474): undefined reference to `mp_sys_stdout_obj'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccCsRh6Z.ltrans2.ltrans.o:(.rodata+0x247c): undefined reference to `mp_sys_stderr_obj'
collect2: error: ld returned 1 exit status
make: *** [Makefile:344: build-pca10040-s132/firmware.elf] Error 1
  • Error when #define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (1)
CC build-pca10040-s132/pins_gen.c
LINK build-pca10040-s132/firmware.elf
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_lgamma.lto_priv.1007':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:170: undefined reference to `lgammaf'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_gamma.lto_priv.1006':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:168: undefined reference to `tgammaf'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_erfc.lto_priv.1005':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:166: undefined reference to `erfcf'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_erf.lto_priv.1004':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:164: undefined reference to `erff'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_atanh.lto_priv.982':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:120: undefined reference to `atanhf'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_asinh.lto_priv.981':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:118: undefined reference to `asinhf'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_acosh.lto_priv.980':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:116: undefined reference to `acoshf'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/cchaRFoM.ltrans2.ltrans.o: in function `mp_math_log2.lto_priv.975':
/mnt/c/Users/sebi/Documents/TINKERING/MicroPython/FORKS/micropython/ports/nrf/../../py/modmath.c:106: undefined reference to `log2f'
collect2: error: ld returned 1 exit status
make: *** [Makefile:344: build-pca10040-s132/firmware.elf] Error 1
  • Error when #define MICROPY_PY_IO_FILEIO (1)
LINK build-pca10040-s132/firmware.elf
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccKalfRU.ltrans2.ltrans.o:(.rodata+0x25fc): undefined reference to `fatfs_type_fileio'
/usr/local/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /tmp/ccKalfRU.ltrans2.ltrans.o:(.rodata+0x2604): undefined reference to `fatfs_type_textio'
collect2: error: ld returned 1 exit status
make: *** [Makefile:344: build-pca10040-s132/firmware.elf] Error 1
  • Error when #define MICROPY_PY_MACHINE_SPI (1):
CC ../../extmod/machine_spi.c
../../extmod/machine_spi.c: In function 'mp_machine_soft_spi_print':
../../extmod/machine_spi.c:175:67: error: expected ')' before 'MP_HAL_PIN_FMT'
     mp_printf(print, "SoftSPI(baudrate=%u, polarity=%u, phase=%u,"
                                                                   ^
                                                                   )
         " sck=" MP_HAL_PIN_FMT ", mosi=" MP_HAL_PIN_FMT ", miso=" MP_HAL_PIN_FMT ")",
                 ~~~~~~~~~~~~~~
../../extmod/machine_spi.c:174:32: error: unused variable 'self' [-Werror=unused-variable]
     mp_machine_soft_spi_obj_t *self = MP_OBJ_TO_PTR(self_in);
                                ^~~~
At top level:
../../extmod/machine_spi.c:146:17: error: 'baudrate_from_delay_half' defined but not used [-Werror=unused-function]
 STATIC uint32_t baudrate_from_delay_half(uint32_t delay_half) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [../../py/mkrules.mk:47: build-pca10040-s132/extmod/machine_spi.o] Error 1

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