Skip to content

Commit b81c8a9

Browse files
author
Cruz Monrreal
authored
Merge pull request #8193 from OpenNuvoton/nuvoton_m2351_license
M2351: Add license file for default secure library/executable
2 parents b2f00fb + cd996cd commit b81c8a9

File tree

2 files changed

+79
-0
lines changed
  • targets/TARGET_NUVOTON/TARGET_M2351/TARGET_NUMAKER_PFM_M2351/TARGET_M23_NS

2 files changed

+79
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Permissive Binary License
2+
3+
Version 1.0, September 2015
4+
5+
Redistribution. Redistribution and use in binary form, without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
1) Redistributions must reproduce the above copyright notice and the
10+
following disclaimer in the documentation and/or other materials
11+
provided with the distribution.
12+
13+
2) Unless to the extent explicitly permitted by law, no reverse
14+
engineering, decompilation, or disassembly of this software is
15+
permitted.
16+
17+
3) Redistribution as part of a software development kit must include the
18+
accompanying file named "DEPENDENCIES" and any dependencies listed in
19+
that file.
20+
21+
4) Neither the name of the copyright holder nor the names of its
22+
contributors may be used to endorse or promote products derived from
23+
this software without specific prior written permission.
24+
25+
Limited patent license. The copyright holders (and contributors) grant a
26+
worldwide, non-exclusive, no-charge, royalty-free patent license to
27+
make, have made, use, offer to sell, sell, import, and otherwise
28+
transfer this software, where such license applies only to those patent
29+
claims licensable by the copyright holders (and contributors) that are
30+
necessarily infringed by this software. This patent license shall not
31+
apply to any combinations that include this software. No hardware is
32+
licensed hereunder.
33+
34+
If you institute patent litigation against any entity (including a
35+
cross-claim or counterclaim in a lawsuit) alleging that the software
36+
itself infringes your patent(s), then your rights granted under this
37+
license shall terminate as of the date such litigation is filed.
38+
39+
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
40+
CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
41+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
42+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Default secure code for M2351
2+
3+
The M2351 is a TrustZone target that requires two codes: secure and nonsecure. Secure code runs first to set up the secure environment and then brings up the nonsecure code. `NuMaker-mbed-TZ-secure-example.hex` is the default secure code, and `cmse_lib.o` is its accompanying
4+
secure gateway library, which exports secure functions to nonsecure code. It is built from the [secure code template](https://github.com/OpenNuvoton/NuMaker-mbed-TZ-secure-example). Because secure and nonsecure code may start at an address other than `0x0`, we have chosen `.hex` rather than `.bin` as the output format.
5+
6+
## Hardware partition
7+
8+
On TrustZone targets, you need to partition the hardware first for secure code to run on secure worlds and nonsecure code to run on nonsecure worlds.
9+
10+
The default secure code has the following hardware partition:
11+
12+
- Flash (512KiB in total): 256KiB for secure and 256KiB for nonsecure.
13+
- SRAM (96KiB in total): 32KiB for secure and 64KiB for nonsecure.
14+
- Peripherals: Most are configured to nonsecure except the following, which are hardwired or reserved:
15+
- **SYS/CLK** hardwired to secure. Accessible to nonsecure through a secure gateway.
16+
- **FMC** hardwired to secure. Accessible to nonsecure through a secure gateway.
17+
- **WDT** hardwired to secure. Accessible to nonsecure through a secure gateway.
18+
- **RTC** configured to secure. Accessible to nonsecure through a secure gateway.
19+
- **TMR0/1** hardwired to secure. TMR0 implements secure `us_ticker`, and TMR1 implements secure `lp_ticker`.
20+
- **TMR2/3** configured to nonsecure. TMR2 implements nonsecure `us_ticker`, and TMR3 implements nonsecure `lp_ticker`.
21+
- **PDMA0** hardwired to secure. Implements secure asynchronous transfer.
22+
- **PDMA1** configured to nonsecure. Implements nonsecure asynchronous transfer.
23+
24+
## Flash secure and nonsecure code
25+
26+
To flash secure and nonsecure code on the M2351, drag-and-drop `NuMaker-mbed-TZ-secure-example.hex` first, and then build the user program, for example, [mbed-os-example-blinky.hex](https://github.com/ARMmbed/mbed-os-example-blinky).
27+
28+
## Reference
29+
30+
Please refer to the [secure code template](https://github.com/OpenNuvoton/NuMaker-mbed-TZ-secure-example) for details.

0 commit comments

Comments
 (0)