mpconfigboard.h customization

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
ajie_dirgantara
Posts: 81
Joined: Fri Sep 02, 2016 9:26 am

mpconfigboard.h customization

Post by ajie_dirgantara » Fri Jun 30, 2017 7:25 am

Hi,

Can somebody tell me where can I get any information (docs, wiki, etc) to get to play around this file? what to do when I need to disable/enable something, doing pin assignment, etc?

The available boards config is good, but I like to customize further according to my need.

Rgds,

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: mpconfigboard.h customization

Post by shaoziyang » Fri Jun 30, 2017 12:28 pm

There is not documents now. But if you are good at embed program, you may guess the option in file mpconfigboard.h, or you may compare difference board's mpconfigboard.h file.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: mpconfigboard.h customization

Post by pfalcon » Sun Jul 02, 2017 10:37 am

All options are well described in py/mpconfig.h. Generally, the best documentation is the source code itself. If you aren't familiar with the idea, see http://wiki.c2.com/?UseTheSourceLuke . Of course, if someone wants to write (high quality) documentation and maintain it afterwards (for years, with daily changes happening to MicroPython), you're more than welcome to do that.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: mpconfigboard.h customization

Post by deshipu » Sun Jul 02, 2017 2:49 pm

pfalcon wrote:Of course, if someone wants to write (high quality) documentation and maintain it afterwards (for years, with daily changes happening to MicroPython), you're more than welcome to do that.
I would really advise against it. Without any help from the developers, who make far-fetching changes without even mentioning them in the changelog, keeping such documentation up to date is a fool's errand. I tried to do it with unofficial development documentation, but within two releases the examples stopped to compile and there is no way to find out what changed other than trawling through all the commits, understanding what each of them changes, until you find the one that actually broke things. I think that effort is much better spent on other things, at least until this project matures and the developers start updating the documentation along with their changes in the same commit. But that may take a generation or two.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: mpconfigboard.h customization

Post by deshipu » Sun Jul 02, 2017 4:58 pm

I think it's also a very bad advice to send people to check the source code when they are unsure about some details of the API. Looking at the source code, you can never be sure if what you see is an official API, a temporary hack, an outright bug, or an implementation detail. Thus, you can be sure that your code *will* break as soon as that code gets changed, and you will forever be condemned to updating it according to the whims of developers. At the same time, the developers feel free to arbitrarily change, rename and remove things, since they are not in the official documentation after all.

Post Reply