OpenWrt-Eclipse常见报错

0.背景

yaml 复制代码
Ubuntu 22
OpenWrt LEDE
Eclipse 2023.12

1. 安装四个重要插件

根据官网Using Eclipse for C/C++ Programming and Debugging的提示,eclipse中需要安装如下几个插件:

sql 复制代码
C/C++ Remote Launch Developer Resources
Remote System Explorer End-User Runtime
Remote Launch Targets Developer Resources
Terminal (Console) View Developer Resources

所以我们选择菜单 Help -> Install New Software ,然后取消勾选 Contact all update sites during install to find required software 否则在安装时会反复报错。

2. 新建C++项目

新建C++项目时,要选择到bin目录,官网提示你的目录应该长这样:<buildsystem root>/staging_dir/toolchain-<whatever>/bin,我这边是 lede/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/bin

再有就是前缀怎么填,前缀不能不填,官网有云:

For example, if you see a file named mips-openwrt-linux-musl-gcc, the toolchain prefix is mips-openwrt-linux-musl-.

对于我来说,就是移到刚才提到的bin目录下,找到mipsel-openwrt-linux-musl-gcc,那么前缀就是mipsel-openwrt-linux-musl-

3. Remote Absolute File Path for C/C++ Application

这一栏要填绝对路径,不能只到某个目录下。比如填写成 /root/hello

4. gdbserver: not found

这个错误是在 make menuconfig 时,忘记选上开发需要的 gdbserver 了。我们在 Development

相关推荐
Freak嵌入式20 小时前
一文速通 Python 并行计算:13 Python 异步编程-基本概念与事件循环和回调机制
开发语言·python·嵌入式·协程·硬件·异步编程
不脱发的程序猿20 小时前
SoC程序如何使用单例模式运行
linux·嵌入式
鑫宇吖1 天前
Polyspace作为MISRA-C合规性检查工具,其检查规则会根据目标C语言标准(C90或C99)动态调整限值要求。
c语言·嵌入式·c99·c90·polyspace·misra-c合规性检查
用户1259265423202 天前
使用 Git LFS 管理大文件并上传至 GitHub
嵌入式
巫山老妖2 天前
Linux流量分析:tcpdump&wireshark
linux·嵌入式
不脱发的程序猿2 天前
Linux守护进程
linux·嵌入式
desssq3 天前
嘉立创黄山派下载watch ui demo 教程(sf32)
ui·嵌入式·嘉立创·黄山派
趣多多代言人3 天前
从零开始手写嵌入式实时操作系统
开发语言·arm开发·单片机·嵌入式硬件·面试·职场和发展·嵌入式
DIY机器人工房3 天前
代码详细注释:通过stat()和lstat()系统调用获取文件的详细属性信息
linux·嵌入式
DIY机器人工房3 天前
代码详细注释:ARM-Linux字符设备驱动开发案例:LCD汉字输出改进建议开发板断电重启还能显示汉字,显示汉字位置自定义
linux·嵌入式·文件io·diy机器人工房