Build error - nano rp2040 connect

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
ps_nithin
Posts: 14
Joined: Sat Jun 18, 2022 1:44 pm

Build error - nano rp2040 connect

Post by ps_nithin » Sun Jul 03, 2022 4:04 pm

I am getting the following error msg when i try to build micropython for nano rp2040 connect.

inspiron3000@inspiron3000-Inspiron-14-3467:~/micropython/ports/rp2$ make BOARD=ARDUINO_NANO_RP2040_CONNECT
[ -e build-ARDUINO_NANO_RP2040_CONNECT/CMakeCache.txt ] || cmake -S . -B build-ARDUINO_NANO_RP2040_CONNECT -DPICO_BUILD_DOCS=0 -DMICROPY_BOARD=ARDUINO_NANO_RP2040_CONNECT
PICO_SDK_PATH is /home/inspiron3000/micropython/lib/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
PICO compiler is pico_arm_gcc
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
Build type is MinSizeRel
PICO target board is arduino_nano_rp2040_connect.
Using board configuration from /home/inspiron3000/micropython/lib/pico-sdk/src/boards/include/boards/arduino_nano_rp2040_connect.h
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter
TinyUSB available at /home/inspiron3000/micropython/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
CMake Warning at /home/inspiron3000/micropython/lib/pico-sdk/src/rp2_common/cyw43_driver/CMakeLists.txt:15 (message):
PICO_CYW43_DRIVER_PATH specified but content not present.


CMake Warning at /home/inspiron3000/micropython/lib/pico-sdk/src/rp2_common/pico_lwip/CMakeLists.txt:14 (message):
PICO_LWIP_PATH specified but content not present.


Found User C Module(s):
-- Configuring done
CMake Error at CMakeLists.txt:66 (add_executable):
Cannot find source file:

/home/inspiron3000/micropython/lib/mynewt-nimble/ext/tinycrypt/src/aes_encrypt.c

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx


-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
make: *** [Makefile:26: all] Error 1

Any ideas?

Lobo-T
Posts: 36
Joined: Tue Nov 16, 2021 2:36 pm

Re: Build error - nano rp2040 connect

Post by Lobo-T » Sun Jul 03, 2022 6:29 pm

It seems that it expects the CYW43 driver to be present, which shouldn't really be necessary for that board.

Have you run:

Code: Select all

make BOARD=ARDUINO_NANO_RP2040_CONNECT submodules
If that does not install the CYW43 submodule try:

Code: Select all

make BOARD=PICO_W submodules
Which does use it.
Then run:

Code: Select all

make BOARD=ARDUINO_NANO_RP2040_CONNECT clean
make BOARD=ARDUINO_NANO_RP2040_CONNECT
And see if that doesn't let you compile.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build error - nano rp2040 connect

Post by jimmo » Mon Jul 04, 2022 1:23 am

Lobo-T wrote:
Sun Jul 03, 2022 6:29 pm
It seems that it expects the CYW43 driver to be present, which shouldn't really be necessary for that board.
This is just a warning and isn't preventing the build from succeeding (although the warning shouldn't be there).
ps_nithin wrote:
Sun Jul 03, 2022 4:04 pm
/home/inspiron3000/micropython/lib/mynewt-nimble/ext/tinycrypt/src/aes_encrypt.c
The problem is that the lib/mynewt-nimble submodule isn't initialised.

I've raised https://github.com/micropython/micropython/pull/8855 to remove the spurious warning and to detect when the required submodules are missing and to make "make BOARD=... submodules" doe the right thing.

ps_nithin
Posts: 14
Joined: Sat Jun 18, 2022 1:44 pm

Re: Build error - nano rp2040 connect

Post by ps_nithin » Mon Jul 04, 2022 1:42 pm

Previous error seems to be fixed. But now i am getting the following error.

inspiron3000@inspiron3000-Inspiron-14-3467:~/micropython/ports/rp2$ make BOARD=ARDUINO_NANO_RP2040_CONNECT
[ -e build-ARDUINO_NANO_RP2040_CONNECT/CMakeCache.txt ] || cmake -S . -B build-ARDUINO_NANO_RP2040_CONNECT -DPICO_BUILD_DOCS=0 -DMICROPY_BOARD=ARDUINO_NANO_RP2040_CONNECT
PICO_SDK_PATH is /home/inspiron3000/micropython/lib/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
PICO compiler is pico_arm_gcc
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
Build type is MinSizeRel
PICO target board is arduino_nano_rp2040_connect.
Using board configuration from /home/inspiron3000/micropython/lib/pico-sdk/src/boards/include/boards/arduino_nano_rp2040_connect.h
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter
TinyUSB available at /home/inspiron3000/micropython/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
CMake Warning at /home/inspiron3000/micropython/lib/pico-sdk/src/rp2_common/cyw43_driver/CMakeLists.txt:15 (message):
PICO_CYW43_DRIVER_PATH specified but content not present.


