用了一个下午把uCOS_II移植到S3C2440上,下面是移植过程中注意事项,从新建工程到最后生成*.bin文件
一、新建工程
1.新建一个ARM Executable Image
2.创建uCOS_II文件夹,创建两个子文件夹,分别为ARM、SOURCE
ARM存放和平台相关的文件("OS_CPU.H" "Os_cpu_a.s" "Os_cpu_c.c" )
SOURCE下存入和平台无关的文件("ucos_ii.h" "os_cfg.h" "os_core.c" "os_flag.c" "os_mbox.c" "os_mem.c" "os_mutex.c" "os_q.c" "os_sem.c" "os_task.c" "os_time.c" "os_tmr.c" )
3.创建一个S3C2440文件夹,创建两个子文件夹,分别为INC、SRC
INC存放S3C2440相关头文件("2440addr.h" "2440lib.h" "2440slib.h" "config.h" "Def1.h" "lcd.h" "mmu.h" "Option.h" "Target.h" "Timer.h" )
SRC存放S3C2440相关源文件("Timer.c" "2440init.s" "2440lib.c" "2440slib.s" "Font_Libs.c" "iphone.c" "lcd.c" "mmu.c" "nand.c" "Target.c" )
4.创建一个app文件夹(app_cfg.h、main.c、Printf.c、Printf.h)
二、工程设置Edit->DebugRel Settings下
1.Target->Target Settings,Post-linker:ARM fromELF
2.Target->Access Paths选中Always Search User Paths(ucos_ii部分文件采用#include <>包涵,不修改这里找不到文件)
3.Language Settings下ARM Assembler、ARM C Compliler、ARM C++ Complier处理器设置成ARM920T
4.Language Settings下ARM C Compliler下Errors下去掉Implicit pointer c,ARM C Compliler下Warnings下去掉Unused declaration(-O1 -g+ -cpu ARM920T -Wx -Ec)
5.ARM Linker下,Output下RO Base设置成0x30000000,Options下Image entry point设置成0x30000000,Layout下Place at beginning of image下的Object/Symbol设置成2440init.o,Section设置成Init,Listings下选勾Image map、List file设置list.txt,勾上Sizes、Totals、Unused、Veneers
6.ARM fromELF下Output file name下填写输出的二进制
阅读(4868) | 评论(0) | 转发(0) |