Fix warnings where undefined vars are used.
Make Kconfig emit "FOO=" for unset bool options
To ensure make variables are always defined, even if empty.
When writing auto.conf, include symbols disabled by dependency to make sure all make variables are always defined.
Fixesespressif/esp-idf#137
Cherry-picked from https://github.com/espressif/esp-idf/pull/138
Too hard to stage the dependencies so that all clean steps complete before any build steps begin. Also, using and then
deleting and then regenerating SDKCONFIG_MAKEFILE in one pass is really hard to manage successfully.
Other terminal emulators (screen, minicom) default to sending CR when
ENTER is pressed on the keyboard. Make behavior of idf_monitor
consistent with them.
Between 3.1.0 and 3.3.0, pyserial had thread cancellation implemented
using a select, which blocked on the stdin and an auxiliary pipe. When
thread had to be cancelled, a byte would be sent into the pipe,
unblocking stdin.
Unfortunately, this method suffers from a problem with using select on
a StreamReader (which represents the decoder wrapped around stdin).
In some cases, when the TTY sends an escape sequence in response to
an escape sequence received from serial, this escape sequence will not
be read from stdin until some key is pressed.
In https://github.com/pyserial/pyserial/commit/cab3dab, this method
was replaced with an TIOCSTI ioctl. This change makes sure we use the
new cancellation method even if the script is running with older
pyserial.
1. Hello World application shows no footprint difference before and
after this change
2. examples/ethernet/ethernet application compiles properly (can't
test with my board)
Makes app image booting more reliable (256-bit rather than 8-bit verification.)
Some measurements, time to boot a 655KB app.bin file and run to app_main() execution.
(All for rev 1 silicon, ie no 340ms spurious WDT delay.)
80MHz QIO mode:
before = 300ms
after = 140ms
40MHz DIO mode:
before = 712ms
after = 577ms
40MHz DIO mode, secure boot enabled
before = 1380ms
after = 934ms
(Secure boot involves two ECC signature verifications (partition table, app) that take approx 300ms each with 80MHz CPU.)
For config-only components, component.mk should now contain "COMPONENT_CONFIG_ONLY := 1"
Also refactored some of the generation of linker paths, library list. This required cleaning up the way the bootloader
project works, it's now mostly independent from the parent.
Now the tests do not pass
Before we had incorrect code of the error code checking
in build_examples.sh for that case and did nothing in test_build_system.sh.
The CI uses the mirror-submodule-update.sh for non-permanent reassignment
of 3rdparty sub-modules to local mirrors (only for 'non-master' branches).
List of the mirrors in mirror-list.txt
You can use the script locally to speed up data retrieval on network problems
check_submodule_sync job uses 'GIT_STRATEGY: clone' to check the availability of public sources
Implements support for system level traces compatible with SEGGER
SystemView tool on top of ESP32 application tracing module.
That kind of traces can help to analyse program's behaviour.
SystemView can show timeline of tasks/ISRs execution, context switches,
statistics related to the CPUs' load distribution etc.
Also this commit adds useful feature to ESP32 application tracing module:
- Trace data buffering is implemented to handle temporary peaks of events load
Add new "make size_components" and "make size_files" targets for analysing makeup of the ELF file.
Plain "make size" output now looks like this:
Total sizes:
DRAM .data size: 11156 bytes
DRAM .bss size: 22304 bytes
Used static DRAM: 33460 bytes ( 294220 available, 10.2% used)
Used static IRAM: 80480 bytes ( 50592 available, 61.4% used)
Flash code: 421463 bytes
Flash rodata: 103824 bytes
Total image size:~ 616923 bytes (.bin may be padded larger)
Run some unit test cases based (poorly) around sodium's test infrastructure.
Increase in unity test task stack is due to signature tests, load a lot of data onto the stack.
CI: auto generate configs for test jobs
Currently CI test jobs are static configured by several pre-generated config files.
This approach have several disadvantages:
1. not flexible to select test cases to run, which is important feature of @bot
2. difficult to update test as we need to pre-generate quite a lot files
3. need to maintain extra config files in IDF
4. not flexible to support new test apps or chips, can't use some new features of test bench
Therefore we'll add assign_test stage between build and test, to generate configs for test jobs.
See merge request !738
CI: save download config in CI build jobs:
IDF built app download config may change with some modification.
save the download configs for built APP in build stage.
then we can use the correct download config in test stage.
See merge request !676
FATFS fixes and tests
This MR includes a set of fixes related to FATFS, SDMMC, and wear levelling:
- `esp_vfs_fat_spiflash_mount` uses `FM_SFD` flag when creating the partition. The volume layout (given in `VolToPart` variable) was not compatible with SFD mode, so mkfs was failing. This fixes the volume layout to use "autodetect" for both volumes. Merges https://github.com/espressif/esp-idf/pull/559.
- fix `prepend_drive_to_path`function, which didn't prepend drive to path (while consuming 2k of stack space)
- fix stack overflow in vfs_fat_link function which allocated two 4kbyte `FIL` structures on the stack
- fix support for having two FATFS instances (in flash and SD) mounted at the same time
- unit tests written for FATFS on SDMMC are made common between SDMMC and WL implementations; FATFS unit tests on WL will run during CI
- fix inconsistent definition of PATH_MAX and ARG_MAX (TW12207, TW12104, https://github.com/espressif/esp-idf/issues/289)
See merge request !732
IDF built app download config may change with some modification.
save the download configs for built APP in build stage.
then we can use the correct download config in test stage.
wear levelling
This MR adds wear levelling component. It presents an interface similar to the interface of spi_flash and esp_partition. Inside, it stores data inside a partition to in a way that reduces worst case number of erase cycles for any given sector.
Also included are APIs similar to the ones provided for SDMMC to mount FAT filesystem on top of the wear levelling partition. A simple example shows how this API can be used.
Ref TW10338.
See merge request !567
- Implements application tracing module which allows to send arbitrary
data to host over JTAG. This feature is useful for analyzing
program modules behavior, dumping run-time application data etc.
- Implements printf-like logging functions on top of apptrace module.
This feature is a kind of semihosted printf functionality with lower
overhead and impact on system behaviour as compared to standard printf.
Windows setup improvements
* Tweak Makefile to significantly reduce startup time on Windows (also reduced on other platforms, but less obvious.)
* Revise windows setup installation script to fix various issues, use latest toolchain.
* Tweak Windows config docs
See merge request !597
SPI flash operations lock for shorter periods
Based on bug report here:
https://esp32.com/viewtopic.php?f=13&t=1489&p=6816#p6773
Long SPI flash erase (and possibly write/read) cycles block all tasks on both CPUs for an extended period, and can lead to WiFi dissassociation (and general priority inversion.)
This MR inserts preemption breaks into large operations (all erases, writes every 8KB, reads every 16KB).
Overhead of a single spi_flash_guart_start()/spi_flash_guard_end() cycle measured at approx 67us (assuming no preemption.)
See merge request !600
* "make monitor" not passed the configured baud rate
Closes#436https://github.com/espressif/esp-idf/issues/436
* Pass toolchain prefix from sdkconfig into monitor tool
* Allow setting EOL in idf_monitor.py, use CRLF by default
* Detect if /dev/tty.X is used on macOS, warn and replace with /dev/cu.X
* If a build fails or gdb exits, ignore Ctrl-T (allowing Ctrl-T Ctrl-A/F to be same key sequence everywhere)
* Add a note about winpty on Windows
Ref 02fdf8271d (commitcomment-21369196)
Expand 'make monitor' support
New 'make monitor' idf_monitor tool for better monitor output. Running 'make monitor' will now:
* Automatically look up code addresses via addr2line and print function, source file, line number in terminal.
* Can reset the ESP32 by typing Ctrl-T Ctrl-R.
* Can run "make flash" by typing Ctrl-T Ctrl-F.
* Can run "make app-flash" by typing Ctrl-T Ctrl-A.
* If gdb stub starts, monitor will automatically run gdb and connect. When gdb exits, ESP32 resets and monitor resumes.
* Exit is still Ctrl-[
Have some more features I'd like to add (log output to file, crash dump support) but I think this is at the point of being useful.
See merge request !565
unit tests: Make UnitTestParser ignore non-directories inside 'components' dirs
Tiny fix to UnitTestParser script behaviour, if you happen to have any stray files in your "components" directories.
See merge request !561
Partition/SPI/OTA docs & OTA new functionality
* Update partition, SPI flash & OTA docs to reflect functionality changes
* Refactor OTA implementation to perform checks mentioned in API doc
* Add new functions to OTA API: esp_ota_get_running_partition() & esp_ota_get_next_update_partition() functions
* Add spi_flash_cache2phys() & spi_flash_phys2cache() functions to support esp_ota_get_running_partition()
See merge request !513
Add python script that parses list of unit test cases for CI from component test folder
Modify .gitlab-ci.yml to run this script as part of build unit tests stage
Create temp config in the same dir as target
Fixes case where SDK and app are on different mounts
(In our usage of kconfig, dirname is the empty string & basename is the full path to sdkconfig)
Github pull request https://github.com/espressif/esp-idf/pull/151
See merge request !309
Add dynamic interrupt allocation mechanism
This adds:
- Dynamic allocation of interrupts. Pass it the features of the interrupt you want, it'll set you up with an int.
- Shared interrupts. Enables multiple peripheral drivers to use the same interrupt.
- Marking what interrupts are fully executable from IRAM; if an int isn't marked like that it will get disabled once flash cache gets disabled.
Also:
- Modifies driver to be in line with these changes
See merge request !254
unit-test-app: Don't auto-display menu after test run finishes
Previous code would sometimes display menu multiple times, depending on UART activity.
See merge request !253
rename nvs host test folder, modify .gitlab-ci.yml
remove unit-test-app build
re-format unit test files
remove extra newlines in project.mk
some refactoring for unit test part in project.mk
add build files of unit-test-app in gitignore
add README.md for unit test app
correct headings in README.md
remove files and make minor tweaks in unit test app
update .gitlab-ci.yml to use unit test app
delete unused lines in component_wrapper.mk
delete periph_i2s.h and lcd test
add text floating point in components/esp32/test/Kconfig
correct idf test build paths in .gitlab-ci.yml
Allow OS X to build without libintl
https://github.com/espressif/esp-idf/pull/42
I have tested this with the following configurations:
- OS X with Xcode command line tools, no macports, no homebrew
- OS X with Xcode command line tools and homebrew
- OS X with Xcode IDE and macports
All three work with this change, without it the first two had issues.
See merge request !172
Extra space is needed in echo -n "-lncurses ", otherwise if pkg-config outputs a directory after that, it will result in "-lncurses-L/opt/local/lib" (without space).
-Wno-format-security flag is needed on macOS to silence warnings about printf(gettext("message")) constructs.
Generated with Eclipse Neon, should work in earlier versions as well.
This file can be imported
- into the workspace via Preferences > C++ > Code Style > Formatter > Import
- or into the project via Project Preferences > C++ General > Formatter > Import
Configuration options in Eclipse are not exactly the same as in astyle.
There may be some discrepancy between the format astyle and Eclipse will produce.
If anyone notices that, please let me know.
This adds initial code style guide. Only section on code formatting is written, other sections to be added later.
Also adds scripts to format code using astyle.
Used by mbedTLS to set MBEDTLS_CONFIG_FILE in all components.
This change sets CFLAGS/etc at the project level and then exports those
variables for components, rather than setting them independently each time
a component Makefile is invoked.