Commit graph

13577 commits

Author SHA1 Message Date
Wu Jian Gang
c3102e8fb2 ld: seperate/rename eagle.xxx.ld to esp32.xxx.ld 2016-08-25 11:07:53 +08:00
Ivan Grokhotkov
842bc53549 Merge branch 'bugfix/dualcore_startup' into 'master'
Fix dualcore startup

This MR includes:
- a workaround for a hardware bug with cache initialization
- fix of `#if CONFIG_WIFI_ENABLED` block in cpu_start.c for the case when WiFi is disabled.
- removal of miscellaneous delays in cpu_start.c

See merge request !22
2016-08-25 11:07:21 +08:00
Angus Gratton
8369d328ed Merge remote-tracking branch 'origin/bugfix/dualcore_startup' into feature/newlib_locking 2016-08-25 10:29:36 +08:00
Ivan Grokhotkov
bce356b700 Merge branch 'bugfix/make_tests_noninteractive' into 'master'
make: update template configuration before running tests

This fixes build error for non-interactive builds

See merge request !26
2016-08-25 10:20:48 +08:00
Ivan Grokhotkov
cb6e0b18f1 make: update template configuration before running tests
This fixes build error for non-interactive builds
2016-08-25 10:28:25 +08:00
Ivan Grokhotkov
2cd1da31f9 Merge branch 'bugfix/dram_attr' into 'master'
fix DRAM_ATTR attribute

Variables marked with DRAM_ATTR were not placed in any specific section and were appended to the last section, causing some errors at binary file generation stage.
This change places contents of .dram1 section into .dram0.data.
Also removes .iram1pro/.iram1app/.dram1pro/.dram1app which weren't used anywhere.

See merge request !23
2016-08-25 10:19:17 +08:00
Angus Gratton
700dbca4db newlib locking: Remove lock table, much simpler implementation. 2016-08-24 20:59:02 +08:00
Ivan Grokhotkov
7ba0d90df2 Merge branch 'bugfix/bootloader_incremental_build' into 'master'
Make: fix incremental builds, add build tests

Four semi-related build changes in one:
* Add basic tests for make system sanity (can be expanded as we find corner cases)
* Fix incremental building of bootloader when source files change
* Don't regenerate component libraries or re-link the ELF file if nothing changed
* Rename `$(vecho)` to  `$(summary)` and add a new `$(details)` macro to echo some helpful build details when V=1.


See merge request !20
2016-08-24 20:24:33 +08:00
Jeroen Domburg
accea4718b Merge branch 'feature/openocd-freertos-support_try2' into 'master'
Add symbol needed for OpenOCD to detect FreeRTOS, add feature to break execution, try 2

Add symbol needed for OpenOCD to detect FreeRTOS, add optional feature to break execution when the scheduler is initially started. The workflow is now so that if you start an esp-idf program, you can reset the CPU and end up in a gdb prompt just before all threads start up. In gdb you can then inspect all threads and watch breakpoints. Has the nice side effect that OpenOCD will restore any break/watchpoints that were there before you reset the chip.

This is try 2 because seemingly, someone or something replaced the bit of my brain that is responsible for handling Git with a squeaky toy.

