Adapting Code::Blocks IDE for ARM Development[1]
使Code::Blocks适合ARM开发
This brief guide can be followed after the ARM-GCC toolchain is setup.
在安装过ARM-GCC工具链后,即可按照此简明指南来做。
For instructions to setup the ARM-GCC toolchain,
refer to the “Setting up the ARM-GCC Toolchain on Windows” page of this site.
对于安装ARM-GCC工具链的用法说明,参考本站的“Windows下ARM-GCC工具链的安装”[2] 。
I recently found perhaps the only other suitable IDE for Windows
named Code::Blocks.
我最近找到的适合IDE也许只有Windows下的Code::Blocks了。
注:Ubuntu下也可以用Code::Blocks,到我翻译这篇文章止版本为8.02。
Unlike Eclipse, it’s slim, fast and native.
不像Eclipse,它是小巧、快速、原生(不依赖其它平台运行,如Java、.net平台)。
Like Eclipse, it’s highly configurable and can be used with GCC.
注:Ubuntu下Code::Blocks v8.02的使用自定义Makefile的设置如下:
像Eclipse一样,它具有高度可配置性并且可以使用GCC。
In addition,
Code::Blocks can be easily used with
GDB to debug your code (major factor in choosing another IDE).
另外,Code::Blocks 可以容易的使用GDB来调试你的代码(挑选类似IDE的主要因素)。
This is good to use later with OCDRemote/gcc to
debug your ARM code (although I haven’t configured it, yet.)
以后使用OCDRemote/gcc[3] 调试你的ARM代码也会很好(虽然我还没有配置它)。
So here are the instructions for setting up the Code::Blocks to work with
the ARM GCC toolchain.
所以这里是建立Code::Blocks与ARM GCC工具链共同工作的用法说明。
To do this,
all that needs to be done is configuring Code::Blocks to
use an external Makefile,
but finding the location of these settings took a rather long time.
为了做到这点,
必须完成配置Code::Blocks使用一个外部的Makefile文件,
仅仅找这些配置的位置就花费了很长时间。
Step One – Create a New Project
第一步 - 创建一个新工程
Since none of the included project templates really fit for
ARM GCC development,
it’s easiest to start out by making a new blank project.
由于ARM GCC开发空工程模板很合适,因为一个空的新工程是最容易着手进行的。
So do this by clicking on the “Project” menu, then “New empty project”.
新建空工程通过点击“工程”菜单项,然后选择“新建空工程”。(如下图)
注:Ubuntu下的Code::Blocks v8.02新建空工程方式有所不同,详见下图:
由于无法在Ubuntu上调试故此只创建“Release”配置即可!(IDE要求必须创建一个Debug或Release的配置)
注:Ubuntu下Code::Blocks v8.02的使用自定义Makefile的设置如下:
点击上面界面的Finish按钮后,
你就点击[Build]菜单 -> [Rebuild] 或 [Rebuild workspace]菜单项,编译空工程的话,
就会从编译日志标签“Build log”得到如下错误提示:
make: *** 没有规则可以创建目标“Release”。 停止。
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
解决方法自然是添加源代码文件与其相关的头文件了!Makefile文件也可以添加,会放入 Others 分类中。
使Code::Blocks适合ARM开发
最新推荐文章于 2024-01-20 13:37:11 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)