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
Transferred from: http://blog.sina.com.cn/s/blog_980e19e00101b5dh.htmlSometimes precise delay is required, such as the 18B20 temperature sensor is very strict in timing requirements and must be accurate to the microsecond levelFirst, with the NOP functionIn Keil C51, call the library function directly:#include//declared void _nop_ (void);_nop_ (); Produce a NOP instructionFunction: For the delay is very short, requirements in the US level, the use of
Recently in doing STM32F4 test development, use to keil,mdk512,mdk514,mdk520 ... Uh, uh, all kinds of entanglements, okay, it's all sorted out, share your experience here.Start Download installation package next-> All the way, no need to modify anything.In the configuration of the appropriate hardware pack package, the different MDK version of the pack package may be installed after the error, you should note. Generally MDK5.12 corresponds to 2.7.0 Th
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
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
using the car later, you can only weld the "Bracket" at the bottom and then install it on the cave board like this:
Operating System Selection
The initial consideration is uC/OS-II. It is very famous (often seen) and has strong functions (sounds like it), and the operating system is also introduced in the books I bought.
The US/OS-II Job Scheduling is a fully preemptible Job Scheduling Method Based on the job priority, the low-priority job being executed can be interrupted by a high-pr
Original address: http://blog.csdn.net/yannanxiu/article/details/52438351
Overview
We will need to print debugging information when we are developing C/d, we are accustomed to use printf function when we print debugging information, but in Keil C51 environment, because our program is downloaded to SCM, we can not directly print to the serial port when using printf function. This time, we need to redirect the output of the printf function. redirect
Keil Download the program sometimes "The connected Emulor is a J-link clone" problem, which means that the identification of the jlink of piracy, should be a new version of the Jlink appear.
My method solves this problem by replacing the file. Replace the folder directly.
Replace the folder is E:\Program files\keil\arm path under the Segger file, replace the file link under, directly delete the original S
language programming.The raw data collected by the forward channel in the real-time control system are mostly fixed-point integers, such as the conversion result of A/D converter of the forward analog channel, the counting result of timer/counter, etc., are fixed-point integers. And the system of the back channel can accept the input amount is an integer, that is, the finite word error caused by quantization is unavoidable, the precision of the control of the decimal place is not accepted by th
Keil and MDK coexist, follow these steps:1 Install Keil C51 First, install directory to: "D:\Keil51" (I was installed on the D drive)2 Reinstall RealView MDK, directory: "D:\Keilarm"3 Copy the C51 folder under Keil51 to Keilarm4 Copy and paste all the files under Keil51 under UV4 (or UV3) to the UV4 folder under Keilarm, note that if promptedDuplicate files, whether overwritten, are selected No, that is, do
In modular programming, it is essential to set up a separate header file for a module.In the two mainstream compilers, it is important to set the accuracy of the file path when referencing the module function, including the path to the header file.Otherwise, the compiler will error, unable to open such a header file!Combined with your own experience, summarize how to set the file inclusion path under these two compilations:The first is the construction of the project, in the actual project folde
Keil software DownloadKeil Uvision4 and Registration machine http://www.liangchan.net/soft/softdown.asp?softid=5688Separate registration Machine http://www.newasp.net/soft/77176.htmlRegisteredKeil registry entry for the License Manager entry for the File menuCopy the CID number to the keygen, multiple generate several times, input window, must appear similar to ' Expires 2020 ' wordsSet up a project and debug to test if the registration is successful
Goal:On the stm32f429 disco Development Board, double-flashing LEDs are lit with freertos dual threads.Get ready:0. Stm32f429i-disco1. Keil ARMMDK 5.132. STM32CUBEMX 4.8Steps:1. Establishment of the projectKeil-project-new Project2. Save on the hard drive, give the project a name3. Save the ProjectAt the same time, the device selection interface is ejected, select STM32F429ZITX4. Above the interface point OK after the run environment Configuration int
Source: Keil c51 internal RAM (idata) dynamic memory management ProgramThe procedure is relatively simple, but the feeling is more interesting, the individual thinks has the certain application value, hoped everybody has the better thought and the method, promotes mutually.The basic idea of the program is that in the Ram area above the CPU stack pointer sp, by moving the stack pointer sp up to a few bytes, the vacated Ram area is available to the user
Today, Proteus and Keil uversion3 are online successfully.Program, Drew a simple circuit on Proteus and ran it to see the effect. Indulge in it ~
Below are the programs I wrote in Keil.
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> # Include Reg52.h > # Include Intrins. h > # Define Uint unsigned int # Define Uchar unsigned
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.