Commit Graph

22914 Commits

Author SHA1 Message Date
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
Ivan Grokhotkov
1a02247c27 Merge branch 'feature/docs_osx_gettingstarted' into 'master'
📘 Setup guide for macOS

Initial version of getting started guide for macOS. Section on crosstool-NG may lack all the necessary steps, but usage of crosstool-NG on macOS is pretty well documented, so this shouldn't be a showstopper. We need to run these steps on a clean install of macOS, both with MacPorts and homebrew. I'll do this once i get a VM with macOS working.
 

See merge request !13
2016-08-23 11:36:15 +08:00
Ivan Grokhotkov
5c452c033f Merge branch 'feature/gitlab-ci' into 'master'
GitLab CI and sync with GitHub

This change adds GitLab CI support. Currently we pull latest version of esp-idf-template project from Github and try to compile it with esp-idf version in question.
Additional test steps will be added in the future.

This change also adds automatic push to GitHub for master branch only, if CI has passed.

To implement CI builds, I created a docker image, espressif/esp32-ci-env. I will make its Dockerfile available on Github as well.

See merge request !12
2016-08-23 11:22:15 +08:00
Ivan Grokhotkov
00eed0deed docs: macOS update started guide
fix URL to use HTTPS
fix typo
mention that compiling toolchain is optional
mention how to find the serial port
2016-08-23 10:38:05 +08:00
Ivan Grokhotkov
ad90dd81a6 docs: add setup guide for macOS 2016-08-22 19:35:31 +08:00
Ivan Grokhotkov
a8ec1a0824 gitlab-ci: push master to GitHub master on success 2016-08-22 18:48:03 +08:00
Angus Gratton
aa4c31f3b0 esptool.py & Makefile: Fix compressed upload support (enabled by default) 2016-08-22 18:44:46 +08:00
Angus Gratton
550c7a4446 esptool.py: Set higher baud rates on ESP32 2016-08-22 18:44:41 +08:00
Angus Gratton
eeb0811088 Merge branch 'default_freq' into 'master'
rtos: change XT_CLOCK_FREQ from 13MHz to 80MHz

Freq has been change to `80MHz` in system_init, otherwise system tick will not be accurate now.

Maybe we can config freq by menuconfig.

See merge request !8
2016-08-22 17:38:00 +08:00
Ivan Grokhotkov
387c05b560 gitlab-ci: initial version
This change adds gitlab CI support. It tests if latest master of esp-idf-template can be built with the commit of ESP-IDF in question. Currently it's a bit lax because both SDK_PATH and IDF_PATH are defined.
This change also changes components/esp32/lib submodule to point to Github over HTTPS instead of SSH, because CI server might not have its SSH keys uploaded to Github.
2016-08-22 17:37:47 +08:00
Jeroen Domburg
ab21d1d9f2 Merge branch 'bugfix/spurious_uninitialized_mux_notice' into 'master'
Add static initializers for muxes, add mutex init to vPortCPUAcquireMutex

We still have some ERROR: vPortCPUAcquireMutex: mux 0x3ffc01cc is uninitialized (0x0)!  errors. I'd like to fix those by giving muxes as used in critical regions an initializer, so they can get initialized at program load. This is FreeRTOS core code, I'd like someone to review it before I commit it.

See merge request !10
2016-08-22 17:33:29 +08:00
Jeroen Domburg
f34110009a Add C99-style named field in initialisation struct 2016-08-22 17:45:46 +08:00
Jeroen Domburg
609f75a8c0 Oops, left in a debugging break.n. Removed. 2016-08-22 17:41:55 +08:00
Jeroen Domburg
925fbb587e Add static initializers for muxes, add mutex init to vPortCPUAcquireMutex 2016-08-22 17:36:32 +08:00