Commit graph

101 commits

Author SHA1 Message Date
Michael Balzer e97f72ea24 Merge remote-tracking branch 'upstream/release/v3.3'
# Conflicts:
#	.gitlab-ci.yml
#	components/bootloader/project_include.cmake
#	components/bootloader_support/include/bootloader_common.h
#	components/bootloader_support/src/bootloader_common.c
#	components/bt/Kconfig
#	components/bt/bluedroid/btc/profile/std/include/btc_gap_ble.h
#	components/bt/bluedroid/stack/btm/btm_ble_gap.c
#	components/bt/bluedroid/stack/btm/btm_devctl.c
#	components/bt/bluedroid/stack/include/stack/hcidefs.h
#	components/bt/bluedroid/stack/smp/smp_act.c
#	components/bt/bt.c
#	components/bt/lib
#	components/driver/Kconfig
#	components/driver/include/driver/rmt.h
#	components/driver/test/test_spi_master.c
#	components/driver/uart.c
#	components/esp32/CMakeLists.txt
#	components/esp32/Kconfig
#	components/esp32/ld/esp32.project.ld.in
#	components/esp32/ld/esp32.spiram.rom-functions-dram.ld
#	components/esp32/ld/esp32.spiram.rom-functions-iram.ld
#	components/esp32/lib
#	components/esp32/spiram.c
#	components/esp32/spiram_psram.c
#	components/esp32/test/test_wifi.c
#	components/esp32/wifi_init.c
#	components/esp_http_server/include/esp_http_server.h
#	components/esp_http_server/src/esp_httpd_priv.h
#	components/esp_http_server/src/httpd_parse.c
#	components/esp_http_server/src/httpd_sess.c
#	components/esp_http_server/src/httpd_txrx.c
#	components/esp_http_server/src/httpd_uri.c
#	components/esp_http_server/test/test_http_server.c
#	components/esp_https_ota/src/esp_https_ota.c
#	components/ethernet/emac_main.c
#	components/freemodbus/Kconfig
#	components/idf_test/include/idf_performance.h
#	components/idf_test/integration_test/TC_IT_BLUEDROID_SMP.yml
#	components/lwip/Kconfig
#	components/newlib/test/test_time.c
#	components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py
#	components/spi_flash/Kconfig
#	components/ulp/cmake/CMakeLists.txt
#	components/ulp/component_ulp_common.cmake
#	components/vfs/vfs.c
#	docs/conf_common.py
#	docs/en/api-reference/provisioning/wifi_provisioning.rst
#	examples/mesh/internal_communication/main/Kconfig.projbuild
#	examples/protocols/aws_iot/subscribe_publish/main/CMakeLists.txt
#	examples/protocols/aws_iot/thing_shadow/main/CMakeLists.txt
#	examples/protocols/coap_client/README.md
#	examples/protocols/coap_server/README.md
#	examples/protocols/modbus_slave/main/Kconfig.projbuild
#	examples/protocols/mqtt/ssl/mqtt_ssl_example_test.py
#	examples/protocols/mqtt/tcp/main/Kconfig.projbuild
#	examples/protocols/mqtt/ws/mqtt_ws_example_test.py
#	examples/protocols/mqtt/wss/mqtt_wss_example_test.py
#	examples/wifi/iperf/components/iperf/iperf.c
#	requirements.txt
#	tools/ci/build_examples.sh
#	tools/ci/test_build_system_cmake.sh
#	tools/cmake/idf_functions.cmake
#	tools/cmake/kconfig.cmake
#	tools/cmake/scripts/expand_requirements.cmake
#	tools/esp_prov/README.md
#	tools/esp_prov/esp_prov.py
#	tools/esp_prov/transport/ble_cli.py
#	tools/idf.py
#	tools/kconfig_new/confgen.py
#	tools/mass_mfg/docs/README.rst
#	tools/mass_mfg/samples/sample_config.csv
#	tools/tiny-test-fw/DUT.py
#	tools/tiny-test-fw/IDF/IDFApp.py
#	tools/tiny-test-fw/IDF/IDFDUT.py
#	tools/tiny-test-fw/TinyFW.py
#	tools/unit-test-app/tools/UnitTestParser.py
#	tools/unit-test-app/unit_test.py
2019-07-20 22:11:10 +02:00
Michael Balzer 40f01ec30a Merge remote-tracking branch 'upstream/release/v3.2' 2019-07-20 15:22:14 +02:00
Angus Gratton f72df315f7 heap: Add integer overflow checks on MALLOC_CAP_32BIT & MALLOC_CAP_EXEC 2019-03-20 18:30:25 +11:00
Angus Gratton 1fac58deb7 heap: Add integer overflow checks on MALLOC_CAP_32BIT & MALLOC_CAP_EXEC 2019-03-20 18:30:17 +11:00
Roland Dobai 37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
Angus Gratton 348d6d5d3f multi_heap: Fix bug when start of heap is unaligned
Alignment was accounted for in one place only.

