Embedded Hardware---Use of ADS tools and establishment of hardware debugging environment

Publisher:熙风细雨Latest update time:2021-05-07 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Open CodeWarrior for ARM Developer Suite software


2. Create a new project, the project type is ARM Executalbe Image, please note that the project name and path must not be in Chinese, otherwise it cannot be opened


3. Add files to the project, [file]->new, select the File tab, enter the file name, such as main.c, select the Add to Project checkbox, and select only DebugRel in Targets (the generated image only contains basic information)


4. Add existing system files, copy the system files to the project directory, select Add files under the [Project] menu on the project page, add the corresponding files, and select DebugRel in Targets.


5. Select Create Group under the [Project] menu on the project page to classify the files.


6. Configure the project options. Click the [DebugRel Setting…] tool button on the toolbar and configure in the DebugRel Setting dialog box:


In the [Target Settings] item, select Post-Linker as ARM fromELF, and then compile and generate an executable file


[Language Settings], select ARM920T for Architecture or Processor of each language


[Linker] item, change the RO Base (memory starting address) of Simple image in the Output tab under ARM Linker to 0x30000000, change the Image entry point in the Options tab to 0x30000000, fill in 2440init.o in Object/Symbol under the Layout tab (the target file of the initialization code, such as the initialization code is 2440init.s, and 2440init.o is generated after compilation), fill in Init in Section (at the entrance of the main function in 2440init.s, a read-only code segment named Init is defined by AREA), the ARM Linker setting is completed, and the set parameters are listed in Equivalent Command Line; select Plain binary in the output format of the executable file under ARM fromELF.


7. System code analysis


2440init.s: system initialization code, setting the system working mode, initializing the stack and interrupt vector table, configuring the storage controller, specifying the entry address of the function, etc.


2440slib.s: Mainly initializes MMU


2440lib.c: some system functions, Delay function is a millisecond delay function, some system clock functions


2440lib.h


2440addr.h: defines all registers, interrupt request flags


def.h: defines data types and commonly used Size values


Uart.c: Function definitions related to the serial port


uart.h


Reference address:Embedded Hardware---Use of ADS tools and establishment of hardware debugging environment

Previous article:Causes and solutions for WinCE startup failure
Next article:Embedded laser ranging system solution based on μC/OS-II

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号