Page 1 of 1

Any newbie guides to build firmware with custom C modules?

Posted: Tue Apr 26, 2022 2:42 am
by sushyoshi
Hello,

I am trying to learn how to build the micropython firmware from scratch so that I can add custom modules to it.

There seem to be bits of information about it scattered all over the web but, I still haven't found a proper guide to do this.

Does anyone know of a guide that is easy for a newbie to follow about this?

Re: Any newbie guides to build firmware with custom C modules?

Posted: Tue Apr 26, 2022 7:58 am
by Lobo-T
I suppose you have read this?: https://docs.micropython.org/en/latest/ ... ython.html

But a better guide would be nice.

Re: Any newbie guides to build firmware with custom C modules?

Posted: Tue Apr 26, 2022 8:25 am
by stijn
What do you need to know exactly? The documentation linked above is actually rather complete: it shows where to find working example source code, a link to docs showing how to get started from scratch in case you haven't yet, and how to build that example module.

Re: Any newbie guides to build firmware with custom C modules?

Posted: Tue Apr 26, 2022 9:34 am
by Lobo-T
Some more examples would be nice.
Especially how to handle different variable types.

Re: Any newbie guides to build firmware with custom C modules?

Posted: Tue Apr 26, 2022 11:19 am
by stijn
https://micropython-usermod.readthedocs.io/en/latest/ is good foor starters (would indeed be better if something like that is part of MicroPython), and once you can do that you probably know enough to derive the rest from the MicroPython source code

Re: Any newbie guides to build firmware with custom C modules?

Posted: Tue Apr 26, 2022 1:29 pm
by sushyoshi
Thanks for the suggestions. Those are indeed very good guides, however the information is very overwhelming for a complete newbie.
After gathering bits of information in different sites here is the format that ai would like to have in a guide:

1 - What you need: Windows, Linux or Mac
2 - If you are on Windows (like most newbies), a guide to run a linux virtual machine
3 - In Linux, update, upgrade, install python
4 - Install esp-idf
5 - clone micropython
6 - building esp32 firmware without any C modules
7 - bulding custom esp32 firmware
8 - Flashing the firmware
9 - Hello World example with a custom module

This is just an example. I just hoped there would be something really complete like this for complete beginner.

Re: Any newbie guides to build firmware with custom C modules?

Posted: Tue Apr 26, 2022 6:11 pm
by marcidy