Bug
使用arm-none-ebai-gcc出现如下报错
Reason
ARM Compiler toolchain 提到一种semi-host机制,博主没仔细看,感觉大概是要么使用semi-host要么不使用。
Semihosting is a mechanism that enables code running on an ARM target to communicate and use the Input/Output facilities on a host computer that is running a debugger.
semi-host是一种可以使得ARM架构的代码能够在debugger机器上使用通信和输入输出功能的机制。如果使用的话,则
$ arm-none-eabi-gcc --specs=rdimon.specs $(OTHER_LINK_OPTIONS)
如果不使用,则是
** non-semihosting/retarget
If you are using retarget, linking like:
$ arm-none-eabi-gcc --specs=nosys.specs $(OTHER_LINK_OPTIONS)
测试发现,不使用该机制则编译通过,后续研究清楚该机制后再更新补充一下这个机制的作用和用法
Solve
使用--specs=nosys.specs
即可
$ arm-none-eabi-gcc --specs=nosys.specs $(OTHER_LINK_OPTIONS)