Skip to content

Commit fe3102f

Browse files
committed
mention indirect and direct dependency on globals .h contents
1 parent a527244 commit fe3102f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

libraries/esp8266/examples/GlobalBuildOptions/GlobalBuildOptions.ino

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
*
55
* Example from https://arduino-esp8266.readthedocs.io/en/latest/faq/a06-global-build-options.html
66
*
7-
* Note, we do not "#include" the special file "GlobalBuildOptions.ino.globals.h".
8-
* The prebuild script will make it available to all modules.
7+
* It is not necessary to have `#include "GlobalBuildOptions.ino.globals.h"`.
8+
* However, any code inside of the special header file would not be available,
9+
* unless there is also a matching `create-file:...` directive inside of it.
910
*
10-
* To track the new sketch name when saving this sketch to a new location and
11-
* name, remember to update the global .h file name.
11+
* Note that when building in debug mode, `build.opt:debug` should be used instead.
12+
*
13+
* Remember to update the global .h file name when saving this sketch to a new location!
1214
*/
1315

1416
#include <umm_malloc/umm_malloc.h> // has prototype for umm_free_heap_size_min()

libraries/esp8266/examples/GlobalBuildOptions/GlobalBuildOptions.ino.globals.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@
88
* this line is ignored
99
*@create-file:build.opt@
1010
# this line is ignored
11+
*/
12+
13+
/*@create-file:build.opt:debug@
14+
// Another embedded build.opt, with a different set of flags
15+
-DMYTITLE1="\"Debugging on \""
1116
-Og
12-
// -fanalyzer
1317
-DUMM_STATS_FULL=1
18+
// -fanalyzer
1419
*/
1520

21+
// Following *raw* contents are also included
1622
#ifndef GLOBALBUILDOPTIONS_INO_GLOBALS_H
1723
#define GLOBALBUILDOPTIONS_INO_GLOBALS_H
1824

0 commit comments

Comments
 (0)