国产精品久久久久影院,成人午夜福利视频,国产精品久久久久高潮,国产精品 欧美 亚洲 制服,国产精品白浆无码流出

UCOS_II的移植到S3C2440 ADS 1.2

發(fā)布者:cocolang最新更新時間:2020-07-01 來源: eefocus關(guān)鍵字:UCOS_II  移植到  S3C2440  ADS 手機看文章 掃描二維碼
隨時隨地手機看文章

一、新建工程

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                                      */  

[1] [2] [3] [4] [5] [6] [7]
關(guān)鍵字:UCOS_II  移植到  S3C2440  ADS 引用地址:UCOS_II的移植到S3C2440 ADS 1.2

上一篇:采用JLink+ADS1.2調(diào)試uboot的方法
下一篇:將TQ2440的ADS工程文件移植到KEIL5中

推薦閱讀最新更新時間:2025-06-28 05:26

移植u-boot-2010.09S3C2440(五)—— 通過OPENJTAG、OPENOCD、ECLIPSE進行調(diào)試
OPENJTAG是買的百問網(wǎng)的,坑爹啊,180大洋,貴。這里說一句,OPENJTAG不是百問網(wǎng)的獨家正版,這個東西是開源的,百問網(wǎng)說這東西是他自己的,說別人是盜版的,這個嘿嘿。。。。就算別人是根據(jù)他的做出來的,做人要謙虛啊。有句話說的好,要做就不要怕別人模仿。話說,好像國內(nèi)很多個人都做過OPENJTAG。而且,他這個東西里面的插件都是別人的。給的網(wǎng)址都過期N年了。。。當然我自己是做不出來的。 它家的這個硬件性能,極其慢,必須等S3C2440運行一小段時間,穩(wěn)定了,再連openocd才能連接的上硬件,還有好像是這個usb轉(zhuǎn)串口做的也一般,輸入存在丟失。一會的少一堆輸入。 不得不說,現(xiàn)在最便宜的在linux下調(diào)試的硬件設備,我
[單片機]
Linux2.6.32移植MINI2440(1)初步移植
根據(jù)友善之臂提供的手冊——《MINI2440 Linux移植開發(fā)實戰(zhàn)指南-內(nèi)核部分-2010.9.9》以及網(wǎng)絡上一些帖子,在此對他們的工作表示感謝,基本過程大都一致,主要是為了熟悉內(nèi)核的基本移植方法,目的是為了能夠生成一個MINI2440上可用的內(nèi)核。 開發(fā)環(huán)境: 主機:fedora 14 虛擬機:vmware workstation 10 交叉編譯工具:arm-linux-gcc 4.3.2 開發(fā)板:mini2440(2m nor ,64m sdram,256m nand) 一、下載源碼包解壓到指定位置 下載地址:http://www.kernel.org/pub/l
[單片機]
有什么辦法快速把51的程序移植430(1
以前寫51時,把位都用sbit定義在頭文件,換接口只用改定義就行了,對位操作直接賦值就可以,現(xiàn)在用430改原來的程序都要用|和&一條一條慢慢改,換接口又要改一次,感覺很麻煩啊,大家有沒有好的辦法可以很方便地實現(xiàn)而不用一條條慢慢改啊! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #define DS1302_IN P2IN #define DS1302_OUT P2OUT #define DS1302_RST BIT1 #define DS1302_SCLK BIT0 #define DS1302_SDI BIT2 //定義MSP320的端口 #define DS130
[單片機]
OpenCV2.0.0移植ARM9(一)(JZ2440----S3c2440)
Linux系統(tǒng):Ubuntu9.10 交叉編譯器:arm-linux-gcc-4.3.2(已安裝) OpenCV:OpenCV-2.0.0.tar.bz2(OpenCV for Linux/Mac) CMake:cmake-2.8.12-Linux-i386.tar.gz 1、OpenCV解壓 將OpenCV-2.0.0.tar.bz2放到/work/systems/下。 解壓命令: tar -jxvf OpenCV-2.0.0.tar.bz2 2、CMake解壓: 將cmake-2.8.12-Linux-i386.tar.gz放到/work/tools/目錄下 解壓命令 :tar -zxv
[單片機]
OpenCV2.0.0<font color='red'>移植</font><font color='red'>到</font>ARM9(一)(JZ2440----S3c2440)
zubax_gnss移植STM32F407
源碼默認支持STM32F107芯片 STM32 HAL庫測試:zubax_gnssbootloaderzubax_chibioschibiostesthalSTM32 STM32 ChibiOS/RT系統(tǒng)測試:zubax_gnssbootloaderzubax_chibioschibiosdemosSTM32 拷貝STM32F407默認配置文件 這三個文件是ChibiOS/RT系統(tǒng)主要的配置文件 源:zubax_gnssbootloaderzubax_chibioschibiosdemosSTM32RT-STM32F407-DISCOVERY 目的:zubax_gnssbootloadersrcos_config
[單片機]
zubax_gnss<font color='red'>移植</font><font color='red'>到</font>STM32F407
S3C2440學習三(基礎模塊的使用1
如果一個人學習一樣東西或做一件事,達到忘我的境界,那么他將變得成功。 ①如何實現(xiàn)UART輸出的?UART使用到的寄存器如下,(1)UART線性控制寄存器ULCONn,(2)UART控制寄存器UCONn,(3)UART FIFO控制寄存器UFCONn,(4)UART MODEM控制寄存器UMCONn,(5)UART 接收發(fā)送狀態(tài)寄存器UTRSTATn,(6)UART 錯誤狀態(tài)寄存器UERSTATn,(7)UART FIFO狀態(tài)寄存器UFSTATn,(8)UART MODEM狀態(tài)寄存器UMSTATn,(9)UART發(fā)送緩存寄存器UTXHn,(10)UART接收緩沖寄存器URXHn,(11)UART波特率除數(shù)寄存器UBRDIVn。 1.
[單片機]
實時操作系統(tǒng)從RTOS移植實時Linux
  在過去的10年中,Linux成功地取代了一些最主要的傳統(tǒng)RTOS平臺,成為了各種各樣的嵌入式設備和應用中首選的新的嵌入式操作系統(tǒng)。盡管一度曾被認為是不重要的平臺,但今天嵌入式Linux已經(jīng)成為主流,并引領著如下重要應用領域的市場和設計份額:消費電子、移動和無線設備、數(shù)據(jù)聯(lián)網(wǎng)以及電信設備。   設計團隊越來越多地期望使用Linux作為標準的嵌入式操作系統(tǒng)??紤]Linux的種種原因包括:廣泛的硬件支持、更高的可靠性、更優(yōu)異的性能、可擴展性以及更快的響應速度。不過,工程師在將基于傳統(tǒng)RTOS的設計移植到嵌入式Linux時會遇到幾大難題,因為Linux的架構(gòu)和傳統(tǒng)RTOS有很大的不同。    移植的時機   隨著應用開發(fā)步
[嵌入式]
STM32F103學習筆記(1)——FreeRTOS下模擬I2C
一、硬件連接 功能口 引腳 SCL PB.6 SDA PB.5 二、移植文件 鏈接:https://pan.baidu.com/s/1wxbQTMlnX2pavrbW2RYg4g 提取碼:dxex 將 board_i2c.c 和 board_i2c.h 兩個文件加入工程的User文件夾下 注意:延時函數(shù)使用了FreeRTOS的vTaskDelay任務延時函數(shù) 2.1 board_i2c.c /********************************************************************* * INCLUDES */ #include FreeRTOS.h #inclu
[單片機]
小廣播
設計資源 培訓 開發(fā)板 精華推薦

最新單片機文章
隨便看看

 
EEWorld訂閱號

 
EEWorld服務號

 
汽車開發(fā)圈

 
機器人開發(fā)圈

電子工程世界版權(quán)所有 京B2-20211791 京ICP備10001474號-1 電信業(yè)務審批[2006]字第258號函 京公網(wǎng)安備 11010802033920號 Copyright ? 2005-2025 EEWORLD.com.cn, Inc. All rights reserved