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
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
MODE;Sbit mode_7 = mode^7;Sbit mode_6 = mode^6;Sbit mode_5 = mode^5;Sbit mode_4 = mode^4;Sbit mode_3 = mode^3;Sbit mode_2 = mode^2;Sbit mode_1 = mode^1;Sbit mode_0 = mode^0;A 8 bit variable mode_n is defined.This is the special data type that defines the statement, KEILC. Remember, it must be sbit.Cannot bit mode_0 = mode^0;Assignment statements If all these C languages are treated as XOR or arithmetic//--------------------------------------------------------------------------------------------
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
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
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
1 # include "usart. H "2 int main () 3 {4 usartmediaconfig (); // serial port initialization, the following information is printed through the serial port 5 printf (" char: % d \ r \ n ", sizeof (char); 6 printf ("unsigned char: % d \ r \ n", sizeof (unsigned char); 7 printf ("short: % d \ r \ n ", sizeof (short); 8 printf (" unsigned short: % d \ r \ n ", sizeof (unsigned short )); 9 printf ("int: % d \ r \ n", sizeof (INT); 10 printf ("unsigned INT: % d \ r \ n ", sizeof (unsigned INT); 11 pri
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
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.