TW27954
2018-12-21 19:03:12 +11:00
Angus Gratton b1f3586f7e multi_heap: Fix bug when start of heap is unaligned
Alignment was accounted for in one place only.

TW27954
2018-12-20 01:40:05 +00:00
Angus Gratton 769bd4a4af linker: When using section type attributes, create unique sections
* Prevents section type conflict errors if (say) const & non-const data
  is put into the same section (ie with DRAM_ATTR)

* Allows linker --gc-sections to remove unused custom sections
2018-12-19 04:42:04 +00:00
Ivan Grokhotkov 3150920cb4 heap: __builtin_return_address argument has to be a literal value
Clang does not accept const int as an argument of __builtin_return_address.

Ref LLVM-14
2018-12-06 16:14:14 +08:00
Mahavir Jain 907b1a9032 mbedtls: align CMake build with corresponding component.mk 2018-11-29 16:23:06 +05:30
Renz Christian Bagaporo 37d30c7a6e cmake: separate app from idf lib project
mbedtls: import mbedtls using unmodified cmake file
2018-11-27 13:59:24 +08:00
Ivan Grokhotkov a46b884a14 Merge branch 'feature/unit_test_example' into 'master'
Move Unity into components, add unit test example

See merge request idf/esp-idf!3562
2018-11-19 18:35:54 +08:00
Ivan Grokhotkov 6091021e83 unity: separate common and IDF specific functionality
New unity component can be used for testing other applications.
Upstream version of Unity is included as a submodule.
Utilities specific to ESP-IDF unit tests (partitions, leak checking
setup/teardown functions, etc) are kept only in unit-test-app.
Kconfig options are added to allow disabling certain Unity features.
2018-11-19 12:36:31 +08:00
Renz Bagaporo 63411fc556 tools: implement linker script generation 2018-11-16 12:42:02 +08:00
Paul Reimer b358581ab8 heap: Compile heap_task_info.c conditionally on CONFIG_HEAP_TASK_TRACKING in heap CMakeLists.txt
Merges https://github.com/espressif/esp-idf/pull/2498
2018-11-08 15:57:11 +05:30
Jakob Löw f2fbfeca87 Merge branch 'master' of github.com:espressif/esp-idf 2018-10-20 23:32:01 +02:00
Renz Bagaporo cc774111bf cmake: Add support for test build 2018-10-20 12:07:24 +08:00
Renz Christian Bagaporo 944014f9f2 cmake: fix source list issues 2018-09-13 08:56:59 +08:00
Renz Christian Bagaporo d9939cedd9 cmake: make main a component again 2018-09-11 09:44:12 +08:00
Angus Gratton b355854d4d Merge branch 'master' into feature/cmake 2018-09-05 10:35:04 +08:00
Jiang Jiang Jian b91cf5a33f Merge branch 'bugfix/esp_bt_mem_release' into 'master'
components/bt: Fix broken API esp_bt_mem_release() for parameter ESP_BT_MODE_BTDM

See merge request idf/esp-idf!3121
2018-09-04 14:17:10 +08:00
Angus Gratton 6976f5671c Merge branch 'bugfix/heap_dma_pool_fixes' into 'master'
heap: Fixes around DMA reserved pool

See merge request idf/esp-idf!3034
2018-09-03 15:43:01 +08:00
Angus Gratton 5f1844a0c8 Merge branch 'bugfix/heap_poison_swap_check' into 'master'
heap: When verifying & swapping a fill pattern, stop swapping if verification fails

See merge request idf/esp-idf!2890
2018-09-03 11:19:16 +08:00
Hrishikesh Dhayagude 4abe47437f components/bt: Fix broken API esp_bt_mem_release() for parameter ESP_BT_MODE_BTDM
Problem:
The new API esp_bt_mem_release() that was added freed BTDM data to heap from esp_bt_controller_mem_release().
Now with the BT memory optimization commit ee787085f9,
the BTDM data is optimized and reduced to only 32 bytes which is not sufficient amount to be added to heap.
So, using the API leads to assert saying that the region is too small.

Solution:
Modify heap_caps_add_region_with_caps to return ESP_ERR_INVALID_SIZE in case the range is too small to create a new heap.
Do not assert if return value is ESP_ERR_INVALID_SIZE

This also fixes using API esp_bt_controller_mem_release() with ESP_BT_MODE_BTDM

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-08-31 14:28:23 +00:00
Angus Gratton a9c4ed7139 Merge branch 'master' into feature/cmake 2018-08-30 18:51:01 +08:00
Angus Gratton 776c57e0ac heap: When adding a new heap, allocate its metadata block from internal memory only 2018-08-30 06:18:18 +00:00
Ivan Grokhotkov ed546797d0 heap: test: don’t warn about oversized mallocs 2018-08-29 14:40:28 +08:00
Angus Gratton ff2404a272 Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
Angus Gratton 383a3f788d Merge branch 'doc/heap_tracing' into 'master'
heap docs: Fix some bad links & errors in the heap docs

