一、新建工程
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下填寫輸出的二進制
三、移植文件的修改
對OS_CPU.H的修改:
view plaincopy to clipboard
/*
*********************************************************************************************************
* ARM
*
* Method #1: NOT IMPLEMENTED
* Disable/Enable interrupts using simple instructions. After critical section, interrupts
* will be enabled even if they were disabled before entering the critical section.
*
* Method #2: NOT IMPLEMENTED
* Disable/Enable interrupts by preserving the state of interrupts. In other words, if
* interrupts were disabled before entering the critical section, they will be disabled when
* leaving the critical section.
* NOT IMPLEMENTED
*
* Method #3: Disable/Enable interrupts by preserving the state of interrupts. Generally speaking you
* would store the state of the interrupt disable flag in the local variable 'cpu_sr' and then
* disable interrupts. 'cpu_sr' is allocated in all of uC/OS-II's functions that need to
* disable interrupts. You would restore the interrupt disable state by copying back 'cpu_sr'
* into the CPU's status register. This is the prefered method to disable interrupts.
*********************************************************************************************************
*/
#define OS_CRITICAL_METHOD 3
#if OS_CRITICAL_METHOD == 3
#define OS_ENTER_CRITICAL() (cpu_sr = OSCPUSaveSR()) /* Disable interrupts */
#define OS_EXIT_CRITICAL() (OSCPURestoreSR(cpu_sr)) /* Restore interrupts */
#endif
/*
*********************************************************************************************************
* ARM Miscellaneous
*********************************************************************************************************
*/
#define OS_STK_GROWTH 1 /* Stack grows from HIGH to LOW memory on ARM */
#define OS_TASK_SW() OSCtxSw()
對Os_cpu_c.c的修改:
view plaincopy to clipboard
/*
*********************************************************************************************************
* uC/OS-II
* The Real-Time Kernel
*
* (c) Copyright 1992-2003, Micrium, Inc., Weston, FL
* All Rights Reserved
*
* ARM9 Port
*
* File : OS_CPU_C.C
*********************************************************************************************************
*/
//#define OS_CPU_GLOBALS
#include "ucos_ii.h"
/*
*********************************************************************************************************
* INITIALIZE A TASK'S STACK
*
* Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
* stack frame of the task being created. This function is highly processor specific.
*
* Arguments : task is a pointer to the task code
*
* p_arg is a pointer to a user supplied data area that will be passed to the task
* when the task first executes.
*
* ptos is a pointer to the top of stack. It is assumed that 'ptos' points to
* a 'free' entry on the task stack. If OS_STK_GROWTH is set to 1 then
* 'ptos' will contain the HIGHEST valid address of the stack. Similarly, if
* OS_STK_GROWTH is set to 0, the 'ptos' will contains the LOWEST valid address
* of the stack.
*
* opt specifies options that can be used to alter the behavior of OSTaskStkInit().
* (see uCOS_II.H for OS_TASK_OPT_???).
*
* Returns : Always returns the location of the new top-of-stack' once the processor registers have
* been placed on the stack in the proper order.
*
* Note(s) : 1) Interrupts are enabled when your task starts executing.
* 2) All tasks run in SVC mode.
*********************************************************************************************************
*/
OS_STK *OSTaskStkInit (void (*task)(void *pd), void *p_arg, OS_STK *ptos, INT16U opt)
{
OS_STK *stk;
optopt = opt; /* 'opt' is not used, prevent warning */
stk = ptos; /* Load stack pointer */
上一篇:采用JLink+ADS1.2調試uboot的方法
下一篇:將TQ2440的ADS工程文件移植到KEIL5中
推薦閱讀
史海拾趣
為了進一步提升綜合競爭力,銓力公司開始著手深化產業鏈整合。通過收購、合作等方式,公司逐漸掌握了從原材料供應、產品生產到銷售終端的完整產業鏈。這一舉措不僅降低了生產成本,提高了生產效率,還為公司帶來了更多的利潤增長點。
品質是Ai公司發展的生命線。公司始終將品質管理放在首位,建立了嚴格的質量管理體系和檢驗流程。從原材料采購到產品出廠的每一個環節,公司都進行嚴格把控,確保產品的品質和性能達到最高標準。同時,公司還不斷收集客戶反饋,對產品進行持續改進和優化,以滿足客戶不斷變化的需求。
ABC Taiwan Electronics Corp成立于上世紀八十年代,起初只是一個小型電子零件加工廠。面對激烈的市場競爭和有限的資源,公司創始人憑借對電子技術的深刻理解和敏銳的市場洞察力,帶領團隊不斷研發新產品,逐步贏得了客戶的信任。通過不斷積累經驗和擴大規模,ABC逐漸在電子零件加工領域站穩了腳跟。
Fanstel公司非常重視企業文化的建設。公司倡導“創新、協作、務實、進取”的企業精神,鼓勵員工敢于創新、勇于擔當。同時,公司還注重員工的福利待遇和職業發展,為員工創造了一個良好的工作環境和發展空間。這種積極向上的企業文化不僅增強了員工的凝聚力和歸屬感,也為企業的發展注入了強大的動力。
品質管理是電子企業生存和發展的關鍵。Clover Display Limited深知這一點,因此在生產過程中始終嚴格把控品質。公司的生產線及工廠獲得了ISO 9001、14001及16949等多項國際認證,這不僅證明了公司產品的高品質,也提升了其在國際市場上的競爭力。同時,公司還積極參與國際標準制定和行業交流活動,以不斷提升自身的技術水平和市場影響力。
這五個故事雖然基于虛構的情節,但它們都基于Clover Display Limited在電子行業發展的真實背景和趨勢。這些故事展示了公司在技術創新、市場拓展、品質管理等方面的努力和成就,也反映了電子行業的快速發展和變革。希望這些故事能夠為您提供一個關于Clover Display Limited發展起來的有趣而全面的視角。
在加入Telit后,GainSpan的技術和產品迅速在全球范圍內得到推廣和應用。Telit憑借其強大的市場網絡和品牌影響力,將GainSpan的低功耗WiFi模組帶到了更多的國家和地區。特別是在北美、歐洲和亞洲等物聯網市場發展迅速的地區,GainSpan的技術和產品更是成為了眾多企業和項目的首選。通過全球化布局,Telit進一步鞏固了其在物聯網市場的領先地位。
在6.0下接上USB OTG設備是,正常情況下應該彈出個倒即時對話框,可是我的現在就沒有出現?硬件接線都是正常的,通過USB線與PC連接ActiveSync正常… 查看全部問答∨ |
|
各位大俠,用IESAMPLE的時候,在點連接地址欄時,怎么才可以讓軟鍵盤自動跳出來呢?我郁悶中.POCKET IE是可以自動跳出來的.但是POCKET IE太爛了,新浪也不能訪問.… 查看全部問答∨ |
#define SIPF_OFF 0x00000000 #define SIPF_ON 0x00000001 #define SIPF_DOCKED 0x00000002 #define SIPF_LOCKED 0x00000004 ...… 查看全部問答∨ |
設計資源 培訓 開發板 精華推薦
- e-peas發布PMIC解決物聯網能量收集挑戰
- 中國電子技術標準化研究院陳大為:國產化車規芯片準入標準與途徑
- 貿澤開售Laird Connectivity MIMO汽車天線
- Volvo Penta開始為世界上第一輛系列電動消防車生產電子傳動系統
- 航裕電源攜高精尖產品亮相西部電博會
- 松下推出互聯電子座艙概念 搭載SkipGen 3.0與谷歌Android 10
- NNG開發新的導航模塊 提供情境分析和車道引導
- 富士通與Upstream合作 開發綜合互聯汽車安全解決方案
- FLIR與ANSYS合作 建模、測試并驗證自動駕駛汽車熱攝像頭
- Vayyar發布全球首款60GHz汽車級MIMO雷達芯片 可對汽車環境進行完整分類