From 1a73374f8277c4c4e8fd87cfbcab19a766101dd4 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 28 Aug 2022 13:47:12 +0200 Subject: [PATCH 1/5] ulp: move the expected ULP-FSM toolchain version from .mk to CMake toolchain_ulp_version.mk is a remnant of the time when we had two build systems, and CMake had to read the expected version from a makefile. --- components/ulp/cmake/CMakeLists.txt | 18 +++++++----------- components/ulp/toolchain_ulp_version.mk | 1 - 2 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 components/ulp/toolchain_ulp_version.mk diff --git a/components/ulp/cmake/CMakeLists.txt b/components/ulp/cmake/CMakeLists.txt index db665973fe..732ae8e4a3 100644 --- a/components/ulp/cmake/CMakeLists.txt +++ b/components/ulp/cmake/CMakeLists.txt @@ -19,25 +19,21 @@ set(as_version ${CMAKE_MATCH_1}) message(STATUS "Building ULP app ${ULP_APP_NAME}") -if(ULP_COCPU_IS_RISCV) - set(ULP_LD_TEMPLATE ${IDF_PATH}/components/ulp/ld/ulp_riscv.ld) -else() +# Check the supported assembler version +if(NOT ULP_COCPU_IS_RISCV) message(STATUS "ULP assembler version: ${as_version}") - - # Check the supported assembler version - file(STRINGS ${IDF_PATH}/components/ulp/toolchain_ulp_version.mk version_file_contents) - string(REGEX MATCH - "SUPPORTED_ULP_ASSEMBLER_VERSION = (${version_pattern})" - as_supported_version - ${version_file_contents}) - set(as_supported_version ${CMAKE_MATCH_1}) + set(as_supported_version 2.28.51-esp-20191205) if(NOT as_version STREQUAL as_supported_version) message(WARNING "WARNING: ULP assembler version ${as_version} is not supported. Expected to see version: \ ${as_supported_version}. Please check ESP-IDF ULP setup instructions and update \ the toolchain, or proceed at your own risk.") endif() +endif() +if(ULP_COCPU_IS_RISCV) + set(ULP_LD_TEMPLATE ${IDF_PATH}/components/ulp/ld/ulp_riscv.ld) +else() set(ULP_LD_TEMPLATE ${IDF_PATH}/components/ulp/ld/ulp_fsm.ld) endif() diff --git a/components/ulp/toolchain_ulp_version.mk b/components/ulp/toolchain_ulp_version.mk deleted file mode 100644 index d835600e43..0000000000 --- a/components/ulp/toolchain_ulp_version.mk +++ /dev/null @@ -1 +0,0 @@ -SUPPORTED_ULP_ASSEMBLER_VERSION = 2.28.51-esp-20191205 From 67bd7a300ae42cea8fd0ef15013b16d22dad97c1 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 28 Aug 2022 13:55:49 +0200 Subject: [PATCH 2/5] ulp: cmake: add the target early, use target_* commands everywhere Instead of collecting options in various variables, use CMake commands like target_sources and target_link_options. --- components/ulp/cmake/CMakeLists.txt | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/components/ulp/cmake/CMakeLists.txt b/components/ulp/cmake/CMakeLists.txt index 732ae8e4a3..a7ef815a46 100644 --- a/components/ulp/cmake/CMakeLists.txt +++ b/components/ulp/cmake/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.16) include(${IDF_PATH}/tools/cmake/utilities.cmake) project(${ULP_APP_NAME} ASM C) +add_executable(${ULP_APP_NAME}) option(ULP_COCPU_IS_RISCV "Use RISC-V based ULP" OFF) @@ -49,7 +50,7 @@ list(APPEND ULP_PREPROCESSOR_ARGS ${component_includes}) list(APPEND ULP_PREPROCESSOR_ARGS -I${COMPONENT_DIR}) list(APPEND ULP_PREPROCESSOR_ARGS -I${sdkconfig_dir}) -include_directories(${COMPONENT_INCLUDES}) +target_include_directories(${ULP_APP_NAME} PRIVATE ${COMPONENT_INCLUDES}) list(APPEND ULP_PREPROCESSOR_ARGS -D__ASSEMBLER__) @@ -89,17 +90,16 @@ if(ULP_COCPU_IS_RISCV) set_source_files_properties(${noop} PROPERTIES NOOP_PROPERTY ${ULP_LD_SCRIPT}) endforeach() - #creates the executable: - add_executable(${ULP_APP_NAME} ${ULP_S_SOURCES}) set(DUMP_SYMBOL_ARGS -g) set(MAP_GEN_EXTRA_ARGS --riscv) - set(EXTRA_LINKER_ARGS "-nostartfiles") - list(APPEND EXTRA_LINKER_ARGS "-Wl,--gc-sections") - list(APPEND EXTRA_LINKER_ARGS "-Wl,-Map=\"${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.map\"") + target_link_options(${ULP_APP_NAME} PRIVATE "-nostartfiles") + target_link_options(${ULP_APP_NAME} PRIVATE -Wl,--gc-sections) + target_link_options(${ULP_APP_NAME} PRIVATE -Wl,-Map=${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.map) + target_sources(${ULP_APP_NAME} PRIVATE ${ULP_S_SOURCES}) #Makes the csr utillies for riscv visible: target_include_directories(${ULP_APP_NAME} PRIVATE "${IDF_PATH}/components/ulp/ulp_riscv/ulp_core/include" "${IDF_PATH}/components/ulp/ulp_riscv/shared/include") - target_link_libraries(${ULP_APP_NAME} "-T \"${IDF_PATH}/components/ulp/ld/${IDF_TARGET}.periperals.ld\"") + target_link_options(${ULP_APP_NAME} PRIVATE -T ${IDF_PATH}/components/ulp/ld/${IDF_TARGET}.periperals.ld) target_compile_definitions(${ULP_APP_NAME} PRIVATE IS_ULP_COCPU) else() @@ -121,11 +121,10 @@ else() list(APPEND ULP_PS_SOURCES ${ulp_ps_output}) endforeach() - # Create an executable - add_executable(${ULP_APP_NAME} ${ULP_PS_SOURCES}) set(DUMP_SYMBOL_ARGS -g -f posix) set(MAP_GEN_EXTRA_ARGS .) - set(EXTRA_LINKER_ARGS "-Map=\"${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.map\"") + target_link_options(${ULP_APP_NAME} PRIVATE -Map=${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.map) + target_sources(${ULP_APP_NAME} PRIVATE ${ULP_PS_SOURCES}) endif() @@ -155,5 +154,4 @@ add_custom_target(build WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(${ULP_APP_NAME} "-T\"${CMAKE_CURRENT_BINARY_DIR}/${ULP_LD_SCRIPT}\"") -target_link_libraries(${ULP_APP_NAME} ${EXTRA_LINKER_ARGS}) set_target_properties(${ULP_APP_NAME} PROPERTIES LINK_DEPENDS ${ULP_LD_SCRIPT}) From 4b03e233d03c462360e175fea42db77f85b71cee Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 28 Aug 2022 14:00:20 +0200 Subject: [PATCH 3/5] ulp: cmake: simplify the dependency on the generated LD script * "dummy loop to force pre-processed linker file generation" seems to be unnecessary. It looks like the idea was copied from the dependency of ULP-FSM preprocessed source files on the LD script. * Can use add_dependencies instead of set_target_properties(...LINK_DEPENDS...) which is more readable * Use target_link_options instead of target_link_libraries, which is supported starting from CMake 3.13. Unlike target_link_libraries, it doesn't require manually quoting the pats. --- components/ulp/cmake/CMakeLists.txt | 41 +++++++++-------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/components/ulp/cmake/CMakeLists.txt b/components/ulp/cmake/CMakeLists.txt index a7ef815a46..adc9ae011c 100644 --- a/components/ulp/cmake/CMakeLists.txt +++ b/components/ulp/cmake/CMakeLists.txt @@ -32,12 +32,6 @@ if(NOT ULP_COCPU_IS_RISCV) endif() endif() -if(ULP_COCPU_IS_RISCV) - set(ULP_LD_TEMPLATE ${IDF_PATH}/components/ulp/ld/ulp_riscv.ld) -else() - set(ULP_LD_TEMPLATE ${IDF_PATH}/components/ulp/ld/ulp_fsm.ld) -endif() - set(ULP_MAP_GEN ${PYTHON} ${IDF_PATH}/components/ulp/esp32ulp_mapgen.py) get_filename_component(sdkconfig_dir ${SDKCONFIG_HEADER} DIRECTORY) @@ -54,16 +48,23 @@ target_include_directories(${ULP_APP_NAME} PRIVATE ${COMPONENT_INCLUDES}) list(APPEND ULP_PREPROCESSOR_ARGS -D__ASSEMBLER__) -# Preprocess linker script, pre-linking +# Pre-process the linker script +if(ULP_COCPU_IS_RISCV) + set(ULP_LD_TEMPLATE ${IDF_PATH}/components/ulp/ld/ulp_riscv.ld) +else() + set(ULP_LD_TEMPLATE ${IDF_PATH}/components/ulp/ld/ulp_fsm.ld) +endif() get_filename_component(ULP_LD_SCRIPT ${ULP_LD_TEMPLATE} NAME) add_custom_command(OUTPUT ${ULP_LD_SCRIPT} COMMAND ${CMAKE_C_COMPILER} -E -P -xc -o ${ULP_LD_SCRIPT} ${ULP_PREPROCESSOR_ARGS} ${ULP_LD_TEMPLATE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${ULP_LD_TEMPLATE} ${SDKCONFIG_HEADER} + MAIN_DEPENDENCY ${ULP_LD_TEMPLATE} + DEPENDS ${SDKCONFIG_HEADER} + COMMENT "Generating ${ULP_LD_SCRIPT} linker script..." VERBATIM) -add_custom_target(${ULP_APP_NAME}_ld_script - DEPENDS ${ULP_LD_SCRIPT} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +add_custom_target(ld_script DEPENDS ${ULP_LD_SCRIPT}) +add_dependencies(${ULP_APP_NAME} ld_script) +target_link_options(${ULP_APP_NAME} PRIVATE SHELL:-T ${CMAKE_CURRENT_BINARY_DIR}/${ULP_LD_SCRIPT}) # To avoid warning "Manually-specified variables were not used by the project" set(bypassWarning "${IDF_TARGET}") @@ -77,19 +78,6 @@ if(ULP_COCPU_IS_RISCV) "${IDF_PATH}/components/ulp/ulp_riscv/ulp_core/ulp_riscv_print.c" "${IDF_PATH}/components/ulp/ulp_riscv/ulp_core/ulp_riscv_utils.c") - #dummy loop to force pre-processed linker file generation: - foreach(ulp_s_source ${ULP_S_SOURCES}) - set(noop ${ulp_s_source}) - - add_custom_command(OUTPUT ${noop} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND cmake -E echo - DEPENDS ${ULP_LD_SCRIPT} - ) - - set_source_files_properties(${noop} PROPERTIES NOOP_PROPERTY ${ULP_LD_SCRIPT}) - endforeach() - set(DUMP_SYMBOL_ARGS -g) set(MAP_GEN_EXTRA_ARGS --riscv) target_link_options(${ULP_APP_NAME} PRIVATE "-nostartfiles") @@ -112,7 +100,7 @@ else() WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_C_COMPILER} -E -P -xc ${ULP_PREPROCESSOR_ARGS} -o ${ulp_ps_output} ${ulp_s_source} - DEPENDS ${ulp_s_source} ${ULP_LD_SCRIPT} + DEPENDS ${ulp_s_source} VERBATIM) # During assembly file compilation, output listing files as well. set_source_files_properties(${ulp_ps_output} @@ -152,6 +140,3 @@ add_custom_target(build ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.ld ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.h WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - -target_link_libraries(${ULP_APP_NAME} "-T\"${CMAKE_CURRENT_BINARY_DIR}/${ULP_LD_SCRIPT}\"") -set_target_properties(${ULP_APP_NAME} PROPERTIES LINK_DEPENDS ${ULP_LD_SCRIPT}) From 2916bf9b6cd1ec1d26f054191af7ab2914e631fb Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 28 Aug 2022 14:11:46 +0200 Subject: [PATCH 4/5] ulp: esp32ulp_mapgen: remove the special case for RISC-V, cleanup There are multiple changes in this commit: 1. Unify the RISC-V and ULP-FSM code paths in esp32ulp_mapgen.py. It seems that these were originally introduced because `nm` output for the RISC-V case contained symbol sizes, while for the ULP-FSM no symbol sizes were reported. This makes sense, because the ULP-FSM object files are produced from assembly source, symbol sizes have to be added manually using the .size directive. In the case of RISC-V, the object files are built from C sources and the sizes are automatically added by the compiler. Now 'posix' output format is used for both RISC-V and ULP-FSM. 2. Move BASE_ADDR out of esp32ulp_mapgen.py. This now has to be passed from CMake, which should make it easier to modify if a new chip with a different RTC RAM base address is added. 3. Add C++ guards to the generated header file. 4. Switch from optparse to argparse for similarity with other IDF tools. 5. Add type annotations. --- components/ulp/cmake/CMakeLists.txt | 12 ++-- components/ulp/esp32ulp_mapgen.py | 101 +++++++++++++--------------- tools/ci/check_copyright_ignore.txt | 1 - tools/ci/mypy_ignore_list.txt | 1 - 4 files changed, 54 insertions(+), 61 deletions(-) diff --git a/components/ulp/cmake/CMakeLists.txt b/components/ulp/cmake/CMakeLists.txt index adc9ae011c..84696254b0 100644 --- a/components/ulp/cmake/CMakeLists.txt +++ b/components/ulp/cmake/CMakeLists.txt @@ -78,8 +78,6 @@ if(ULP_COCPU_IS_RISCV) "${IDF_PATH}/components/ulp/ulp_riscv/ulp_core/ulp_riscv_print.c" "${IDF_PATH}/components/ulp/ulp_riscv/ulp_core/ulp_riscv_utils.c") - set(DUMP_SYMBOL_ARGS -g) - set(MAP_GEN_EXTRA_ARGS --riscv) target_link_options(${ULP_APP_NAME} PRIVATE "-nostartfiles") target_link_options(${ULP_APP_NAME} PRIVATE -Wl,--gc-sections) target_link_options(${ULP_APP_NAME} PRIVATE -Wl,-Map=${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.map) @@ -109,16 +107,18 @@ else() list(APPEND ULP_PS_SOURCES ${ulp_ps_output}) endforeach() - set(DUMP_SYMBOL_ARGS -g -f posix) - set(MAP_GEN_EXTRA_ARGS .) target_link_options(${ULP_APP_NAME} PRIVATE -Map=${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}.map) target_sources(${ULP_APP_NAME} PRIVATE ${ULP_PS_SOURCES}) endif() +# Currently all the supported targets have the same base address of the ULP memory in the CPU address space. +# Modify this or pull this out of some SoC header file, if that becomes necessary. +set(ULP_BASE_ADDR "0x50000000") + # Dump the list of global symbols in a convenient format add_custom_command(OUTPUT ${ULP_APP_NAME}.sym - COMMAND ${CMAKE_NM} ${DUMP_SYMBOL_ARGS} $ > ${ULP_APP_NAME}.sym + COMMAND ${CMAKE_NM} -f posix -g $ > ${ULP_APP_NAME}.sym DEPENDS ${ULP_APP_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) @@ -129,7 +129,7 @@ add_custom_command(OUTPUT ${ULP_APP_NAME}.bin WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) add_custom_command(OUTPUT ${ULP_APP_NAME}.ld ${ULP_APP_NAME}.h - COMMAND ${ULP_MAP_GEN} ${MAP_GEN_EXTRA_ARGS} -s ${ULP_APP_NAME}.sym -o ${ULP_APP_NAME} + COMMAND ${ULP_MAP_GEN} -s ${ULP_APP_NAME}.sym -o ${ULP_APP_NAME} --base ${ULP_BASE_ADDR} DEPENDS ${ULP_APP_NAME}.sym WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/components/ulp/esp32ulp_mapgen.py b/components/ulp/esp32ulp_mapgen.py index bc36737b63..382752269c 100755 --- a/components/ulp/esp32ulp_mapgen.py +++ b/components/ulp/esp32ulp_mapgen.py @@ -2,77 +2,72 @@ # esp32ulp_mapgen utility converts a symbol list provided by nm into an export script # for the linker and a header file. # -# Copyright (c) 2016-2017 Espressif Systems (Shanghai) PTE LTD. -# Distributed under the terms of Apache License v2.0 found in the top-level LICENSE file. +# SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 from __future__ import print_function -from optparse import OptionParser +import argparse +import os +import textwrap +import typing -BASE_ADDR = 0x50000000 +UTIL = os.path.basename(__file__) -def gen_ld_h_from_sym(f_sym, f_ld, f_h): - f_ld.write('/* Variable definitions for ESP32ULP linker\n') - f_ld.write(' * This file is generated automatically by esp32ulp_mapgen.py utility.\n') - f_ld.write(' */\n\n') - f_h.write('// Variable definitions for ESP32ULP\n') - f_h.write('// This file is generated automatically by esp32ulp_mapgen.py utility\n\n') - f_h.write('#pragma once\n\n') +def gen_ld_h_from_sym(f_sym: typing.TextIO, f_ld: typing.TextIO, f_h: typing.TextIO, base_addr: int) -> None: + f_ld.write(textwrap.dedent( + f""" + /* ULP variable definitions for the linker. + * This file is generated automatically by {UTIL} utility. + */ + """ + )) + f_h.write(textwrap.dedent( + f""" + /* ULP variable definitions for the compiler. + * This file is generated automatically by {UTIL} utility. + */ + #pragma once + #ifdef __cplusplus + extern "C" {{ + #endif + """ + )) for line in f_sym: - name, _, addr_str = line.split(' ', 2) - addr = int(addr_str, 16) + BASE_ADDR + # NM "posix" format output has the following structure: + # symbol_name symbol_type addr_hex [size_hex] + parts = line.split() + name = parts[0] + addr = int(parts[2], 16) + base_addr f_h.write('extern uint32_t ulp_{0};\n'.format(name)) f_ld.write('PROVIDE ( ulp_{0} = 0x{1:08x} );\n'.format(name, addr)) - -def gen_ld_h_from_sym_riscv(f_sym, f_ld, f_h): - f_ld.write('/* Variable definitions for ESP32ULP linker\n') - f_ld.write(' * This file is generated automatically by esp32ulp_mapgen.py utility.\n') - f_ld.write(' */\n\n') - f_h.write('// Variable definitions for ESP32ULP\n') - f_h.write('// This file is generated automatically by esp32ulp_mapgen.py utility\n\n') - f_h.write('#pragma once\n\n') - - for line in f_sym: - addr_str, _, name = line.split() - addr = int(addr_str, 16) + BASE_ADDR - f_h.write('extern uint32_t ulp_{0};\n'.format(name)) - f_ld.write('PROVIDE ( ulp_{0} = 0x{1:08x} );\n'.format(name, addr)) + f_h.write(textwrap.dedent( + """ + #ifdef __cplusplus + } + #endif + """ + )) -def main(): +def main() -> None: description = ('This application generates .h and .ld files for symbols defined in input file. ' 'The input symbols file can be generated using nm utility like this: ' - 'esp32-ulp-nm -g -f posix > ') + 'nm -g -f posix > ') - parser = OptionParser(description=description) - parser.add_option('-s', '--symfile', dest='symfile', - help='symbols file name', metavar='SYMFILE') - parser.add_option('-o', '--outputfile', dest='outputfile', - help='destination .h and .ld files name prefix', metavar='OUTFILE') + parser = argparse.ArgumentParser(description=description) + parser.add_argument('-s', '--symfile', required=True, help='symbols file name', metavar='SYMFILE', type=argparse.FileType('r')) + parser.add_argument('-o', '--outputfile', required=True, help='destination .h and .ld files name prefix', metavar='OUTFILE') + parser.add_argument('--base-addr', required=True, help='base address of the ULP memory, to be added to each symbol') - parser.add_option('--riscv', action='store_true', help='use format for ulp riscv .sym file') + args = parser.parse_args() - (options, args) = parser.parse_args() - if options.symfile is None: - parser.print_help() - return 1 - - if options.outputfile is None: - parser.print_help() - return 1 - - if options.riscv: - with open(options.outputfile + '.h', 'w') as f_h, open(options.outputfile + '.ld', 'w') as f_ld, open(options.symfile) as f_sym: - gen_ld_h_from_sym_riscv(f_sym, f_ld, f_h) - return 0 - - with open(options.outputfile + '.h', 'w') as f_h, open(options.outputfile + '.ld', 'w') as f_ld, open(options.symfile) as f_sym: - gen_ld_h_from_sym(f_sym, f_ld, f_h) - return 0 + with open(args.outputfile + '.h', 'w') as f_h, open(args.outputfile + '.ld', 'w') as f_ld: + gen_ld_h_from_sym(args.symfile, f_ld, f_h, int(args.base_addr, 0)) if __name__ == '__main__': - exit(main()) + main() diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 5072f14120..5e05d89845 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -1286,7 +1286,6 @@ components/tcp_transport/test/test_transport_connect.c components/tcp_transport/test/test_transport_fixtures.c components/tcp_transport/transport_utils.c components/tinyusb/additions/include/tusb_config.h -components/ulp/esp32ulp_mapgen.py components/ulp/test/esp32/test_ulp_as.c components/unity/include/priv/setjmp.h components/unity/include/unity_config.h diff --git a/tools/ci/mypy_ignore_list.txt b/tools/ci/mypy_ignore_list.txt index b0e37ec659..ec408f5a9c 100644 --- a/tools/ci/mypy_ignore_list.txt +++ b/tools/ci/mypy_ignore_list.txt @@ -18,7 +18,6 @@ components/protocomm/python/constants_pb2.py components/protocomm/python/sec0_pb2.py components/protocomm/python/sec1_pb2.py components/protocomm/python/session_pb2.py -components/ulp/esp32ulp_mapgen.py components/wifi_provisioning/python/wifi_config_pb2.py components/wifi_provisioning/python/wifi_constants_pb2.py components/wifi_provisioning/python/wifi_scan_pb2.py From 9aecfe2b9d0d4037d18dab109aac19dbf2d89be8 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 28 Aug 2022 14:13:15 +0200 Subject: [PATCH 5/5] ulp: fix typo in peripherals ld file names --- components/ulp/cmake/CMakeLists.txt | 2 +- .../ulp/ld/{esp32s2.periperals.ld => esp32s2.peripherals.ld} | 0 .../ulp/ld/{esp32s3.periperals.ld => esp32s3.peripherals.ld} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename components/ulp/ld/{esp32s2.periperals.ld => esp32s2.peripherals.ld} (100%) rename components/ulp/ld/{esp32s3.periperals.ld => esp32s3.peripherals.ld} (100%) diff --git a/components/ulp/cmake/CMakeLists.txt b/components/ulp/cmake/CMakeLists.txt index 84696254b0..8b39a30126 100644 --- a/components/ulp/cmake/CMakeLists.txt +++ b/components/ulp/cmake/CMakeLists.txt @@ -85,7 +85,7 @@ if(ULP_COCPU_IS_RISCV) #Makes the csr utillies for riscv visible: target_include_directories(${ULP_APP_NAME} PRIVATE "${IDF_PATH}/components/ulp/ulp_riscv/ulp_core/include" "${IDF_PATH}/components/ulp/ulp_riscv/shared/include") - target_link_options(${ULP_APP_NAME} PRIVATE -T ${IDF_PATH}/components/ulp/ld/${IDF_TARGET}.periperals.ld) + target_link_options(${ULP_APP_NAME} PRIVATE SHELL:-T ${IDF_PATH}/components/ulp/ld/${IDF_TARGET}.peripherals.ld) target_compile_definitions(${ULP_APP_NAME} PRIVATE IS_ULP_COCPU) else() diff --git a/components/ulp/ld/esp32s2.periperals.ld b/components/ulp/ld/esp32s2.peripherals.ld similarity index 100% rename from components/ulp/ld/esp32s2.periperals.ld rename to components/ulp/ld/esp32s2.peripherals.ld diff --git a/components/ulp/ld/esp32s3.periperals.ld b/components/ulp/ld/esp32s3.peripherals.ld similarity index 100% rename from components/ulp/ld/esp32s3.periperals.ld rename to components/ulp/ld/esp32s3.peripherals.ld