What are the common mistakes about ADS?

Publisher:玉立风华Latest update time:2020-09-02 Source: elecfansKeywords:ADS  ARM  Edit Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Create a project, edit source files, add files to the project, set project properties, compile and link options, make!

Error : A1163E: Unknown opcode

vector.s line 14

14 00000020 Reset_Addr DCD Reset_Handler

。。。

The people of the country were shocked again, and the people of the world were dumbfounded. . .

I really edited the code in CodeWarrior of ADS this time~! Why! ? Why doesn't armassembler recognize DCD again?

What are the common mistakes about ADS?

I checked each letter one by one and found no errors. I pressed Enter once before and after the error code to ensure that the line breaks were correct, but it still reported an error. . . . I removed the Tab symbol in front of the pseudo-operation statement Reset_Addr DCD Reset_Handler, and it was amazing! ! It no longer reported an error~ ! ! Could it be that the Tab key was causing trouble last time, and I wrongly blamed the vim editor?

ADS used its stubbornness to prove once again to the ugly man with low self-esteem and the proud silly girl: What's the point of looking good? You can't eat it~!

天,我在语句前面加一个Tab符号,不过是想代码看起来整齐些,难道爱美也有错嘛~没有规矩,不成方圆,当兵就得有当兵的样,部队就有部队的规矩,要不去当文艺兵得了————写代码就是让代码去当兵,个个理成平头一个样,还谈啥好看哩~想不到,有些时候Tab也是不能乱加的,想让代码整齐清楚的一些小动作,到了ADS这里竟也成了壞習慣了~!

You don't have to tell me, the armassembler/compiler/linker of ADS is sometimes weird, and it always makes some errors that only machines can understand! Why not make a development environment to let the machine do the coding~! Look at this code:

MCR P15, 0, R1, C1, C0, 0

Is it wrong? It's a very simple instruction to write coprocessor CP15 register 1. The syntax and spelling are correct! If ADS reports an error to you, are you crazy? It actually reports an error!

Error :A1151E: Bad register name symbol

boot.s line 107

Fortunately, I have a strong psychological endurance and found this error that is invisible to the naked eye before I went crazy: just represent P15, C1, and C0 with lowercase letters!

MCR p15, 0, R1, c1, c0, 0 ;correct now

At this point, people all over the world couldn't help but give ADS a thumbs up in their hearts.

It turns out that all coprocessor register symbols must be represented by lowercase letters~! My God! What a ***ing world!

Oh, I encountered a new problem! I mentioned earlier that some pseudo-operation statements do not need TAB in front of them, but some pseudo-operations (directionsThere must be a tab or space before TI ve! Don't believe it? Try writing AREA and its corresponding END statement at the top? ADS will give you an error! There must also be a tab or space before EXPORT/IMPORT!

When using ADS1.2, for assembly files, such as initialization init.s, a "TAB" or space must be added before each statement, otherwise an "unkown opcode" error will occur.

If you encounter this kind of problem, you can try the following methods:

1. Remove the TAB in front of the statement or try it (some pseudo operations such as DCD and EQU statements cannot have a TAB symbol before them);

2. Try adding a space or Tab symbol before the statement (it is known that there must be a space or Tab symbol before AREA, END, EXPORT/IMPORT);

3. Change uppercase letters to lowercase letters (it is known that coprocessors and coprocessor registers must be represented by lowercase letters);

4. TAB for space or space for TAB and other methods.

Comments in assembly begin with ; and in C or C++ begin with //

--------------------------------------------------

Under ADS, __main() is an internal library function of C language, which completes the initialization of internal RAM before entering the user main().

-------------------------

Since ARM uses a three-stage pipeline structure, when SWI and undefined instruction exception interrupts occur, the value of the program counter PC has not been updated, and it points to the second instruction after the current instruction (for ARM instructions, it points to the current instruction address plus 8 bytes; for Thumb instructions, it points to the current instruction address plus 4 bytes). This is why when SWI and undefined instruction exception interrupts occur, the processor saves (PC-4) to the register lr_mode in the exception mode, and then (PC-4) points to the next instruction after the current instruction.

Keywords:ADS  ARM  Edit Reference address:What are the common mistakes about ADS?

Previous article:How many coprocessors does ARM have? Detailed explanation of ARM coprocessors
Next article:In-depth understanding of ARM architecture basics

Recommended ReadingLatest update time:2024-11-16 12:45

ARM Assembly Programming Basics 5 - Use of ADS Development Environment
After mastering the basic assembly instructions and pseudo-operations, you will have the basic theoretical ability to write simple ARM assembly programs. However, to obtain real executable programs in actual combat, you also need the support of a development environment (command line compiler or IDE) that can edit and
[Microcontroller]
ARM interrupt architecture
Seven modes of operation of ARM architecture CPU User mode (usr): the normal program execution state of the ARM processor System mode (sys): runs privileged operating system tasks Management mode (svc): protection mode used by the operating system Interrupt mode (irq): used for general interrupt processing Fast interr
[Microcontroller]
A brief discussion on the determining factors of different performance of ARM core MCU
This article briefly describes the main factors that determine the performance and power consumption of ARM core MCUs.   After ARM launched the Cortex-M0+ core, its 32-bit MCU cores increased to 4. Not long ago, NXP also announced that it had obtained the Cortex-M0+ processor license, becoming the only semiconductor
[Analog Electronics]
A brief discussion on the determining factors of different performance of ARM core MCU
Network-on-chip system hardware platform based on FPGA and ARM9
 The development of IC manufacturing technology is driving the chip towards higher integration, so that the entire system can be designed into a single chip to form a system on chip (SoC). SoC adopts a global synchronous shared bus communication structure. Due to the exclusivity of the devices hanging on the bus during
[Microcontroller]
Network-on-chip system hardware platform based on FPGA and ARM9
Embedded Digital Image Processing System Based on ARM
introduction In the process of studying remote digital image processing and transmission, it is necessary to perform image processing at the remote site. This paper proposes an embedded digital image processing system that integrates image acquisition, processing and display. The target image is acquired through the i
[Microcontroller]
Embedded Digital Image Processing System Based on ARM
Quickly learn Arm (42)--External memory controller (3)
Let's look at an example of EMC timing settings:    EMCStaticConfig0=0x0; //Disable page mode    EMCStaticWaitWen0=0x0; //Write enable delay is 1cclk    EMCStaticWaitWr0=0x1F; //Delay 33cclk write    EMCStaticWaitOen0=0x0; //Output enable delay is 1cclk    EMCStaticWaitRd0=0x1F; //Delay is 33cclk read    EMCStaticWait
[Microcontroller]
Introduction to ARM processors
The concept of ARM ARM (Advanced RISC Machine) can be considered as the name of a company, a general term for a type of microprocessor, or the name of a technology. ARM does not manufacture or sell chips, it only sells chip technology licenses. Its partner companies match various hardware components, such as UART, SD
[Microcontroller]
Introduction to ARM processors
ARM TCM (Tightly Coupled Memory) Memory--Introduction
1 Introduction TCM : Tightly Coupled Memory In order to compensate for the uncertainty of cache access, OnChip Memory is added. Some CPUs contain separate Instruction TCM / Data TCM. TCM is included in the memory address map space and can be accessed as fast memory. TCM uses physical addresses, and write acces
[Microcontroller]
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号