kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/gcc8_compatibility' into 'master'
Support for GCC8 compatibility - 2 See merge request idf/esp-idf!3677pull/2847/head
commit
647145a734
|
@ -176,11 +176,8 @@ static const uint16_t primary_service_uuid = ESP_GATT_UUID_PRI_SERVICE;
|
||||||
static const uint16_t character_declaration_uuid = ESP_GATT_UUID_CHAR_DECLARE;
|
static const uint16_t character_declaration_uuid = ESP_GATT_UUID_CHAR_DECLARE;
|
||||||
static const uint16_t character_client_config_uuid = ESP_GATT_UUID_CHAR_CLIENT_CONFIG;
|
static const uint16_t character_client_config_uuid = ESP_GATT_UUID_CHAR_CLIENT_CONFIG;
|
||||||
static const uint16_t character_user_description = ESP_GATT_UUID_CHAR_DESCRIPTION;
|
static const uint16_t character_user_description = ESP_GATT_UUID_CHAR_DESCRIPTION;
|
||||||
static const uint8_t char_prop_read = ESP_GATT_CHAR_PROP_BIT_READ;
|
|
||||||
static const uint8_t char_prop_write = ESP_GATT_CHAR_PROP_BIT_WRITE;
|
|
||||||
static const uint8_t char_prop_notify = ESP_GATT_CHAR_PROP_BIT_NOTIFY;
|
static const uint8_t char_prop_notify = ESP_GATT_CHAR_PROP_BIT_NOTIFY;
|
||||||
static const uint8_t char_prop_read_write = ESP_GATT_CHAR_PROP_BIT_WRITE | ESP_GATT_CHAR_PROP_BIT_READ;
|
static const uint8_t char_prop_read_write = ESP_GATT_CHAR_PROP_BIT_WRITE | ESP_GATT_CHAR_PROP_BIT_READ;
|
||||||
static const uint8_t char_prop_read_write_notify = ESP_GATT_CHAR_PROP_BIT_WRITE | ESP_GATT_CHAR_PROP_BIT_READ | ESP_GATT_CHAR_PROP_BIT_NOTIFY;
|
|
||||||
static const uint8_t char1_name[] = "Char_1_Short_WR";
|
static const uint8_t char1_name[] = "Char_1_Short_WR";
|
||||||
static const uint8_t char2_name[] = "Char_2_Long_WR";
|
static const uint8_t char2_name[] = "Char_2_Long_WR";
|
||||||
static const uint8_t char3_name[] = "Char_3_Short_Notify";
|
static const uint8_t char3_name[] = "Char_3_Short_Notify";
|
||||||
|
|
|
@ -201,6 +201,7 @@ static void parse_gsv(esp_gps_t *esp_gps)
|
||||||
switch (esp_gps->item_num) {
|
switch (esp_gps->item_num) {
|
||||||
case 1: /* total GSV numbers */
|
case 1: /* total GSV numbers */
|
||||||
esp_gps->sat_count = (uint8_t)strtol(esp_gps->item_str, NULL, 10);
|
esp_gps->sat_count = (uint8_t)strtol(esp_gps->item_str, NULL, 10);
|
||||||
|
break;
|
||||||
case 2: /* Current GSV statement number */
|
case 2: /* Current GSV statement number */
|
||||||
esp_gps->sat_num = (uint8_t)strtol(esp_gps->item_str, NULL, 10);
|
esp_gps->sat_num = (uint8_t)strtol(esp_gps->item_str, NULL, 10);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -43,9 +43,9 @@ typedef struct {
|
||||||
static esp_err_t create_packet_file(void)
|
static esp_err_t create_packet_file(void)
|
||||||
{
|
{
|
||||||
uint32_t file_no = 0;
|
uint32_t file_no = 0;
|
||||||
char filename[PCAP_FILE_NAME_MAX_LEN];
|
char filename[PCAP_FILE_NAME_MAX_LEN + 15];
|
||||||
do {
|
do {
|
||||||
snprintf(filename, PCAP_FILE_NAME_MAX_LEN, "%s%d.pcap", packet_filepath, file_no);
|
snprintf(filename, sizeof(filename), "%s%d.pcap", packet_filepath, file_no);
|
||||||
file_no++;
|
file_no++;
|
||||||
} while (0 == access(filename, F_OK));
|
} while (0 == access(filename, F_OK));
|
||||||
/* Create file to write, binary format */
|
/* Create file to write, binary format */
|
||||||
|
|
|
@ -76,10 +76,11 @@ endmacro()
|
||||||
function(idf_set_global_compile_options)
|
function(idf_set_global_compile_options)
|
||||||
# Temporary trick to support both gcc5 and gcc8 builds
|
# Temporary trick to support both gcc5 and gcc8 builds
|
||||||
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2.0)
|
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2.0)
|
||||||
set(GCC_NOT_5_2_0 0)
|
set(GCC_NOT_5_2_0 0 CACHE STRING "GCC is 5.2.0 version")
|
||||||
else()
|
else()
|
||||||
set(GCC_NOT_5_2_0 1)
|
set(GCC_NOT_5_2_0 1 CACHE STRING "GCC is not 5.2.0 version")
|
||||||
endif()
|
endif()
|
||||||
|
list(APPEND compile_definitions "GCC_NOT_5_2_0=${GCC_NOT_5_2_0}")
|
||||||
|
|
||||||
list(APPEND compile_definitions "ESP_PLATFORM" "HAVE_CONFIG_H")
|
list(APPEND compile_definitions "ESP_PLATFORM" "HAVE_CONFIG_H")
|
||||||
|
|
||||||
|
@ -178,9 +179,6 @@ function(idf_set_global_compile_options)
|
||||||
list(APPEND cxx_compile_options ${EXTRA_CXXFLAGS})
|
list(APPEND cxx_compile_options ${EXTRA_CXXFLAGS})
|
||||||
list(APPEND compile_options ${EXTRA_CPPFLAGS})
|
list(APPEND compile_options ${EXTRA_CPPFLAGS})
|
||||||
|
|
||||||
# Temporary trick to support both gcc5 and gcc8 builds
|
|
||||||
list(APPEND compile_definitions "GCC_NOT_5_2_0=${GCC_NOT_5_2_0}")
|
|
||||||
|
|
||||||
set_default(IDF_COMPILE_DEFINITIONS "${compile_definitions}")
|
set_default(IDF_COMPILE_DEFINITIONS "${compile_definitions}")
|
||||||
set_default(IDF_COMPILE_OPTIONS "${compile_options}")
|
set_default(IDF_COMPILE_OPTIONS "${compile_options}")
|
||||||
set_default(IDF_C_COMPILE_OPTIONS "${c_compile_options}")
|
set_default(IDF_C_COMPILE_OPTIONS "${c_compile_options}")
|
||||||
|
|
Ładowanie…
Reference in New Issue