Skip to content

Commit

Permalink
Merge branch 'bugfix/p4_factory_firmware_warnings' into 'master'
Browse files Browse the repository at this point in the history
fix(p4): Fixed the P4 factory firmware compilation warnings

See merge request ae_group/esp-dev-kits!277
  • Loading branch information
lijunru-hub committed Feb 12, 2025
2 parents 89f9343 + 12dc5a2 commit ccea338
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ build_esp32_c3_lcdkit:
variables:
IMAGE: espressif/idf:release-v5.1

build_esp32_p4_function_ev_board:
extends:
- .build_examples_template
- .rules:build:esp32_p4_function_ev_board
parallel:
matrix:
- EXAMPLE_DIR: examples/esp32-p4-function-ev-board/examples/esp_brookesia_phone
- EXAMPLE_DIR: examples/esp32-p4-function-ev-board/examples/lvgl_demo_v8
- EXAMPLE_DIR: examples/esp32-p4-function-ev-board/examples/lvgl_demo_v9
variables:
IMAGE: espressif/idf:release-v5.4

build_esp32_s2_hmi_devkit_1:
extends:
- .build_examples_template
Expand Down
12 changes: 12 additions & 0 deletions .gitlab/ci/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
.patterns-esp32_c3_lcdkit: &patterns-esp32_c3_lcdkit
- "examples/esp32-c3-lcdkit/**/*"

.patterns-esp32_p4_function_ev_board: &patterns-esp32_p4_function_ev_board
- "examples/esp32-p4-function-ev-board/**/*"

.patterns-esp32_s2_hmi_devkit_1: &patterns-esp32_s2_hmi_devkit_1
- "examples/esp32-s2-hmi-devkit-1/**/*"

Expand Down Expand Up @@ -63,6 +66,15 @@
if: '$CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build(?:,[^,\n\r]+)*$/i'

# rules for development board
.rules:build:esp32_p4_function_ev_board:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-esp32_p4_function_ev_board

.rules:build:esp32_c3_lcdkit:
rules:
- <<: *if-protected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,3 @@ idf_component_register(
REQUIRES driver
PRIV_REQUIRES esp_timer fatfs esp_psram esp_mm
)

target_compile_options(
${COMPONENT_LIB} PRIVATE
-Wno-format
-Wno-int-conversion
-Wno-incompatible-pointer-types
-Wunused-function
-Wno-unused-variable
-Wno-unused-function
-Wno-overflow
-Wno-unused-but-set-variable
-Wno-discarded-qualifiers)
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ add_compile_options(
-Wno-missing-field-initializers
-Wno-unused-but-set-variable
-Wno-cast-function-type
-Wno-ignored-qualifiers
)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-enum-enum-conversion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ idf_component_register(
target_compile_options(
${COMPONENT_LIB}
PRIVATE
$<$<COMPILE_LANGUAGE:C>:
-Wno-format
-Wno-incompatible-pointer-types
-Wno-int-conversion
-DLV_LVGL_H_INCLUDE_SIMPLE)
>
$<$<COMPILE_LANGUAGE:CXX>:
-Wno-format
-Wno-conversion-null
-Wno-attributes
-Wno-write-strings
>
-DLV_LVGL_H_INCLUDE_SIMPLE
)
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ esp_err_t esp_lvgl_simple_player_del(void)
return ESP_OK;
}

if (player_task_handle != NULL) {
if (player_task_handle != 0) {
esp_lvgl_simple_player_stop();
if (esp_lvgl_simple_player_wait_task_stop(-1) != ESP_OK) {
ESP_LOGE(TAG, "Player task stop timeout");
Expand All @@ -726,7 +726,7 @@ esp_err_t esp_lvgl_simple_player_wait_task_stop(int timeout_ms)
return ESP_OK;
}

if (player_task_handle == NULL) {
if (player_task_handle == 0) {
return ESP_OK;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ int media_src_storage_open(media_src_t *src)
return 0;
}

int media_src_storage_connect(media_src_t *src, char *uri)
int media_src_storage_connect(media_src_t *src, const char *uri)
{
storage_src_t* m = (storage_src_t*)src->sub_src;
if (m->fp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ typedef struct {
} media_src_t;

int media_src_storage_open(media_src_t *src);
int media_src_storage_connect(media_src_t *src, char *uri);
int media_src_storage_connect(media_src_t *src, const char *uri);
int media_src_storage_disconnect(media_src_t *src);
int media_src_storage_read(media_src_t *src, void *data, size_t len);
int media_src_storage_seek(media_src_t *src, uint64_t position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ set(EXTRA_COMPONENT_DIRS
)

add_compile_options(-Wno-format)
add_compile_options(-Wno-ignored-qualifiers)
project(lvgl_demo_v8)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS
../common_components
)

add_compile_options(-Wno-format)
add_compile_options(-Wno-ignored-qualifiers)
add_compile_options(-Wno-attributes)
add_compile_options(-Wno-unused-function)
project(lvgl_demo_v9)
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "nvs_flash.h"
#include "nvs.h"
#include "esp_log.h"
Expand Down

0 comments on commit ccea338

Please sign in to comment.