Hello Team,
I am trying to implement a software timer, as part of this, I have used
signal(SIGALRM, event_start_init_callback);
alarm(10); // To invoke the call back handler after 10sec.
But I am getting undefined reference to `alarm' error.
I have included unistd.h. But still linked is unable to find the alarm call.
I verified that, alarm is defined in sys/unistd.h
Can someone please let me know, what I am missing here?
Regards,
San
Hi,
Yes, I know this is LPC Micro-Controller support forum. I am using LPC1768 and Free RTOS is OS.
I am using MCUXpresso IDE v11.8.0_1165
I even noticed, signal.h, and unistd.h are available in below mentioned path.
C:\nxp\MCUXpressoIDE_11.8.0_1165\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047\tools\arm-none-eabi\include
Based on that I assumed signals are supported.
Please let me know.
Regards,
San
Hi,
Okay, I see.
I suppose that both the signal() and alarm() are not implemented.
You can use timer hardware module for example MRT, systick,sctimer...to implement a fixed period interrupt.
Hope it can help you
BR
XiangJun Rong
Hello,
I would like to use software based time delay, not a hardware based.
As my code is working on event based mechanism, so I want to avoid dependency or any other issues with hardware based interrupts.
Regards,
San
Hi,
Pls try to add the library(*.a) and check if you can find out the binary implementation of the two functions.
BR
XiangJun Rong
Hi,
This is LPC Micro-controller support forum, as far as I know that the signal() and alarm() functions are Linux function.
Can you tell us the part number you are using? do you use Linux OS for your target board?
BR
XiangJun Rong