Commit graph

3057 commits

Author SHA1 Message Date
Angus Gratton d664e32394 build system: Use component.mk for all components, refactor bootloader build
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.
2017-07-19 09:10:48 +10:00
Angus Gratton 5492ba759a build system docs: Add some notes about project-level variables 2017-07-19 09:07:53 +10:00
Angus Gratton 2571e66a29 build system: Make component searching more explicit, obsolete SRCDIRS
Each COMPONENT_DIRS directory can now either be a component directory, or a parent directory containing component
subdirectories.

When searching for components, skip any directory which doesn't have component.mk, Kconfig.projbuild, or
Makefile.projbuild in it. This helps with debugging, list-components output, etc.
2017-07-19 09:07:53 +10:00
Angus Gratton 2c1fe6663d build system: Add list-components target for debugging component discovery 2017-07-19 09:07:53 +10:00
Ivan Grokhotkov aef5e90cce Merge branch 'feature/mmap_unordered_flash_pages' into 'master'
Add function to map non-contiguous flash pages to contiguous memory space.

See merge request !873
2017-07-18 10:49:12 +08:00
Ivan Grokhotkov 0ae916d555 Merge branch 'feature/high_level_interrupts' into 'master'
Break out high-level interrupts so a component can override them

See merge request !675
2017-07-18 10:42:31 +08:00
Angus Gratton 4029ed1df4 Merge branch 'bugfix/rom_gpio_typo' into 'master'
bugfix(typo): fix typo in rom/gpio.h

See merge request !1009
2017-07-18 06:53:30 +08:00
Ivan Grokhotkov bff9616e91 Merge branch 'bugfix/rom_doc_toc' into 'master'
doc: Move romconsole doc sub-headings to sub-headings

See merge request !994
2017-07-17 21:19:06 +08:00
Ivan Grokhotkov fd2d53fca6 Merge branch 'bugfix/wl_write' into 'master'
wear_levelling: fix write and read length for single access was wrong.

See merge request !993
2017-07-17 18:31:27 +08:00
Dmitry Yakovlev b36e580756 wear_levelling: fix write and read length for single access was wrong. 2017-07-17 12:00:40 +03:00
Wangjialin 10340d718f bugfix(typo): fix typo in rom/gpio.h 2017-07-17 15:41:02 +08:00
Angus Gratton c2e6e10dcc Merge branch 'bugfix/nghttp2_build_submodules' into 'master'
nghttp2: Add submodule to COMPONENT_SUBMODULES, update to v1.24

See merge request !977
2017-07-17 14:14:28 +08:00
Angus Gratton e50870c2dc Merge branch 'bugfix/bootloader_stack_smash' into 'master'
Fix crashes when >approx 185KB of DRAM is statically allocated

See merge request !983
2017-07-17 14:11:35 +08:00
Angus Gratton f824829a13 Merge branch 'bugfix/dont_link_unused_data_sections' into 'master'
ld: Save RAM by removing unused .data sections at link time

See merge request !985
2017-07-17 14:10:12 +08:00
Jiang Jiang Jian 4ec2abbf23 Merge branch 'feature/some_refactor_for_tcpip_adapter' into 'master'
tcpip_adapter: not remove netif when tcpip adapter is stopped

See merge request !943
2017-07-13 22:16:00 +08:00
Jiang Jiang Jian 5ac0503ce7 Merge branch 'bugfix/btdm_modify_BTA_GATTC_KNOWN_SR_MAX_for_Multi-connection' into 'master'
component/bt: modify BTA_GATTC_KNOWN_SR_MAX for Multi-connection bug

See merge request !992
2017-07-13 21:55:24 +08:00
Liu Zhi Fu d724cc23d2 tcpip_adapter: not free netif when tcpip adapter is stopped
When tcpip adapter is stop, don't free the netif
2017-07-13 18:42:45 +08:00
Angus Gratton 399ec29a68 Merge branch 'feature/silent_assertions' into 'master'
Add "silent" assertion option

