Hi @stijn,
Thanks for your kind response.
Which port do you want to build?
I work on stm32, esp8266 and esp32 ports however to start with stm32 is enough for the moment, then I can find my way for other ports.
In general its as 'simple' as telling Eclipse to use an existing Makefile (according to internet, something like File->New project->C/C++->Makefile Project with Existing Code).
Yes, it should be easy because all I have to do is to execute just a simple build command "make -C ports/stm32/ BOARD=STM32F7DISC" but I couldn't do it despite several trials.
Edit: Everybody agree on the project should be a
Makefile Project.
[*]The first question is, do we create an
Empty Makefile Project and import the micropython source code into it,
[*]or do we create directly a
Makefile Project From Existing (micropython) Code. [*]Another option is to import directly the
Existing (micropython) Code as Makefile Project but if I am not wrong the last two way is identical and produces the same project tree.
[*]Another option is to import the micropython source code direct from
File System as it is.
As you see there is a 4 way separation just in the beginning even if we agree on the project will be a Makefile Project.
I choose
File -> New -> Makefile Project with Existing Code. Now I have to point
Existing Code Location and the 2nd question arises: should I chose microphython root folder where the README.md exist or ports/stm32 (my case) ? I guess I have to
choose micropython root folder as Existing Code Location because otherwise many source code stay outside of the project. I
choose ARM Cross GCC as the Toolchain for Indexer Settings as well.
-> Finish, project tree appears in the Project Explorer window..
Now I
create a build target with the name of my target as
BOARD=STM32F7DISC and change
Build command from default to "make -C ports/stm32 V=1" , I do right-click the new build target and choose
Build, I get the following:
10:51:53 **** Build of configuration Default for project micropython ****
make -C ports/stm32 V=1 BOARD=STM32F7DISC
make: Entering directory 'G:/microPython/project/micropython/ports/stm32'
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
c:/users/murat/appdata/roaming/gnu mcu eclipse/build tools/2.12-20190422-1053/bin/sh: python3: not found
make: *** [Makefile:666: build-STM32F7DISC/genhdr/pins.h] Error 127
make: *** [build-STM32F7DISC/genhdr/pins.h] Deleting file 'build-STM32F7DISC/pins_STM32F7DISC.c'
make: Leaving directory 'G:/microPython/project/micropython/ports/stm32'
"make -C ports/stm32 V=1 BOARD=STM32F7DISC" terminated with exit code 2. Build might be incomplete.
10:52:05 Build Failed. 2 errors, 0 warnings. (took 12s.636ms)
I feel that I am on the right way but I am doing something wrong or incomplete.
Edit2: I am running Eclipse in windows on purpose to build micropython in windows, I think invoking python as python3 cause problem, I am working on it.