Commit Graph

25291 Commits

Author SHA1 Message Date
songruojing
688fb18faa esp32c6: add soc/ xxx_periph, xxx_channel, xxx_pins, etc. files 2022-09-01 12:28:06 +08:00
songruojing
9d515185d0 esp32c6: clean up existing soc files and header file inclusion in IDF to be compatible with the new chip 2022-09-01 12:28:06 +08:00
wuzhenghui
d6d44b4781 perfmon: fix xtensa_perfmon build target 2022-09-01 12:28:00 +08:00
morris
82f2ad9b6d Merge branch 'bugfix/propagate_isr_allocation_failure' into 'master'
Fix MCPWM multiplication overflow

Closes IDFGH-8151 and IDFGH-8155

See merge request espressif/esp-idf!19829
2022-09-01 10:44:15 +08:00
Roland Dobai
b4b9d993db Merge branch 'feature/build_color_output' into 'master'
build system, tools: enable compiler color diagnostics by default, update CMake to 3.24.0

See merge request espressif/esp-idf!19864
2022-09-01 02:35:07 +08:00
morris
6088f53966 Merge branch 'refactor/add_ledc_i2c_soc_caps' into 'master'
soc_caps: Introduce SOC_LEDC_SUPPORTED and SOC_I2C_SUPPORTED caps to IDF

See merge request espressif/esp-idf!19885
2022-08-31 23:42:24 +08:00
morris
4daa04481b Merge branch 'bugfix/usb_serial_jtag_console_crash' into 'master'
console: fix a crash when initializing usb_serial_jtag console

Closes IDFGH-8166

See merge request espressif/esp-idf!19866
2022-08-31 22:17:16 +08:00
Roland Dobai
0aef81247c Merge branch 'contrib/github_pr_9637' into 'master'
export.fish: set IDF_PATH without changing current working directory (GitHub PR)

Closes IDFGH-8146 and IDFGH-8140

See merge request espressif/esp-idf!19879
2022-08-31 21:16:16 +08:00
Song Ruo Jing
6a60ecf780 soc_caps: Introduce SOC_LEDC_SUPPORTED and SOC_I2C_SUPPORTED caps to IDF
Wrap the ledc, i2c source files with the new caps in CMakeLists and linker.lf.
This could avoid potential source file not found warning during linking time.
2022-08-31 20:43:22 +08:00
Marek Fiala
5974f495b6 Fix macOS compatibility
command "readlink -m" was not compatible with macOS.
2022-08-31 14:38:24 +02:00
Ivan Grokhotkov
4d9018e925 Merge branch 'feature/ulp_cmake_cleanups' into 'master'
ulp: CMake and python cleanups

See merge request espressif/esp-idf!19817
2022-08-31 17:59:05 +08:00
Wang Zi Yan
bcb8581878 Merge branch 'docs/fix_typos_in_get-started' into 'master'
docs: fix typos in get-started

Closes DOC-3580 and DOC-3589

See merge request espressif/esp-idf!19877
2022-08-31 17:39:13 +08:00
morris
731db1c873 mcpwm: fix multiplication overflow in converting us to compare ticks
Closes https://github.com/espressif/esp-idf/issues/9648
2022-08-31 17:38:29 +08:00
morris
a0d03a60cd legacy_timer: propagate isr register failure
Closes https://github.com/espressif/esp-idf/issues/9651
2022-08-31 17:18:55 +08:00
wangziyan
da9d7a257a docs: fix typos in get-started 2022-08-31 16:30:58 +08:00
Mo Fei Fei
5a35714f2e Merge branch 'docs/updated_esp32_s3_devkitc_1_figures' into 'master'
Docs: update figures for esp32-s3-devkitc-1 user guide

Closes DOC-3349

See merge request espressif/esp-idf!19591
2022-08-31 16:24:59 +08:00
Mo Fei Fei
5dcb6022ea Docs: update figures for esp32-s3-devkitc-1 user guide 2022-08-31 16:24:58 +08:00
Shu Chen
91e8312f03 Merge branch 'feature/add_readme_for_ot_br_discovery_delegate' into 'master'
openthread: add README for discovery delegate.