See merge request !24
2016-08-24 20:21:52 +08:00
Jeroen Domburg
95f547025b Undo two empty lines 2016-08-24 18:34:04 +08:00
Jeroen Domburg
b1ad6a16e9 Undo submodule commit 2016-08-24 18:31:37 +08:00
Angus Gratton
f5715ac28d FreeRTOS: Add xQueueGetMutexHolder support
Enables it as a config option, but there's no overhead at all if the
function is not called anywhere.
2016-08-24 18:13:10 +08:00
Angus Gratton
4b281af0f7 newlib locking: Turns out the "hack" is the way to make stdout thread-safe in newlib 2016-08-24 18:13:10 +08:00
Angus Gratton
93c92f7a5b FreeRTOS: Configure configASSERT fail behaviour, abort() by default 2016-08-24 18:13:10 +08:00
Ivan Grokhotkov
dec846a953 components/spi_flash: make spi_flash APIs dual-core-compatible
See esp_spi_flash.c for implementation notes.
2016-08-24 18:06:33 +08:00
Jeroen Domburg
bdf4b27e38 Add symbol needed for OpenOCD to detect FreeRTOS, add feature to break execution when the scheduler is initially started. 2016-08-24 17:32:20 +08:00
Jeroen Domburg
a44c45e63e Add files I forgot (FreeRTOS-openocd.c and panic.h) 2016-08-24 17:30:53 +08:00
Ivan Grokhotkov
9e57466c96 components/esp32: fix DRAM_ATTR attribute
This change places contents of .dram1 section into .dram0.data.
Also removes .iram1pro/.iram1app/.dram1pro/.dram1app which weren't used anywhere.
2016-08-24 17:20:00 +08:00
Ivan Grokhotkov
4d1084120c components/bootloader: fix enabling cache for APP CPU
This is a workaround for a hardware bug with cache initialization.
Only two lines of code related to DPORT_APP_CACHE_MMU_IA_CLR were added around mmu_init(1); call,
and two lines at the end of comment block.
I reformatted surrounding lines to use spaces for indentation, like the rest of the code in this file does.
2016-08-24 16:25:04 +08:00
Ivan Grokhotkov
be112daa71 components/esp32: fix and clean up dual core startup
This change removes various delays in PRO and APP CPU startup paths.
Also some unused code and ets_printf statements are cleaned up or removed.
2nd CPU now communicates that it has started through a global variable.
2016-08-24 16:21:28 +08:00
Angus Gratton
94104f0fe8 Add hack of explicitly locking stdout
This shouldn't be necessary as stdout is already locked by libc (see
comment.) Not sure which part isn't working.
2016-08-24 13:49:17 +08:00
Angus Gratton
bd2f9e03f0 Add newlib libc locking using FreeRTOS primitives 2016-08-24 13:49:17 +08:00
Angus Gratton
9921e60f55 freertos: Change variable name in comment 2016-08-24 13:49:17 +08:00
Angus Gratton
3b508c8b37 esp32 syscalls.c: Use rom/uart.h for uart_tx_one_char prototype 2016-08-24 13:49:17 +08:00
Angus Gratton
a233619429 CI: Pass IDF_PATH to build_system_tests.sh 2016-08-24 13:31:33 +08:00
Jeroen Domburg
29c2e58c75 'Merge branch 'thread_local_storage_delete_callbacks' into 'master'
The thread-local-storage feature in FreeRTOS attaches an application-usable array of pointers to a thread control block. These pointers usually point to a structure the thread allocates. When a thread gets (voluntarily or involuntarily) destroyed, this memory can leak. This merge adds a matching second array of user-settable pointers to destructor routines. As soon as the task gets cleaned up (which happens in the idle thread), the destructors get called and the memory can be freed.

See merge request !19
2016-08-24 13:30:30 +08:00
Angus Gratton
a278c51d3e Make: Building the bootloader depends on syncing its sdkconfig from the top-level project 2016-08-24 13:25:06 +08:00
Angus Gratton
116e730132 Makefile: Don't re-build libraries or re-link ELF files if nothing has changed in the component
make/build_system_tests.sh should now pass.
2016-08-24 13:25:06 +08:00
Angus Gratton
938d13c5a3 Makefile: Rename $(vecho) to $(summary), add new $(details) for echoing details when V=1 2016-08-24 13:25:06 +08:00
Angus Gratton
1fd22c5748 make bootloader: Always recurse into bootloader directory to check source dependencies 2016-08-24 13:25:06 +08:00
Angus Gratton
528638f5eb Add build system test (via bash script)
Currently fails due to bootloader not automatically rebuilding anything,
and ELF/BIN files generating when nothing changed.
2016-08-24 13:25:06 +08:00
Ivan Grokhotkov
94bcf9d994 Merge branch 'feature/docs_linux_gettingstarted' into 'master'
docs: add linux getting started guide

See merge request !16
2016-08-24 12:06:18 +08:00
Ivan Grokhotkov
2ee17ef950 docs: update linux getting started guide
- add commands to get prerequisites on Debian and Arch
- change "Terminal.app" to "terminal"
- add note on python2 for Arch users
2016-08-24 11:17:15 +08:00
Ivan Grokhotkov
11271b418f Merge branch 'bugfix/ci-menuconfig-noninteractive' into 'master'
Fix for noninteractive builds

This MR fixes the case when new Kconfig configuration options were added
and you run `make menuconfig`. Previously this would first show console 
prompt to set values for new options, and then launch menuconfig.
Now this will just launch menuconfig. New items are marked as `(NEW)`.

New target is added, defconfig, which may be useful for non-interactive 
environments to set default values for all new configuration options.

Gitlab CI uses `make defconfig` to update sdkconfig in case any new 
options were added in ESP-IDF.

