Skip to main content
Visitor II
June 24, 2025
Question

Build error - STSW-KITSTKNX

  • June 24, 2025
  • 1 reply
  • 483 views

Hi, Sir/Marm,

I tried to build STSW-KITSTKNX according to the instruction described in the document UM2409.

But it failed.

Could you please give me a solution for it?

[ Project ] EvalKitSTKNX_inOut4

 - Error detail : After clean project  

make: *** No rule to make target 'clean'. Stop.

 

12:17:27 Build Failed. 1 errors, 0 warnings. (took 477ms)

 

- Error and worning detail : After build project

C:/STeval_STKNX/en.STSW-KITSTKNX/STSW-KITSTKNX/Libraries/Tapko/dev_mod/07B0/dat_07B0.c:87:1: warning: ignoring attribute 'section ("BCU_EEPROM")' because it conflicts with previous 'section ("BCU_SYS_EEPROM")' [-Wattributes]

C:/STeval_STKNX/en.STSW-KITSTKNX/STSW-KITSTKNX/Project/STM32F10x_STKNX_inOut4/Src/app_data.c:70:1: warning: ignoring attribute 'section ("BCU_EEPROM")' because it conflicts with previous 'section ("BCU_SYS_EEPROM")' [-Wattributes]

(.text._close_r+0xc): warning: _close is not implemented and will always fail

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o): note: the message above does not take linker garbage collection into account

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o): note: the message above does not take linker garbage collection into account

(.text._fstat_r+0xe): warning: _fstat is not implemented and will always fail

(.text._getpid_r+0x0): warning: _getpid is not implemented and will always fail

(.text._isatty_r+0xc): warning: _isatty is not implemented and will always fail

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o): note: the message above does not take linker garbage collection into account

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o): note: the message above does not take linker garbage collection into account

(.text._kill_r+0xe): warning: _kill is not implemented and will always fail

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o): note: the message above does not take linker garbage collection into account

(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o): note: the message above does not take linker garbage collection into account

(.text._read_r+0x10): warning: _read is not implemented and will always fail

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o): note: the message above does not take linker garbage collection into account

(.text._write_r+0x10): warning: _write is not implemented and will always fail

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: EvalKitSTKNX_inOut4.elf has a LOAD segment with RWX permissions

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o): note: the message above does not take linker garbage collection into account

 

12:17:50 Build Failed. 8 errors, 11 warnings. (took 22s.54ms)

 

1 reply

Billy OWEN
ST Employee
June 24, 2025

Hi @Seiji 

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Regards,

Billy

Shubhendu Banerjee
Associate II
June 27, 2025

I'm also getting the same errors. Previously, I had to define _write only to print things. Now, with STM32CubeIDE Version 1.18.1, to compile the project successfully, I need to create a few stubs.
    Additionally, when I put the stubs in a .c, the .c gets deleted every time  I generate code with .ioc.

 

#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

//
#include "usart.h"

int _write(int fd, char *ptr, int len) {
    HAL_UART_Transmit(&huart1, (uint8_t*) ptr, len, HAL_MAX_DELAY);
    return len;
}

// Stub for _read
ssize_t _read(int file, void *ptr, size_t len) {
    errno = EBADF;
    return -1;
}

// Stub for _close
int _close(int file) {
    return -1;
}

// Stub for _lseek
off_t _lseek(int file, off_t ptr, int dir) {
    return 0;
}

// Stub for _fstat
int _fstat(int file, struct stat *st) {
    st->st_mode = S_IFCHR;
    return 0;
}

// Stub
int _getpid(void) {
    return 1;  // or 0, any dummy PID
}

// Stub
int _kill(int pid, int sig) {
    errno = EINVAL;
    return -1;
}

// Stub for _isatty
int _isatty(int file) {
    return 1;
}