这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 关于eking的调试bsp方法的问题

共3条 1/1 1 跳转至

关于eking的调试bsp方法的问题

菜鸟
2004-11-17 08:37:30     打赏

我按照eking的文章http://bbs.edw.com.cn/dispbbs.asp?boardID=3&ID=27287&page=1,想试一试怎样用SDT来调试4510的bsp,我的步骤是:

1、我拿了一个已经改好的bsp,按照eking的方法做以下修改:

config.h修改后的部分

#define ROM_BASE_ADRS 0x00100000 /* base of Flash/EPROM 16 MB */ #define ROM_TEXT_ADRS 0x00100000 /* code start addr in ROM */ #define ROM_SIZE 0x00100000 /* size of ROM holding VxWorks 512K */

#define ROM_COPY_SIZE ROM_SIZE #define ROM_SIZE_TOTAL 0x00100000 /* total size of ROM 2MB */

#define RAM_LOW_ADRS 0x00001000 /* VxWorks image entry point */ #define RAM_HIGH_ADRS 0x00100000 /* RAM address for ROM boot */

Makefile修改后的部分: ROM_TEXT_ADRS = 00100000 # ROM entry address ROM_WARM_ADRS = 00100004 # ROM warm entry address ROM_SIZE = 00080000 # number of bytes of ROM space

RAM_LOW_ADRS = 00001000 # RAM text/data address (bootrom) RAM_HIGH_ADRS = 00100000 # RAM text/data address (bootrom)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 另,config.h和makefile修改前的部分如下:

config.h修改前的部分

#define ROM_BASE_ADRS 0x01000000 /* base of Flash/EPROM 16 MB */ #define ROM_TEXT_ADRS 0x01000000 /* code start addr in ROM */ #define ROM_SIZE 0x00100000 /* size of ROM holding VxWorks 512K */

#define ROM_COPY_SIZE ROM_SIZE #define ROM_SIZE_TOTAL 0x00100000 /* total size of ROM 2MB */

#define RAM_LOW_ADRS 0x00001000 /* VxWorks image entry point */ #define RAM_HIGH_ADRS 0x00100000 /* RAM address for ROM boot */

Makefile修改前的部分

ROM_TEXT_ADRS = 01000000 # ROM entry address ROM_WARM_ADRS = 01000004 # ROM warm entry address ROM_SIZE = 00080000 # number of bytes of ROM space

RAM_LOW_ADRS = 00001000 # RAM text/data address (bootrom) RAM_HIGH_ADRS = 00100000 # RAM text/data address (bootrom)

修改后编译成为bootrom_uncmp

2、在SDT窗口执行如下命令:

let 0x3ff0000 =0x87ffff91 let 0x3ff3008 =0xeb7 let 0x3ff3010 =0xfdffff9 let 0x3ff3014 =0x21080060 let 0x3ff3018 =0x25084060 let 0x3ff301c =0x25094060 let 0x3ff3020 =0x25094060 let 0x3ff3024 =0x25094060 let 0x3ff3028 =0x25094060 let 0x3ff302c =0x20000380 let 0x3ff3030 =0x25094380 let 0x3ff3034 =0x25094380 let 0x3ff3038 =0x25094380 let 0x3ff303c =0xce278360

然后loadimage bootrom_uncmp到目标板的sdram,完成之后SDT的状态栏有一个如下的指示

warning!unknown name:main

不知道是什么意思?

然后run,超级终端没有任何输出,stop之后将pc改为0x100000后再运行偶尔超级终端有正常输出,能看到程序已经正常运行了。

我不知道为什么会这样,各位大侠帮忙看看吧,究竟应该怎样调试bsp,给引引路吧,先谢谢了。




关键词: 关于     eking     调试     方法     问题     #define    

菜鸟
2004-11-18 03:54:00     打赏
2楼
哪位大侠指点一下啊,谢谢了!

菜鸟
2004-11-19 06:47:00     打赏
3楼

还是不行啊?楼上的是不是用你的方法调通过啊

哪位帮忙看看吧


共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]