摘要: <linux/atomic.h> <stdatomic.h> 以及gcc内置的__sync_*系列的原子操作函数使用的区别?在交叉编译环境下该使用哪一个? 阅读全文
posted @ 2024-12-26 16:02 lxue07 阅读(7) 评论(0) 推荐(0)
摘要: 编译平台:Ubuntu18.04 目标平台:PowerPC 1. 编译器安装 2. 编译过程 参考:ethtool工具源码交叉编译_ethtool交叉编译-CSDN博客 注:步骤3中的config配置中,通过sudo apt-get install pkg-config libmnl-dev修复完问 阅读全文
posted @ 2024-12-25 19:39 lxue07 阅读(61) 评论(0) 推荐(0)
摘要: 主要参考: 交叉编译ncurses与htopforarm平台详细步骤 其它记录:开始使用arm-none-linux-gnueabihf编译,始终有问题(编译ncurses可以,但是编译htop时出现CRT.h中重复定义的问题),使用arm-linux-gnueabihf成功。 将htop编译完成后 阅读全文
posted @ 2024-12-19 19:04 lxue07 阅读(91) 评论(0) 推荐(0)
摘要: 代码中定了#define DEBUG(format,...) printf(""format"\n", ##__VA_ARGS__ ) 编译参数为DEBUG时会报错: debug.h:8: warning: "DEBUG" redefined <command-line>: note: this i 阅读全文
posted @ 2024-10-18 09:12 lxue07 阅读(218) 评论(0) 推荐(0)
摘要: 在使用Keil5(版本5.33.0.0)开发时,发现atoi函数在将字符串转换为整数时有些数据转换不对,如atoi("123")转换后的结果为23;atoi("888")转换后的结果为0。但其它大多数字符串均可转换正确,原因不明,先做记录。 阅读全文
posted @ 2023-05-17 17:41 lxue07 阅读(355) 评论(0) 推荐(0)
摘要: Linux下RS485通讯测试,接收的数据字节只有8个。解决方法: 关键代码: struct termios options; if(0 != tcgetattr(s_fd,&options)) { printf("ead rs485 termios error!\n"); } printf("op 阅读全文
posted @ 2023-03-27 19:27 lxue07 阅读(514) 评论(0) 推荐(0)
摘要: 系统挂起后,重新恢复,查看网络,出现信息: ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 如下: 解决方法: 输入指令: sudo dhclient ens33 参考:L 阅读全文
posted @ 2023-03-09 09:21 lxue07 阅读(366) 评论(0) 推荐(0)
摘要: 参考: Linux串口编程进阶 - 知乎 (zhihu.com) Linux平台串口波特率设置 - 墨天轮 (modb.pro) c++ - Including <termios.h> and <asm/termios.h> in the same project - Stack Overflow 阅读全文
posted @ 2022-10-27 15:26 lxue07 阅读(331) 评论(0) 推荐(0)
摘要: 问题: 网络恢复后,SVN更新,Repo-brows功能均正常,但Show Log无法显示信息,发现为右上角的时间选择From:xxxx/xx/xx To: xxxx/xx/xx均为1970/01/01且不能更改。 解决方式:Settings -> Saved Data -> Log Message 阅读全文
posted @ 2022-03-01 14:17 lxue07 阅读(1746) 评论(0) 推荐(1)