Commit graph

56 commits

Author SHA1 Message Date
Michael (XIAO Xufeng)
562af8f65e global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.

Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.

In CMAKE, we have two kinds of header visibilities (set by include path visibility):

(Assume component A --(depends on)--> B, B is the current component)

1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)

and we have two kinds of depending ways:

(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)

1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)

1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)

This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:

- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h

The major broken include chain includes:

1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h

some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h

BREAKING CHANGE
2019-04-16 13:21:15 +08:00
Kirill Chalov
a01ec59f74 Review log.rst and index.rst files in api-reference/system 2019-04-11 15:33:38 +08:00
morris
c159984264 separate rom from esp32 component to esp_rom
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
Roland Dobai
37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
Renz Christian Bagaporo
d9939cedd9 cmake: make main a component again 2018-09-11 09:44:12 +08:00
Angus Gratton
ff2404a272 Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
michael
3ba8461928 doc: fix the level inconsistent issue in Kconfig document 2018-06-05 10:36:18 +00:00
Angus Gratton
6b9784cc45 Merge branch 'master' into feature/cmake_update 2018-05-31 14:46:23 +10:00
Ivan Grokhotkov
cb649e452f remove executable permission from source files 2018-05-29 20:07:45 +08:00
Ivan Grokhotkov
12f707932f log: clean up docs, clarify esp_log_level_set usage
Closes https://github.com/espressif/esp-idf/issues/1713
2018-05-11 13:55:16 +08: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
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
Angus Gratton
2f318d16fa log: Make ESP_LOGx macros into single statements
Requires a semicolon after any use (previously this was optional due to trailing } after expansion)

Closes https://github.com/espressif/esp-idf/issues/1757
2018-04-26 09:08:07 +10:00
island
4ee6f73a2e component/bt: Fix BLE printf missing problem 2018-02-06 14:35:39 +08:00
Angus Gratton
2e33dbf766 Merge branch 'bugfix/esp_log_level_set_strcmp' into 'master'
Fix esp_log_level_set string matching (github PR 1557)

See merge request idf/esp-idf!1872
2018-01-31 09:58:21 +08:00
David Ashley
750c8c00c8 This is a fix for the esp_log_level_set function. The problem is when this
function is called but NOT withe the same 'c' string constant that the LOG*
calls used in each module, the cache check doesn't match, so the cached
entry won't get updated. There's no point in optimizing this function
anyway because it is only called rarely.
2018-01-28 16:47:07 -06:00
Ivan Grokhotkov
527be440f8 log: fix preprocessor comparison against an enum value
Fix `#if (LOG_LOCAL_LEVEL >= ESP_LOG_INFO)` which is always false and
produces a warning with -Wundef.

Use same pattern to compare LOG_LOCAL_LEVEL with ESP_LOG_INFO as is used
in definition of `ESP_LOG_BUFFER_HEX_LEVEL` and
`ESP_LOG_BUFFER_CHAR_LEVEL`.

Also reformat existing definitions for better readability.

Closes https://github.com/espressif/esp-idf/issues/1526
2018-01-28 19:45:25 +08:00
David Antliff
19f10c4960 Fix hexdump comment and array size. See issue #1518.
Closes https://github.com/espressif/esp-idf/pull/1518

Merges https://github.com/espressif/esp-idf/pull/1519
2018-01-22 16:25:09 +11:00
Ivan Grokhotkov
3a6962b8ec log: fix typos in header files 2018-01-05 16:10:58 +08:00
Ivan Grokhotkov
6a5c105753 log: define LOG_LOCAL_LEVEL before using it, don't use type cast
LOG_LOCAL_LEVEL is now used in a construct like:
 #if (LOG_LOCAL_LEVEL >= ESP_LOG_INFO)
Make sure that LOG_LOCAL_LEVEL is defined, and don't use a type cast in
its definition, because preprocessor can not parse that.
2018-01-05 16:10:58 +08:00
Andrew Dikarev
08ba79cc2b return old handler from esp_log_set_vprintf()
Merges #1286
2017-11-22 11:01:43 +08:00
Jeroen Domburg
740f8a79f0 Add logic to make external RAM usable with malloc() 2017-09-28 17:17:50 +08:00
michael
9d9e771933 fix(global, log): fix esp_log(_early)_timestamp readings after startup by correct the CCOUNT register when switching CPU clock.
TW#13332, Closes #700
2017-09-26 15:18:17 +08:00
michael
8244fa95fe feat(log): add new function to log buffer with level and hex dump. 2017-09-18 11:44:54 +08:00
Ivan Grokhotkov
0a5a705ca8 Merge branch 'bugfix/log_tag_change_level' into 'master'
bugfix(log): fix the log tag to update existing rather than add new tag when calling ``esp_log_level_set``

See merge request !1153
2017-08-31 10:45:55 +08:00
krzychb
8c3169b6be Removed redundant 'Logging to Host' and docs cleaning 2017-08-29 20:47:10 +02:00
michael
cfd95b62cb feat(log): add tags only when no one exist, otherwise refresh linked list and cache. 2017-08-28 16:25:40 +08:00
michael
940f5fcb89 refactor(log): replace the tag uncached list with standard SLIST.
NOTE: split the header modify outside.
2017-08-28 16:25:39 +08:00
michael
28c4ba1288 doc(log): document the log macros. 2017-08-28 16:25:39 +08:00
Alexey Gerenkov
c2c9149a24 esp32: Apptrace API enhancement
- User down buffer configuration support
 - bugfix: ring buf - avalable write size undeflow
 - SysView down buf support updated
