sf2,sf6 & pyboard factoryreset build failure on latest 42e45bd

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
User avatar
devnull
Posts: 447
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

sf2,sf6 & pyboard factoryreset build failure on latest 42e45bd

Post by devnull » Sat Dec 21, 2019 10:39 am

I have not changed my setup for over a month, and just updated, when I attempt to compile I get:

Code: Select all

LINK build-PYBV11/firmware.elf
arm-none-eabi-ld: build-PYBV11/main.o: in function `stm32_main':
main.c:(.text.stm32_main+0x2e4): undefined reference to `f_mount'
arm-none-eabi-ld: build-PYBV11/factoryreset.o: in function `factory_reset_make_files':
factoryreset.c:(.text.factory_reset_make_files+0x1c): undefined reference to `f_open'
arm-none-eabi-ld: factoryreset.c:(.text.factory_reset_make_files+0x2c): undefined reference to `f_write'
arm-none-eabi-ld: factoryreset.c:(.text.factory_reset_make_files+0x32): undefined reference to `f_close'
arm-none-eabi-ld: build-PYBV11/factoryreset.o: in function `factory_reset_create_filesystem':
factoryreset.c:(.text.factory_reset_create_filesystem+0x28): undefined reference to `f_mkfs'
arm-none-eabi-ld: factoryreset.c:(.text.factory_reset_create_filesystem+0x46): undefined reference to `f_setlabel'
arm-none-eabi-ld: build-PYBV11/storage.o: in function `pyb_flash_init_vfs':
storage.c:(.text.pyb_flash_init_vfs+0x34): undefined reference to `mp_fat_vfs_type'
arm-none-eabi-ld: build-PYBV11/sdcard.o: in function `sdcard_init_vfs':
sdcard.c:(.text.sdcard_init_vfs+0x44): undefined reference to `mp_fat_vfs_type'
make: *** [Makefile:573: build-PYBV11/firmware.elf] Error 1
This fails on Pyboard, SF2 SF6, however esp8266, esp32 and nrf are OK, so it is appears to be pyboard specific.

So it looks like something else has changed, any suggestions ??

User avatar
pythoncoder
Posts: 4017
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: sf2,sf6 & pyboard factoryreset build failure on latest 42e45bd

Post by pythoncoder » Sun Dec 22, 2019 7:30 am

As I commented on GitHub, for my own reasons I created a fresh clone of MicroPython yesterday and built from that. The build for SF2 was successful and littlefs works on EEPROM chips I'm working with. I'm no Git guru but I'd suspect your mechanism for updating the source.
Peter Hinch

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

Re: sf2,sf6 & pyboard factoryreset build failure on latest 42e45bd

Post by devnull » Sun Dec 22, 2019 10:33 am

Thanks Peter;

I tracked it down to adding: `MICROPY_VFS_FAT=1` to the MAKE command which fixed the build for me.

Not sure if Little FS is also working on the SF2/SF6 ?

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

Re: sf2,sf6 & pyboard factoryreset build failure on latest 42e45bd

Post by devnull » Sun Dec 22, 2019 10:44 pm

Here's my clone and update scripts, can someone confirm that I am not missing any GIT steps ??

$ARG would be either "clean" or "commit", and $OPT used with commit would be the commit hash.

Code: Select all

BASHDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
UPYDIR="$BASHDIR/../build/micropython"
BUILDDIR="$BASHDIR/../build/micropython/micropython"

function clone {
  cd $UPYDIR
  echo "@@ Cloning micropython..."
  if [ -d "$BUILDDIR" ]; then
    rm -rf $BUILDDIR
  fi
  git clone --recursive https://github.com/micropython/micropython.git;
}

function update {

  if [ ! -d "$BUILDDIR" ]; then
    clone;
  fi
  
  cd $BUILDDIR;
  
  echo "@@ Updating micropython..."
  
  ## Scrap any local changes
  git stash;
  
  if [ "$ARG" == "commit" ]; then
    echo "Checkout $OPT"
    git checkout $OPT
  else
    git pull origin master;
  fi
  
  git submodule update --init
  make clean
  make -C mpy-cross
}

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

Re: sf2,sf6 & pyboard factoryreset build failure on latest 42e45bd

Post by jimmo » Mon Dec 23, 2019 3:12 am

FYI (for other people finding this thread) this was resolved in https://github.com/micropython/micropython/issues/5443

Post Reply