The attachment shows the production method and the lcd1602 example, which includes video tutorials.
Keil CLib file generation method
Inclusion relationship
Lcd1602.cIncluding lcd1602.h
Lcd1602.hFile Format
Set to generate lib File
LIBFile call
Add lib file dialog box
Added lib File
Haha ^ _ ^. In this way, you can delete the file lcd16
has been using Keil to write some of the microcontroller program, but has not done some optimization of the project structure, and sometimes open the project after the document structure level more complex looks very uncomfortable, so here are some of my ideas:First, the structure of the file to be divided into bin Buil_keil include library lst obj source startup such directory, such asThis allows the generated. bin file to be placed down the bin. Wan
The basic steps for debugging the Keil program in internal RAM are already available on the Internet, so I will not repeat them here. You can find a lot on the Internet.
However, sometimes the internal RAM is not enough, so you need to load the program into the external RAM for debugging. In this process, various problems may occur, here, I will summarize some of the problems I have encountered and the areas that need attention, hoping to help you.
I read a lotArticleAnd writes are very simple (actually very simple :)). A detailed tutorial is provided.
1. Use vspd to connect two virtual serial ports on the PC. I connect com2 and com3. Click ADDR pair.
2. We can see that two virtual serial ports are connected together on virtual ports.
3. The virtual serial port is ready. First, you can directly enter the command for debugging. We open the Keil MDK and set it to the simulation m
killed, and only a few useful files are left. the total size is 232kb, much less than before. now, you can package the folder and send it to others, which can save a lot of traffic. it can also save space on your hard disk.What's amazing about. bat? You can use a text tool to open it as needed. BAT file, add or delete some statements in it to suit you. of course, the premise is that you are right. BAT must have a little understanding. specific Learning,HereFor more information, see. the flexibl
"Reference url" http://www.openedv.com/posts/list/600.htm
1. Use. bat (Batch) file can be used to delete Keil compiled generated useless files, reduce the volume of the project disk, easy to talk about the project to the collaborators.
2. The unused file storage directory compiled by the program has been set to the Obj folder. When compiled, you will find that there are several files in the obj directory, about 100 files, occupying space will be nea
After the project is successfully compiled in Keil, the following message is printed in the Bulid ouput window below:Program size:code=6320 ro-data=4864 rw-data=44 zi-data=1636The meaning of the representative:Code: The size of the bytes in the programRo-data: Instruction and constant size defined in the program (Personal understanding: Read only)Rw-data: The variable size initialized in the program (Personal Understanding ": read/write)Zi-data: Unini
STM32 Keil Software Setup program write start address selection
STM32 Series MCU, here take CORTEX-M4 as an example, when we debug online, we usually set the program to write the start address and size. This size is typically 0x08000000, which is the mapping address of the internal flash. But some products start from 0x08020000, which is why. is because in the 0x08000000-0x08020000 this space is the boot program, that is, the boot program is stored f
Fixed repeated variable definitions when multiple files are created in Keil
Extern is used in many places in the C/C ++ language. However, if you do not really understand its meaning, it will bring a lot of trouble to programming, let's explain it in detail.
For small programs, there is usually only one C file and one head file. We usually define global variables directly in the C file and add int I Definitions before the program. If you want to de
51655502Https://mp.weixin.qq.com/s/CSUa4zegzz8JWr0dtaaqQAThe relationship between a space, a project, a goal:Multiple projects under one workspace (different MCU for Master and slave), with multiple versions (simple and complex) based on different software configurations per projectBuilding a multi-project under the workspace: a project (project file extension) is first added to a multi-project space for unified management. Commissioning requires setting up a project for the active project.Set m
View the number of bytes occupied by the Keil MDK-ARM for various data types
1. Define several variables to store the number of bytes of each data type.
Unsigned char a, B, c, d, e, f, g;
Main ()
{
A = sizeof (char );
B = sizeof (short INT );
C = sizeof (INT );
D = sizeof (long );
E = sizeof (long INT );
F = sizeof (float );
G = sizeof (double );
While (1 );
}
2. view the storage address of each variable. View --- symbols window.
3. view the sto
1. put keilkill. put the bat file under the same path as the Project, and double-click keilkill. bat can delete the intermediate files generated by compilation, and then re-compile the files to avoid xxx. _ I class error. Keilkill. bat file 2. The simulation displays *** error65: accessviolationat0x0000000C: noreadpermissi
1. put keilkill. put the bat file under the same path as the Project, and double-click keilkill. bat can delete the intermediate files generated by compilation, and then re-c
Article Source Address: http://blog.sina.com.cn/s/blog_dc9244010102vtn1.htmlRecently in the study of STM32 PWM output, because the hands do not have an oscilloscope, so in accordance with the Wildfire tutorial using software simulation, using MDK5 Logic Analyzer to observe the waveform, the front all the way smoothly, in the logic Analyzer to open the Add Signal, the problem occurred--unknown signal! The signal cannot be added in. In the Baidu Library to see a MDK460 related problems of the solu
change it? So to speak: at any time, you don't need to change startup.a51, if you understand its characteristics. Below is a detailed explanation: 1. Label Idatalen equ 80h ; The length of IDATA memory in bytes. Here Idatalen is just a label, and IDATA is not the same thing! If you want to, this procedure in the idatalen you can change to dog ah, pig ah, playboy ah these markings (in fact, my ideal is the life of pigs, not worry about eating and drinking, carefree, but can not do), The above s
The target configuration diagram for the options for target and the scatter file for the project file.When we modify the address in read/only memory areas and read/write memory areas in target, the address in the scatter file is automatically changed after compiling the project file.To observe the relationship between the two, it is not difficult to find that the starting address and size in the read/only memory areas correspond to the load address of the image file in the scatter file and the s
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
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
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.