一些错误调试记录

1 编译util-linux源码时报错 ERROR: You must have autopoint installed to gener。。。

解决办法:

1、 apt install autopoint
2、apt install bison

2 configure error /bin/bash /config sub failed

使用命令如下:./configure --host=arm-linux    \    CC=arm-linux-gcc LD=arm-linux-ld

正确的命令如下:./configure --host=arm-linux CC=arm-linux-gcc LD=arm-linux-ld 

多了一个「接续符」

3 错误:
directive output may be truncated writing 6 bytes into a region of size between 1 and 20

(-Wformat-truncation的级别1 […]仅警告对返回值未使用的有界函数的调用,这很可能导致输出截断。)

解决方法:1.我们可以检查snprintf的返回值,该值在错误时返回负值。
解决方法:2.将snprintf的dest buf 调大
解决方法:3.如果需要消除warning当成error的编译规则,在Makefile中去掉-Werror参数
 

4 出错信息:error: dereferencing pointer to incomplete type 'RSA {aka struct rsa_st}'

原因:由于默认使用了openssl 1.1.x 版本,导致的API不一致引起

解决办法:

1,直接安装openssl1.0版本,Debian 系:apt-get install libssl1.0-dev

2,编译openssl 1.0 版本,PKG_CONFIG_PATH 指向 1.0 版本,如 PKG_CONFIG_PATH=/usr/local/openssl-1.0.2l/lib/pkgconfig

由于环境变量可能存在众多复杂的替换,方法2不一定能行

5 IAR速度慢CPU占用高

编译下载调试都很慢,IAR弹出Source Browser Log,显示Failed to parse input files的问题,

很可能是你使用了中文路径。 

打开IAR速度慢CPU占用高,很可能是你使用了中文路径。 - 综合技术交流 - 电子工程世界-论坛 (eeworld.com.cn)

IAR弹出Source Browser Log,显示Failed to parse input files的问题_source browse log-优快云博客

解决办法:把工程放到非中文的路径下

6  IAR报错Error[Pe084]: invalid combination of type specifiers

报错处  typedef signed char bool;

可能的原因是 bool 已经定义了,比如在头文件  #include <stdbool.h>

解决方法: 去掉 typedef signed char bool; 增加  #include <stdbool.h>

7     unable to allocate space for sections/blocks with a total estimated minimum size of 0xa26c bytes (max align 0x8) in <[0x2000'00c8-0x2000'7f37]> (total uncommitted space 0x7e70). 

stm内存空间不够,

解决办法:

1  大的常量数组,增加const ,把数组放到flash里面,

比如: uint16_t g_box_16[256] 修改为  const  uint16_t g_box_16[256]

(已解决)STM32内存溢出错误:unable to allocate space for section... (stmicroelectronics.cn)

2 减少heap大小,

比如 :PRIVILEGED_DATA static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];

减少 configTOTAL_HEAP_SIZE

为什么在STM32里使用指针进行数据赋值死机?-优快云社区

IAR配置ICF到项目的实现方法-EDA365

10  STM32F030xx硬件SPI调试 初始化需要增加硬件SPI接收FIFO的阈值,即下面的函数SPI_RxFIFOThresholdConfig ,否则会失败,103则不需要

SPI_RxFIFOThresholdConfig(SPI1, SPI_RxFIFOThreshold_QF);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值