* works
* fixup! works
* back to callbacks
* names
* daisy chain
* seconds
* less inline
* fix dns setter
* might as well keep using initlist
/to d-a-v it has automatic storage, here it's the same stack based one
(just one less line for us)
* shift blame
* naming
* fix impl
* revert to ip4 dns
* merge fix
* restyle
* masking done wrong
* Patch eap.o memory leak
WiFi Enterprise option can leak up to 3 allocations per connect/disconnect
cycle: anonymous Identity, password, and some unidentified allocation.
This solution patches eap.o from libwpa2 to call a special 2 part
wrapper instead of vPortFree for cleanup.
Corrected typos and adjusted tabs in script.
Added script eval_fix_sdks.sh to aid in evaluating similarity between
patch sections of .o files being patched across different SDKs.
* Add some dev debug code and improve comments
* Patch eap.o memory leak
WiFi Enterprise option can leak up to 3 allocations per connect/disconnect
cycle: anonymous Identity, password, and some unidentified allocation.
This solution patches eap.o from libwpa2 to call a special 2 part
wrapper instead of vPortFree for cleanup.
Corrected typos and adjusted tabs in script.
Added script eval_fix_sdks.sh to aid in evaluating similarity between
patch sections of .o files being patched across different SDKs.
* Add some dev debug code and improve comments
* Fix double-free when connecting to WPA2-Enterprise networks
Fixes: #8082
This patches the callx0 instruction to a nop in eap.o which is part of libwpa2.a.
It looks like espressif fixed the Bug in newer SDK versions, so if we update to the latest NONOS-SDK it is most likely not necessary to add/adapt this patch.
Also modifies the fix_sdk_libs.sh script as it even changed files if no changes were necessary, for example adding multiple system_func1 exports.
* Apply suggestions from code review
* Initialize SoftAP DhcpServer object on demand
Remove dependency on global ctor, and just construct the object when
someone asks us to do it. Only dependency right now is netif_git, which
is expected to be initialized by the lwip code some time before
dhcps_start happens.
Removing ip_info from begin(), since we never reference later on.
Also removing the specific check for netif id and simplify the ctors.
Update tests and recover old nonos-sdk dhcps functions that were not implemented.
* nonos helpers have a separate header
* wifi ap needs this anyway, simplify sketch includes
* missing example
* existing name :/
* trying to fix header dependency
* restyle
* not a c header
* no need to init
* move dhcp server getter to WiFi
more... arduino'ish? we ahve object as namespace, plus everything else
related to softAP is there
redundant includes, redundant mock impl (out-of-scope here to fix)
* ...move things back, still expose as WiFi method
* review fix
* include -nonos header in wifi lib though
* no more lwip include
* style
* need mock dhcpserver instance
once `tools/sizes.py` outputted to `stderr` rather `stdout` before da4a19fdacd7a859da395e014c9e0fded99aa985
(Arduino IDE 1.8.19 for Windows doesn't capture `stdout`, 2.0.0-rc6 does)
Due to historical circumstances, some of light/heavy version of Unicode
box-drawing chars may have twice width of others (aka. "Zen-Kaku" in Japanese,
means full-square), eg. All of '─'(U+2500), '│'(U+2502), '└'(U+2514) and
'├'(U+251C) correspond to that in Windows Japanese fonts and locale.
Double versions, '═'(U+2550), '║'(U+2551), '╚'(U+255A) and '╠'(U+2560) are
not like that.
(See [Box Drawing, The Unicode Standard](https://www.unicode.org/charts/PDF/U2500.pdf))
* Define lwIP's s32/u32 to int
s32/u32 were previously defined as long,
but long can be 64 bits in host mode,
so this commit reduces valgrind complaints and increase coherency.
* some lads like to use `unsigned long` for 32 bits IPv4 addresses
* fix lwIP's `sys_now()` return type
* fix C declarations
* merge upstream (lwip2) update on sys_now() definition
* matching lwIP api (2/2)
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
* 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
* Table output for segment size script
Also include maximum aka total for every segment key
Re-format the file and clean-up the resulting data dict
* revert to line output
* used, percentage
* unicodes
* shorter desc, headers
The key functions added are:
`bool enableForwarder(const String &domainName=emptyString, const IPAddress &dns=uint32_t)0)`
If specified, `enableForwarder` will update the `domainName` that is used to match DNS request to this AP's IP Address. A non-matching request will be forwarded to the DNS server specified by `dns`.
Returns `true` on success.
Returns `false`,
* when forwarding `dns` is not set, or
* unable to allocate resources for managing the DNS forward function.
`void disableForwarder(const String &domainName=emptyString, bool freeResources=false)`
`disableForwarder` will stop forwarding DNS requests. If specified, updates the `domainName` that is matched for returning this AP's IP Address.
Optionally, resources used for the DNS forward function can be freed.
Avoid blowing up user code when `$user:$password` string is longer than
127 bytes. Use String to both manage the memory and handle concatenation.
Also clean-up historical quicks such as
- `if(StringObject)` that is always true since we implemented SSO
- `authReq = "";` / `authReq = String();`, which will happen anyway
- `(String)...` casts that happen anyway, implicitly (and which is also not a 'cast' btw, we do init it)
`tests/ci/check_restyle.sh` does not exist; however, `tests/ci/style_check.sh` does.
Changed run_CI_locally.sh to run style_check.sh from ci directory.
The _hash and _verify functionality of the Updater class are pretty much entwined. But it might be useful to calculate the hash, even without a signature present in the image itself. This change permits that by allowing a zero-length signature.
For reference, one possible use case is where the expected hash is provided separately to the uploaded image. Another is to provide generic post-upload validation of the image: the hash function permits a convenient way of inspecting the complete image against arbitrary conditions; this is particularly useful after HTTP client OTA updates.
(It's fair that reading the whole image back out of flash is not very efficient, but that's not the concern of this PR.)
* Test: fixing itoa implementation, clean-up of tests and test runner
Update itoa to be the same as newlib, fixing edgecase of abs(INT_MIN)
Update WString.cpp:toString() integer conversions to use noniso funcs
Remove legacy gcc versions from Makefile and allow overrides
Don't fallback to c11 and c++11, source cannot support that
* CXX and CC are make predefined values, assuming ?= does not work (?)
Restore the pre-3.0.0 behaviour when we could assign numeric values to
the string object. After introducing operator =(char), everything was
converted to char instead of the expected 'stringification' of the
number (built-in int, long, unsigned int, unsigned long, long long,
unsigned long long, float and double)
Add toString() that handles conversions, re-use it through out the class
Fix#8430
Isolate NULL/panic test of _context to dev debug assert macro.
Use abort instead of panic for case of caller providing non-heap address pointer.
Added debug print.
Improved get_unpoisoned_check_neighbors to print file/line when available.
GitHub PR rebase-merge of #8464 introduced a new commit, instead of using
the one from the PR tree. Point to that new one in the `master` branch.
(fixing 24c41524dc56c683d8926671bdd639d7411f2815 changes)
Ignore mass-reformatting commits
Include the clang-format, and the previous astyle
Based on the idea from black
https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html#avoiding-ruining-git-blame
To be used with git CLI when exploring some specific file history
```
$ git blame --ignore-revs-file .git-blame-ignore-revs -- file.cpp
```
Or, by modifying the config to apply globally
```
$ git config blame.ignoreRevsFile .git-blame-ignore-revs
```
(note that the by default config will apply only for the current repository)
* Error even w/warnings disabled for no-return fcns
A function whose prototype says it will return a value but doesn't
is undefined behaviour in C++. GCC 10 will generate code that crashes
in this case.
In warnings==None mode, insterad of turning off all warnings with
`-w`, explicitly list all G++ possible warnings except for the
`no-return` warning which catches this programming error.
* Use different lists for GCC vs G++
G++ and GCC have different warning options, so use different lists.
* Make separate file for each level, add readme
The readme now includes the exact commands required to regenerate the
none-XXX files, no manual editing needed.
* Address review comments, only adjusts G++/None
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)
* emulation on host: minor fixes
merge MockDigital.cpp and HostWiring.cpp
* emulation: share mockverbose between CI-on-host and emulation
* mock: add missing recently overridden method
* remove extern variable, use weak function