Three common mistakes when using KEIL5 for STM32 development

Publisher:支持中文Latest update time:2018-08-17 Source: eefocusKeywords:KEIL5  STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Compile with keil5 warning: #1-D: last line of file ends without a newline The last line return does not work

    

After the last line is entered, make sure it is in the first column. The new line cannot have spaces or other empty characters to avoid this warning.


2. When defining a header file, a message similar to X #include "led.h" always appears on the interface, but no errors or warnings appear in the compilation.

Open keil5's option for target --> c/c++ --> Include Paths, do not do anything, just click OK, and then exit


3. When using MDK debugging, the following error occurs:

    error: #268: declaration may not appear after executablestatement

    After querying, I found the problem:

    The declaration of variables cannot be placed after the executable statement. The variables must be declared at the beginning of the main function!

    The above error will occur when declaring a variable in a program.


Keywords:KEIL5  STM32 Reference address:Three common mistakes when using KEIL5 for STM32 development

Previous article:Summary of common errors in Keil5
Next article:LCD displays a small number of Chinese characters in STM32

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号