mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
cmake: Add support for test build
This commit is contained in:
11
components/ulp/test/CMakeLists.txt
Normal file
11
components/ulp/test/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
set(COMPONENT_SRCDIRS ".")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
||||
|
||||
set(COMPONENT_REQUIRES unity ulp soc)
|
||||
|
||||
register_component()
|
||||
|
||||
set(ULP_APP_NAME ulp_test_app)
|
||||
set(ULP_S_SOURCES "ulp/test_jumps.S")
|
||||
set(ULP_EXP_DEP_SRCS "test_ulp_as.c")
|
||||
include(${IDF_PATH}/components/ulp/component_ulp_common.cmake)
|
@@ -1,4 +1,4 @@
|
||||
ULP_APP_NAME = ulp_test
|
||||
ULP_APP_NAME = ulp_test_app
|
||||
|
||||
ULP_S_SOURCES = $(addprefix $(COMPONENT_PATH)/ulp/, \
|
||||
test_jumps.S \
|
||||
|
@@ -2,17 +2,17 @@
|
||||
#include "unity.h"
|
||||
#include "soc/rtc_cntl_reg.h"
|
||||
#include "esp32/ulp.h"
|
||||
#include "ulp_test.h"
|
||||
#include "ulp_test_app.h"
|
||||
|
||||
|
||||
extern const uint8_t ulp_test_bin_start[] asm("_binary_ulp_test_bin_start");
|
||||
extern const uint8_t ulp_test_bin_end[] asm("_binary_ulp_test_bin_end");
|
||||
extern const uint8_t ulp_test_app_bin_start[] asm("_binary_ulp_test_app_bin_start");
|
||||
extern const uint8_t ulp_test_app_bin_end[] asm("_binary_ulp_test_app_bin_end");
|
||||
|
||||
|
||||
TEST_CASE("jumps condition", "[ulp]")
|
||||
{
|
||||
esp_err_t err = ulp_load_binary(0, ulp_test_bin_start,
|
||||
(ulp_test_bin_end - ulp_test_bin_start) / sizeof(uint32_t));
|
||||
esp_err_t err = ulp_load_binary(0, ulp_test_app_bin_start,
|
||||
(ulp_test_app_bin_end - ulp_test_app_bin_start) / sizeof(uint32_t));
|
||||
TEST_ESP_OK(err);
|
||||
|
||||
REG_CLR_BIT(RTC_CNTL_INT_RAW_REG, RTC_CNTL_ULP_CP_INT_RAW);
|
||||
|
Reference in New Issue
Block a user