|
楼主 |
发表于 2007-3-27 16:08:15
|
显示全部楼层
版主所说的方法不行啊。
请看我的试验结果:
1.程序
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
unsigned long addr;
if (argc != 2)
{
printf("usage: %s xxxx(hex num)\n", argv[0]);
return -1;
}
addr = strtoul(argv[1], NULL, 16);
printf("go to 0x%.8x\n", addr);
(*(void (*)(void))addr)();
return 0;
}
2.将之编译为go.
3.相关启动信息
## Booting image at 01030000 ...
Load Address: 00008000
Entry Point: 00008000
4.运行结果
/> go 0
go to 0x00000000
pid 20: failed 11
/> go 1030000
go to 0x01030000
pid 21: failed 4
/> go 8000
go to 0x00008000
Unhandled fault: external abort on linefetch (F4) at 0x00000001
fault-common.c(97): start_code=0x79d040, start_stack=0x7a5f8c)
pid 22: failed 7
/>
5.我查了一下错误信息
11=Resource temporarily unavailable
4=Interrupted system call
7=Argument list too long
6.这一命令应该和bootloader里面的reset命令相似,可是这一命令太复杂了,
我没看懂。不会做。版主能帮忙吗? |
|