NRF - PR5472 Build Sanity Check Please ?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
User avatar
devnull
Posts: 440
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

NRF - PR5472 Build Sanity Check Please ?

Post by devnull » Sun Jan 12, 2020 11:15 am

Hello All;

Would really appreciate if someone else can verify that the errors I am getting during build for the NRF with FAT enabled on the PCA10056 development board can be replicated by someone else, as this is driving me nuts !.

See the threads here: https://github.com/micropython/micropyt ... -573270500

Here's the method I used to build:

1) Pull in PR 5472 that enables FAT support

Code: Select all

# cd /nfs/qnap/dev/uPython/build/micropython/micropython
# git fetch origin pull/5472/head:PR-5472
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Total 20 (delta 17), reused 17 (delta 17), pack-reused 3
Unpacking objects: 100% (20/20), done.
From https://github.com/micropython/micropython
 * [new ref]             refs/pull/5472/head -> PR-5472
# git checkout PR-5472
Switched to branch 'PR-5472'
#

2) Install Bluetooth soft-device

Code: Select all

cd /nfs/qnap/dev/uPython/build/micropython/micropython/ports/nrf/drivers/bluetooth
./download_ble_stack.sh

3) Enable FAT support during MAKE:

Code: Select all

cd /nfs/qnap/dev/uPython/build/micropython/micropython/ports/nrf
make -j8 BOARD=pca10056 SD=s140 MICROPY_VFS_VFAT=1
4) Build Fails:

Code: Select all

Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
mkdir -p build-pca10056-s140/genhdr
mkdir -p build-pca10056-s140/device/
mkdir -p build-pca10056-s140/drivers/
mkdir -p build-pca10056-s140/drivers/bluetooth/
...
...
...
CC ../../lib/utils/interrupt_char.c
CC ../../lib/timeutils/timeutils.c
CC build-pca10056-s140/pins_gen.c
LINK build-pca10056-s140/firmware.elf
/usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: /tmp/ccaI98Ul.ltrans3.ltrans.o: in function `factory_reset_filesystem':
/nfs/qnap/dev/uPython/build/micropython/micropython/ports/nrf/main.c:134: undefined reference to `f_mkfs'
/usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: /nfs/qnap/dev/uPython/build/micropython/micropython/ports/nrf/main.c:141: undefined reference to `f_setlabel'
/usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: /nfs/qnap/dev/uPython/build/micropython/micropython/ports/nrf/main.c:142: undefined reference to `mp_fat_vfs_type'
/usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: /tmp/ccaI98Ul.ltrans1.ltrans.o:(.rodata+0x1298): undefined reference to `mp_fat_vfs_type'
/usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: /tmp/ccaI98Ul.ltrans4.ltrans.o: in function `os_sync.lto_priv.510':
/nfs/qnap/dev/uPython/build/micropython/micropython/ports/nrf/modules/uos/moduos.c:92: undefined reference to `disk_ioctl'
collect2: error: ld returned 1 exit status
make: *** [Makefile:426: build-pca10056-s140/firmware.elf] Error 1

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

Re: NRF - PR5472 Build Sanity Check Please ?

Post by jimmo » Sun Jan 12, 2020 1:04 pm

devnull wrote:
Sun Jan 12, 2020 11:15 am

Code: Select all

make -j8 BOARD=pca10056 SD=s140 MICROPY_VFS_VFAT
I'll try and repro your steps during the week, but shouldn't it be MICROPY_VFS_FAT? (not VFAT)

User avatar
devnull
Posts: 440
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: NRF - PR5472 Build Sanity Check Please ?

Post by devnull » Mon Jan 13, 2020 1:54 am

@jimmo - thanks, well spotted - that was the cause of the problem,

Code: Select all

MICROPY_VFS_VFAT
should be

Code: Select all

MICROPY_VFS_FAT
After that it builds

:oops:

Post Reply