See merge request idf/esp-idf!2942
2018-08-10 16:46:52 +08:00
Angus Gratton c9cbc6b30c heap docs: Fix some bad links & errors in the heap docs
Also add a note about printf() sometimes causing on-demand allocations.
2018-08-10 15:54:58 +10:00
Angus Gratton a5ae5ac4b3 soc: Allow components to reserve fixed memory ranges that they need
No longer necessary to keep all reserved addresses in 'soc'.

Means 'soc' does not need to know about 'bt', for example.

Also means that Bluetooth can be enabled in config without any memory being reserved for BT
controller. Only if code calling the BT controller is linked in, will this memory be reserved...
2018-08-06 01:37:55 +00:00
Angus Gratton 8cbd12b9b7 heap: When verifying & swapping a fill pattern, stop swapping if verification fails
Avoids situation where data has been overwritten during any post-mortem analysis
(core dump, gdbstub, etc).

As reported via forum https://esp32.com/viewtopic.php?f=2&t=6471&p=27790
2018-07-31 14:53:24 +10:00
Angus Gratton ae59d7522a heap: heap_caps_malloc(..., MALLOC_CAP_32_BIT) should always align a 32-bit aligned size
Fixes crash in heap poisoning code if a non-32bit-aligned size is specified.
2018-07-31 14:29:31 +10:00
Angus Gratton bfc6bb97c0 heap: Fix heap metadata test to account for background memory allocations 2018-07-30 11:41:30 +10:00
Ivan Grokhotkov 9a2583122c heap/tests: make IRAM allocation size divisible by 4
heap_caps_malloc will fail to poison a block in IRAM with size not
divisible by 4. The proper fix will be to make poisoning code
smarter, or to disallow allocations from IRAM with size not aligned
by 4.
2018-07-25 09:45:39 +03:00
Ivan Grokhotkov a981e73e22 heap: move get_all_caps to IRAM, used in unit test 2018-07-24 09:56:40 +03:00
Ivan Grokhotkov 7a154d6a4e heap: fix unit test for the case when less than 10k of IRAM is available 2018-07-24 09:56:40 +03:00
Michael Balzer 0fb2019f2b Merge remote-tracking branch 'upstream/master' 2018-07-06 20:45:32 +02:00
Konstantin Kondrashov 899fa2dc55 assert: Fix. Move useful functions from wrapped assert functions
Moved useful functions from wrapped assert functions, because option `CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=y` will remove this functions.

Closes https://github.com/espressif/esp-idf/issues/2068
2018-06-22 15:17:55 +05:00
Angus Gratton fd88d6d89c heap: Add integer overflow checks 2018-06-19 23:31:37 +00:00
Michael Balzer c49e29f8b9 Fix crash on realloc of block with size 0 2018-06-02 13:43:04 +02:00
Angus Gratton 6b9784cc45 Merge branch 'master' into feature/cmake_update 2018-05-31 14:46:23 +10:00
Angus Gratton 3fe862dacb test_multi_heap_host: Remove race conditions from parallel "make clean test" 2018-05-22 12:09:30 +10:00
Michael Balzer 9d8e44e0f0 Merge branch 'master' of https://github.com/espressif/esp-idf 2018-05-11 08:47:18 +02:00
Angus Gratton 68282cf80b heap/cmake: Fix linking error when heap tracing is enabled 2018-05-01 17:27:39 +10:00
Angus Gratton 1cb5712463 cmake: Add component dependency support
Components should set the COMPONENT_REQUIRES & COMPONENT_PRIVATE_REQUIRES variables to define their
requirements.
2018-04-30 09:59:20 +10:00
Angus Gratton 88df8fd293 cmake: Use cmake_lint project, tidy up all CMake source files 2018-04-30 09:59:20 +10:00
Angus Gratton 4f1a856dbf cmake: Remove defaults for COMPONENT_SRCDIRS, COMPONENT_SRCS, COMPONENT_ADD_INCLUDEDIRS
* Philosophical: "explicit is better than implicit".
* Practical: Allows useful errors if invalid directories given in components as the defaults aren't
  always used. Also trims the -I path from a number of components that have no actual include
  directory.
* Simplifies knowing which components will be header-only and which won't
2018-04-30 09:59:20 +10:00
Angus Gratton c671a0c3eb build system: Initial cmake support, work in progress 2018-04-30 09:59:20 +10:00
Mahavir Jain 5cdd08ef5a heap: fix build failure due to missing header
Closes https://github.com/espressif/esp-idf/issues/1881

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-26 11:08:58 +05:30