Skip to content
Snippets Groups Projects
Commit b1422de1 authored by Paul Sokolovsky's avatar Paul Sokolovsky Committed by Damien George
Browse files

py: Allow to override port config file and thus have >1 configs per port.

Use it like:

make CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_my.h>"'
parent 49c47da8
No related branches found
No related tags found
No related merge requests found
...@@ -25,10 +25,23 @@ ...@@ -25,10 +25,23 @@
*/ */
// This file contains default configuration settings for MicroPython. // This file contains default configuration settings for MicroPython.
// You can override any of these options using mpconfigport.h file located // You can override any of the options below using mpconfigport.h file
// in a directory of your port. // located in a directory of your port.
// mpconfigport.h is a file containing configuration settings for a
// particular port. mpconfigport.h is actually a default name for
// such config, and it can be overriden using MP_CONFIGFILE preprocessor
// define (you can do that by passing CFLAGS_EXTRA='-DMP_CONFIGFILE="<file.h>"'
// argument to make when using standard MicroPython makefiles).
// This is useful to have more than one config per port, for example,
// release vs debug configs, etc. Note that if you switch from one config
// to another, you must rebuild from scratch using "-B" switch to make.
#ifdef MP_CONFIGFILE
#include MP_CONFIGFILE
#else
#include <mpconfigport.h> #include <mpconfigport.h>
#endif
// Any options not explicitly set in mpconfigport.h will get default // Any options not explicitly set in mpconfigport.h will get default
// values below. // values below.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment