mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
Merge branch 'bugfix/format_esp_common' into 'master'
fix(system): format esp_common, app_format and bootloader_format with astyle See merge request espressif/esp-idf!28748
This commit is contained in:
@@ -10,7 +10,6 @@
|
|||||||
#include "esp_app_desc.h"
|
#include "esp_app_desc.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
|
||||||
// Application version info
|
// Application version info
|
||||||
const __attribute__((weak)) __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = {
|
const __attribute__((weak)) __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = {
|
||||||
.magic_word = ESP_APP_DESC_MAGIC_WORD,
|
.magic_word = ESP_APP_DESC_MAGIC_WORD,
|
||||||
@@ -42,7 +41,6 @@ const __attribute__((weak)) __attribute__((section(".rodata_desc"))) esp_app_de
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifndef CONFIG_APP_EXCLUDE_PROJECT_VER_VAR
|
#ifndef CONFIG_APP_EXCLUDE_PROJECT_VER_VAR
|
||||||
_Static_assert(sizeof(PROJECT_VER) <= sizeof(esp_app_desc.version), "PROJECT_VER is longer than version field in structure");
|
_Static_assert(sizeof(PROJECT_VER) <= sizeof(esp_app_desc.version), "PROJECT_VER is longer than version field in structure");
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,7 +31,7 @@ TEST(esp_app_format, esp_app_get_elf_sha256_test)
|
|||||||
char ref_sha256[sha256_hex_len + 1];
|
char ref_sha256[sha256_hex_len + 1];
|
||||||
const esp_app_desc_t* desc = esp_app_get_description();
|
const esp_app_desc_t* desc = esp_app_get_description();
|
||||||
for (int i = 0; i < sizeof(ref_sha256) / 2; ++i) {
|
for (int i = 0; i < sizeof(ref_sha256) / 2; ++i) {
|
||||||
snprintf(ref_sha256 + 2*i, 3, "%02x", desc->app_elf_sha256[i]);
|
snprintf(ref_sha256 + 2 * i, 3, "%02x", desc->app_elf_sha256[i]);
|
||||||
}
|
}
|
||||||
ref_sha256[sha256_hex_len] = 0;
|
ref_sha256[sha256_hex_len] = 0;
|
||||||
|
|
||||||
|
@@ -9,7 +9,6 @@
|
|||||||
#include "esp_bootloader_desc.h"
|
#include "esp_bootloader_desc.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
|
||||||
// Bootloader version info
|
// Bootloader version info
|
||||||
const __attribute__((weak)) __attribute__((section(".data_bootloader_desc"))) esp_bootloader_desc_t esp_bootloader_desc = {
|
const __attribute__((weak)) __attribute__((section(".data_bootloader_desc"))) esp_bootloader_desc_t esp_bootloader_desc = {
|
||||||
.magic_byte = ESP_BOOTLOADER_DESC_MAGIC_BYTE,
|
.magic_byte = ESP_BOOTLOADER_DESC_MAGIC_BYTE,
|
||||||
|
@@ -303,7 +303,6 @@ extern "C" {
|
|||||||
|
|
||||||
#endif // !CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT
|
#endif // !CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -36,7 +36,6 @@ typedef int esp_err_t;
|
|||||||
#define ESP_ERR_NOT_FINISHED 0x10C /*!< Operation has not fully completed */
|
#define ESP_ERR_NOT_FINISHED 0x10C /*!< Operation has not fully completed */
|
||||||
#define ESP_ERR_NOT_ALLOWED 0x10D /*!< Operation is not allowed */
|
#define ESP_ERR_NOT_ALLOWED 0x10D /*!< Operation is not allowed */
|
||||||
|
|
||||||
|
|
||||||
#define ESP_ERR_WIFI_BASE 0x3000 /*!< Starting number of WiFi error codes */
|
#define ESP_ERR_WIFI_BASE 0x3000 /*!< Starting number of WiFi error codes */
|
||||||
#define ESP_ERR_MESH_BASE 0x4000 /*!< Starting number of MESH error codes */
|
#define ESP_ERR_MESH_BASE 0x4000 /*!< Starting number of MESH error codes */
|
||||||
#define ESP_ERR_FLASH_BASE 0x6000 /*!< Starting number of flash error codes */
|
#define ESP_ERR_FLASH_BASE 0x6000 /*!< Starting number of flash error codes */
|
||||||
|
@@ -893,7 +893,7 @@ const char *esp_err_to_name(esp_err_t code)
|
|||||||
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
||||||
size_t i;
|
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) {
|
if (esp_err_msg_table[i].code == code) {
|
||||||
return esp_err_msg_table[i].msg;
|
return esp_err_msg_table[i].msg;
|
||||||
}
|
}
|
||||||
@@ -908,7 +908,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
|
|||||||
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
||||||
size_t i;
|
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) {
|
if (esp_err_msg_table[i].code == code) {
|
||||||
strlcpy(buf, esp_err_msg_table[i].msg, buflen);
|
strlcpy(buf, esp_err_msg_table[i].msg, buflen);
|
||||||
return buf;
|
return buf;
|
||||||
|
@@ -42,7 +42,7 @@ const char *esp_err_to_name(esp_err_t code)
|
|||||||
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
||||||
size_t i;
|
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) {
|
if (esp_err_msg_table[i].code == code) {
|
||||||
return esp_err_msg_table[i].msg;
|
return esp_err_msg_table[i].msg;
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
|
|||||||
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
|
||||||
size_t i;
|
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) {
|
if (esp_err_msg_table[i].code == code) {
|
||||||
strlcpy(buf, esp_err_msg_table[i].msg, buflen);
|
strlcpy(buf, esp_err_msg_table[i].msg, buflen);
|
||||||
return buf;
|
return buf;
|
||||||
|
@@ -8,7 +8,6 @@
|
|||||||
#include "unity_test_runner.h"
|
#include "unity_test_runner.h"
|
||||||
#include "esp_heap_caps.h"
|
#include "esp_heap_caps.h"
|
||||||
|
|
||||||
|
|
||||||
// Some resources are lazy allocated (newlib locks) in the esp_common code, the threshold is left for that case
|
// Some resources are lazy allocated (newlib locks) in the esp_common code, the threshold is left for that case
|
||||||
#define TEST_MEMORY_LEAK_THRESHOLD (-100)
|
#define TEST_MEMORY_LEAK_THRESHOLD (-100)
|
||||||
|
|
||||||
@@ -28,8 +27,6 @@ void setUp(void)
|
|||||||
before_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT);
|
before_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void tearDown(void)
|
void tearDown(void)
|
||||||
{
|
{
|
||||||
size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT);
|
size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT);
|
||||||
|
@@ -29,7 +29,6 @@ extern int _ext_ram_noinit_end;
|
|||||||
extern int _ext_ram_bss_start;
|
extern int _ext_ram_bss_start;
|
||||||
extern int _ext_ram_bss_end;
|
extern int _ext_ram_bss_end;
|
||||||
|
|
||||||
|
|
||||||
//Variables for test: Attributes place variables into correct sections
|
//Variables for test: Attributes place variables into correct sections
|
||||||
static __NOINIT_ATTR uint32_t s_noinit;
|
static __NOINIT_ATTR uint32_t s_noinit;
|
||||||
#if SOC_RTC_MEM_SUPPORTED
|
#if SOC_RTC_MEM_SUPPORTED
|
||||||
@@ -119,7 +118,6 @@ TEST_CASE_MULTIPLE_STAGES("Spiram test noinit memory", "[psram][ld]", write_spir
|
|||||||
|
|
||||||
#endif // CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY
|
#endif // CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
|
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
|
||||||
#define TEST_BSS_NUM (256 * 1024)
|
#define TEST_BSS_NUM (256 * 1024)
|
||||||
static EXT_RAM_BSS_ATTR uint32_t s_bss_buffer[TEST_BSS_NUM];
|
static EXT_RAM_BSS_ATTR uint32_t s_bss_buffer[TEST_BSS_NUM];
|
||||||
|
@@ -52,10 +52,7 @@ components_not_formatted_temporary:
|
|||||||
- "/components/cxx/"
|
- "/components/cxx/"
|
||||||
- "/components/driver/"
|
- "/components/driver/"
|
||||||
- "/components/efuse/"
|
- "/components/efuse/"
|
||||||
- "/components/esp_app_format/"
|
|
||||||
- "/components/esp_bootloader_format/"
|
|
||||||
- "/components/esp_coex/"
|
- "/components/esp_coex/"
|
||||||
- "/components/esp_common/"
|
|
||||||
- "/components/esp_eth/"
|
- "/components/esp_eth/"
|
||||||
- "/components/esp_event/"
|
- "/components/esp_event/"
|
||||||
- "/components/esp_gdbstub/"
|
- "/components/esp_gdbstub/"
|
||||||
|
Reference in New Issue
Block a user