QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: limingth

Learn lumit Step 1: ARM 程序开发技巧

[复制链接]
发表于 2005-9-5 16:19:47 | 显示全部楼层
[quote:d967cbd186="chw75"]斑竹:
    我现在正在看第一个实验,想把这个程序吃透,可是对硬件不熟.想请教你以下代码:
   ---------------------------------------------------
        AREA LED, CODE
       
        ldr        r0, =0x03FF5000
        ldr        r1, =0x0003FFFF                ; set all 18 gpios' direction to output
        str        r1, [r0]

     ---------------------------------------------------
  (1)请问以上代码中AREA LED, CODE是什么意思?
(2)0x03FF5000这个地址是什么地址?
                 谢谢!!!  [/quote]
我查阅了一些资料,对ldr这个装载指令有些小问题
比如      ldr   r0,  =0x03FF5000
也有      ldr   r1,  0xFF
怎么有的有等号,另外的却没有
等号有什么其他含义么??
回复

使用道具 举报

发表于 2005-9-5 17:13:35 | 显示全部楼层
对于 linux 下 make 命令不太熟悉的朋友,我介绍一个简单的例子,一看就明白了。

#
# makefile - test led program and show how to use makefile
#
# Author: li ming <[email protected]>
# Date: 2005-5-20
# Copyleft: http://www.lumit.org
#

#************************************************************
# display a hint of how to make first target
all:
@echo Hint: you can type "make l0" to build first target

#************************************************************
# compile and link led_0000.s, then convert .axf -> .bin file
l0:
armasm led_0000.s -o led_0000.o
armlink -ro-base 0x0 -entry 0x0 led_0000.o -o led_0000.axf
fromelf led_0000.axf -bin -output led_0000.bin

#************************************************************
# burn led_0000.bin into flash
j0:
-sjf4510-1.1.0.exe led_0000.bin

#************************************************************
# clean up all temp file except source file
clean:
rm -f *.o
rm -f *.axf
rm -f *.bin


这个是什么意思呀?不明白呀.没有接触过linux啊
回复

使用道具 举报

 楼主| 发表于 2005-9-6 09:17:38 | 显示全部楼层
请仔细阅读上面 Step 1 中的文字部分,并找一下 makefile 相关的网上文章辅助理解。
"
上面的例子是从附件中 Makefile 中摘取出来的一个部分,一共可以做
四件事情: 即 make (all), make l0, make j0, make clean 这四个目标。
# 开头的行都是注释,@ 开头的命令不显示,- 开头的命令忽略错误继续执行。
这些概念和符号都和 linux 是类似的,下面是具体执行的一个例子输出。
"
回复

使用道具 举报

发表于 2006-10-19 09:35:30 | 显示全部楼层
谢谢版主,我可以开始入门了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-26 00:42 , Processed in 0.090844 second(s), 13 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表