See merge request espressif/esp-idf!19223
2022-08-31 14:31:06 +08:00
morris
3b5b7e55ec Merge branch 'docs/update_cn_trans_establish_serial_connect' into 'master'
Docs: update cn translation for establish-serial-connection.rst

Closes DOC-3575

See merge request espressif/esp-idf!19807
2022-08-31 12:43:25 +08:00
Mo Fei Fei
62e968589f Docs: update cn translation for establish-serial-connection.rst 2022-08-31 12:43:25 +08:00
morris
daea081d54 Merge branch 'feature/add_rom_reset_api' into 'master'
esp_rom: add rom reset api to IDF

See merge request espressif/esp-idf!19824
2022-08-31 12:29:32 +08:00
wuzhenghui
c31aaeda2a ll: add reset interface to rtc_cntl_ll 2022-08-31 01:59:36 +00:00
wuzhenghui
82ffe7e438 replacing reset by register operations with ROM interfaces to decouple the effects of register name changes 2022-08-31 01:59:36 +00:00
wuzhenghui
88c123f805 esp_rom: add esp_rom_software_reset and esp_rom_software_reset_cpu interface 2022-08-31 01:59:36 +00:00
imcaizheng
84ec01c330 export.fish: set IDF_PATH without changing current working directory 2022-08-31 02:07:31 +08:00
Ivan Grokhotkov
5b88c6b142
console: pass esp_console_repl_universal_t pointer to the repl task
For usb_serial_jtag REPL only, xTaskCreate was passing a pointer to
esp_console_repl_com_t, while esp_console_repl_task was expecting
a pointer to esp_console_repl_universal_t.

The way the two structures are defined, this makes no difference, and
the pointer values are the same. Still, this could potentially break
in the future.

(I am not sure what is the distinction between repl_com (common?) and
repl_universal; it seems that `int uart_channel` could just as well
be part of esp_console_repl_com_t; alternatively, as suggested in the
previous commit, this structure could contain a callback function
pointer, which would allow `esp_console_new_repl_*` functions to
specify how stdin/stdout should be initialized by the REPL task.)
2022-08-30 19:37:15 +02:00
Ivan Grokhotkov
c1d5717013
console: fix a crash when initializing usb_serial_jtag console
The crash occurred when calling setvbuf(stdin,...) with stdin==NULL.
This happened because esp_console_repl_task started running before
its args->uart_channel was initialized; then esp_console_repl_task
went into the code path 'uart_channel != CONFIG_ESP_CONSOLE_UART_NUM',
and tried to 'fopen("/dev/uart/0");`
Since the UART VFS is not registered when ESP_CONSOLE_USB_SERIAL_JTAG
option is enabled, fopen failed and 'stdin' was NULL.
Fix by moving the initialization of repl task arguments before the
start of the task, same as it is done for the usb_cdcacm case.

The crash started happening after the commit 287ab7566b. I haven’t
verified this, but I guess the reason why it wasn’t happening before
was that xTaskCreate was not correctly yielding to the newly created
higher-priority 'repl' task, therefore the code which was setting
the repl task arguments after xTaskCreate had time to execute.

It should be noted that the 'uart_channel' argument is a bit hacky,
in the first place. The code should be refactored to pass a callback
function to the repl task, and let this callback initialize stdin and
stdout based on the chosen console channel. Then esp_console_repl_task
does not require assumptions about the specific interface used.

Closes https://github.com/espressif/esp-idf/issues/9662
2022-08-30 19:16:51 +02:00
Mahavir Jain
0a93ee1337 Merge branch 'bugfix/ctx_lock_wifi_prov' into 'master'
Fixed provisioning manager deinit

Closes IDFGH-8171

