1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

37 Commits

Author SHA1 Message Date
M Hightower
d1d4212e8b
Add support for global build defines and options (#8504)
* Add support to specify global build defines and options

A script manages the use of a file with a unique name, like
`SketchName.ino.globals.h`, in the Sketch source directory to provide compiler
command-line options (build options) and sketch global defines. The build
option data is encapsulated in a unique "C" comment block and extracted into
the build tree during prebuild.

* Applied os.path.normpath() liberally to input arguments. Fixes windows file path issue.
Improved helpful message for adding embedded build options.

* doubleup '\'

* Added context help for build option support

* expunged sketchbook global
added workaround for aggressive caching

* inital pass at searching for and reading preferences.txt

* Correct Windows path for preferences.txt
Added portable path for preferences.txt
Expanded file timestamp granularity
Improved error message printing for Arduino IDE 2.0 RC4

* Improved portable path and various Windows paths to preferences.txt

* Add cleanup logic and identify 1st run after IDE restart

* text corrections

* Create mkbuildoptglobals.py

When global header file does not exist, this print makes it easier for user to create the header file by providing its name and documentation pointer.

* build.opt heads up to user

Compiler command line changes from build.opt are shown to user

* Updated text

* oops

* Expanded comment and made print help consistent

* Improve handling stderr/stdout with "no verbose output"
Grouped helpful info to print at the end.
Added missing return value.

* Correct timestamp on CommonHFile.h
More improvements to printing
Updated docs.

* Added command-line parser

Support hints for compiler.cache_core. For use when Arduino IDE uses
command-line options that override compiler.cache_core.

Removed overuse of ()

Improve FAQ entry

* Fix script failure under windows

Rely on argpaser for checking that all arguments are present.
Removed redundant argument check in main().

Added '--debug' option and print_dbg method.

Rethink failures on overrides. Remove well know path fallbacks,
error exit when override file is missing.

In well-known path search for preferences.txt, do not assume true.
Make failure to find an error exit event.

When Windows has two preferences.txt files and they have different
values for caching and globals.h is used, error exit. It is not
possible to know from the script which is being used.

* Use quotes on build.opt

Update comment
Include the @ within the expantion string use quotes around file name.
Update doc example to remind and use quotes.

* Update CI for build option and global support

Added "mkbuildoptglobals.extra_flags=--cache_core" to platform.loca.txt
Update "-ide-version=10802" this version number indicates aggressive caching support
Added example to test global .h support

* Add debug prints
Added --debug to CI - this needs to be removed later
Tweaks to touch...

* Give each build VM a unique build.tmp space

* Corrected style on example
temp CI changes
debug crud
Added --ci switch

* Removed CI debug crud

run_CI_locall.sh works fine locally. Hosted Multi-VM CI fails
to work with 'aggressive caching' workaround method.

Add #if defined(CORE_MOCK) to failing example.

* Try HOST_MOCK

* CI adjustments

mkbuildoptglobals.py is optimized around the Arduino IDE 1.x
behaviour. One way the CI differs from the Arduino IDE is in the
handling of core and caching core. With the Arduino IDE, each sketch
has a private copy of core and contributes to a core cache. With the
CI, there is one shared copy of core for all sketches. When global
options are used, the shared copy of core and cache are removed before
and after the build.

* Doc update
2022-05-12 17:14:17 +02:00
Max Prokhorov
fd53a080ee
Add documentation entry about compiler warnings (#8492)
per #8421 and #8475
after checking HW, suggest to check SW as well by at least by enabling some or all compiler warnings
(and also note of the IDE weirdest defaults causing issues we expected to stay solved)
2022-02-22 13:42:26 +03:00
david gauchard
f60defc3d3
flash-size agnostic builds (#6690)
* flash: mapping definition by sketch at runtime depending on flash chip size and user configuration
2022-02-10 18:25:18 +01:00
david gauchard
1cc6960a55
[BREAKING] Disable WiFi at boot by default (#7902)
* Disable WiFi at boot by default

* +define WIFI_IS_OFF_AT_BOOT

* remove now useless example

* mv enableWiFiAtBootTime() to core_esp8266_features.h

* sync with master

* per @earlephilhower review: a file was missing

* doc

* WiFi persistence is now false by default

* fix doc

* ditto

* doc: remove sphinx warnings (fix links and formatting)

* fix link name

* fix doc

* legacy: restore persistence

* undeprecate preinit()

* move force modem up to when mode has changed (per @mcspr review)

* do not wake up from sleep when mode if OFF

* fix doc per review
2021-04-09 23:01:11 +02:00
Earle F. Philhower, III
656a33e6f8
BREAKING - Use IRAM_ATTR in place of ICACHE_RAM_ATTR (#7921)
Update the core to use the define that the ESP32 uses, IRAM_ATTR, for
placing code in DRAM.
2021-03-14 16:56:47 -07:00
Martin Berka
5631051378
Update a02-my-esp-crashes.rst (#7739)
Fixes formatting of bulleted list in Stack section, and misc typos/wording.
2020-12-02 10:14:14 +01:00
standby24x7
1ff927d04c
Fix spelling typo under doc/faq (#7538)
This patch fixes some spelling typo found in doc/faq.
2020-08-18 07:45:37 -07:00
david gauchard
af1bc71a9e
remove lwip-v1.4 specific code (#7436)
* remove lwip-v1.4 specific code

* ditto

* ditto

* fix ip4_addr definition

* CI: change debug builds to use IPv6, remove regular IPv6 builds

* ditto

* split pio CI in four (because they last twice the time of the other builds)

* remove option from pio

* remove lwIP-1.4 from doc

* restore pio CI splitting

* fix CI debug6 script

* ditto
2020-07-09 09:59:49 -07:00
Earle F. Philhower, III
a70e834d1e
Add a "-- CUT HERE --" marker to exception output (#7369)
Users aren't reporting/seeing the actual PC of failures because they
are only copying the >>stack<< into the decoder and not the Exception
line.  Add an ALL CAPS "CUT HERE FOR EXCEPTION DECODER" line to the
output to make it blindingly obvious to include the full crashdump
both in bug reports as well as exception decodes.
2020-06-11 15:24:21 -07:00
Amadeus
27ef03fc05
Add documentation on recovering from deep sleep with WAKE_RF_DISABLED (#7338)
* Clarify how to enable WiFi after DeepSleep

* Add FAQ item for recovering from DeepSleep

* Reference issue

* Update issue URL
2020-05-29 14:14:45 -04:00
Earle F. Philhower, III
83166f948b
Deprecate SPIFFS, move examples to LittleFS (#7263)
* Deprecate SPIFFS, move examples to LittleFS

SPIFFS has been a great filesystem, but it has significant problems in
many cases (and it's also pretty slow).  Development seems to have
slowed/stopped on the upstream version, and we're not able to provide
support or fix the known issues with it as-is.

Deprecate SPIFFS variable.

Update all examples to use LittleFS instead of SPIFFS.

Also, minor cleanup on very old examples which has obsolete delays
waiting for the Serial port to come up, or which were stuck at 9600 baud
because of their ancient AVR heritage.

Fixes #7095

* Remove leftover debug code

* Clean up comments in some examples

* Update documentation on SPIFFS deprecation

* Fix host tests to avoid deprecation warnings

* Fix cut-n-paste error

* Restore SpeedTest.ino, adjust to allow custom FSes

Co-authored-by: Develo <deveyes@gmail.com>
2020-05-04 14:22:50 -04:00
M Hightower
9f6d3c7c3e Add board filter support ... (#6643)
* Add boards filter support - allows for the creation of an abridged boards.txt.
Add some of the ITEAD Sonoff boards to boards.txt.py.
Minor reorder of presentation of board menu items, mainly grouped
board Model and module selection to the top.

* Corrected, I think, LED_BUILTIN vs BUILTIN_LED??

* Updated boards.txt

* Added support for DOIT ESP-Mx DevKit (ESP8285) board.
Adjusted wording and fixed side bar formating issue on the
Sonoff description. Also, removed resetmethod menu
and assigned resetmethod of none.
2019-11-08 14:49:29 -03:00
Earle F. Philhower, III
93ef9e7005
Upgrade to https: serving for JSON, links in docs (#5992)
* Upgrade to https: serving for JSON, links in docs

Fixes #5480

* Update boards.rst documentation

* Update more documentation http: refs to https:

* Remove obsolete staging info

* Drop obsolete versions from JSON programatically

After the final merge is done on the JSON, strip out any named versions
from the final product.

Removing 1.6.5-* and 2.5.0-beta(1,2,3) for now.

* Remove 2.4.0-rc(0/1) from JSON, too
2019-04-30 23:55:03 -07:00
Earle F. Philhower, III
848fbf5b4a
Update conf.py from git tag, fix sphinx warnings (#5716)
Fixes #5671

Implements https://protips.readthedocs.io/git-tag-version.html

Fix a myriad of minor Sphinx warnings generated in the docs.
2019-02-04 20:19:23 +00:00
david gauchard
ce28a76a24 metric for heap fragmentation (#5090)
* +Esp.getHeapUnfragness()

* only in debug mode

* default value

* always enable, 64->32, light 32 integer square root, comments

* fix when debugging is disabled

* give credits

* cosmetics

* fragmentation metric updates (doc, better api, added getMaxFreeBlockSize())

* api reworked, +example

* fixe types, fix names

* coding style fix

* use astyle for example
2018-09-10 01:50:01 -03:00
David Albert
3164af0f35 Update readme.rst (#5092)
Document additional build flag needed to support WPS under 2.4.2
2018-08-30 13:24:52 -03:00
David Albert
a917ad9941 Update a05-board-generator.rst (#5093)
Added additional information about where to find the core root directory (often deeply hidden) so users can run board generator
2018-08-29 23:52:44 -04:00
david gauchard
85e68093e9
Automatic stack location selection (SYS or HEAP), enable per library AR-chive in arduino build system (#5018)
Automatic stack location selection (SYS or HEAP), enable per library AR-chive in arduino build system 

* enable dot_a_linkage on internal libraries
* add device tests
* boards generator: deprecate --noextra4k/--allowWPS and fix documentation
2018-08-20 14:35:52 +02:00
WEMOS Electronics
319adc6b8a Fix boards.txt.py compatible with python3 (#4998) 2018-08-03 10:45:03 +02:00
david gauchard
3ab38d690d board generator documentation (#4989)
* update "more flash" doc

* doc: try to emphasize OOM knowledge

* fighting with markdown?

* it seems I can't emphasize text in link

* board generator doc: need reviewers

* markdown formatting, typos

* typos

* add links

* + last memory failure allocation + emphasis exception decoder

* more emphasis on exception decoder

* repeat the board generator introduction

* fixes
2018-08-01 00:00:59 -04:00
Steven Conaway
0899ae9d3e Update a03-library-does-not-work.rst (#4971) 2018-07-28 21:43:17 -04:00
david gauchard
e486887f18
optionally allow WPS (#4889) 2018-07-06 16:45:25 +02:00
ZaPpInG
1eb0645dcb Improve the compatibility of the doc between Github and RTD... (#4800)
* Update requirements.txt

* Update conf.py

* Update libraries.rst

* Update libraries.rst

* Update libraries.rst

* Update stack_dump.rst

* Update client-examples.rst

* Update readme.rst

* Update readme.rst

* Update server-class.rst

* Update server-examples.rst

* Update soft-access-point-class.rst

* Update station-class.rst

* Update station-examples.rst

* Update udp-class.rst

* Update udp-examples.rst

* Update a04-board-generic-is-unknown.rst

* Update readme.rst

* Update readme.rst

* Update readme.rst
2018-06-28 10:58:33 -04:00
david gauchard
1a9403df1b
lwip2 fix and update (#4729)
* interactive example: update with option for using DHCP again after using static IP
* lwip2: avoid crash when IP address is set to 0(any) by dhcp not getting its lease renewal in due time
* lwip2: automatically remove oldest PCBs in time-wait state, limit their number
  thanks to @me-no-dev 07f4d4c241 (diff-f8258e71e25fb9985ca3799e3d8b88ecR399)
* faq: update about tcpCleanup()
* lwip2: add a macro HAS_PHY_CAPTURE=1 indicating capture facility is available
2018-05-25 17:24:00 +02:00
ZaPpInG
30155f2ad3 Fix menu and checklist in a01-espcomm_sync-failed (#4512)
Fix menu and checklist in a01-espcomm_sync-failed.rst
2018-03-16 00:04:56 -03:00
Steven Conaway
4b9d3d9e33 Fix some typos in the FAQ (#4503) 2018-03-12 01:15:50 -03:00
ZaPpInG
ac546acb80 Remove reference to an arrow/_right that doesn't exist (#4401)
Remove the reference to an arrow/_right that doesn't exist.
2018-03-08 15:15:18 -08:00
ZaPpInG
9127e6eaac Fix some links (#4408)
Fix some links
2018-02-28 14:32:52 -03:00
Doanh Văn Lương
f6f977fb03 fix links for read the docs (#4293)
* fix links for read the docs

* fix typo

fix typo in link
2018-02-08 01:17:36 -03:00
david gauchard
b15102ad28 doc/faq: tcpCleanup (#4314) 2018-02-07 09:09:25 -03:00
Doanh Văn Lương
4e115917ae fix dead link docs (#4221) 2018-02-05 00:57:58 -03:00
Develo
a7984b65dc
Update a02-my-esp-crashes.rst (#3950)
* Update a02-my-esp-crashes.rst

Added section Other causes for crashes with ISR, Async callbacks, memory guidelines, stack.
Fixes #1388 .

* Update a02-my-esp-crashes.rst

Minor typos and text fixes

* Update a02-my-esp-crashes.rst

Fixed stack size typo
2017-12-28 00:41:45 -03:00
Ivan Grokhotkov
283eb97cd3 docs: convert to .rst and add readthedocs 2017-05-14 11:44:16 -05:00
Krzysztof
28b0c7b98f Desription of new FAQ item
How to resolve "Board generic (platform esp8266, package esp8266) is
unknown" error?
2016-08-27 12:50:09 +02:00
Krzysztof
27854bc9b4 New FAQ added to the index
How to resolve "Board generic (platform esp8266, package esp8266) is
unknown" error?

Ref. #2297, #2156, #2022, #1802, #1514, #1387, #1377, #1251, #1247, #948
2016-08-27 12:35:36 +02:00
Krzysztof
dd1a7e91b8 ESP.restart() doesn't work, typo fixes (#2216)
New FAQ item: ESP.restart() doesn't work
Write up review / typo fixes
2016-07-04 10:46:04 +08:00
Krzysztof
9cc2bab276 Initial release of FAQ / Troubleshooting section (#2207)
* FAQ / Troubleshooting Final Draft release

readme.md
a01-espcomm_sync failed.md
a02-my-esp-crashes.md
a03-library-does-not-work.md
Total of five FAQ items
Emoji included
pictures folder

May need to read again in couple of days for another cleaning

Date:      Sun Jun 26 18:43:51 2016 +0200

* Frizing schematics added
2016-06-30 15:04:24 +08:00