CMake Warning at /home/inspiron3000/micropython/lib/pico-sdk/src/rp2_common/pico_lwip/CMakeLists.txt:14 (message):
PICO_LWIP_PATH specified but content not present.


Found User C Module(s):
-- Configuring done
-- Generating done
-- Build files have been written to: /home/inspiron3000/micropython/ports/rp2/build-ARDUINO_NANO_RP2040_CONNECT
make -s -C build-ARDUINO_NANO_RP2040_CONNECT
Scanning dependencies of target ELF2UF2Build
[ 0%] Creating directories for 'ELF2UF2Build'
[ 0%] No download step for 'ELF2UF2Build'
[ 0%] No patch step for 'ELF2UF2Build'
[ 1%] No update step for 'ELF2UF2Build'
[ 1%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/inspiron3000/micropython/ports/rp2/build-ARDUINO_NANO_RP2040_CONNECT/elf2uf2
[ 1%] Performing build step for 'ELF2UF2Build'
Scanning dependencies of target elf2uf2
[ 50%] Building CXX object CMakeFiles/elf2uf2.dir/main.cpp.o
[100%] Linking CXX executable elf2uf2
[100%] Built target elf2uf2
[ 1%] No install step for 'ELF2UF2Build'
[ 1%] Completed 'ELF2UF2Build'
[ 1%] Built target ELF2UF2Build
Scanning dependencies of target bs2_default
[ 2%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 2%] Linking ASM executable bs2_default.elf
[ 2%] Built target bs2_default
Scanning dependencies of target bs2_default_padded_checksummed_asm
[ 2%] Generating bs2_default.bin
[ 2%] Generating bs2_default_padded_checksummed.S
[ 2%] Built target bs2_default_padded_checksummed_asm
[ 3%] Generating genhdr/mpversion.h
GEN /home/inspiron3000/micropython/ports/rp2/build-ARDUINO_NANO_RP2040_CONNECT/genhdr/mpversion.h
[ 3%] Generating genhdr/qstr.i.last
[ 4%] Generating genhdr/qstr.split
[ 4%] Generating genhdr/qstrdefs.collected.h
QSTR updated
[ 5%] Generating genhdr/qstrdefs.preprocessed.h
[ 5%] Generating genhdr/qstrdefs.generated.h
[ 5%] Generating genhdr/moduledefs.split
[ 5%] Generating genhdr/moduledefs.collected
Module registrations updated
[ 5%] Generating genhdr/moduledefs.h
[ 5%] Generating frozen_content.c
Traceback (most recent call last):
File "/home/inspiron3000/micropython/tools/makemanifest.py", line 435, in <module>
main()
File "/home/inspiron3000/micropython/tools/makemanifest.py", line 347, in main
include(input_manifest)
File "/home/inspiron3000/micropython/tools/makemanifest.py", line 70, in include
exec(f.read(), globals(), {"options": IncludeOptions(**kwargs)})
File "<string>", line 4, in <module>
File "/home/inspiron3000/micropython/tools/makemanifest.py", line 65, in include
with open(manifest) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/inspiron3000/micropython-lib/micropython/bluetooth/aioble/manifest.py'
make[3]: *** [CMakeFiles/firmware.dir/build.make:77: frozen_content.c] Error 1
make[2]: *** [CMakeFiles/Makefile2:1621: CMakeFiles/firmware.dir/all] Error 2
make[1]: *** [Makefile:84: all] Error 2
make: *** [Makefile:27: all] Error 2

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Build error - nano rp2040 connect

Post by jimmo » Mon Jul 04, 2022 2:42 pm

ps_nithin wrote:
Mon Jul 04, 2022 1:42 pm
Previous error seems to be fixed. But now i am getting the following error.
You need to have micropython-lib cloned alongside the microptython repo.

Code: Select all

cd /home/inspiron3000/
git clone https://github.com/micropython/micropython-lib.git
should do it.

(We're currently discussing this exact issue of micropython-lib in that PR I raised earlier -- https://github.com/micropython/micropython/pull/8856 )

ps_nithin
Posts: 14
Joined: Sat Jun 18, 2022 1:44 pm

Re: Build error - nano rp2040 connect

Post by ps_nithin » Mon Jul 04, 2022 2:48 pm

Thanks. Now i can successfully build micropython for nano rp2040 connect.

Post Reply