stm32:cubeclt

CubeCLT

STは開発に必要なコマンドラインパッケージを一括でまとめて提供している
2024年4月6日段階の最新は1.15.0、同梱されているarm-none-eabi-gccのバージョンは 12.3.1 Rel1
## システムコールが未定義のために出る警告

更新してみたらどうやら入っているnewlib-nanoのバージョンが変わった?のか警告が出るようになった。

F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a(libc_a-closer.o): in function `_close_r':(.text._close_r+0xc): warning: _close is not implemented and will always fail
F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail
F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a(libc_a-readr.o): in function `_read_r':(.text._read_r+0x10): warning: _read is not implemented and will always fail
F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: F:/ST/STM32CubeCLT_1.15.0/GNU-tools-for-STM32/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a(libc_a-writer.o): in function `_write_r':(.text._write_r+0x10): warning: _write is not implemented and will always fail

newlibから呼び出される関数群が定義されていないため出る警告の模様。
STM32なら自動生成されるsyscalls.csysmem.cをコンパイル対象に追加すれば良い。
gcc-arm-none-eabi 11.3 "is not implemented and will always fail"
ARM GCC 11.3 Rel1 newlib-nano linker warning _read is not implemented and will always fail
Build error

warning: xxx.elf has a LOAD segment with RWX permissions

という警告がでた。
どうやらFlash領域が書き込み可となってるための警告の模様。リンカスクリプトを編集してFlashの領域を読み出しのみの属性とすルト良さそう。
STM32CubeIDE 1.15.0: elf has a LOAD segment with RWX permissions

  • stm32/cubeclt.txt
  • 最終更新: 2024/04/06
  • by yuqlid