Any newbie guides to build firmware with custom C modules?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
sushyoshi
Posts: 21
Joined: Sat Feb 05, 2022 9:25 am

Any newbie guides to build firmware with custom C modules?

Post by sushyoshi » Tue Apr 26, 2022 2:42 am

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?

Lobo-T
Posts: 36
Joined: Tue Nov 16, 2021 2:36 pm

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

Post by Lobo-T » Tue Apr 26, 2022 7:58 am

I suppose you have read this?: https://docs.micropython.org/en/latest/ ... ython.html

But a better guide would be nice.

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

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

Post by stijn » Tue Apr 26, 2022 8:25 am

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.

Lobo-T
Posts: 36
Joined: Tue Nov 16, 2021 2:36 pm

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

Post by Lobo-T » Tue Apr 26, 2022 9:34 am

Some more examples would be nice.
Especially how to handle different variable types.

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

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

Post by stijn » Tue Apr 26, 2022 11:19 am

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

sushyoshi
Posts: 21
Joined: Sat Feb 05, 2022 9:25 am

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

Post by sushyoshi » Tue Apr 26, 2022 1:29 pm

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.

marcidy
Posts: 133
Joined: Sat Dec 12, 2020 11:07 pm

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

Post by marcidy » Tue Apr 26, 2022 6:11 pm


Post Reply