diff --git a/components/hal/CMakeLists.txt b/components/hal/CMakeLists.txt index 0f9b9e4bdf..e0bab96d2b 100644 --- a/components/hal/CMakeLists.txt +++ b/components/hal/CMakeLists.txt @@ -261,7 +261,6 @@ idf_component_register(SRCS ${srcs} PRIV_INCLUDE_DIRS ${priv_include} REQUIRES soc esp_rom LDFRAGMENTS linker.lf) -target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") if(CONFIG_HAL_DEFAULT_ASSERTION_LEVEL EQUAL 1) target_link_libraries(${COMPONENT_LIB} INTERFACE "-u abort") diff --git a/components/hal/adc_oneshot_hal.c b/components/hal/adc_oneshot_hal.c index a51bbeaa66..ce6cb193c6 100644 --- a/components/hal/adc_oneshot_hal.c +++ b/components/hal/adc_oneshot_hal.c @@ -94,14 +94,14 @@ static void adc_hal_onetime_start(adc_unit_t unit, uint32_t clk_src_freq_hz) delay = (1000 * 1000) / digi_clk + 1; //3 ADC digital controller clock cycle delay = delay * 3; - HAL_EARLY_LOGD("adc_hal", "clk_src_freq_hz: %d, digi_clk: %d, delay: %d", clk_src_freq_hz, digi_clk, delay); + HAL_EARLY_LOGD("adc_hal", "clk_src_freq_hz: %"PRIu32", digi_clk: %"PRIu32", delay: %"PRIu32"", clk_src_freq_hz, digi_clk, delay); //This coefficient (8) is got from test, and verified from DT. When digi_clk is not smaller than ``APB_CLK_FREQ/8``, no delay is needed. if (digi_clk >= APB_CLK_FREQ/8) { delay = 0; } - HAL_EARLY_LOGD("adc_hal", "delay: %d", delay); + HAL_EARLY_LOGD("adc_hal", "delay: %"PRIu32"", delay); adc_oneshot_ll_start(false); esp_rom_delay_us(delay); adc_oneshot_ll_start(true); diff --git a/components/hal/lcd_hal.c b/components/hal/lcd_hal.c index 08d332a794..8dbe8d4851 100644 --- a/components/hal/lcd_hal.c +++ b/components/hal/lcd_hal.c @@ -56,7 +56,7 @@ uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t *hal, uint32_t src_freq_hz, uin b /= d; } - HAL_EARLY_LOGD("lcd_hal", "n=%d,a=%d,b=%d,mo=%d", n, a, b, mo); + HAL_EARLY_LOGD("lcd_hal", "n=%"PRIu32",a=%"PRIu32",b=%"PRIu32",mo=%"PRIu32"", n, a, b, mo); lcd_ll_set_group_clock_coeff(hal->dev, n, a, b); lcd_ll_set_pixel_clock_prescale(hal->dev, mo); diff --git a/components/hal/sdio_slave_hal.c b/components/hal/sdio_slave_hal.c index 34c08d31bc..be81ca8b15 100644 --- a/components/hal/sdio_slave_hal.c +++ b/components/hal/sdio_slave_hal.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -7,6 +7,7 @@ // The HAL layer for SDIO slave (common part) #include +#include #include "soc/slc_struct.h" #include "soc/hinf_struct.h" #include "hal/sdio_slave_types.h" @@ -318,11 +319,11 @@ static void send_new_packet(sdio_slave_context_t *hal) // update pkt_len register to allow host reading. sdio_slave_ll_send_write_len(hal->slc, end_desc->pkt_len); - HAL_EARLY_LOGV(TAG, "send_length_write: %d, last_len: %08X", end_desc->pkt_len, sdio_slave_ll_send_read_len(hal->host)); + HAL_EARLY_LOGV(TAG, "send_length_write: %"PRIu32", last_len: %08"PRIX32"", end_desc->pkt_len, sdio_slave_ll_send_read_len(hal->host)); send_set_state(hal, STATE_SENDING); - HAL_EARLY_LOGD(TAG, "restart new send: %p->%p, pkt_len: %d", start_desc, end_desc, end_desc->pkt_len); + HAL_EARLY_LOGD(TAG, "restart new send: %p->%p, pkt_len: %"PRIu32"", start_desc, end_desc, end_desc->pkt_len); } static esp_err_t send_check_new_packet(sdio_slave_context_t *hal) @@ -668,7 +669,7 @@ void sdio_slave_hal_load_buf(sdio_slave_context_t *hal, sdio_slave_ll_desc_t *de static inline void show_queue_item(sdio_slave_ll_desc_t *item) { - HAL_EARLY_LOGI(TAG, "=> %p: size: %d(%d), eof: %d, owner: %d", item, item->size, item->length, item->eof, item->owner); + HAL_EARLY_LOGI(TAG, "=> %p: size: %"PRIu32"(%"PRIu32"), eof: %"PRIu32", owner: %"PRIu32"", item, item->size, item->length, item->eof, item->owner); HAL_EARLY_LOGI(TAG, " buf: %p, stqe_next: %p", item->buf, item->qe.stqe_next); } diff --git a/components/hal/test/CMakeLists.txt b/components/hal/test/CMakeLists.txt index 144d832d98..a06f271e1a 100644 --- a/components/hal/test/CMakeLists.txt +++ b/components/hal/test/CMakeLists.txt @@ -1,4 +1,3 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "${include_dirs}" PRIV_REQUIRES cmock test_utils) -target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")