我的步骤是这样的
[plg@localhost ~]$ arm-linux-gcc -c -o utils.o utils.c
[plg@localhost ~]$ ls
main.c s3c6410_addr.h soc_cfg.h utils.c utils.h utils.o
[plg@localhost ~]$ arm-linux-gcc -c -o main.o main.c
[plg@localhost ~]$ arm-linux-gcc -v -static -WI,-Tubl-davinci.lds,-Map,system.map -nostartfiles -o target.elf utils.o main.o
[plg@localhost ~]$ arm-linux-objcopy -O binary target.elf boot.bin
然后 把这个 boot.bin 文件传到板上裸机运行,可是没效果 的, 我的代码是根据 6410 demo 的改了下
int _main(void)
{
Uart_Init();
Port_Init();
Uart_SendString("\r\nHello, Mini6410\r\n");
int i;
for(i = 0; i < 10 ; i++) {
Led_Display(0x9); // 1001
LedDelay();
Led_Display(0x6); // 0110
LedDelay();
Uart_SendString("\r\nHello, Mini6410\r\n");
}
Uart_SendString("\r\nGame Over!\r\n");
return 0;
}