How to Build and Debug MicroPython Source Code with Eclipse

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
User avatar
ta1db
Posts: 52
Joined: Mon Sep 02, 2019 12:05 pm
Contact:

Re: How to Build and Debug MicroPython Source Code with Eclipse

Post by ta1db » Sun May 31, 2020 5:56 pm

Above procedure requires STM32CubeProgrammer https://www.st.com/en/development-tools ... eprog.html and ST LINK GDB Server installations https://www.st.com/resource/en/user_man ... ronics.pdf

Now, Time to Micropython Application Development with Eclipse
I appreciate your comments, contributions.

miltmobley
Posts: 25
Joined: Mon Mar 07, 2016 11:44 pm

Re: How to Build and Debug MicroPython Source Code with Eclipse

Post by miltmobley » Sun Jul 26, 2020 4:05 am

Backing up a little in the message stream,

"create an Empty Makefile Project and import the micropython source code into it" will create a project folder in your current workspace,
install its config files there, and then you import the source files there.

"create a Makefile Project with Existing source" will install the config files in the source tree you specify, wherever it is.
you may not want this.

miltmobley
Posts: 25
Joined: Mon Mar 07, 2016 11:44 pm

Re: How to Build and Debug MicroPython Source Code with Eclipse

Post by miltmobley » Sun Jul 26, 2020 4:18 am

How about another approach?

For stm32 boards you may be able to use STM32Cube IDE, which is an Eclipse derivative, and works on Windows.
It has a predefined project config for the mpu used on pyboard, and for most other st mpu's. It installs its own toolchains,
so you wouldn't have to mess with building mpy-cross.
A possible problem is you would have to figure out how to make it build micropython firmware, and download it instead of
the standard firmware it gets from the st web servers.

miltmobley
Posts: 25
Joined: Mon Mar 07, 2016 11:44 pm

Re: How to Build and Debug MicroPython Source Code with Eclipse

Post by miltmobley » Thu Jul 30, 2020 2:18 am

This just a report of an attempt to build micropython on eclipse. I tried both latest eclipse for c/c++ download and current version
of STM32Cube IDE (which is derived from elipse+cdt) on Windows 10 with same result.

Both IDE's can create a new standard project for the pybv11 chip and find the toolchain automatically. Result of building
was a 1.2 MB elf file, which I assume could be processed for downloading using the micropython tool.

I was also able to create a makefile project and import the micropython source. But the toolchain was not found automatically,
and I haven't figured out how to link it to the project yet. The eclipse ui has changed from Neon eclipse where I did similar things
successfully.

Worse yet after exiting and restarting eclipse/cube, the IDE is not able to open the project.

If you can't use neon eclipse, you might want to use eclipse as an editor and do command line makes as suggested above.

User avatar
ta1db
Posts: 52
Joined: Mon Sep 02, 2019 12:05 pm
Contact:

Re: How to Build and Debug MicroPython Source Code with Eclipse

Post by ta1db » Wed Aug 26, 2020 5:37 am

Hi @miltmobley
Thanks for your kind contribution to my post.
I had to do other jobs for a long time. For this reason, unfortunately, I cannot give a detailed answer. I hope to return to this subject at the earliest opportunity and evaluate what they wrote.

OutoftheBOTS_
Posts: 791
Joined: Mon Nov 20, 2017 10:18 am

Re: How to Build and Debug MicroPython Source Code with Eclipse

Post by OutoftheBOTS_ » Wed Aug 26, 2020 9:45 pm

Not sure oif this will help but I use system workbench for all my STM32 projects. Which is also derived from eclipse and has all the needed toolchains and linker setup see https://www.st.com/en/development-tools/sw4stm32.html

Post Reply