制作keil5的pack

【原创出品§转载请注明出处】 出处:http://www.cnblogs.com/libra13179/p/6273415.html

我在这里就交大家怎样制作自己的Pack,(这里是我制作好的http://files.cnblogs.com/files/libra13179/KEIL5%E7%9A%84RTT%E4%B9%8Bpack.zip)

1、用的C:Program Files (x86)SEGGERJLink_V512fSamplesRTTSEGGER_RTT_V512f这个压缩文件中程序。

2、添加文件rtt_log.C和rtt_log.H

3、新增一个Segger.Segger_RTT_Logger.pdsc

Segger.Segger_RTT_Logger.pdsc的具体内容如下

 1 <?xml version="1.0" encoding="utf-8"?>
 2 
 3 <package schemaVersion="1.2" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PACK.xsd">
 4   <vendor>Segger</vendor>
 5   <name>Segger_RTT_Logger</name>
 6   <description>Simple logging functionality for Segger's J-Link Real-Time Terminal</description>
 7   <url></url>
 8   <supportContact>404267906@qq.com</supportContact>
 9   <!-- optional license file -->
10   <!-- 
11   <license>
12   </license>
13   -->
14   
15   <releases>
16     <release version="1.0.1">
17       2017/01/11 Initial Version (SEGGER_RTT_V512f)
18       2017/01/11 add  rtt_log.c and rtt_log.h
19     </release>
20   </releases>
21 
22   <keywords>
23     <!-- keywords for indexing -->
24     <keyword>Debug</keyword>
25     <keyword>Log</keyword>
26     <keyword>Logging</keyword>
27     <keyword>J-Link</keyword>
28     <keyword>Segger</keyword>
29   </keywords>
30 
31   <!-- apis section (optional - for Application Programming Interface descriptions) -->
32   <!-- 
33   <apis>
34   </apis>
35   -->
36 
37   <!-- boards section (mandatory for Board Support Packs) -->
38   <!-- 
39   <boards>
40   </boards>
41   -->
42 
43   <!-- devices section (mandatory for Device Family Packs) -->
44   <!--
45   <devices>
46   </devices>
47   -->
48 
49   <!-- examples section (optional for all Software Packs)-->
50   <!--
51   <examples>
52   </examples>
53   -->
54   
55   <!-- conditions section (optional for all Software Packs)-->
56   <!--
57   <conditions>
58   </conditions>
59   -->
60   
61   <!-- component section (optional for all Software Packs)-->
62   
63   <components>
64     <component Cclass="Segger Tools" Cgroup="Segger RTT Tools Logger" Cversion="1.0.0">
65       <description>Routines to use the Segger Real-Time Terminal for logging</description>
66       <files>
67         <file category="header" name="SEGGER_RTT_V512fRTTSEGGER_RTT.h"/>
68         <file category="header" name="SEGGER_RTT_V512fRTTSEGGER_RTT_Conf.h" attr="config"/>
69         <file category="source" name="SEGGER_RTT_V512fRTTSEGGER_RTT.c"/>
70         <file category="source" name="SEGGER_RTT_V512fRTTSEGGER_RTT_printf.c"/>
71         <file category="header" name="SEGGER_RTT_V512f
tt_log.h"/>
72         <file category="source" name="SEGGER_RTT_V512f
tt_log.c"/>
73       </files>
74     </component>
75 
76   </components>
77 
78   
79   <!-- optional taxonomy section for defining new component Class and Group names -->
80   <!--
81   <taxonomy>
82   </taxonomy>
83   -->
84   
85 </package>
View Code

> 参考KEIL的pack文档
http://files.cnblogs.com/files/libra13179/keil%E4%B9%8Bpack%E5%88%B6%E4%BD%9C%E6%96%87%E6%A1%A3.zip

4、将SEGGER_RTT_V512f文件夹和Segger.Segger_RTT_Logger.pdsc进行压缩文件命名为Segger.Segger_RTT_Logger.1.0.1.ZIP,.ZIP后缀修改.pack。

5、安装到keil中

测试我们生成PACK

编译工程下载后可以看到

原文地址:https://www.cnblogs.com/libra13179/p/6273415.html