Notes:
(1) How do I disable Keil from initializing zero Ram?
1. Hook in Keil noinit
2.
Int test1 = 1;
_ Attribute _ (zero_init) int Test2;
Int test3 _ at (0x20001000 );
View Map Files
Test1 0x20000000 data 4 main. O (. Data)Test2 0x2000000c data 4 main. O (. BSS)Test3 0x20001000 data 4 main. O (. Arm. _ at_0x20001000)
(2) How can I determine whether it is a soft reset or a power-on reset for stm32?
Flag
Today, I wrote a 51 program. during compilation, Keil always prompts that a semicolon was lost, but I couldn't find out where the semicolon was lost. It took me one afternoon to solve the problem, share your experience here to prevent others from making the same mistake! The prompt message is:
Lcd12864.h (20): Error c129: Missing '; 'before' flag'
The u8 flag I defined in the lcd12864.c file is 0;
Make this statement in the lcd12864.h file: extern u8
After work, I switched from a single-chip computer to an arm. At the beginning, I used the ads1.2 compiler for a while, because the old program I took over was compiled using ads, and most departments were using it. when learning SCM, we use the Keil C51 compiler. ads and this compiler cannot be compared in terms of ease of use. later, we gradually learned that Keil has been acquired by arm, and now
Problem description: Use the Keil C51 compiling environment with a font LCD. some Chinese characters cannot be displayed when such a statement is used: uchar code coun_show1 [] = {"Please enter the first operand"}; the number of Chinese characters will not be displayed, replace the preceding Chinese characters with simplified Chinese encoding, for example, uchar code coun_show1 [] = {0xc7, 0xeb, 0xca, 0xe4, 0xc8, 0xeb, 0xb5, 0xda, 0xd2, 0xbb, 0xb2, 0x
ClickLink to Keil V3 to add the STC series single-chip microcomputer library file method + header file library
Add a single-chip microcomputer database, you can chooseSTCSingle-Chip Microcomputer, without affecting the use of the original database.
Procedure:
1. Download the STC database for Keil and rename it STC. CDB. Place the files in the folder to the corresponding folder. If there is no STC folde
Keil compiles the project. If microlib is used, you can use malloc. A heap management module is located inside the micro-database.The memory size of the chip is fixed. The memory size is divided into global variables and allocated to the heap and stack. This is a general development method.However, during the development project process, the market encountered various problems. Stack penetration into the heap, or the heap is not large enough, which is
Ⅰ, write in front
This article uses the current (November 2016) Latest version of the Keil (mdk-arm) V5.21A development environment , taking the STM32 processor as an example to tell you about the detailed process of creating a new software engineering.
Keil (Mdk-arm) V4 and V5 new software engineering are basically the same, this article is also suitable for the V4 version of the new software engineering.
This is an external interrupt in the Keil MDK environment.ProgramIt is really convenient to use H-JTAG and MDK for debugging because Keil is used and ADS is not used. This program is just a large framework.
irq_handler proc export irq_handler [Weak] sub LR, LR, #4; Save the return address analytic dB SP !, {R0-R12, LR}; save site LDR r0, = effecffset; Determine the interrupt source LDR r0, [R0] L
It is annoying to install the system each time. The biggest thing is to install a lot of software. Today, I installed all the software again. In the face of Keil, the software that seems not very difficult to install, there was a small problem after the installation, and finally it was solved. Write it out today to prevent you from forgetting it later.
1. Click Install.
2. The installation page appears. click Next.
Completion phase:
Click Ne
Code is the keyword of the Keil C51 extension, and the code-modified variable will beinto the code area. But the const keyword in c also seems to have the function of defining variables that cannot be changed, what is the difference between these two keywords?To find the const in the Help manual, you can find the following description1 Variables declared with the const type qualifier alone is stored in the "Memory Area" (data, Idata, XData, and so on)
After some analysis, Kung fu is not a conscientious, find Global.prop This file, this file is used to save users on the Keil interface and font information such as parameters, If you want to save or share beautiful settings , you can just replace the file. Don't talk nonsense directly The global replica is a backup of the original configurationThis is my configuration, like can save the following code, replace the original global (original directly
Keil upgrade to 4.72 version, Jlink began to prompt firmware upgrade, is very irritable, but look on the internet can be said to replace the previous version of the Segger file to Keil the latest version of the Segger file, it can be used, I tried the next, it really works ha, below to share the operation process.Save the previous 4.6 version of the Segger file, the version using Jlink no problem, Keil6.0 i
Keil program in the basic steps of internal RAM debugging online has been very much, I will not repeat, we can search the Internet very much.But sometimes the internal ram is not enough, this need to load the program into the external Ram debugging, and in this process may have a variety of problems, here I will have some of the problems I have encountered and the need to pay attention to the place to summarize, I hope to be helpful to everyone.The wr
http://blog.csdn.net/men_wen/article/details/52694069The first one:Small experiment of array pointersPassing parameters with pointersResults:The second one:Array pointer experimentDefine a pointer he points to an arrayReplace the parameter passing part of the test function above with thisAfter the change.The input part of the argument will be an errorAddress symbols must be added Third KindFormal parameters: Define an array with pointers all insideThe surest way to pass array parameters under
Keil STM32 C + + mixed programming Essentials
1. The filename must be. CPP and. h2. In the. h file, add the following code:
#ifndef __ledtask_h
#define __LEDTASK_H
#ifdef __cplusplus
extern "C" {
#endif
#include " Stm32_led.h "
void Led1_task (void *pdata);
#ifdef __cplusplus
}
#endif
#endif
3. When calling resources in a. cpp file (such as classes, functions, etc.), that file must also be a. cpp file. Programs in the. cpp file that can in
Keil always appears "File has been changed outside the editor, reload?" Hint, when using Keil sometimes do not know something wrong, always will appear this hint, in fact, this is not a bug knowledge you opened the corresponding **.map file, resulting in each time you compile the file after the file will change, resulting in this hint.
The workaround is to close the map file of the corresponding project fi
The ARM application code needs to load a startup program code before it runs, and the following is an example of the s3c2440 startup code that analyzes the arm's stack settings. If we directly use the Keil in the boot code, maybe sometimes we will smooth through the compilation, and then run, but, sometimes we write code can not be successfully compiled, and our desire to violate. All we have to do at this point is modify our startup code to fit our r
Recently found that the project warning a bit more, good dozens of, a look at the majority of this:
Warning: #1-D: Last line of file ends without a newline
warning: #550-d: Variable "XX" is set but never used
The first my file at the end of a blank line, but it also error, do not know what the reason.Second, some register zeroing action is cleared by reading the value of the register, I define a local variable, then Keil said I defined the usele
Keil will have a line after compiling: program size:code=xxx ro-data=xxx rw-data=xxx zi-data=xxx
Code represents the execution of the codes, and all functions in the program are located here.
Ro-data represents read-only data, and the global constant data and strings defined in the program are located here.
The rw-data represents the initialized read-write data, and the global and static variables defined and initialized in the program are located her
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.