mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: enabled ldgen mapping check in ci
This commit is contained in:
parent
5aa09271d8
commit
2c1c4999f5
@ -1,7 +1,8 @@
|
|||||||
[mapping:spi_flash]
|
[mapping:spi_flash]
|
||||||
archive: libspi_flash.a
|
archive: libspi_flash.a
|
||||||
entries:
|
entries:
|
||||||
spi_flash_rom_patch (noflash)
|
if IDF_TARGET_ESP32 = y:
|
||||||
|
spi_flash_rom_patch (noflash)
|
||||||
spi_flash_chip_generic (noflash)
|
spi_flash_chip_generic (noflash)
|
||||||
spi_flash_chip_issi (noflash)
|
spi_flash_chip_issi (noflash)
|
||||||
spi_flash_chip_mxic (noflash)
|
spi_flash_chip_mxic (noflash)
|
||||||
|
1
tools/ci/check_ldgen_mapping_exceptions.txt
Normal file
1
tools/ci/check_ldgen_mapping_exceptions.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
libc
|
@ -59,6 +59,7 @@ build_ssc_esp32s2:
|
|||||||
variables:
|
variables:
|
||||||
LOG_PATH: "$CI_PROJECT_DIR/log_ut_cmake"
|
LOG_PATH: "$CI_PROJECT_DIR/log_ut_cmake"
|
||||||
PYTHON_VER: 3
|
PYTHON_VER: 3
|
||||||
|
LDGEN_CHECK_MAPPING: 0
|
||||||
script:
|
script:
|
||||||
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
|
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
|
||||||
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
|
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
|
||||||
@ -81,6 +82,7 @@ build_esp_idf_tests_cmake_esp32s2:
|
|||||||
extends: .build_template
|
extends: .build_template
|
||||||
variables:
|
variables:
|
||||||
PYTHON_VER: 3
|
PYTHON_VER: 3
|
||||||
|
LDGEN_CHECK_MAPPING: 0
|
||||||
parallel: 10
|
parallel: 10
|
||||||
artifacts:
|
artifacts:
|
||||||
when: always
|
when: always
|
||||||
|
@ -56,6 +56,12 @@ function(__ldgen_process_template template output)
|
|||||||
|
|
||||||
idf_build_get_property(config_env_path CONFIG_ENV_PATH)
|
idf_build_get_property(config_env_path CONFIG_ENV_PATH)
|
||||||
|
|
||||||
|
if($ENV{LDGEN_CHECK_MAPPING})
|
||||||
|
set(ldgen_check "--check-mapping"
|
||||||
|
"--check-mapping-exceptions=${idf_path}/tools/ci/check_ldgen_mapping_exceptions.txt")
|
||||||
|
message(STATUS "Mapping check enabled in ldgen")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${output}
|
OUTPUT ${output}
|
||||||
COMMAND ${python} ${idf_path}/tools/ldgen/ldgen.py
|
COMMAND ${python} ${idf_path}/tools/ldgen/ldgen.py
|
||||||
@ -67,6 +73,7 @@ function(__ldgen_process_template template output)
|
|||||||
--env-file "${config_env_path}"
|
--env-file "${config_env_path}"
|
||||||
--libraries-file ${build_dir}/ldgen_libraries
|
--libraries-file ${build_dir}/ldgen_libraries
|
||||||
--objdump ${CMAKE_OBJDUMP}
|
--objdump ${CMAKE_OBJDUMP}
|
||||||
|
${ldgen_check}
|
||||||
DEPENDS ${template} ${ldgen_fragment_files} ${ldgen_depends} ${SDKCONFIG}
|
DEPENDS ${template} ${ldgen_fragment_files} ${ldgen_depends} ${SDKCONFIG}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -344,14 +344,19 @@ class GenerationModel:
|
|||||||
try:
|
try:
|
||||||
if not (obj == Mapping.MAPPING_ALL_OBJECTS and symbol is None and
|
if not (obj == Mapping.MAPPING_ALL_OBJECTS and symbol is None and
|
||||||
scheme_name == GenerationModel.DEFAULT_SCHEME):
|
scheme_name == GenerationModel.DEFAULT_SCHEME):
|
||||||
|
|
||||||
if self.check_mappings and mapping.name not in self.check_mapping_exceptions:
|
if self.check_mappings and mapping.name not in self.check_mapping_exceptions:
|
||||||
if not obj == Mapping.MAPPING_ALL_OBJECTS:
|
if not obj == Mapping.MAPPING_ALL_OBJECTS:
|
||||||
obj_section = sections_infos.get_obj_sections(archive, obj)
|
obj_sections = sections_infos.get_obj_sections(archive, obj)
|
||||||
if not obj_section:
|
if not obj_sections:
|
||||||
message = "'%s\:%s' not found" % (archive, obj)
|
message = "'%s:%s' not found" % (archive, obj)
|
||||||
raise GenerationException(message, mapping)
|
raise GenerationException(message, mapping)
|
||||||
|
|
||||||
|
if symbol:
|
||||||
|
obj_sym = fnmatch.filter(obj_sections, "*%s" % symbol)
|
||||||
|
if not obj_sym:
|
||||||
|
message = "'%s:%s %s' not found" % (archive, obj, symbol)
|
||||||
|
raise GenerationException(message, mapping)
|
||||||
|
|
||||||
self._add_mapping_rules(archive, obj, symbol, scheme_name, scheme_dictionary, mapping_rules)
|
self._add_mapping_rules(archive, obj, symbol, scheme_name, scheme_dictionary, mapping_rules)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
message = GenerationException.UNDEFINED_REFERENCE + " to scheme '" + scheme_name + "'."
|
message = GenerationException.UNDEFINED_REFERENCE + " to scheme '" + scheme_name + "'."
|
||||||
|
Loading…
Reference in New Issue
Block a user