Edgeimpulse c++ lib deploy to tdk-721x mcu but run_classifier always return -22 error

Question/Issue:
when i deploy c++ lib to my tdk-721x mcu, i allways get -22 error when call run_classifier. what can i do ?? i get nothing funcall log like get_signal_data\ei_read_timer_us\ei_read_timer_ms\ei_malloc\ei_free\ei_calloc\ei_sleep\ei_printf\ei_printf_float

my log like this:
[0065]bef

[0066][MEM] Free Heap: 6656 bytes | Min Ever Free: 6656 bytes

[0067]after

[0068][MEM] Free Heap: 6656 bytes | Min Ever Free: 6656 bytes

[0069]run_classifier returned: -22 len:588

[006a]Timing: DSP 0 ms, inference 0 ms, anomaly 0 ms

the functions all need define like this:

signal_t signal; // Wrapper for raw input buffer
ei_impulse_result_t result; // Used to store inference output
EI_IMPULSE_ERROR res; // Return code from inference

// Calculate the length of the buffer
// size_t buf_len = sizeof(input_buf) / sizeof(input_buf[0]);


    
if (buf_len == EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE) {
    // Assign callback function to fill buffer used for preprocessing/inference
    signal.total_length = EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE;
    signal.get_data = &get_signal_data;

    tlkapi_printf(APP_LOG_EN, "bef \n");
    print_heap_info();
    // Perform DSP pre-processing and inference
    res = run_classifier(&signal, &result, true);
    tlkapi_printf(APP_LOG_EN, "after \n");
    print_heap_info();


    // Print return code and how long it took to perform inference
    tlkapi_printf(APP_LOG_EN, "run_classifier returned: %d len:%d\n", res, buf_len);
    tlkapi_printf(APP_LOG_EN, "Timing: DSP %d ms, inference %d ms, anomaly %d ms\n",
            result.timing.dsp,
            result.timing.classification,
            result.timing.anomaly);

static int get_signal_data(size_t offset, size_t length, float *out_ptr) {
tlkapi_printf(APP_LOG_EN, “get_signal_data:\n”);
for (size_t i = 0; i < length; i++) {
out_ptr[i] = (input_buf + offset)[i];

    // tlkapi_printf(APP_LOG_EN, "input_buf %f\n", out_ptr[i]);
}

return EIDSP_OK;

}

uint64_t ei_read_timer_us()
{
tlkapi_printf(APP_LOG_EN, “ei_read_timer_us:\n”);
static uint64_t us_base = 0;
static uint32_t last_tick = 0;

uint32_t cur_tick = clock_time();


if (cur_tick < last_tick) {

    us_base += ((uint64_t)1 << 32) / 24;
}
last_tick = cur_tick;

return us_base + (cur_tick / 24);
return 0;

}

uint64_t ei_read_timer_ms()
{
tlkapi_printf(APP_LOG_EN, “ei_read_timer_ms:\n”);

return ei_read_timer_us()/1000;
// return 0;

}

#ifdef __cplusplus
extern “C” {
#endif

extern void vPortFree(void *pv);
extern void *pvPortMalloc(size_t xWantedSize);

#ifdef __cplusplus
}
#endif

void* ei_malloc(size_t size) {
tlkapi_printf(APP_LOG_EN, “ei_malloc \n”);

return pvPortMalloc(size); 

}
void ei_free(void* ptr) {
tlkapi_printf(APP_LOG_EN, “ei_free \n”);

vPortFree(ptr); 

}
void* ei_calloc(size_t n, size_t size) {
tlkapi_printf(APP_LOG_EN, “ei_calloc \n”);

void* p = ei_malloc(n * size); 
if(p) 
memset(p, 0, n * size); 
return p; 

}

EI_IMPULSE_ERROR ei_sleep(
int32_t time_ms
)
{
tlkapi_printf(APP_LOG_EN, “ei_sleep \n”);

vTaskDelay(pdMS_TO_TICKS(time_ms)); 

}

attribute((weak)) void ei_printf(const char* format, …)
{
tlkapi_printf(APP_LOG_EN, “ei_printf \n”);
va_list args;
va_start(args, format);
vprintf(format, args);
va_end(args);
}
void ei_printf_float(
float f
)
{
tlkapi_printf(APP_LOG_EN, “ei_printf_float %f\n”, f);
}

os:
6.17.0-14-generic #14~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 15 15:52:10 UTC 2 x86_64 x86_64 x86_64 GNU/Linu

Build Environment
vs code and vs code plug<>
build by cmake
telink iot studio is installed

MCU
https://www.telink-semi.cn/products/bluetooth-le/tl721x
my mcu type is this TL7218HE11B94R

tips:
my programe can run(like led ctrl is ok, print log to com is ok), just run_classifier function error( my test input_data is ok)

i find that handle->impulse is null,but why?

extern “C” EI_IMPULSE_ERROR process_impulse(ei_impulse_handle_t *handle,
signal_t *signal,
ei_impulse_result_t *result,
bool debug = false)
{
ei_printf(“process_impulse 1\n”);
if ((handle == nullptr) || (handle->impulse == nullptr) || (result == nullptr) || (signal == nullptr)) {

        if ((handle == nullptr) ) {
    ei_printf(" handle\n");

        }
        if ((handle->impulse == nullptr) ) {
    ei_printf(" handle->impulse\n");

        }