ulp: refactor ulp component
This commit refactors the ulp component. Files are now divided based on type of ulp, viz., fsm or risc-v. Files common to both are maintained in the ulp_common folder. This commit also adds menuconfig options for ULP within the ulp component instead of presenting target specific configuations for ulp.
This commit is contained in:
@@ -195,7 +195,10 @@ INPUT = \
|
||||
$(PROJECT_PATH)/components/esp_rom/include/esp_rom_sys.h \
|
||||
$(PROJECT_PATH)/components/esp_system/include/esp_system.h \
|
||||
$(PROJECT_PATH)/components/esp_common/include/esp_idf_version.h \
|
||||
$(PROJECT_PATH)/components/ulp/include/ulp_common.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_common/include/ulp_common.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_fsm/include/ulp_fsm_common.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_riscv/include/ulp_riscv.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_riscv/include/ulp_riscv_utils.h \
|
||||
$(PROJECT_PATH)/components/app_trace/include/esp_app_trace.h \
|
||||
$(PROJECT_PATH)/components/app_trace/include/esp_sysview_trace.h \
|
||||
$(PROJECT_PATH)/components/esp_pm/include/esp_pm.h \
|
||||
|
||||
@@ -9,6 +9,7 @@ INPUT += \
|
||||
$(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/touch_sensor_channel.h \
|
||||
$(PROJECT_PATH)/components/driver/$(IDF_TARGET)/include/driver/touch_sensor.h \
|
||||
$(PROJECT_PATH)/components/esp_hw_support/include/soc/esp32/himem.h \
|
||||
$(PROJECT_PATH)/components/ulp/include/$(IDF_TARGET)/ulp.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_fsm/include/$(IDF_TARGET)/ulp.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_common/include/$(IDF_TARGET)/ulp_common_defs.h \
|
||||
$(PROJECT_PATH)/components/esp_system/include/esp_ipc.h \
|
||||
$(PROJECT_PATH)/components/esp_system/include/esp_ipc_isr.h
|
||||
|
||||
@@ -9,8 +9,8 @@ INPUT += \
|
||||
$(PROJECT_PATH)/components/driver/$(IDF_TARGET)/include/driver/touch_sensor.h \
|
||||
$(PROJECT_PATH)/components/esp_hw_support/include/soc/esp32s2/esp_ds.h \
|
||||
$(PROJECT_PATH)/components/esp_hw_support/include/soc/esp32s2/esp_hmac.h \
|
||||
$(PROJECT_PATH)/components/ulp/include/esp32s2/ulp_riscv.h \
|
||||
$(PROJECT_PATH)/components/ulp/include/$(IDF_TARGET)/ulp.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_fsm/include/$(IDF_TARGET)/ulp.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_common/include/$(IDF_TARGET)/ulp_common_defs.h \
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_element.h \
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_button.h \
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_slider.h \
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
INPUT += \
|
||||
$(PROJECT_PATH)/components/ulp/include/$(IDF_TARGET)/ulp.h \
|
||||
$(PROJECT_PATH)/components/esp_hw_support/include/soc/$(IDF_TARGET)/esp_hmac.h \
|
||||
$(PROJECT_PATH)/components/esp_hw_support/include/soc/$(IDF_TARGET)/esp_ds.h \
|
||||
$(PROJECT_PATH)/components/hal/include/hal/mcpwm_types.h \
|
||||
@@ -8,8 +7,8 @@ INPUT += \
|
||||
$(PROJECT_PATH)/components/driver/include/driver/pcnt.h \
|
||||
$(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/touch_sensor_channel.h \
|
||||
$(PROJECT_PATH)/components/driver/$(IDF_TARGET)/include/driver/touch_sensor.h \
|
||||
$(PROJECT_PATH)/components/ulp/include/esp32s3/ulp_riscv.h \
|
||||
$(PROJECT_PATH)/components/ulp/include/$(IDF_TARGET)/ulp.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_fsm/include/$(IDF_TARGET)/ulp.h \
|
||||
$(PROJECT_PATH)/components/ulp/ulp_common/include/$(IDF_TARGET)/ulp_common_defs.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_helpers.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_host.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_types_ch9.h \
|
||||
|
||||
@@ -116,7 +116,7 @@ Starting the ULP-RISC-V Program
|
||||
|
||||
To run a ULP-RISC-V program, the main application needs to load the ULP program into RTC memory using the :cpp:func:`ulp_riscv_load_binary` function, and then start it using the :cpp:func:`ulp_riscv_run` function.
|
||||
|
||||
Note that `CONFIG_ESP32S2_ULP_COPROC_ENABLED` and `CONFIG_ESP32S2_ULP_COPROC_RISCV` options must be enabled in menuconfig to reserve memory for the ULP. "RTC slow memory reserved for coprocessor" option must be set to a value sufficient to store ULP code and data. If the application components contain multiple ULP programs, then the size of the RTC memory must be sufficient to hold the largest one.
|
||||
Note that `CONFIG_ULP_COPROC_ENABLED` and `CONFIG_ULP_COPROC_TYPE_RISCV` options must be enabled in menuconfig to reserve memory for the ULP. "RTC slow memory reserved for coprocessor" option must be set to a value sufficient to store ULP code and data. If the application components contain multiple ULP programs, then the size of the RTC memory must be sufficient to hold the largest one.
|
||||
|
||||
Each ULP-RISC-V program is embedded into the ESP-IDF application as a binary blob. The application can reference this blob and load it in the following way (suppose ULP_APP_NAME was defined to ``ulp_app_name``)
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ ULP-RISC-V 协处理器代码以 C 语言编写(也可能是汇编语言),
|
||||
|
||||
要运行 ULP-RISC-V 程序,主程序需要调用 :cpp:func:`ulp_riscv_load_binary` 函数,将 ULP 程序加载到 RTC 内存中,然后调用 :cpp:func:`ulp_riscv_run` 函数,启动 ULP-RISC-V 程序。
|
||||
|
||||
注意,必须在 menuconfig 中启用 `CONFIG_ESP32S2_ULP_COPROC_ENABLED` 和 `CONFIG_ESP32S2_ULP_COPROC_RISCV` 选项,以便为 ULP 预留内存。"RTC slow memory reserved for coprocessor" 选项设置的值必须足够存储 ULP 代码和数据。如果应用程序组件包含多个 ULP 程序,RTC 内存必须足以容纳最大的程序。
|
||||
注意,必须在 menuconfig 中启用 `CONFIG_ULP_COPROC_ENABLED` 和 `CONFIG_ULP_COPROC_TYPE_RISCV` 选项,以便为 ULP 预留内存。"RTC slow memory reserved for coprocessor" 选项设置的值必须足够存储 ULP 代码和数据。如果应用程序组件包含多个 ULP 程序,RTC 内存必须足以容纳最大的程序。
|
||||
|
||||
每个 ULP-RISC-V 程序均以二进制 BLOB 的形式嵌入到 ESP-IDF 应用程序中。应用程序可以引用此 BLOB,并以下面的方式加载此 BLOB(假设 ULP_APP_NAME 已被定义为 ``ulp_app_name``):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user