This article will build an engineering template based on the Nucleo Development Board and KEIL5.14, consisting of a few parts:1, the establishment of the project template2, the Stlink set and the Forever water lamp1, the establishment of the project template1) before building the project, first set up a folder to store the template files, we call it template。 Then set up 6 subfolders: Doc,libraries,listing,output,project,user, set up cmsis and Fwlib folders in Libraries, set up startup in Cmsis,
=0;//wait for the semaphore#defineWAITSEM (SEM) do{sem=1; WAITX (0); if (sem>0) return 1;} while (0);//wait for semaphore or timer overflow, timer tickets max is 0xFFFE#defineWAITSEMX (sem,tickets) do {sem=tickets+1; WAITX (0); if (sem>1) {sem--; return 1;} } while (0);//Send Signal Volume#defineSENDSEM (SEM) does {sem=0;} while (0);/** * * Small scheduler End *******************************************************/sbit LED1= p2^1; Sbit LED2= p2^2;voidInitT0 () {Tmod=0x21; IE|=0x82;//12ttl0=0Xf
First of all, thank you for your support and attention, and now it is time to edit this article, this article is a very long time I did not know where the copy came,A lot of questions don't know how to solve, now I use Keil for arm.Using Keil and IAR, personal feeling is IAR or very good. Is:Http://files.iar.com/ftp/pub/box/CD-EWARM-6301-3142.zip V6.30.1 (the address looks like the IAR site, I do not know i
During this period of time, I used nrf9e5 for Wireless Development. the most annoying thing was debugging. The lack of effective debugging methods led to slow progress. At the beginning, I had to observe three LED lights to judge the progress.
ProgramThe running location. Later, I connected to the serial port. I wrote data to the serial port and received the data on the PC. The debugging information is more, which is equivalent to debugging with the printf method. but it's still too slow !! Esp
1,Compile Wei Dongshan's bare board in Keil uvision4ProgramWill prompt an error:
Build target 'target 1'Linking...Key_led.axf: Error: l6218e: Undefined symbol image $ rw_ram1 $ RW $ length (Referred From S3C2440. O ).Target not created
The reason is that rom1 in Read/only and ram1 in read/write are not configured in target (the two options correspond toCodeThe storage location in the chip) can be configured as follows:
Then compile the connec
the first letter of the two people, a, V, and A, which is not officially recognized by ATMEL ).
I think it's the most cost-effective version of the mega Series.
Originally, it was uncomfortable for Xiao Zhu to switch the developed hardware platform when he was a little familiar with the 80C51 series. Discard familiar tools such as Keil and serial download tool to get familiar with new tools. Xiao Zhu started the mix project with such emotions.
T
Some time ago, bare metal was used on the Keil platform. Keil was not born to support both arm11 and arm11 products. It was not very easy to use, but it was still switched back to ads. The Platform should not be an obstacle that binds us. It should be our tool. It should be used when we pick it up!
This blog does not teach you to start learning ads from scratch, but is just a record of my experiment, whic
1. Preparations
Jlink is connected to the Development Board. The driver has been installed.
Keil MDK 4.0 installation is complete.
2. Create a project
Select the device Samsung/s3c2440a for the project
There is a dialog box asking if you want to copy the default startupCodeSelect "no" in the project. (Other information on the internet says that the MDK has a problem with the startup code of the 2440 built-in routine. Theref
Although it is a program of two hundred million lines, I debugged it for one day and got something wrong.
It turns out that # 0ffh was not written to P0 when reading P0. After a long time, I finally found a C Proteus simulation program and a C program of Keil on csdn. It's okay to stick to my circuit diagram. At last, I joined Keil and Proteus step by step to find out the error.
I would like to return to my
aEnvironment1.1 Keil UVision4http://pan.baidu.com/s/1o6A331w1.2 STCHttp://pan.baidu.com/s/1jGpCUTC1.3 MyEclipse 8.5Http://pan.baidu.com/s/1jGABEaM1.4 jar package to be imported RXTXHttp://pan.baidu.com/s/1ntwsvRrFirst copy the RxtxParallel.dll and RxtxSerial.dll to the bin directory of the JDK directory.Then copy the Rxtxcomm to the Jdk\jre\lib\ext directory.Finally, you will import the jar package in your Java project Rxtxcomm1.5 at89c51 Single chip
In the previous blog post, we have learned how to coordinate how each level in the whole system works, and the command issued by the application layer reaches the drive layer under the kernel, thus achieving the purpose of operating the hardware layer.Let's look at the code in the final molded "shell driver" first_drv.c in the last blog post:#include As I said in my previous blog post, there is a disadvantage to this driver, and we'll optimize it in the next post. Now first to compile the driver
under the nrf5x-tools-linux, I download the version is (after decompression also placed in AAAA directory): nRF5x-Command-Line-Tools_9_7_3_Linux-x86_64.tar
5) Download the latest J-link Toolkit J-link software and documentation pack from Segger official website, I am downloading the latest linux-64 bit-deb installation version:
2, compiling and burning write Blink project
1) Check the Development Board for the chip used for NRF51822-QFAA, refer to nRF51822 Product Anoma
This is a document I wrote for the company a year ago to introduce young embedded software engineers on how to write high quality embedded C programs in a bare-metal environment. Feeling is a certain reference value, so take out to share, to give a thought.
Reprint please indicate the source: http://blog.csdn.net/zhzht19861011/article/details/45508029
Absrtact: Firstly, this paper analyzes the pitfalls and defects of C language, summarize the error-prone places, analyze the deficiencies of the
reproduced in the original: http://blog.csdn.net/zhzht19861011/article/details/5974945, thank you very much.
Beginners often do not know how to modular programming, in fact, it is simple and easy to learn, but also the organization of good program structure is one of the effective methods.
This article will first about the modular approach and considerations, and finally to the beginner's most widely used Keil C compiler as an example, give the det
A period of time to do Bluetooth communication, single-chip computer serial port to send the total display garbled characters, the code is as follows:
Send a Bytevoid sendbyte (unsigned char dat){sbuf = dat;while (! TI);TI = 0;}Send a stringvoid Sendstr (unsigned char *s){while (*s!= '){Sendbyte (*s);s++;}}
Call Sendstr in the main function ("Current data is:");
Observe the serial debugging assistant display is a bunch of garbled characters, however, the Chinese character to English character
want to reference. This makes it possible to invoke the inline function in the header file. and can be correctly compiled, linked.
In fact, in the MDK at91rm9200 standard library is also done, AT91RM9200 Standard library has two. h Files ――at91rm9200.h and Lib_ AT91RM9200.h, where some constants and peripheral interface structures are defined in AT91RM9200.h. The library function is stored in lib_at91rm9200.h, and its library functions are all inline functions.
Note: The path of the above two
Hold down SHIFT and right-click the button to enter the X:\Program Files\keil\mdk510\arm\armcc\bin.Open the command cmd.exe, and then enter the operation.
Compile your own project and copy the XXX.AXF files from the "_build" directory to the X:\Program Files\keil\mdk510\arm\armcc\bin.Then, run "cmd" at the start of windows-> and enter the CD command to switch to the above directory.Enter "Fromelf.exe--bi
run the C program environment, such as the stack pointer SP does not point to the correct location. Assembly code should complete the original hardware device initialization, and prepare the C run environment, so that the function can be written in C language.------Solution--------------------------------------------------------1. C language does not have the SP (Stack Pointer Register), CPSR, CP15 and other control instructions, to initialize these, must use Assembly code, the other parts are
# Include
I. # include
# Include
If the built-in header file defined by your compiler is referenced under C: \ Keil \ c51 \ INC \, then # include
Ii. # include
# Include "refers to the header file in the relative path of your program directory.
If your project directory is in D: \ Projects \ tmp \, then # include "my. h "references D: \ Projects \ tmp \ my. h this header file is generally used to reference some header files written by yours
Conditional compilation (ifdef. 6. When the priority of operations in an expression is unclear or confusing, parentheses should be used to specify their priority. 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. Before using a function in a program, you should describe the function type. The description of the function type must be consistent with the original func
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.