使用ADS创建ARM项目:入门LED控制示例

需积分: 34 72 下载量 25 浏览量 更新于2024-08-09 收藏 768KB PDF 举报
"本文档详细介绍了如何在ADS1.2环境下建立一个新的项目,特别是针对初学者,以便开发针对周立功EasyARM2104的ARM项目。首先,用户需要运行CodeWarrior IDE并创建新项目,选择ARM Executable Image模板,因为这种模板适合初学者,它会生成包含ARM指令的ELF格式映像文件。 在新建项目时,用户需要设置项目的存放目录(例如,e:\My Documents\ex_led),并为其指定一个名称(如ex_led)。新建后的项目仅包含一个空的mcp项目文件。接下来,从周立功光盘的\实验程序\启动代码目录中复制特定文件到项目目录,这些文件包括Vectors.s(异常处理相关)、Init.s(LPC210x初始化代码)、Target.c和Target.h(用户自定义的程序模块,包括异常处理和初始化)、Config.h(用户配置文件,用于调整项目设置),以及LPC2106.h(硬件相关定义)。 需要注意的是,因为LPC2104.h并未提及,这是因为LPC210X系列寄存器通用,主要区别在于FLASH和RAM的大小,因此通用了LPC2106.h。此外,文章提醒新手读者,虽然作者提供了一个基本的使用示例,但ADS的强大功能需要深入研究英文PDF使用说明,以便理解更深层次的设置和参数。作者也欢迎读者反馈文档中的错误,并提供了联系邮箱以便交流。 在整个过程中,还需要确保ADS软件已安装、EasyJTAG驱动已正确安装,以及EasyARM实验板上的硬件设置,如JP8LED1跳线已短接且其他跳线设置正确。本文档旨在帮助读者通过实际操作熟悉ADS环境,并为进一步学习ARM编程打下基础。"
2004-06-25 上传
《游戏编程精粹》光盘源代码Author: Steve Rabin E-mail: stevera@noa.nintendo.com Last revised: 5-20-00 This MS Visual C++ project is the AI engine described in the book Game Programming Gems within the article "Designing a General Robust AI Engine". Please refer to the book for a full explanation of the implementation. Comments within the code also provide additional information. The state machine language uses a few custom keywords that should be highlighted by Visual C++ in order to make the state machine more readable. You can get Visual C++ to highlight these words by placing the file "usertype.dat" (included in this directory) into the same directory as Msdev.exe (C:Program FilesMicrosoft Visual StudioCommonMSDev98Bin). The file "usertype.dat" is simply a text file listing the state machine keywords. Here is a brief overview of the state machine structure. Each game object can point to a state machine. When that game object receives a message, it gets routed to it s state machine. The state machine can execute any code on behalf of the game object and can send additional messages, delayed messages (timers), can change state, or can destroy itself. Actually, each state machine can execute any code within your game. It is completely general. The state machine language was designed to provide a simple, consistent, robust, and general implementation of a state machine to every game object. The language itself consists solely of macros that have been carefully crafted to fit together like puzzle pieces. You can see an example in the file "fsm_drone.cpp". The macro language can be found in the file "fsmmacros.h". The AI engine provided was ported from C++ to C in order to show that it doesn t rely on any object-oriented techniques and that its generally applicable (also for legal reasons). I would highly advise porting it back to C++ so that it can take advantage of object-oriented techniques (even though it doesn t require them). Good Luck!