# linux rtthread **Repository Path**: vitochl/linux-rtthread ## Basic Information - **Project Name**: linux rtthread - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-07-13 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### Linux搭建rt-thread开发环境 1. 参考rt-thread官网 ### 搭建编辑工具 1. 安装vscode并安装插件gitee ### 串口调试工具 1. 安装minicom ### 安装st-link 1. 从仓库中st-link的代码 2. 安装依赖库及工具 cmake libusb-1.0 libgtk-3-dev 3. 在stlink根目录下make 4. 添加 stlink/build/Release/bin 到环境变量 5. 烧写命令 st-flash --debug --reset write rtthread.bin 0x08000000 ### 配置opeocd 1. 进行openocd的clone,openecd 仓库地址 https://gitee.com/vitochl/openocd.git 此地址的.gitmodule文件经过了修改,使子模组指向了gitee中的项目用来解决模块下载问题 2. 安装依赖 sudo apt-get install build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libtool libsysfs-dev 3. sudo ./bootstrap 4. sudo ./configure 5. sudo make 6. sudo make install 7. openocd --version 查看是否安装成功 8. sudo openocd -f /usr/local/share/openocd/scripts/interface/cmsis-dap.cfg -f /usr/local/share/openocd/scripts/target/stm32f4x.cfg 注意:此处自行选择配置文件 并且根据openocd文档的50页设置swd jtag模式 9. 编辑 task.json 文件,添加如下两个任务: openocd server:用于开启 openocd GDB 服务器。scons:用于编译工程。 10. 编辑 launch.json文件(点击deug之后自动创建)参考范例文件。 11. 完成