lpcxpresso55s16 zephyr undefined reference to `__aeabi_d2iz'

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

lpcxpresso55s16 zephyr undefined reference to `__aeabi_d2iz'

919 次查看
Aravinth1
Contributor II

 

 

Hello Everyone !

I'm using lpcxpresso55s16 Eval Board with zephyr stack, I just created a thread which calling one function , In that function I'm performing some floating point calculation based on the result I'm incrementing the static variable when I try to compile it's compiling but in linker stage it's throwing error like undefined reference to `__aeabi_d2iz', I'm struggling to fix this issue , if you have any suggestion or solution please reply to this query.

Details :

board : lpcxpresso55s16

stack : zephyr 3.3.99

//File Name : abc.c
#include <kernel.h>
#include <def.h>
static struct k_thread handler_thread_data;

K_THREAD_STACK_DEFINE(handler_thread_stack,0X400);

void create_thread()
{

task_tid = k_thread_create(&handler_thread_data,handler_thread_stack,K_THREAD_STACK_SIZEOF(handler_thread_stack),handler_thread,NULL,NULL,NULL,2,0,K_FOREVER);
	if(!task_tid)
	{
		return task_init_failed;
	}
	k_thread_name_set(task_tid,"data_task");
	initialized = true;
}

void handler_thread(void *arg1,void *arg2, void *arg3)
{

	for(;;)
	{

	    calc();
            k_msleep(50);
    }
}


//Filename : def.c
#include <def.h>	
static double c=8.725;
static uint16_t inc=0;
void calc()
{
    
    double a;
    long b;
    a=10.5;
    b= (long)(a * c);  // compiler pointing this line and says undefined reference to `__aeabi_d2iz'

    if (b > 40) 
    {
          inc++;
    }	
    if(inc>1000)
    {
        inc=0;
    } 
}

 


@zephyr_care @lpcxpresso_supp 

标签 (1)
0 项奖励
回复
1 回复

905 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Aravinth1,

this request is an unsure the symptoms/behavior is an Issue, please create a Discussion to GitHub: 

https://github.com/zephyrproject-rtos/zephyr/discussions

Thanks,

Jun Zhang

0 项奖励
回复