Skip to content

Commit cdddfee

Browse files
committed
Add license and readme
1 parent 0dc3f9a commit cdddfee

File tree

2 files changed

+250
-0
lines changed

2 files changed

+250
-0
lines changed

LICENSE

+222
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
With the exception of files that contain licensing information
2+
stating the contrary, files within the dapboot project are licensed
3+
under the ISC license as follows:
4+
5+
Copyright (c) 2016, Devan Lai
6+
7+
Permission to use, copy, modify, and/or distribute this software
8+
for any purpose with or without fee is hereby granted, provided
9+
that the above copyright notice and this permission notice
10+
appear in all copies.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13+
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14+
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15+
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
16+
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
18+
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19+
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20+
21+
The following files in the dapboot project pertaining to the base
22+
Makefile and linker script are derived from the libopencm3 examples
23+
template and are licensed under the GNU Lesser General Public
24+
License version 3:
25+
* libopencm3.rules.mk
26+
* src/libopencm3.target.mk
27+
* src/stm32f042/stm32f042x6.ld
28+
* src/stm32f103/stm32f103x8.ld
29+
30+
libopencm3, included as a submodule and statically linked as part
31+
of the build process, is separately licensed under the LGPLv3.
32+
33+
The following is for informative purposes only: all LICENSE files
34+
contained within the project should be consulted for precise
35+
specifications.
36+
37+
The LGLPv3 is the most restrictive license applying to any subset
38+
of the dapboot project; all other licensed material is strictly less
39+
restrictive than the LGPLv3. Accordingly, you may distribute the
40+
dapboot project in source or object code form under the terms of
41+
the LGPLv3 without needing to meet additional requirements for
42+
the less restrictively licensed portions of the dapboot project.
43+
44+
Otherwise, the combined work consisting of the dapboot object code
45+
linked with the libopencm3 object code may be distributed without
46+
distributing a copy of the dapboot source code or any modifications
47+
to it.
48+
49+
However, if the source code is not distributed, you must provide a
50+
means for the user to "re-link" the libopencm3 object code to
51+
produce a new combined work containing updated libopencm3 object
52+
code along-side any dapboot object code.
53+
54+
The text of the GNU Lesser General Public License version 3 is
55+
reproduced below for use with the limited portions of the dapboot
56+
project licensed under the LGPLv3:
57+
58+
GNU LESSER GENERAL PUBLIC LICENSE
59+
Version 3, 29 June 2007
60+
61+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
62+
Everyone is permitted to copy and distribute verbatim copies
63+
of this license document, but changing it is not allowed.
64+
65+
66+
This version of the GNU Lesser General Public License incorporates
67+
the terms and conditions of version 3 of the GNU General Public
68+
License, supplemented by the additional permissions listed below.
69+
70+
0. Additional Definitions.
71+
72+
As used herein, "this License" refers to version 3 of the GNU Lesser
73+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
74+
General Public License.
75+
76+
"The Library" refers to a covered work governed by this License,
77+
other than an Application or a Combined Work as defined below.
78+
79+
An "Application" is any work that makes use of an interface provided
80+
by the Library, but which is not otherwise based on the Library.
81+
Defining a subclass of a class defined by the Library is deemed a mode
82+
of using an interface provided by the Library.
83+
84+
A "Combined Work" is a work produced by combining or linking an
85+
Application with the Library. The particular version of the Library
86+
with which the Combined Work was made is also called the "Linked
87+
Version".
88+
89+
The "Minimal Corresponding Source" for a Combined Work means the
90+
Corresponding Source for the Combined Work, excluding any source code
91+
for portions of the Combined Work that, considered in isolation, are
92+
based on the Application, and not on the Linked Version.
93+
94+
The "Corresponding Application Code" for a Combined Work means the
95+
object code and/or source code for the Application, including any data
96+
and utility programs needed for reproducing the Combined Work from the
97+
Application, but excluding the System Libraries of the Combined Work.
98+
99+
1. Exception to Section 3 of the GNU GPL.
100+
101+
You may convey a covered work under sections 3 and 4 of this License
102+
without being bound by section 3 of the GNU GPL.
103+
104+
2. Conveying Modified Versions.
105+
106+
If you modify a copy of the Library, and, in your modifications, a
107+
facility refers to a function or data to be supplied by an Application
108+
that uses the facility (other than as an argument passed when the
109+
facility is invoked), then you may convey a copy of the modified
110+
version:
111+
112+
a) under this License, provided that you make a good faith effort to
113+
ensure that, in the event an Application does not supply the
114+
function or data, the facility still operates, and performs
115+
whatever part of its purpose remains meaningful, or
116+
117+
b) under the GNU GPL, with none of the additional permissions of
118+
this License applicable to that copy.
119+
120+
3. Object Code Incorporating Material from Library Header Files.
121+
122+
The object code form of an Application may incorporate material from
123+
a header file that is part of the Library. You may convey such object
124+
code under terms of your choice, provided that, if the incorporated
125+
material is not limited to numerical parameters, data structure
126+
layouts and accessors, or small macros, inline functions and templates
127+
(ten or fewer lines in length), you do both of the following:
128+
129+
a) Give prominent notice with each copy of the object code that the
130+
Library is used in it and that the Library and its use are
131+
covered by this License.
132+
133+
b) Accompany the object code with a copy of the GNU GPL and this license
134+
document.
135+
136+
4. Combined Works.
137+
138+
You may convey a Combined Work under terms of your choice that,
139+
taken together, effectively do not restrict modification of the
140+
portions of the Library contained in the Combined Work and reverse
141+
engineering for debugging such modifications, if you also do each of
142+
the following:
143+
144+
a) Give prominent notice with each copy of the Combined Work that
145+
the Library is used in it and that the Library and its use are
146+
covered by this License.
147+
148+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
149+
document.
150+
151+
c) For a Combined Work that displays copyright notices during
152+
execution, include the copyright notice for the Library among
153+
these notices, as well as a reference directing the user to the
154+
copies of the GNU GPL and this license document.
155+
156+
d) Do one of the following:
157+
158+
0) Convey the Minimal Corresponding Source under the terms of this
159+
License, and the Corresponding Application Code in a form
160+
suitable for, and under terms that permit, the user to
161+
recombine or relink the Application with a modified version of
162+
the Linked Version to produce a modified Combined Work, in the
163+
manner specified by section 6 of the GNU GPL for conveying
164+
Corresponding Source.
165+
166+
1) Use a suitable shared library mechanism for linking with the
167+
Library. A suitable mechanism is one that (a) uses at run time
168+
a copy of the Library already present on the user's computer
169+
system, and (b) will operate properly with a modified version
170+
of the Library that is interface-compatible with the Linked
171+
Version.
172+
173+
e) Provide Installation Information, but only if you would otherwise
174+
be required to provide such information under section 6 of the
175+
GNU GPL, and only to the extent that such information is
176+
necessary to install and execute a modified version of the
177+
Combined Work produced by recombining or relinking the
178+
Application with a modified version of the Linked Version. (If
179+
you use option 4d0, the Installation Information must accompany
180+
the Minimal Corresponding Source and Corresponding Application
181+
Code. If you use option 4d1, you must provide the Installation
182+
Information in the manner specified by section 6 of the GNU GPL
183+
for conveying Corresponding Source.)
184+
185+
5. Combined Libraries.
186+
187+
You may place library facilities that are a work based on the
188+
Library side by side in a single library together with other library
189+
facilities that are not Applications and are not covered by this
190+
License, and convey such a combined library under terms of your
191+
choice, if you do both of the following:
192+
193+
a) Accompany the combined library with a copy of the same work based
194+
on the Library, uncombined with any other library facilities,
195+
conveyed under the terms of this License.
196+
197+
b) Give prominent notice with the combined library that part of it
198+
is a work based on the Library, and explaining where to find the
199+
accompanying uncombined form of the same work.
200+
201+
6. Revised Versions of the GNU Lesser General Public License.
202+
203+
The Free Software Foundation may publish revised and/or new versions
204+
of the GNU Lesser General Public License from time to time. Such new
205+
versions will be similar in spirit to the present version, but may
206+
differ in detail to address new problems or concerns.
207+
208+
Each version is given a distinguishing version number. If the
209+
Library as you received it specifies that a certain numbered version
210+
of the GNU Lesser General Public License "or any later version"
211+
applies to it, you have the option of following the terms and
212+
conditions either of that published version or of any later version
213+
published by the Free Software Foundation. If the Library as you
214+
received it does not specify a version number of the GNU Lesser
215+
General Public License, you may choose any version of the GNU Lesser
216+
General Public License ever published by the Free Software Foundation.
217+
218+
If the Library as you received it specifies that a proxy can decide
219+
whether future versions of the GNU Lesser General Public License shall
220+
apply, that proxy's public statement of acceptance of any version is
221+
permanent authorization for you to choose that version for the
222+
Library.

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# dapboot
2+
The dapboot project is an open-source USB [Device Firmware Upgrade](http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf) (DFU) bootloader for STM32 devices.
3+
4+
Currently, the only target officially supported is the STM32F103x chip on STLink/v2 compatible boards.
5+
6+
## Build instructions
7+
As only one target is really in use, invoking `make` will build a binary for the STM32F103. The more general usage is:
8+
9+
make clean
10+
make TARGET=STM32F103
11+
12+
## Flash instructions
13+
The `make flash` target will use openocd to upload the bootloader to an attached board. By default, the Makefile assumes you're using a [CMSIS-DAP](http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php) based probe, but you can override this by overriding `OOCD_INTERFACE` variable. For example:
14+
15+
make OOCD_INTERFACE=interface/stlink-v2.cfg flash
16+
17+
## Overriding defaults
18+
Local makefile settings can be set by creating a `local.mk`, which is automatically included.
19+
20+
## Switching to the bootloader
21+
The bootloader can be built to look for arbitrary patterns, but the default for the STM32F103 target looks for a magic value stored in the RTC backup registers. Writing the magic value and then resetting will run the bootloader instead of the main application.
22+
23+
## Licensing
24+
All contents of the dapboot project are licensed under terms that are compatible with the terms of the GNU Lesser General Public License version 3.
25+
26+
Non-libopencm3 related portions of the dapboot project are licensed under the less restrictive ISC license, except where otherwise specified in the headers of specific files.
27+
28+
See the LICENSE file for full details.

0 commit comments

Comments
 (0)