See merge request espressif/esp-idf!19828
2022-08-30 23:09:29 +08:00
Ivan Grokhotkov
1ba3d58b78
tools: cmake: upgrade from 3.23.1 to 3.24.0 2022-08-30 16:38:14 +02:00
Ivan Grokhotkov
13881a3832
idf.py: ensure that build log is always sanitized from color sequences
The actual output from the build tool (CMake/Ninja) may or may not
contain color escape codes, depending on various factors. The output
written to the log file should never include color escape codes,
though. This is because color escape codes in files are usually not
rendered as "color" in editors, and complicate reading. Also escape
codes would break the regular expressions used to display hints for
compilation errors.
2022-08-30 16:38:14 +02:00
Ivan Grokhotkov
d04b554065
tools: idf.py: enable CLICOLOR_FORCE for interactive builds
If stdout is a TTY (meaning that the output is not redirected), tell
the build tool (GNU Make or Ninja) to enable colorized output.

GNU Make and Ninja also check if their stdout is redirected and
strip color escape sequences in that case. CLICOLOR_FORCE environment
variable overrides this behavior.

With this change, if the compiler was launched with the
-fcolor-diagnostics flag and idf.py output is not redirected, the
final output in the terminal will be colorized.

(-fcolor-diagnostics is handled at CMake level by the previous commit)
2022-08-30 16:38:13 +02:00
Ivan Grokhotkov
56e6263350
cmake: enable CMAKE_COLOR_DIAGNOSTICS by default
Related to https://github.com/espressif/esp-idf/issues/4162

Setting this option informs CMake that it should pass
-fcolor-diagnostics flag to the compiler.

(Colorized build system output, like from GNU Make, is produced even
without this flag.)

Note that if the build is done using Ninja and the build output is
redirected (not a TTY), Ninja will still strip the escape codes from
the output. For the case of idf.py, this is handled in the next
commit.
2022-08-30 16:38:13 +02:00
Mahavir Jain
a8c8946766 Merge branch 'fix/mqtt_ssl_ds_remove_unwanted_readme_section' into 'master'
mqtt/ssl_ds: Remove unwanted readme section

See merge request espressif/esp-idf!19841
2022-08-30 22:30:22 +08:00
Simon
f923a835d2 Merge branch 'contrib/github_pr_9666' into 'master'
correct spelling of detect (GitHub PR)

Closes IDFGH-8170

See merge request espressif/esp-idf!19857
2022-08-30 18:58:30 +08:00
morris
c7696fb8ef Merge branch 'docs/update_touch_sensor_esp32s2s3' into 'master'
docs: update touch sensor of esp32s2 and esp32s3

Closes DOC-3193

See merge request espressif/esp-idf!19696
2022-08-30 17:08:06 +08:00
Roland Dobai
cb81d14892 Merge branch 'bugfix/build_color_output_windows' into 'master'
tools: idf.py: use actual sys.stdout instead of the memoized one

See merge request espressif/esp-idf!19847
2022-08-30 16:31:42 +08:00
Marius Vikhammer
dfaaefe2ce Merge branch 'bugfix/uart_sclk_freq' into 'master'
uart: fixed sclk_freq not init warning when compiling with asserts disabled

Closes IDFGH-8144

See merge request espressif/esp-idf!19792
2022-08-30 16:24:38 +08:00
Roland Dobai
61860832ac Merge branch 'revert-02a19c6d' into 'master'
Revert "Merge branch 'feature/build_color_output' into 'master'"

See merge request espressif/esp-idf!19852
2022-08-30 16:05:51 +08:00
Ivan Grokhotkov
b548d9345e Revert "Merge branch 'feature/build_color_output' into 'master'"
This reverts merge request !19330
2022-08-30 15:14:47 +08:00
morris
1ca3fad458 Merge branch 'bugfix/gpio_ut_usj' into 'master'
gpio: add a test case to test the ability of disabling USB D+ pin pull-up

See merge request espressif/esp-idf!19838
2022-08-30 14:09:45 +08:00
Aditya Patwardhan
6c7fd1edc0 mqtt/ssl_ds: Remove unwanted references to configure_ds.py, Also updated
the DS documentation
2022-08-30 10:54:15 +05:30
Gao Xu
0da21aca0d Merge branch 'bugfix/fix_spi_hd_quad_issue_esp32c3' into 'master'
essl_spi: fix wrong dummy cycle under quad spi mode ant add a test to verify spi quad mod

Closes IDF-5182 and IDF-5181

