Building lv_micropython with Eclipse in Windows

I have a topic post on building micropython codebase with eclipse on the micropython forum here and it works.

However when I try the same method for lv_micropython (driver_STM32F7DISC branch) here https://github.com/prolomb/lv_micropython.git , just in the beginning of the build process (where the mainline micropython stm32 build process normally pass with “python3 …/…/py/makeversionhdr.py build-STM32F7DISC/genhdr/mpversion.h”) I get “FIND: Parameter format not correct” 11 times like this:

15:02:19 **** Build of configuration Default for project lv_micropython ****
make -C ports/stm32 V=1 BOARD=STM32F7DISC 
make: Entering directory 'I:/microPython-500gb/lv_micropython/ports/stm32'
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
FIND: Parameter format not correct
GEN build-STM32F7DISC/genhdr/pins.h
python3 boards/make-pins.py --board boards/STM32F7DISC/pins.csv --af boards/stm32f746_af.csv \
	--prefix boards/stm32f4xx_prefix.c --hdr build-STM32F7DISC/genhdr/pins.h --hdr-obj-decls \
	--qstr build-STM32F7DISC/pins_qstr.h --af-const build-STM32F7DISC/genhdr/pins_af_const.h \
	--af-defs build-STM32F7DISC/genhdr/pins_af_defs.h --af-defs-cmp-strings \
	--af-py build-STM32F7DISC/pins_af.py > build-STM32F7DISC/pins_STM32F7DISC.c

I am pretty sure that quotes (" ") are required somewhere because in windows find requires quotes

FIND something 
FIND: Parameter format not correct

FIND "something"
works

however I can’t locate which command cause this error in stm32/Makefile.

I appreciate your help. Thanks

EDIT
At the end I get a “OSError: [WinError 193] %1 is not a valid Win32 application” error as well, this can be connected with FIND error above.

python3 ../../tools/makemanifest.py -o build-STM32F7DISC/frozen_content.c -v "MPY_DIR=../.." -v "MPY_LIB_DIR=../../../micropython-lib" -v "PORT_DIR=/i/microPython-500gb/lv_micropython/ports/stm32" -v "BOARD_DIR=boards/STM32F7DISC" -b "build-STM32F7DISC" -f"-march=armv7m" boards/manifest.py
MPY dht.py
Traceback (most recent call last):
  File "../../tools/makemanifest.py", line 294, in <module>
    main()
  File "../../tools/makemanifest.py", line 254, in main
    res, out = system([MPY_CROSS] + args.mpy_cross_flags.split() + ['-o', outfile, '-s', script, '-O{}'.format(opt), infile])
  File "../../tools/makemanifest.py", line 126, in system
    output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File "C:\Users\murat\AppData\Local\Programs\Python\Python37\Lib\subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "C:\Users\murat\AppData\Local\Programs\Python\Python37\Lib\subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\murat\AppData\Local\Programs\Python\Python37\Lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "C:\Users\murat\AppData\Local\Programs\Python\Python37\Lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
make: *** [../../py/mkrules.mk:103: build-STM32F7DISC/frozen_content.c] Error 1
make: Leaving directory 'I:/microPython-500gb/lv_micropython/ports/stm32'
"make -C ports/stm32 V=1 BOARD=STM32F7DISC" terminated with exit code 2. Build might be incomplete.

15:07:31 Build Failed. 1 errors, 0 warnings. (took 5m:11s.295ms)

Hi,

At the moment, it’s not surprising that building lv_micropython on Windows will not work as I’m pretty sure we have only tested it on Linux.

I think if you used WSL (Windows Subsystem for Linux) or something similar, you could make it work.

Hi,

With this method explained here it is now possible to build and debug micropython in windows environment and with windows programs (I hate windows btw :slight_smile: ). As far as I know WSL only runs on Windows 10 and requires a Linux distribution such as Ubuntu on its top. We’re doing the same with WMware Player free tool. However if we can find the issues and make necessary adjustments in stm32/Makefile as we did for mainline micropython here in this PR it will be possible to build and debug lv_micropython as well.

That’s because we use linux “find” utility in the Makefile.
It’s not portable to Windows the way it’s written today, but can probably be fixed/rewritten if anyone bothered with it.

Hi @amirgon
Thanks for pointing the potential cause.
I found a similar use of “shell find” utility here in micropython/py/mkrules.mk that didn’t cause any problem im my micropython build, I don’t have enough knowledge about micropython codebase structure - build process yet to make a comment, but working on it.