2017-07-24 19:57:44 +03:00
Jiang Jiang Jian
ff6c0a6cc8 Merge branch 'bugfix/spi_flash_large_writes' into 'master'
spi_flash: Fix large writes, unaligned writes, and writes from flash

See merge request !843
2017-06-16 15:04:01 +08:00
island
c5debed621 component/bt: Fix bug while writing slave's service change characteristic
- Fix slave initiate service discovery procedure
- Fix master re-discovery every time connection established
- Optimize service discovery char ccc write procedure
- Optimize esp_log_buffer function
- Modify default supervision timeout from 20s to 2s
2017-06-14 13:12:38 +08:00
Angus Gratton
edd2459934 esp_log_buffer_hex: Make buffer argument a void pointer 2017-06-09 17:16:58 +10:00
zhiweijian
f5a59f4f78 component/bt: add open and close event for gatts
1.added open event and close event for gatts.
2.used esp_log_buffer_char/hex for gattc scan result.
2017-06-01 15:01:54 +08:00
jack
fc130fba86 fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +08:00
Alexey Gerenkov
55f1a63faf esp32: Adds functionality for application tracing over JTAG
- Implements application tracing module which allows to send arbitrary
   data to host over JTAG. This feature is useful for analyzing
   program modules behavior, dumping run-time application data etc.
 - Implements printf-like logging functions on top of apptrace module.
   This feature is a kind of semihosted printf functionality with lower
   overhead and impact on system behaviour as compared to standard printf.
2017-04-17 23:26:29 +03:00
Lourens Naudé
a8b75ed974 log: fix esp_log_level_set function name in docs
Fix documentation and comments to reflect the new esp_log_level_set API (and not deprecated esp_log_set_level)
2017-01-16 02:37:10 +08:00
Alexey Gerenkov
ad66fbe5ad esp32: Fixes issues discussed during code review of MR!341
The following issues mentioned during MR!341 review were fixed:
1) Core dump test application description
2) Usage of CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH and CONFIG_ESP32_ENABLE_COREDUMP_TO_UART
3) FLASH_GUARD_START macro usage is fixed in flash API
4) Core dump module logging facility
5) cache util functions doc updated
6) interactive delay before print core dump to uart
7) core dump partion support in build system
2017-01-12 19:38:19 +03:00
Ivan Grokhotkov
46a39b1e0f catch log output from WiFi libs 2016-11-22 21:14:36 +08:00
Angus Gratton
c15024e629 Merge branch 'master' into feature/build_component_project_vars 2016-11-14 14:54:41 +11:00
Angus Gratton
ea4005e673 Merge branch 'feature/esptool_secure_boot' into 'master'
Secure boot support

Also includes a lot of esptool.py changes (two new command line tools, espefuse.py and espsecure.py)
https://github.com/themadinventor/esptool/compare/feature/esp32_v20_refactor...feature/esp32_secure_boot?expand=1


See merge request !163
2016-11-14 11:32:04 +08:00
Angus Gratton
208e83def7 build system: Refactor component.mk to not need component_common.mk
New makefile component_wrapper.mk allows some variables to be set
before component.mk is evaluated. This properly fixes problems with
sdkconfig being hard to access in all phases of the build.

Including component_common.mk is no longer necessary and will print a
deprecation warning for components which use it.
2016-11-10 15:52:22 +11:00
Ivan Grokhotkov
81b18aa8d5 bootloader: move some functions out of IRAM when building in bootloader mode
Fixes https://github.com/espressif/esp-idf/issues/80
2016-11-08 20:17:08 +08:00
Angus Gratton
aceb6517c0 Refactor existing bootloader common functionality into bootloader_support component 2016-11-02 17:58:41 +11:00
Krzysztof
079f5faad8 Fixed confused Sphinx
Sphinx failed to phrase esp_log_timestamp
reorderdering esp_log_write and esp_log_timestamp fixed this issue
2016-11-01 01:21:18 +08:00
Krzysztof
f6118c67b0 Fixed desription of logging library 2016-11-01 01:21:18 +08:00
Ivan Grokhotkov
182184567e build system: add menuconfig choice for optimization level, reorganize C*FLAGS
This change adds two options (Debug/Release) for optimization level.
Debug enables -O0, release enables -Os and adds -DNDEBUG (which removes all assert() statements).
Debugging symbols are kept in both cases, although we may add an option to strip output file if necessary.
Also we used to define all common compiler flags in CPPFLAGS, and then appended them to CFLAGS/CXXFLAGS.
It makes it impossible to add preprocessor macros to CPPFLAGS at component level (one has to use CFLAGS/CXXFLAGS instead).
Some third party libraries are not compatible with this approach. Changed to the more common way of using these variables.
2016-10-17 12:38:17 +08:00
Wu Jian Gang
ed0a85ab4d Kconfig: use 4 spaces to instead 1 tab
In some Kconfig file, both 4 spaces and 1 tab are used mix, let's just
use 4 space, it will be clean in some editor.
2016-09-28 13:24:58 +08:00
Ivan Grokhotkov
14e003fcf2 components/log: regroup macros for better readability 2016-09-19 08:53:09 +08:00