See merge request !15
2016-08-23 23:13:50 +08:00
Ivan Grokhotkov
57f0b96eea docs: add linux getting started guide
Currently this is mostly a verbatim copy of macOS guide with some obvious changes.
Exact lists of dependencies for Debian and Arch need to be specified.
Also made minor fixes to Windows and macOS guides:
- changed http urls to https
- added --prefix=$PWD to crosstool-NG's configure
- added chmod u+w for the build output directory

In general, except for prerequisites, Linux and macOS guides are virtually identical.
It might make sense to refactor this into single document with prerequisites being
described in separate docs.
2016-08-23 17:25:32 +08:00
Ivan Grokhotkov
b21a5918a5 gitlab-ci: run make defconfig before make all to update sdkconfig 2016-08-23 16:19:49 +08:00
Ivan Grokhotkov
f19ac2b927 make: add defconfig, don't run silentoldconfig before menuconfig
This commit fixes the case when new Kconfig configuration options were added and you run `make menuconfig`.
Previously this would first show console prompt to set values for new options, and then launch menuconfig.
Now this will just launch menuconfig.
New target is added, defconfig, which may be useful for non-interactive environments to set default values for
all new configuration options.
2016-08-23 16:18:36 +08:00
Jeroen Domburg
553b08cd5e Merge branch 'feature/configurable_add_lf_after_cr_printf' into 'master'
Add cr after a lf is printed (configurable)

Small menuconfig option to make the newlib stdout functions replicate the behaviour of ets_printf e.a. by sending out a \r before every \n.

See merge request !14
2016-08-23 15:09:13 +08:00
Jeroen Domburg
d579040e32 Add cr after a lf is printed (configurable)
Formatting
2016-08-23 15:20:03 +08:00
Ivan Grokhotkov
0f35ff8a98 Merge branch 'feature/nvs_tests' into 'master'
Power off recovery tests for non-volatile storage library, bug fixes, test coverage

This merge request:
- fixes several issues with internal state handling in nvs::Page
- fixes possible infinite loop when initializing namespace list
- fixes nvs_get_{str,blob} APIs to behave according to header file doc (they didn't return *length)
- adds extra consistency checks in nvs::PageManger initialization.
- adds test coverage via gcov and lcov
- adds host side tests during CI builds

See merge request !9
2016-08-23 15:06:06 +08:00
Ivan Grokhotkov
9ef827ae20 components/nvs: strlcpy is not available on Linux, replace with strncpy and terminate strings explicitly 2016-08-23 15:14:13 +08:00
Ivan Grokhotkov
3df4130eb7 components/nvs: run small number of tests as part of CI builds 2016-08-23 12:56:10 +08:00
Ivan Grokhotkov
b783e2ffab components/nvs: fix typos in readme 2016-08-23 12:08:00 +08:00
Ivan Grokhotkov
a65e019451 components/nvs: fix host build with GCC 4.9, add coverage report generation 2016-08-23 12:08:00 +08:00
Ivan Grokhotkov
7998b6ca2e components/nvs: handle more cases where sudden power off may happen
This commit fixes several issues with state handling in nvs::Page. It also adds extra consistency checks in nvs::PageManger initialization.
These changes were verified with a new long-running test ("test recovery from sudden poweroff"). This test works by repeatedly performing same pseudorandom sequence of calls to nvs_ APIs. Each time it repeats the sequence, it introduces a failure into one of flash operations (write or erase). So if one iteration of this test needs, say, 25000 flash operations, then this test will run 25000 iterations, each time introducing the failure point at different location.
2016-08-23 12:08:00 +08:00
Ivan Grokhotkov
7447d08605 components/nvs: clear handles list on init, fix returning *length in nvs_get_{str,blob} 2016-08-23 12:08:00 +08:00
Ivan Grokhotkov
35d50643bc components/nvs: fix infinite loop when loading namespaces 2016-08-23 12:08:00 +08:00
Ivan Grokhotkov
f04c894123 components/nvs: add debugging facilities and runtime checks
Extra runtime sanity checks run when compiled for the host (i.e. with no ESP_PLATFORM define)
2016-08-23 12:08:00 +08:00
Ivan Grokhotkov
3ce433cfd1 components/nvs: make some methods const 2016-08-23 12:08:00 +08:00
Jeroen Domburg
49b2dfea1e Merge branch 'feature/esptoolpy_performance' into 'master'
esptool.py performance

Restores esptool.py custom baud rate, and re-adds compressed upload into the Makefile default targets

See merge request !11
2016-08-23 11:52:03 +08:00