See merge request !984
2017-07-13 17:21:09 +08:00
zhiweijian ca3bf570cd Component/bt: modify BTA_GATTC_KNOWN_SR_MAX for Multi-connection bug 2017-07-13 16:22:44 +08:00
Angus Gratton 1ed4eadfab Merge branch 'bugfix/mbedtls_ecp_failure_memory_leak' into 'master'
mbedtls: Fix memory leak in initial ECDH exchange if OOM/failure occurs

See merge request !987
2017-07-13 15:39:40 +08:00
Angus Gratton b71f47670f doc: Move romconsole doc sub-headings to sub-headings
Removes them from the API guides ToC.
2017-07-13 14:33:29 +08:00
Ivan Grokhotkov 0c28b3bc4c Merge branch 'bugfix/btdm_update_connect_params_for_gattc' into 'master'
component/bt: bugfix update connect params for gattc

See merge request !991
2017-07-13 14:32:20 +08:00
Jiang Jiang Jian fc4d3df890 Merge branch 'bugfix/tw13744_make_low_rate_work' into 'master'
esp32: update wifi lib to make low rate work

See merge request !965
2017-07-13 14:26:02 +08:00
Ivan Grokhotkov 7fc25f18d2 Merge branch 'feature/enable_brownout_detector' into 'master'
Enable brownout detector

See merge request !811
2017-07-13 11:40:37 +08:00
Angus Gratton c46e2edcae Merge branch 'bugfix/make_size_windows' into 'master'
make size: Fix map file parsing error on Windows

See merge request !932
2017-07-12 17:31:49 +08:00
Angus Gratton 8cd03c84d0 Merge branch 'feature/ip_route_base_on_source_ip' into 'master'
Broadcast IP route based on source IP address.

See merge request !942
2017-07-12 17:31:24 +08:00
Angus Gratton 7b565e4b25 assertions: Add "silent" option
Reduces assertion codesize overhead by approximately 35%
2017-07-12 17:29:26 +08:00
Angus Gratton d8d2933bde Merge branch 'bugfix/gdbstub_handler_noreturn' into 'master'
gdbstub: Mark the panic handler entry as noreturn

See merge request !975
2017-07-12 17:23:59 +08:00
Angus Gratton ffefeef5ea mbedtls: Fix memory leak in initial ECDH exchange if OOM/failure occurs
In ecp_mul_comb(), if (!p_eq_g && grp->T == NULL) and ecp_precompute_comb() fails (which can happen due to OOM), then the new array of points T was leaked.
2017-07-12 16:34:26 +08:00
Angus Gratton cfbb1a652b Merge branch 'doc/esp_random' into 'master'
esp_random: Add some documentation about using before RF subsystem is on

See merge request !976
2017-07-12 16:18:43 +08:00
Angus Gratton 2243bb00f6 Merge branch 'bugfix/freertos_malloc_regression' into 'master'
pvPortMalloc: Fix regression when changing to new heap implementation

See merge request !982
2017-07-12 16:18:12 +08:00
Angus Gratton 99fe61716c startup: Add assertion checks around various initialisation sequences
These may fail if close to 192KB of static RAM is allocated (remaining early heap RAM is too small.)
2017-07-12 13:06:56 +08:00
Angus Gratton 2b0f623259 bootloader/early boot: Error out if >192KB of static DRAM is allocated (temporary fix)
Currently the last 128KB of DRAM is reserved for the bootloader & early boot stacks. This means if >192KB of static DRAM
is allocated, the only available heap is this region - which is disabled until the scheduler starts. As a result, you
get either heap corruption on early boot if the static data overlaps startup heap (leading to very weird errors), or
FreeRTOS will fail to start when it can't malloc() anything.

