一、新建工程
1.新建一個ARM Executable Image
2.創(chuàng)建uCOS_II文件夾,創(chuàng)建兩個子文件夾,分別為ARM、SOURCE
ARM存放和平臺相關(guān)的文件("OS_CPU.H" "Os_cpu_a.s" "Os_cpu_c.c" )
SOURCE下存入和平臺無關(guān)的文件("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.創(chuàng)建一個S3C2440文件夾,創(chuàng)建兩個子文件夾,分別為INC、SRC
INC存放S3C2440相關(guān)頭文件("2440addr.h" "2440lib.h" "2440slib.h" "config.h" "Def1.h" "lcd.h" "mmu.h" "Option.h" "Target.h" "Timer.h" )
SRC存放S3C2440相關(guān)源文件("Timer.c" "2440init.s" "2440lib.c" "2440slib.s" "Font_Libs.c" "iphone.c" "lcd.c" "mmu.c" "nand.c" "Target.c" )
4.創(chuàng)建一個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調(diào)試uboot的方法
下一篇:將TQ2440的ADS工程文件移植到KEIL5中
推薦閱讀最新更新時間:2025-06-28 05:26


設計資源 培訓 開發(fā)板 精華推薦
- Microchip 升級數(shù)字信號控制器(DSC)產(chǎn)品線 推出PWM 分辨率和 ADC 速度業(yè)界領先的新器件
- 意法半導體STM32MP23x:突破成本限制的工業(yè)AI應用核心
- 意法半導體推出用于匹配遠距離無線微控制器STM32WL33的集成的匹配濾波芯片
- ESP32開發(fā)板連接TFT顯示屏ST7789跳坑記
- 如何讓ESP32支持analogWrite函數(shù)
- LGVL配合FreeType為可變字體設置字重-ESP32篇
- 使用樹莓派進行 ESP32 Jtag 調(diào)試
- ESP32怎么在SPIFFS里面存儲html,css,js文件,以及網(wǎng)頁和arduino的通訊
- ESP32 freeRTOS使用測試
- LTC3809-1 的典型應用 - 無檢測、低輸入電壓、具有輸出跟蹤功能的同步 DC/DC 控制器
- NCV8189CMTW180TAGEVB:NCV8189 WDFNW6 2x2 1V8 評估板
- LTC3615HFE-1 雙路 3A 同步降壓型 DC/DC 轉(zhuǎn)換器在主機和從機中的典型應用,用于使用 2MHz 外部時鐘實現(xiàn)一致跟蹤輸出
- ADK-8470,HI-8470 16 傳感器陣列評估板 + ARINC 429 輸出、接地/開路或電源/開路傳感器
- AM1G-1209DH30Z ±9V 1 瓦 DC/DC 轉(zhuǎn)換器的典型應用
- L7808A 固定輸出穩(wěn)壓器的典型應用
- DC274A-A,用于 LT1576CS8、200kHz 降壓轉(zhuǎn)換器的演示板,具有關(guān)斷、5.5 至 25Vin、3.3V 或 5Vout,1.25A
- TCR5SB24U、200mA、2.4V輸出電壓CMOS低壓降穩(wěn)壓器的典型應用
- STEVAL-ISA101V1,使用 L5973D 的演示板,具有 4 V/36 V 輸入電壓范圍的 2 A 直流降壓開關(guān)穩(wěn)壓器
- 使用 Semtech 的 ACS8527 的參考設計
- GaN氮化鎵正在進入汽車領域
- ST 向大眾市場推出ST4SIM M2M用兼容GSMA的eSIM卡芯片
- Advanced Energy LGA110D 的直流/直流電源轉(zhuǎn)換效率優(yōu)于同級產(chǎn)品
- 新思科技:部署數(shù)據(jù)安全戰(zhàn)略,加強安全管理和隱私保護
- 高通孟樸:持續(xù)推動5G技術(shù)演進 全球化發(fā)展和產(chǎn)業(yè)協(xié)作是大
- 昆山國顯光電AMOLED技術(shù) 多款手機屏幕均搭載
- 在操作頻譜儀之前我們需要做哪些準備工作呢?
- 貿(mào)澤電子與Amphenol推出介紹新型連接解決方案的Plugged In視頻系列
- 關(guān)于印發(fā)《上海市居民小區(qū)電動汽車充電設施建設管理辦法》的通知
- 影響嵌入式處理技術(shù)未來發(fā)展的三個趨勢
- 正向 DCDC 巧改負壓?GM2406/GM24061反向操作指南!
- 『新品發(fā)布』共模半導體重磅發(fā)布40V、4A/6A低EMI車規(guī)級同步降壓穩(wěn)壓器 GM2406
- Bourns 推出專為光伏應用設計 POWrFuse? 大功率電力保險絲系列,具備 1500 VDC 額定值
- 納芯微推出車規(guī)級自動雙向型電平轉(zhuǎn)換器NCAS0104和NCAB0104
- 瑞薩電子推出全新GaN FET,增強高密度功率轉(zhuǎn)換能力, 適用于AI數(shù)據(jù)中心、工業(yè)及電源系統(tǒng)應用
- 芯對話 | 芯佰微CBM8605/CBM8606/CBM8608運算放大器 精密信號鏈的核心解決方案
- 物聯(lián)網(wǎng)技術(shù)促進能量收集創(chuàng)新應用落地
- Proximus Global旗下公司BICS與Epic Malta合作,為2G/3G網(wǎng)絡退役后保障旅行者漫游連接
- 大聯(lián)大世平集團推出以NXP產(chǎn)品為核心的HVBMS BJB方案
- 適用于高速應用的先進全局快門圖像傳感器
- 使用eclipse搭建stm32f7xx環(huán)境的工程
- Ubuntu下安裝Stm32的Eclipse的開發(fā)環(huán)境(1)
- 在ubuntu下利用eclipse搭建stm32開發(fā)環(huán)境和st-link調(diào)試
- STM32高級開發(fā)(15)-使用eclipse開發(fā)STM32
- ubuntu中安裝配置STM32開發(fā)環(huán)境
- 美國隊長即將下崗 下任超級英雄IP誰接棒?
- 不堪其負,杭州要把 1/3 的共享單車拉出城外
- 國網(wǎng)平湖市供電公司首個智能機器人上崗
- Switch賣得最好的十款獨立游戲你玩過幾個?
- 一加5北美市場官網(wǎng)停售 或許是再為新旗艦作準備