Skip to content

Commit

Permalink
Merge branch 'bugfix/misc_ci_fixes' into 'master'
Browse files Browse the repository at this point in the history
ci: esp_err_to_name and check_readme_links fixes

See merge request espressif/esp-idf!13859
  • Loading branch information
projectgus committed Jun 4, 2021
2 parents 5cbea22 + b1aa926 commit 65f70b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions components/esp_common/src/esp_err_to_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,10 @@ static const esp_err_msg_t esp_err_msg_table[] = {
ERR_TBL_IT(ESP_ERR_ESP_NETIF_DNS_NOT_CONFIGURED), /* 20490 0x500a */
# endif
# ifdef ESP_ERR_ESP_NETIF_MLD6_FAILED
ERR_TBL_IT(ESP_ERR_ESP_NETIF_MLD6_FAILED), /* 20490 0x500b */
ERR_TBL_IT(ESP_ERR_ESP_NETIF_MLD6_FAILED), /* 20491 0x500b */
# endif
# ifdef ESP_ERR_ESP_NETIF_IP6_ADDR_FAILED
ERR_TBL_IT(ESP_ERR_ESP_NETIF_IP6_ADDR_FAILED), /* 20490 0x500a */
ERR_TBL_IT(ESP_ERR_ESP_NETIF_IP6_ADDR_FAILED), /* 20492 0x500c */
# endif
// components/esp_common/include/esp_err.h
# ifdef ESP_ERR_FLASH_BASE
Expand Down Expand Up @@ -765,7 +765,7 @@ const char *esp_err_to_name(esp_err_t code)
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
size_t i;

for (i = 0; i < sizeof(esp_err_msg_table) / sizeof(esp_err_msg_table[0]); ++i) {
for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
if (esp_err_msg_table[i].code == code) {
return esp_err_msg_table[i].msg;
}
Expand All @@ -780,7 +780,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
size_t i;

for (i = 0; i < sizeof(esp_err_msg_table) / sizeof(esp_err_msg_table[0]); ++i) {
for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
if (esp_err_msg_table[i].code == code) {
strlcpy(buf, esp_err_msg_table[i].msg, buflen);
return buf;
Expand Down
8 changes: 4 additions & 4 deletions examples/system/ota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The OTA workflow is illustrated in the following diagram:

### Configure the project

Open the project configuration menu (`idf.py menuconfig`).
Open the project configuration menu (`idf.py menuconfig`).

In the `Example Connection Configuration` menu:

Expand Down Expand Up @@ -88,7 +88,7 @@ cp ca_cert.pem /path/to/ota/example/server_certs/

After booting, the firmware prints "Starting OTA example" to the console and:

1. Connects via Ethernet or to the AP using the provided SSID and password (Wi-Fi case)
1. Connects via Ethernet or to the AP using the provided SSID and password (Wi-Fi case)
2. Connects to the HTTPS server and downloads the new image
3. Writes the image to flash, and instructs the bootloader to boot from this image after the next reset
4. Reboots
Expand All @@ -107,7 +107,7 @@ ACCEPT

## Supporting Rollback

This feature allows you to roll back to a previous firmware if new image is not useable. The menuconfig option `CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE` allows you to track the first boot of the application (see the ``Over The Air Updates (OTA)`` article).
This feature allows you to roll back to a previous firmware if new image is not useable. The menuconfig option `CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE` allows you to track the first boot of the application (see the ``Over The Air Updates (OTA)`` article).

The ``native_ota_example`` contains code to demonstrate how a rollback works. To use it, enable the `CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE` option in the `Example Configuration` submenu of menuconfig to set `Number of the GPIO input for diagnostic` to manipulate the rollback process.

Expand Down Expand Up @@ -136,7 +136,7 @@ In ``native_ota_example``, ``$PROJECT_PATH/version.txt`` is used to define the a

### Error "ota_begin error err=0x104"

If you see this error, check that the configured (and actual) flash size is large enough for the partitions in the partition table. The default "two OTA slots" partition table requires at least 4MB flash size. To use OTA with smaller flash sizes, create a custom partition table CSV (for details see [components/partition_table](../../../compenents/partition_table)) and configure it in menuconfig.
If you see this error, check that the configured (and actual) flash size is large enough for the partitions in the partition table. The default "two OTA slots" partition table requires at least 4MB flash size. To use OTA with smaller flash sizes, create a custom partition table CSV (for details see [Partition Tables](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html)) and configure it in menuconfig.

Make sure to run "idf.py erase_flash" after making changes to the partition table.

Expand Down

0 comments on commit 65f70b9

Please sign in to comment.