Long term fix is to move the stacks & bootloader data to the very end of RAM, and only reserve that part for early
boot. This is a little fiddly because of also wanting to make sure this memory is not preemptively fragmented when it
gets reintroduced to the heap. This will become more important if/when we have more static allocation options in the
future.

For now, these errors make it clear why the boot has failed.

Ref TW13909
2017-07-12 13:06:56 +08:00
Angus Gratton 187b5fb888 ld: Remove unused .data sections at link time
Reduces static RAM, code size.
2017-07-12 13:05:54 +08:00
Angus Gratton 083f7d667b nghttp2: Add submodule to COMPONENT_SUBMODULES, update to release v1.24
Removes need for -DNDEBUG hack in component.mk (fixed upstream).
2017-07-12 11:16:55 +08:00
Angus Gratton d601bedb85 pvPortMalloc: Fix regression when changing to new heap implementation 2017-07-12 11:10:11 +08:00
Angus Gratton 7ae93f271c Merge branch 'feature/multi_heap' into 'master'
Separate the heap implementation from FreeRTOS

See merge request !731
2017-07-12 10:53:37 +08:00
Angus Gratton 9487797273 Merge branch 'bugfix/minimal_stack_size' into 'master'
freertos: Bump idle stack size to 1KB, min stack to 768 bytes, make configurable

See merge request !979
2017-07-11 21:08:52 +08:00
Angus Gratton 3ad163e644 freertos: Bump idle stack size to 1KB, min stack to 768 bytes, make configurable
Reverts regression mentioned at
3fe0022efa (commitcomment-23013504)
2017-07-11 14:48:15 +08:00
Angus Gratton 3bb90bab97 esp_random: Add some documentation about using before RF subsystem is on 2017-07-11 14:27:20 +08:00
zhiweijian 8460f1a972 Component/bt: bugfix update connect params for gattc 2017-07-11 11:27:36 +08:00
Angus Gratton c049cd55a6 gdbstub: Mark the panic handler entry as noreturn
Fixes a warning in panic.c when this panic mode is enabled.
2017-07-11 10:18:08 +08:00
Angus Gratton ad60c30de0 heap: Rename memory "tags" to "types" to avoid confusion w/ old tag allocator API 2017-07-10 17:46:03 +08:00
Angus Gratton ee28fafcdf gitignore: Add gcov files 2017-07-10 17:46:03 +08:00
Angus Gratton 8d7074ed5c soc: Move esp_ptr_dma_capable() function to soc_memory_layout.h 2017-07-10 17:46:03 +08:00
Angus Gratton 71c70cb15c heap: Refactor heap regions/capabilities out of FreeRTOS
Remove tagged heap API, rename caps_xxx to heap_caps_xxx

Also includes additional heap_caps_xxx inspection functions.
2017-07-10 17:46:03 +08:00
Angus Gratton 5ee49fd311 heap: Add new multi_heap heap implementation to replace FreeRTOS-based tagged heaps 2017-07-10 17:46:03 +08:00
Ivan Grokhotkov 01b185977c brownout detector: enable by default
Because of errata related to BOD reset function, brownout is handled as follows:

- attach an ISR to brownout interrupt
- when ISR happens, print a message and do a software restart
- esp_restart_nonos enables RTC watchdog, so if restart fails,
  there will be  one more attempt to restart (using the RTC
  watchdog)
2017-07-10 17:25:55 +08:00
Ivan Grokhotkov 780569c04a esp32: fix RTC watchdog configuration in esp_restart
RTC watchdog didn’t have any actions configured for any of the stages.
This change configures it to use SW_SYSTEM_RESET at stage 0 and a
full reset at stage 1. The timeout is now calculated based on
RTC_SLOW_CLK frequency.
2017-07-10 17:21:49 +08:00
Ivan Grokhotkov cbe23147bf driver/rtc: add support for attaching handlers to RTC_CNTL interrupts 2017-07-10 17:21:49 +08:00