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嵌入式1 小时前
USB-CDC 通信实战应用:树莓派 Pico 虚拟串口 + select+MicroPython 全拆解
嵌入式
Freak嵌入式20 小时前
PIO 入门:手把手实现板载 LED 闪烁,原理与代码全解析
嵌入式
Freak嵌入式1 天前
一文搞懂树莓派 Pico 任务调度器:基于定时器的 MicroPython 多任务实现
嵌入式
花 满 楼2 天前
国芯科技CCFC3008PCS BIST (内建自测试) 分析总结
mcu·嵌入式·bist
虎王物联2 天前
ESP32 FreeRTOS多任务优先级翻转与互斥量保护实战
物联网·嵌入式·esp32·freertos
与你4033 天前
CLion 中为什么要重写 _write,而不是 fputc?
嵌入式
Freak嵌入式3 天前
MicroPython 开发避坑:用 Signal 类解决不同电路的电平兼容问题
嵌入式
智码看视界4 天前
Edge AI 全栈1:ESP32 传感器采集到云端大模型推理的完整链路
人工智能·物联网·嵌入式·esp32·aiot·全栈开发·edgeai
Freak嵌入式4 天前
告别硬件差异!MicroPython Signal 类:让你的 GPIO 代码跨板运行无压力
嵌入式
v_for_van4 天前
C语言__attribute__
服务器·c语言·开发语言·mcu·嵌入式·嵌入式实时数据库