Page 1 of 1

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

Posted: Sat Dec 21, 2019 10:39 am
by devnull
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 ??

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

Posted: Sun Dec 22, 2019 7:30 am
by pythoncoder
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.

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

Posted: Sun Dec 22, 2019 10:33 am
by devnull
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 ?

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

Posted: Sun Dec 22, 2019 10:44 pm
by devnull
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
}

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

Posted: Mon Dec 23, 2019 3:12 am
by jimmo
FYI (for other people finding this thread) this was resolved in https://github.com/micropython/micropython/issues/5443