DEV Community

Discussion on: CMake on STM32 | Episode 1: the beginning

Collapse
 
thebruce87m profile image
thebruce87m

Not an expert, but stumbled about some errors in my own project to find some workarounds below.

For anyone else having problems with "undefined reference to ... _close, _lseek" etc, remove the "enable_language(C ASM)" line.

This seems to be an issue of libg_nano.a vs liba_nano.a - with the line in it seems to use libg_nano.a and you get the linker errors.

Alternatively, changing "-specs=nano.specs" to "-specs=nosys.specs".

Collapse
 
pgradot profile image
Pierre Gradot

Errors like these are indeed caused by variations in the standard libraries. I am not familiar with specs files, so fixing them is a bit like coin-flipping for me ;)