lpcxpresso55s16 zephyr undefined reference to `__aeabi_d2iz'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpcxpresso55s16 zephyr undefined reference to `__aeabi_d2iz'

383 Views
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 

Labels (1)
0 Kudos
1 Reply

369 Views
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 Kudos