See merge request espressif/esp-idf!18680
2022-08-30 10:53:11 +08:00
Simon
f8c3d093f0 Merge branch 'bugfix/btld_flash_ram' into 'master'
bootloader_flash: Some bootloader flash functions are not put in IRAM

See merge request espressif/esp-idf!19832
2022-08-30 10:51:52 +08:00
Ivan Grokhotkov
9aecfe2b9d
ulp: fix typo in peripherals ld file names 2022-08-30 02:34:28 +02:00
Ivan Grokhotkov
2916bf9b6c
ulp: esp32ulp_mapgen: remove the special case for RISC-V, cleanup
There are multiple changes in this commit:

1. Unify the RISC-V and ULP-FSM code paths in esp32ulp_mapgen.py.
   It seems that these were originally introduced because `nm` output
   for the RISC-V case contained symbol sizes, while for the ULP-FSM
   no symbol sizes were reported. This makes sense, because the
   ULP-FSM object files are produced from assembly source, symbol
   sizes have to be added manually using the .size directive.
   In the case of RISC-V, the object files are built from C sources
   and the sizes are automatically added by the compiler.

   Now 'posix' output format is used for both RISC-V and ULP-FSM.

2. Move BASE_ADDR out of esp32ulp_mapgen.py. This now has to be passed
   from CMake, which should make it easier to modify if a new chip
   with a different RTC RAM base address is added.

3. Add C++ guards to the generated header file.

4. Switch from optparse to argparse for similarity with other IDF
   tools.

5. Add type annotations.
2022-08-30 02:34:28 +02:00
Ivan Grokhotkov
4b03e233d0
ulp: cmake: simplify the dependency on the generated LD script
* "dummy loop to force pre-processed linker file generation" seems to
  be unnecessary. It looks like the idea was copied from the
  dependency of ULP-FSM preprocessed source files on the LD script.
* Can use add_dependencies instead of
  set_target_properties(...LINK_DEPENDS...) which is more readable
* Use target_link_options instead of target_link_libraries, which is
  supported starting from CMake 3.13. Unlike target_link_libraries,
  it doesn't require manually quoting the pats.
2022-08-30 02:34:28 +02:00
Ivan Grokhotkov
67bd7a300a
ulp: cmake: add the target early, use target_* commands everywhere
Instead of collecting options in various variables, use CMake
commands like target_sources and target_link_options.
2022-08-30 02:34:28 +02:00
Ivan Grokhotkov
1a73374f82
ulp: move the expected ULP-FSM toolchain version from .mk to CMake
toolchain_ulp_version.mk is a remnant of the time when we had two
build systems, and CMake had to read the expected version from a
makefile.
2022-08-30 02:34:28 +02:00
Ivan Grokhotkov
2c5b62f10e
tools: idf.py: use actual sys.stdout instead of the memoized one
This fixes the issue with build output not being colorized on Windows,
while the hints messages are colorized.

The issue occurred because sys.stdout and sys.stderr get overridden
by colorama.init() at runtime, but the default argument
output_stream=sys.stdout holds the reference to the"original"
sys.stdout.

colorama.init() (which, by the way, gets called via a curious chain
of imports, via idf_component_tools.manifest and tqdm package)
overrides standard streams, on Windows only. The overridden streams
contain logic to convert ANSI color codes into Windows Console API
calls to colorize the text.

Since read_and_write_stream function used the default value of
output_stream evaluated at module loading time, it was using the
original sys.stdout, not the one overridden by colorama.

One extra note is that while this does fix the coloring issue, the
solution is a bit fragile, as it relies on one of the following
(on Windows):
- colorama.init() is called (this can change if idf-component-manager
  stops importing tqdm)
- Sufficiently new version of Windows 10 is used, and ANSI color codes
  support is enabled in the Registry.
2022-08-30 01:30:32 +02:00
Ivan Grokhotkov
b7efde18c6 Merge branch 'bugfix/vfs_build_warning' into 'master'
vfs: use recommended `esp_cpu_dbgr_is_attached` API

See merge request espressif/esp-idf!19843
2022-08-30 07:18:40 +08:00