Debug build of libm_dbl fails (missing copysign)

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
badi
Posts: 51
Joined: Mon Aug 10, 2015 2:18 pm
Location: Bern, Switzerland

Debug build of libm_dbl fails (missing copysign)

Post by badi » Thu Jul 26, 2018 8:50 am

Hi

I was playing around with the x7 ports for STM32. I tried to debug on my Nucleo H743 board so I ssued the command:

Code: Select all

make BOARD=NUCLEO_H743ZI DEBUG=1 -j4 
which resulted (after deactivate the MICROPY_HW_HAS_SDCARD #define in mpconfigboard.h) in the error:

Code: Select all

build-NUCLEO_H743ZI/py/objfloat.o: In function `mp_obj_float_divmod':
/home/badi/projekte/sw/embedded/micropython/micropython/ports/stm32/../../py/objfloat.c:223: undefined reference to `copysign'
/home/badi/projekte/sw/embedded/micropython/micropython/ports/stm32/../../py/objfloat.c:234: undefined reference to `copysign'
build-NUCLEO_H743ZI/py/objfloat.o: In function `mp_obj_float_binary_op':
/home/badi/projekte/sw/embedded/micropython/micropython/ports/stm32/../../py/objfloat.c:287: undefined reference to `copysign'
build-NUCLEO_H743ZI/py/modmath.o: In function `copysign_func':
/home/badi/projekte/sw/embedded/micropython/micropython/ports/stm32/../../py/modmath.c:140: undefined reference to `copysign'
make: *** [Makefile:519: build-NUCLEO_H743ZI/firmware.elf] Fehler 1
 
The funny thing is, that the normal release build does not fail! I am using the latest gnu arm toolchain (V7-2018-q2-update) for build but I have no clue why for not defined DEBUG flag the copysign function is defined but for DEBUG=1 I have to supply a copysign function (see branch Improve_NUCLEO_H743ZI in my repo https://github.com/tobbad/micropython/t ... LEO_H743ZI).

If I compile for NUCLEO_F767ZI (an other board which has double precision math library libm_dbl) i get this error, too.

Any hints?
badi

Post Reply