CMakeLists.txt 855 B

123456789101112131415161718192021
  1. idf_component_register(SRCS "ulp_adc_example_main.c"
  2. INCLUDE_DIRS ""
  3. REQUIRES soc nvs_flash ulp driver)
  4. #
  5. # ULP support additions to component CMakeLists.txt.
  6. #
  7. # 1. The ULP app name must be unique (if multiple components use ULP).
  8. set(ulp_app_name ulp_${COMPONENT_NAME})
  9. #
  10. # 2. Specify all assembly source files.
  11. # Files should be placed into a separate directory (in this case, ulp/),
  12. # which should not be added to COMPONENT_SRCS.
  13. set(ulp_s_sources "ulp/adc.S")
  14. #
  15. # 3. List all the component source files which include automatically
  16. # generated ULP export file, ${ulp_app_name}.h:
  17. set(ulp_exp_dep_srcs "ulp_adc_example_main.c")
  18. #
  19. # 4. Call function to build ULP binary and embed in project using the argument
  20. # values above.
  21. ulp_embed_binary(${ulp_app_name} "${ulp_s_sources}" "${ulp_exp_dep_srcs}")