Commit graph

6050 commits

Author SHA1 Message Date
Wu Jian Gang 3e8bb67e75 ld: fix ld to use ram as much as possible, rearrange heap_alloc area 2016-08-25 11:07:53 +08:00
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 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 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
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 1fd22c5748 make bootloader: Always recurse into bootloader directory to check source dependencies 2016-08-24 13:25:06 +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 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
Angus Gratton aa4c31f3b0 esptool.py & Makefile: Fix compressed upload support (enabled by default) 2016-08-22 18:44:46 +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
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
Wu Jian Gang 893ce242a1 rtos: change XT_CLOCK_FREQ from 13MHz to 80MHz
Freq has been change to 80MHz in system_init
2016-08-22 12:04:14 +08:00
Angus Gratton f853f94335 Use IDF_PATH instead of SDK_PATH for the environment variable pointing to esp-idf
This will require a matching change in all projects using ESP-IDF.
2016-08-19 15:01:49 +08:00
Angus Gratton 9ec0e1545d Standardise remaining uses of SDK to ESP-IDF 2016-08-19 15:01:15 +08:00
Angus Gratton fffba81bd3 Make: Add some "magic" to try and pull git submodules if missing 2016-08-19 15:01:15 +08:00
Angus Gratton b0f530d004 Makefile: bootloader-clean shouldn't clean config or partition table
Also don't build config for 'make help', and remove some redundant
clearing of variables.
2016-08-19 14:04:51 +08:00
Angus Gratton 14eb490bb3 make: 'make all' default target builds everything, 'make flash' flashes everything
Also added 'make help' target which prints some useful usage summary.
2016-08-18 21:42:37 +08:00
Angus Gratton 9552b0e6f0 Fix 'make bootloader' not printing instructions 2016-08-18 21:42:37 +08:00
Angus Gratton 45d1baa24b Make: Fix make bootloader, make bootloader-flash, cleaning of bootloader
Should resolve TW6610
2016-08-18 21:15:47 +08:00
Ivan Grokhotkov bd6ea4393c Initial public version 2016-08-17 23:08:22 +08:00