如何使用USB引导程序时设置ARM用户应用程序的起始地址? [英] How to set ARM user app start address when using USB bootloader?

查看:329
本文介绍了如何使用USB引导程序时设置ARM用户应用程序的起始地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚拿起这些ARM Cortex-M3的 LPC1768迷你之一板易趣的。这基本上是一个接口板。

Just picked up one of these ARM Cortex-M3 LPC1768 mini boards from eBay. It's basically a breakout board.

不过,基于什么文档很少用它来了,我已经决定了它具有类似于由恩智浦的
LPC1700辅助USB引导程序(AN10866)
应用笔记。

However, based on what little documentation came with it, I've determined that it has a USB bootloader similar to that described by NXP's LPC1700 secondary USB bootloader (AN10866) app note.

这两个文档的(应用笔记和电路板文档)的指示用户程序要建成这样,他们的起始地址为0x2000 。的由于USB引导程序已经在0x0和占用8K

Both docs (the app note and board docs) indicate that user programs are to be built such that their starting address is 0x2000. Because the USB bootloader is already at 0x0 and takes up 8K.

这两个文档还显示截图(见应用笔记的第14页)关于如何Keil公司uVision内做到这一点,但我打算用GNU工具链(Yagarto +的Eclipse + OpenOCD的)。

Both docs also show screenshots (see page 14 of app note) on how to do this within Keil uVision, however I'm planning on using a GNU toolchain (Yagarto + Eclipse + OpenOCD).

如何指定为0x2000一个起始地址与GNU工具链编译时,使其与USB引导程序正常工作?

How do I specify a starting address of 0x2000 when compiling with a GNU toolchain so that it will work properly with the USB bootloader?

推荐答案

我有很多的基于ARM的例子:

I have lots of arm based examples:

https://github.com/dwelch67

查找或创建自己的链接脚本。它可能会说ORIGIN =的ROM变化00000000,要为0x2000,这样的事情,例如:

Find or create your own linker script. where it might have said ORIGIN = 0x00000000 for the rom change that to 0x2000, something like this for example:

MEMORY
{
   rom : ORIGIN = 0x00002000, LENGTH = 0x6000
   ram : ORIGIN = 0x40000000, LENGTH = 0x2000
}
SECTIONS
{
   .text : { *(.text*) } > rom
   .bss  : { *(.bss*) } > ram
}

你可能想/需要用的.data

   .data  : { *(.data*) } > ram AT >rom

或类似的东西。取决于你的程序和引导code和一切。

or something like that. depends on your programs and boot code and all that.

如果您已经拥有了为建立一个00000000工作系统然后找到正在使用的linkerscript,使它的一个副本并将其更改为为0x2000,并指定链接脚本。

If you already have a working system that builds for 0x00000000 then find the linkerscript being used and make a copy of it and change it to 0x2000 and specify that linker script.

这篇关于如何使用USB引导程序时设置ARM用户应用程序的起始地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