too complex, after a long time, they are not easy to read, not conducive to future maintenance.
7. functionFor a function in a program, the type of the function should be described before it is used, and the description of the function type must ensure that it is consistent with the type of function originally defined, with a "void" description for functions with no parameters and no return value type. If you need to shorten the length of your code, you can define some of the common program se
Comparison between Openjtag and Jlink:
Same point: Both USB to JTAG, USB to serial port function
Difference:
1. Operating system:
Openjtag can be used in Windows, Linux;
Jlink can only be used under Windows, under Linux its debugging function can not be used, can only use "JLINK+USB to serial 2 in 1" in the USB to serial port function
2. Integrated development Environment:
Openjtag can be used on all tools that support the GDB debug protocol, such as IAR, Eclipse, winarm, and cannot be use
Sep readme.txt
drwx------ 4 pi pi 4096 Sep 04:17 Source
Demo: Demo RoutinesLicense: Licensing InformationSource: Real-time kernel file
# ls-l freertos/source/Total
352
-rwx------ 1 pi pi 15771 may croutine.c
- rwx------ 1 pi pi 26251 event_groups.c
drwx------ 2 pi pi 4096 Sep 04:17 Inc Lude
-rwx------ 1 pi pi 10993 may list.c
drwx------pi pi 4096 Sep 04:17 Porta ble
-rwx------ 1 pi pi 83729 queue.c
-rwx------ 1 pi pi 822 Sep Readme.txt
-rwx------ 1 pi pi 157816 may
openjtag+eclipse 3.5+gdb+mini2440 Graphic Tutorial comparison between Openjtag and Jlink:Same point: Both USB to JTAG, USB to serial port functionDifference:1. Operating system:Openjtag can be used in Windows, Linux;Jlink can only be used under Windows, under Linux its debugging function can not be used, can only use "JLINK+USB to serial 2 in 1" in the USB to serial port function2. Integrated development Environment:Openjtag can be used on all tools that support the GDB debug protocol, such as I
;Int u32value3;} Asamplestructor;
In the preceding example, the size value is 13, indicating that the total length of the structure is 13 bytes after the 1-byte alignment. After the _ packed alignment is removed, it is 16 bytes.
Five alignment-related definitions that can run in a VC environment or an arm (Keil) environment at any time
We often take the code on the embedded platform to the PC environment for testing. The difference in the environm
(1) Open the main interface of keilmdk and you will see a default project in the project. Click the project name and select project> close project to close the project! In this way, the entire MDK is empty. Next we will create our project template.
(2) Before creating a project, we recommend that you create a directory under a directory on your computer. All the projects created later can be placed under this directory. Here, we create a directory named development code.
(3) Click the "project"
Results of the selected data segments overlap, resulting in confusion. Simply put, a digital tube shows the overlapping effect of the characters to be displayed in the previous position and the characters to be displayed. To avoid "drag-and-drop", you must disable each digital tube after it is displayed. What can we add? "P2 = 0xff;", so that all digital tubes will not be selected, and the next digit will not be affected when it is displayed again. This is called "Shadow elimination ". Let's ch
Overview:
Yesterday, Keil, the firmware development environment, was basically completed, and the INC and Lib provided by suite 3.4.7 were added using the c file of the random firmware program ccd1, the Hex file is slightly smaller than the Hex file attached to ccd1. (Not fit: The old fx2regs. the hfile does not define every bit of the port ABCD (E cannot be accessed by bit), so the txmaster of ccd1. the beginning of the C file is defined in the form
Results of the selected data segments overlap, resulting in confusion. Simply put, a digital tube shows the overlapping effect of the characters to be displayed in the previous position and the characters to be displayed. To avoid "drag-and-drop", you must disable each digital tube after it is displayed. We can add "p2 = 0xff;" so that no digital tube is selected, the next digit will not be affected when it is displayed again. This is called "shadow ". Let's change the program to the following:
space
Start:
Loop: mov P0, # 11110011b; what is the role of the two statements? Let the lights of the east place shine on the north and south
Acall dtime
MoV r0, #5; What are the functions of these statements? Make things yellow, North and South Red
Loop1:
MoV P0, # 0f5h
Acall dtime1
MoV P0, # 0f7h
Acall dtime1
Djnz r0, loop1
MoV P0, # 0deh; North-South green light, East-West red light
Acall dtime
MoV r0, #5
Loop2: mov P0, # 0eeh; flashing yellow light in north and
Excerpt from Baidu LibraryEach writing a program, always inseparable from the application of data, in learning C51 language in the process of mastering the understanding of data types is also very important. Looking at table 3-1, the table lists the data types supported by the KEIL UVision2 microcontroller C language compiler. The basic data types in standard C are char,int,short,long,float and double, whereas in the C51 compiler the int and short are
First contact with the microcontroller, my first experiment: let the microcontroller on the 4th led lit up.Step one: Create a new Keil folder on the desktopStep two: Open Keil uVision4,Step three: Create a new project fileStep four: This will bring up the interfaceClick on Atmel to select At89c51Five: Click File->new and save to create a. c fileSix: Start compilingRemember to save the file after compiling a
interrupt arrives, the internal hardware mechanism of STM32 automatically positions the PC pointer to the interrupt vector table, the interrupt service program is executed based on the interrupt vector retrieved from the interrupt source.
IAP function design:
There are two programs to write the IAP function, one is the IAP (and BOOT) project, and the other is the APP project. The IAP is designed to be placed in the 0x80000000 -- 0x80002000 area of the Internal FLASH of STM32. The size of the IA
reduces the number of statements used without judgment.
6. ExpressionsParentheses should be used to specify the priority of operations in an expression that are not clear or confusing. An expression cannot be written too complex. If the expression is too complex, it will not be easy to understand after a long time, which is not conducive to future maintenance.
7. FunctionsBefore using a function in a program, you should describe the function type. The description of the function type must be co
Ram is the data space used to store random variables in the program running. The default internal RAM of 51 single-chip microcomputer is only 128 bytes, and the number of 52 single-chip microcomputer is increased to 256 bytes, and the number of 52 single-chip microcomputer is increased to 512 bytes, for programmers, the more ram a chip has, the easier it is to write programs, I don't always think that Ram is not enough, but I am worried that too many variables cannot be defined.As we mentioned b
/*--------------------------------------------------------------------------LIMITS. HANSI standard include file.Copyright (c) 1988-2008 Keil Elektronik GmbH and Keil Software, Inc.Copyright (c), ARM Germany GmbHAll rights reserved.--------------------------------------------------------------------------*/#ifndef __limits_h__#define __limits_h__#define CHAR_BIT 8/* Number of bits in any "CHAR" */#define CHA
SDRAM program, how to set the program loading section by the distributed loading file, refer to my other blog post Keil MDK use J-link respectively in Sram,nor The principle and method of debugging code in Flash and SDRAM, this paper introduces the principle and method of setting up the loading position of RO, RW, Stack, Heap and so on. The implementation of the program is also very simple, no longer repeat. Init.bin MDK Engineering downloads are ava
the Keil integration environment.2) The executable file in the Keil binary tool (similar to GCC objcopy) explained in 1). Extract the code and data to generate the loaded address. Hex format file. Remember to load the address instead of the execution address.3) Burn write. Hex file data to nor flash. It is based on the loading address in the file. Generally speaking. The load address and execution address
, just the opposite. The X86 structure we commonly use is the small-end mode, while the Keil C51 is the big-endian mode. Many of the arm,dsp are in the small-end mode.Some arm processors can also be hardware to choose between big-endian or small-end mode. The following code can be used to test whether your compiler is big-endian or small-end mode: short int x;Char x0,x1;x=0x1122;X0= ((char*) x) [0]; Low address unitX1= ((char*) x) [1]; High address Un
want to see the system Text Editor ugly of a tab eight space?4, IDE many difficult to unify? Web development of notepad++, Sublime, Dreamweaver, Phpstorm, Hbuilder, Microsoft vc++6.0, VS20XX, embedded development Keil C51, Keil MDK, There are a bunch of eclipse skins of the various Ides (Eclipse, Zendstudio, etc.) I have used, but have not seen a default is not a tab four spaces.5, the code paste to the on
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.