began to learn C51, do not know how long to persist, before learning a period of time, after learning P1 mouth did not learn, before learning all forget.1. Use Keil to build the project: Open Keil4. Load c file into the projectthen expand "Source Group1" and you'll seelesson2_1.c loaded in, write a little code in, light the first LED light.1 #include 2 sbit p1_1 = p1^0; 3 void Main () 4 {5 0 ; 6 while (1); 7 },
I tried to port the STM Keil project to IAR several times. Fortunately, all of them succeeded. Here I will write down the notes during the porting process...
The first step is to first create a project folder PWM, and then create several subfolders in the folder: User, Inc, and startup. Of course, we have to copy the official library directory of STM, so there are four folders under the project directory (in fact, creating a few folders is random, jus
Keil C51 is a compiler compatible with ansi c. The ansi c Specification specifies that the default data types of decimal Integer constants are int, long int, and unsigned long Int, which of the given constants depends on the actual size of the constant. If the constant is between-32768 and ~ Between 32767 and are processed by the int type. If the processing by the int type overflows, consider the long Int or larger data type unsigned long Int. In shor
Label: Style Color Io use AR for strong data spHow to Reduce the code compilation size of Keil-C: (reduce by optimizing the code)
1.1 perform less multiplication and division operations, and use left/right shift to realize multiplication and division
Eg, common: a = 0x80*4;
Optimization: a = 0x80
1.2 use the short type instead of the long type without affecting the operation
Eg, common: int;
Optimized: Char;
1.3 Use unsigned data whenever possible
Eg
Putchar in Keil C, take 8051 as an instance, putcharkeilIn Keil C, it is necessary to implement char putchar (char c), or the powerful function printf wocould not work.We shoshould notice in here: new line command for serial output be "\ r \ n" (line feed: LF, 0x0a + carriage return: CR, 0x0d ), not only "\ n" in Keil C.I do not want to write too much tedious wor
I installed analyticdb in windows. It was a headache. I had to use it in compatibility mode. Even if this happens, there is a problem with jlink. I had no choice but to give up ads, but I had a lot of materials to develop with ads. Finally, I tried to use Keil and searched the internet for the information. I found that some people did the same thing. So I tried to find out what they did, but it was not a success. Finally, I had to wait for a while to
Follow the Keil for ARM tutorial to create a project, write the main function, and operate gpio,ProgramThere is no problem with compilation after writing,
"At91sam7x. axf"-0 error (s), 0 warning (s ).
Set debug to jlink. When the program is downloaded to flash,
The following error is prompted when the out window of Keil is displayed: No algorithm found for: 00100000 H-001004e7h.
Very depressing. Why not
Tags: blog HTTP Io ar OS SP file data
You can view the virtual debugging information of the serial port in Keil through view-serial windows-# usart1/2/3/4/debug (printf. Of course, you can also use the virtual serial port vspd + Serial Port debugging Assistant in the external implementation, the method is as follows:
Procedure
1. Download the virtual serial port software and the virtual two connected serial ports Coma/comb. These two serial port
The Keil uvision (MDK v4.7) was run on Ubuntu 12.04LTS a few days ago. The process is also smooth, sharing the next steps to the needs of friends.
A screenshot of the previous installation (I'm using the old-fashioned Gnome classic interface) to see Keil uVision4 in the Wine menu.
In fact, using wine (HTTP://BAIKE.BAIDU.COM/LINK?URL=8TJGR-T30E9PQ-H4MOY_55BL__W8HDLNIKYPZD9M8G7WYFTIJL-S3S4LIGGBA_MJ) to ins
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
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.