There is also a configuration option that must be set to use the setjmp in NuttX.  It is in the top-level Kconfig as I recall.

You don't get a compilation error so you are probably including the toolchain's setjmp.h.  So most likely you have -nostdlib or something like that on the command line so that you do not bring in the toolchain's C library version of setjmp/longjmp.

On 6/9/2021 12:51 PM, David S. Alessio wrote:
Hello, Foti,

I wrote setjmp/longjmp for armv7-m some time ago.  The code should be in file:
arch/arm/src/armv7-m/gnu/up_setjmp.S

If not, it’s attached here.

Cheers,
-david









On Jun 9, 2021, at 11:10 AM, Fotis Panagiotopoulos <f.j.pa...@gmail.com <mailto:f.j.pa...@gmail.com>> wrote:

Hi everyone!

I just started adding Lua to my NuttX-based project, but I have some
problems with it.
I am getting undefined references to longjmp/setjmp.

I am using an STM32F4 and GCC:
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major)
9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]

As I see, this combination of arch and compiler should work for
setjmp/longjmp, so I believe that something is misconfigured on my side.

Is there any special Kconfig option that I am not aware of? Do I need any
special compiler flags?

Reply via email to