<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Keil &#8211; 寂静花园</title>
	<atom:link href="https://www.addesp.com/archives/tag/keil/feed" rel="self" type="application/rss+xml" />
	<link>https://www.addesp.com</link>
	<description>寂静中交织着热情</description>
	<lastBuildDate>Sat, 05 Jun 2021 04:23:16 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>ARM-MDK 工程模板建立（基于标准固件库）</title>
		<link>https://www.addesp.com/archives/450</link>
					<comments>https://www.addesp.com/archives/450#respond</comments>
		
		<dc:creator><![CDATA[ADD-SP]]></dc:creator>
		<pubDate>Fri, 10 Apr 2020 00:41:02 +0000</pubDate>
				<category><![CDATA[笔记]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Keil]]></category>
		<category><![CDATA[MDK]]></category>
		<guid isPermaLink="false">https://www.addesp.com/?p=450</guid>

					<description><![CDATA[介绍如何建立STM32F10X的MDK工程模板（基于标准固件库）。]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>概述</strong></h2>



<p class="wp-block-paragraph">介绍如何建立STM32F10X的MDK工程模板（基于标准固件库）。</p>



<h2 class="wp-block-heading"><strong>正文</strong></h2>



<ol class="wp-block-list"><li>新建一个文件夹命名为&nbsp;Template。</li><li>在文件夹下新建三个文件夹，分别为，core，stdlib，user。</li><li>前往<a rel="noreferrer noopener" href="https://www.stmicroelectronics.com.cn/zh/embedded-software/stm32-standard-peripheral-libraries.html" data-type="URL" data-id="https://www.stmicroelectronics.com.cn/zh/embedded-software/stm32-standard-peripheral-libraries.html" target="_blank">官网</a>下载标准固件库。</li><li>拷贝 Libraries\CMSIS\CM3\CoreSupport 下的所有文件到 Template\core。</li><li>拷贝 Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm 下对应的启动文件到 Template\core 下。</li><li>拷贝 Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x 下的 stm32f10x.h，system_stm32f10x.c，system_stm32f10x.h到 Template\core 下。</li><li>拷贝 Libraries\STM32F10x_StdPeriph_Driver 下的 inc 和 src 两个文件夹到  Template\stdlib 下。</li><li>拷贝 Project\STM32F10x_StdPeriph_Template 下的 main.c ，stm32f10x_conf.h，stm32f10x_it.c，stm32f10x_it.h，system_stm32f10x.c 到 Template\user 下。</li><li>用&nbsp;MDK&nbsp;新建工程到 Template\user 目录下。</li><li><ul><li>添加宏 USE_STDPERIPH_DRIVER。</li><li>根据<a rel="noreferrer noopener" href="https://blog.csdn.net/u013385925/article/details/51165541" data-type="URL" data-id="https://blog.csdn.net/u013385925/article/details/51165541" target="_blank">STM32&nbsp;&#8211;&nbsp;Keil中启动文件的选择和固件库宏定义</a>选择对应的宏如STM32F103R6就填入`STM32F10X_HD`（<strong>如果后续编译出现问题可以移除该宏重试</strong>）。</li><li>多个宏之间用半角逗号分隔。</li><li><img decoding="async" width="150" height="113" class="wp-image-452" style="width: 150px;" src="https://www.addesp.com/wp-content/uploads/2020/09/0-15.webp" alt=""></li></ul></li><li>添加下列头文件路径<ul><li>添加 Template\core。</li><li>添加 Template\stdlib\inc。</li><li>添加 Template\user。</li><li><img decoding="async" width="150" height="113" class="wp-image-453" style="width: 150px;" src="https://www.addesp.com/wp-content/uploads/2020/09/1-13.webp" alt=""></li></ul></li><li>添加下列分组并向分组中添加对应的文件<ul><li>core 分组中添加 Template\core 下所有的 *.c，*.s 文件。</li><li>stdlib 分组添加 Template\stdlib\inc 下所有的 *.c 文件。</li><li>user 分组添加 Template\user 下所有的 *.c 文件。</li><li><img decoding="async" width="150" height="113" class="wp-image-455" style="width: 150px;" src="https://www.addesp.com/wp-content/uploads/2020/09/2-13.webp" alt=""></li></ul></li><li>清空 main。c 中的内容，写一个空的 int&nbsp;main(void) 函数进去。</li><li>编译工程，见招拆招。</li></ol>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.addesp.com/archives/450/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
