Background: The code accumulated more, everyone may have tried to write a library, convenient to call, my initial approach is to put the usual functions into one. c file inside, to use when you put a. C added to the group inside, this method is very troublesome, each new project will add half a day.Objective: To write some functions into the form of a library file, to the form of a header file function interface, so that other projects can be called directly.1, the new 1
Source: KEIL MDK View Code volume, Ram usage--ro-data, Rw-data, zi-data explanationKEIL RVMDK Post-compilation informationProgram size:code=86496 ro-data=9064 rw-data=1452 zi-data=16116Code is the amount of space that is consumed by the codes;Ro-data is the size of Read only read-only constant, such as const type;Rw-data is the size of the read-write variable that was initialized;Zi-data is the size of a read-write variable (Zero Initialize) that is n
gprs_send_buff[index++]=stdev.sn>>24+ (gprs_send_buff[4]%4);gprs_send_buff[index++]=stdev.sn>>16+ (gprs_send_buff[4]%4);gprs_send_buff[index++]=stdev.sn>>8+ (gprs_send_buff[4]%4);gprs_send_buff[index++]=stdev.sn+ (gprs_send_buff[4]%4);Out of the results always in my unexpected, tossing half an hour to find out, is the algorithm out of the question,Priority judgment exceeded unexpected.Before learning C language when not how to remember the priority, just remind yourself when programming can not
printf in 8.debug.c.#ifdef __gnuc__#definePutchar_prototype int __io_putchar (int ch)/* with gcc/raisonance, small printf (option LD Linker->libraries->small printf set to ' Yes ') calls __io_putchar () */#else #definePutchar_prototype int FPUTC (int ch, FILE *f)#endif/* __gnuc__ */putchar_prototype{BYTE C=(BYTE) ch; if(DEMCR Trcena) { while(Itm_port32 (0) ==0) {} itm_port8 (0) =C; } returnch;}9. Switch to SW mode10. Set the clock according to the processor and open ITM Port 011.
Keil some function keys do not have the default shortcut keys, if commonly used, more convenient approach is to set it into their own habit of shortcut keys.
Here's how to customize shortcut keys:
1. Find the location of the function you want to define, such as I want to define "Comment Selection" annotation Select the target function, find its location:Edit:Advanced:Comment Selection;
2. Select edit:configuration, configuration options;
3. Select
In the Keil installation directory, where there are STDIO.H several print functions are as follows:
extern int printf (const char *, ...);
extern int sprintf (char *, const char *, ...);
extern int vprintf (const char *, char *);
extern int vsprintf (char *, const char *, char *);
vprintf corresponds to printf, which prints the data in ASCII format to the serial port
The vsprintf corresponds to sprintf, which prints the data in ASCII format to
Download Keil MDK5 After the device is not installed, if the creation of the project will not find the target chip, as shown in the following figure:
At this point we will install the chip series we need, such as the STM32F1 series.
First select Project-manage-pack installer as shown in the following figure:
At this point, the following interface appears:
Select Packs in the menu bar, click Check for Updates, the latest supported CPU series
Use MDK to create a stm32f103ze core project yourselfAdd the source code after compiling, normal, online simulation single-step implementation of the following problemsError 65:access violation at 0x40021000:no ' read ' permissionI found a problem with the setup inside Debug.http://www.cnblogs.com/xiaobo-Linux/The main items are the following 2 settingsDialog DLL Default is DCM3.DLLParameter default is-PCM3should readDialog DLL Default is DARMSTM.DLLParameter default is-pstm32f103zeIt's normal.S
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
In actual projects, the Internal flash space of the chip is often insufficient, which requires the program to be installed into the external flash.
In order to avoid detours, I would like to share some of my problems and lessons with you.
For your reference only. If you have any errors, please correct them. Thank you in advance!
Reprinted please indicate the source: blog.csdn.net/waitig1992
Introduction to hardware environment
The chip is lpc1788, and the External Flash is sst39vf1601 (norf
Use the Keil development environment to develop the release L discovery. After firmware is updated, the target board cannot be connected. The error "Internal Command error flash download failed target dll has been can" is returned. Finally, update Keil to 4.60.During use, when the target board chip is in sleep state, the internal command error flash download failed target dll has been can error will also oc
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
Recent contact with the arm chip, learning conditions from the hardware and software are not available. It's hard to wait for the company to solve the problem, in which I basically give up the last fantasy of the company. I think that if you want to master what skills or to contact a little more interesting things, still have to test themselves to invest, efforts. Often, a similar learning infrastructure can be solved on Taobao.
Bought the development Board, and found the
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
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.