ARM architecture and assembly 100 question (2)

Source: Internet
Author: User

Chapter 2 compiler and language

14th Q:
Q: 00254: What is the error message of unimplemented RDI? It indicates that the connection settings are normal. Is the chip burned?
A: It is a JTAG problem. You can try ISP first. If ISP is available, it indicates that the LPC2104 is not damaged and the program can run normally.

15th Q:
Q: When I debug the program, the following message is displayed in axd: RDI warning 00159: cocould not open specified device port. I set it according to the steps in the relevant tutorial.
A: Follow the CD \ easyarm_drive \ readme.txt to install the driver.

16th Q:
Q: The following information is frequently displayed when I use an experiment program! The program cannot be downloaded to the target board.
Warnning! Interrupt vectors data is not correct!
Program you downloaded can not run freely!
A: 1. The simulator must be correctly configured. That is, select "erase flash when need" in "Flash" in the "easyarm configuration" window ";
2. The sum of the vector table values is 0;
3. You can first debug a program (run) in Ram, then stop, and then use file-> load image... to load the debugging file to be downloaded to flash.

17th Q:
Q: Can I debug UCOS-II-based programs in ads?
A: ads software debugging can only debug the ARM kernel, but cannot debug peripherals. however, after the PLL lock detection is canceled, You can debug the Task Switch to the idle task. software Simulation is the best tool to start porting.

18th Q:
Q: What is the armulate software? Isn't easyjtag. dll used for simulation?
A: software simulation can only simulate arm cores.

19th Q:
Q: What is the issue about lpc2106.inc. I cannot reference the lpc2106.inc file in the project, but can only reference the lpc2106.h file. What is the reason? When my main program is compiled in assembly, I cannot reference the lpc2106.h file, but I do not

Add method to project. How can I set the assembler?
A: You don't need to add 2106. Inc. As long as the file is in your project folder, you can add it directly at the beginning of the assembler.
"Include 2106.inc ".
Note: This file is the header file defined in the Assembly file and defines internal registers.

20th Q:
Q: What does the entry point mean when I port the UCOS-II on the lpc2106, I always prompt image does not have an entry point every time make, but I put the vetctors of the disc. s copied and looked at it carefully,

Entery has been declared. What is going on?
A: You need to set the entry in ads.

21st Q:
Q: How can I define a variable not initialized?
A: Let the compiler not know the memory address.
A: If Ram is allocated by means of Distributed File loading, a part of Ram is intentionally reserved and is not allocated, it is used to store things you do not need to initialize. or do not call the startup Code provided by the compiler, but it may be difficult to program.

22nd Q:
Q: I directly downloaded the ext1_test program of easyarm to the arm through the JTAG port. The interrupt vector warning is displayed: interrupt vector is not correct arm is not running freely. the chip cannot run after the reset.

However, after downloading through the serial port, the chip will work normally and interrupt. in addition, if I use JTAG for simulation, the chip will work normally and interrupt, but the JTAG port cannot be downloaded. I don't know why.
A: You can set erase flash when need in the simulator configuration as follows:
1. You can open a project and debug it in Ram;
2. Stop program;
3. Use File-> load image... Reload the *. axf file generated by ext1_test.
Q: I set erase flash when need in the simulator configuration. But as you said, isn't it debugging in Ram?
I can debug it in Ram, but after downloading the file, interrupt vector data is not correct appears. I have read several more articles. Is it related to the accumulation and non-zero of the interrupt vector table?
A: Yes. It is the sum and not zero of the vector tables.
If the table can be downloaded and run using ISP, the sum and number of tables are zero. However, if the table cannot be downloaded using JTAG, the Code cannot be downloaded normally. debug the program in Ram to download the program to flash.

23rd Q:
Q: How to Use scatter to locate a function or file somewhere in flash?
A: Refer to http://www.zlgmcu.com/download/downs.asp id = 1009

 
24th Q:
Q: I encountered the following prompt during simulation: error, Flash is protected by user configation! How can I write it into flash?
A: See appendix 1 of "Basic and practice of ARM microcontroller.

25th Q:
Q: I think of two problems in the porting experiment:
1. What are the differences between debug, release, and debugrel? Why do we need to use release for 2104 porting experiments?
2. Why do I set RW base to 0x40000040 in release? I set it to 0x40003000. Why cannot I work?
A: They are all just a problem. The memory space is used because running the OS requires a relatively large memory space, so it is necessary to free up some space.

26th Q:
Q: Does the ARM chip without MMU support dynamic memory allocation using the malloc () function?
A: whether the malloc () function is supported has little to do with the chip, mainly related to the compiler.
Q: What if no operating system is supported?
A: Yes.

27th Q:
Q: In the I2C experiment program, how can I view the value of databuf in the data buffer?
A: Watch the window or mouse over the variable name to be viewed.
Q: What I query is the value written into the databuf buffer. If you place the cursor on it, no value is displayed. Even if you add it to watch, the result is "name not found ".
A: The variable is optimized. You can define it as a global variable during debugging.

28th Q:
Q: The simulation software and the 2104 Development Board cannot connect to DBE warning 00041 :! An unspecified debug toolbox call failed power supply is connected to the Development Board. The error is the same as that of the Development Board. The driver is also installed. Press the OK key during installation.

The software has been responding for a long time. Please help.
A: 1. Whether the parallel port is normal
2. Try it in another operating system (such as 98) or in another connected pc.

29th Q:
Q: How to generate a 32-bit HEX file? I set it to Intel 32bit hex in release setting-> arm fromelf-> output format, but it seems that no HEX file is generated.
A: Try this method:
Target --> Target Setting --> select "arm fromelf" in post link and add the above settings.

30th Q:
Q: What is R0 base RW base in settings?
A: RO: Read Only, RW: read and write.

31st Q:
Q: What is the first line of information after compilation, code, R0 data, RW data, Zi data, and debug?
A: R0 read-only segment, that is, the program code space;
RW read/write segments, that is, data variable space;
Zi clears the variable segment, that is, the space of the initialized data variable needs to be cleared.

32nd Q:
Q: How can I view the execution of tasks in ads, such as stacks.
A: Stack, memory, and other information in a multi-task environment can be implemented only after software debugging is supported. A statistical function module in UCOS can indirectly implement some functions.

33rd Q:
Q: Could you tell me why exceeds flash limitation occurs when you burn data to flash!
A: The Flash address to be written exceeds the range. If the code is not too large, check whether the SCF file is correct.

34th Q:
Q: How to locate the absolute address of an array in a chip such as lpc2214, for example, the use of 51 _.
A: * (char *) 0x40000300) Similar access
Q: Thank you, but you do not need to define the array variables in this way, and the access is inconvenient. Are there any tips?
A: You can use distributed loading.

35th Q:
Q: How can I solve the ads compilation error "l6221e: Execution region er_ro overlays with execution regioner_zi "?
A: Please try using the Engineering Template on our website. The biggest possibility is that your release or debug options are not correctly set, according to the settings described in "ARM microcontroller basics and practices", this question does not exist.
Question.

36th Q:
Q: I would like to ask: writing the program into flash, and then debugging and writing the program in JTAG mode, and then resetting the program does not reflect anything. I read many previous posts and said that the memmap register should be 1. I used a very simple example of controlling the LED and changed the parameters.

I wrote flash later. I cannot find the memmap register operation part in the vectors of this program. What is the problem? What should I do?
A: The appendix in "Basic and practice of ARM microcontroller" contains "FAQ", which lists the reasons why flash cannot be run. the memmap operation can be performed at the target. add in the targetresetinit () function in C.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.