2019-04-28 07:38:46 +00:00
|
|
|
idf_component_register(SRCS "ulp_example_main.c"
|
|
|
|
INCLUDE_DIRS ""
|
|
|
|
REQUIRES soc nvs_flash ulp)
|
2018-09-13 06:54:59 +00:00
|
|
|
#
|
2019-02-04 07:07:10 +00:00
|
|
|
# ULP support additions to component CMakeLists.txt.
|
2018-09-13 06:54:59 +00:00
|
|
|
#
|
2019-02-04 07:07:10 +00:00
|
|
|
# 1. The ULP app name must be unique (if multiple components use ULP).
|
|
|
|
set(ulp_app_name ulp_${COMPONENT_NAME})
|
2018-09-13 06:54:59 +00:00
|
|
|
#
|
2019-02-04 07:07:10 +00:00
|
|
|
# 2. Specify all assembly source files.
|
2018-09-13 06:54:59 +00:00
|
|
|
# Files should be placed into a separate directory (in this case, ulp/),
|
|
|
|
# which should not be added to COMPONENT_SRCS.
|
2020-03-03 08:15:29 +00:00
|
|
|
set(ulp_s_sources "ulp/pulse_cnt.S" "ulp/wake_up.S")
|
2018-09-13 06:54:59 +00:00
|
|
|
#
|
|
|
|
# 3. List all the component source files which include automatically
|
2019-02-04 07:07:10 +00:00
|
|
|
# generated ULP export file, ${ulp_app_name}.h:
|
|
|
|
set(ulp_exp_dep_srcs "ulp_example_main.c")
|
2018-09-13 06:54:59 +00:00
|
|
|
#
|
2019-02-04 07:07:10 +00:00
|
|
|
# 4. Call function to build ULP binary and embed in project using the argument
|
|
|
|
# values above.
|
2020-02-14 06:20:11 +00:00
|
|
|
ulp_embed_binary(${ulp_app_name} "${ulp_s_sources}" "${ulp_exp_dep_srcs}")
|