writer.c:(.text._write_r+0x14): undefined reference to `_write‘

使用 ubuntu 下编译 stm32f4 程序,使用arm-none-eabi-  工具链,报错如下:

/opt/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: warning: stm32f4/tests/ledtest/ledtest has a LOAD segment with RWX permissions
/opt/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: /opt/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-writer.o): in function `_write_r':
writer.c:(.text._write_r+0x14): undefined reference to `_write'
collect2: error: ld returned 1 exit status
stm32f4/tests/ledtest/build.mk:19: recipe for target 'stm32f4/tests/ledtest/ledtest' failed
make: *** [stm32f4/tests/ledtest/ledtest] Error 1

错误内容就是找不到函数 _write()  ,原因是在linux 下调用了printf ,底层接口函数为:

int _write (int fd, char *pBuffer, int size)  
{  
    return size;  
}

加入上面函数后解决问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
解释下F:\python_projects\venv\Scripts\python.exe F:\result\eye_first_move_to_objects_time.py Traceback (most recent call last): File "F:\result\eye_first_move_to_objects_time.py", line 73, in <module> coordinate_x = float(fix_record[row_index][5].value) ValueError: could not convert string to float: '.' Error in atexit._run_exitfuncs: Traceback (most recent call last): File "F:\python_projects\venv\lib\site-packages\openpyxl\worksheet\_writer.py", line 32, in _openpyxl_shutdown os.remove(path) PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\dell\\AppData\\Local\\Temp\\openpyxl.byyckh9l' Exception ignored in: <generator object WorksheetWriter.get_stream at 0x000001FBA5104820> Traceback (most recent call last): File "F:\python_projects\venv\lib\site-packages\openpyxl\worksheet\_writer.py", line 300, in get_stream File "src\lxml\serializer.pxi", line 1834, in lxml.etree._FileWriterElement.__exit__ File "src\lxml\serializer.pxi", line 1570, in lxml.etree._IncrementalFileWriter._write_end_element lxml.etree.LxmlSyntaxError: inconsistent exit action in context manager Exception ignored in: <generator object WriteOnlyWorksheet._write_rows at 0x000001FBA5104270> Traceback (most recent call last): File "F:\python_projects\venv\lib\site-packages\openpyxl\worksheet\_write_only.py", line 75, in _write_rows File "src\lxml\serializer.pxi", line 1834, in lxml.etree._FileWriterElement.__exit__ File "src\lxml\serializer.pxi", line 1568, in lxml.etree._IncrementalFileWriter._write_end_element lxml.etree.LxmlSyntaxError: not in an element Process finished with exit code 1
最新发布
06-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值