Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
609 commits
Select commit Hold shift + click to select a range
fbc47d9
Vscode export: replace obsolete ${workspaceRoot}
ngraziano Feb 11, 2019
8e36fbc
Update linker files and resolve build issue
Feb 11, 2019
52c3749
Do not provide a default Pelion host address.
bridadan Feb 6, 2019
3ce9cec
Add MBEDTLS_ENTROPY_NV_SEED to NUCLEO_F411RE to fix the build
Feb 12, 2019
6fed2dd
FUTURE_SEQUANA_PSA: fixed deep sleep mode
lrusinowicz Feb 12, 2019
794bfbd
readme: license update
0xc0170 Feb 12, 2019
8cdc2e0
readme: storage license under one folder
0xc0170 Feb 12, 2019
0dc2f94
Doxygen correction
Jan 10, 2019
fa8b228
FUTURE_SEQUANA: Fixed Arduino signal mappings
lrusinowicz Feb 12, 2019
2b880b0
Make a few trivial syntactic changes to better support cross-compilation
NeilMacMullen Feb 12, 2019
ec9dde2
Greentea tests: set correct port to test against google.com
michalpasztamobica Feb 12, 2019
8864352
Keep style linter happy
NeilMacMullen Feb 12, 2019
12a60ee
Add WIFI support for RDA target UNO_91H
caixue1102 Jan 7, 2019
13e0876
Prefixed string to properly be parsed as bytes
Feb 12, 2019
7849c62
Removed decode since deeper tools always return strings
Feb 12, 2019
b5e5f57
add the RFC for PinMap's extension
ithinuel Nov 8, 2018
ba4413b
add form_factors
ithinuel Nov 12, 2018
d91076c
fix types names.
ithinuel Nov 15, 2018
0e1d2f7
add precision about static arrays and fix functions' names
ithinuel Nov 15, 2018
724f881
update according to @bulislaw 's review
ithinuel Nov 23, 2018
de49daf
fix according to @donatieng's review
ithinuel Dec 13, 2018
863caf3
Update pinmap design document
c1728p9 Feb 12, 2019
51ccbf5
target: UBLOX: Fix build warning in UBLOX_AT_CellularNetwork.cpp
Feb 12, 2019
13d3d78
platform: fix build warning in mbed_error
Feb 12, 2019
0f4a898
Change TESTS/netsocket/ for cellular testing
Feb 8, 2019
87a1a90
revert: "Refactor sleep tracing driver identifier to be pointer to th…
Feb 11, 2019
1f89345
license: rename to apache 2.0 txt file
0xc0170 Feb 13, 2019
bc952b2
license: add license file containing folders with non apache license
0xc0170 Feb 13, 2019
3100d7a
enet_tasklet_disconnect() should generate event to tasklet.
KariHaapalehto Feb 12, 2019
ea412b3
Adding MBEDTLS_ENTROPY_NV_SEED macro check in device key to allow key…
Jan 31, 2019
83d60d9
Refactor psa entropy inject test
Feb 13, 2019
ef23f95
Clear ITS environment in psa entropy tests
Feb 13, 2019
06e1e39
readme: license file reference fix
0xc0170 Feb 13, 2019
67d4177
Make targets plural in design document
Feb 13, 2019
f0305bb
crypto: Remove PSA Crypto API from targets without entropy
Patater Feb 13, 2019
49b4a79
Fix dependencies of platform partition
Feb 13, 2019
e79ae97
nanostack: icmpv6: fix build warning
Feb 12, 2019
2c1974c
btle: fix build warning about unused clockConfiguration
Feb 12, 2019
8209513
features: nanostack: fix warning in thread_extension.h
Feb 12, 2019
f5ac5ac
Storage mbed_lib.json files
Feb 6, 2019
ac6772c
Add PSA mbed-lib.json
Feb 6, 2019
3e75d97
Update table of content links
c1728p9 Feb 13, 2019
5d811eb
Only GCC_ARM toolchain is supported, removing legacy code
Feb 13, 2019
ecf7105
Add .inc as a header file type.
bridadan Feb 13, 2019
7dc47de
Cellular: clean sensitive information from trace
Feb 11, 2019
ba76316
ESP8266: handles reset ready as OOB
Jan 23, 2019
c59bf17
ESP8266: fixes network status refresh procedure
Jan 23, 2019
94c6230
ESP8266: fixes UART HW flow control enabling sequence
Feb 6, 2019
1336330
ESP8266: protects setting UART HW flow control with a mutex
Feb 6, 2019
76ad940
ESP8266: prevents doing reset twice in a row, unnecessary
Feb 6, 2019
0ebbe8e
ESP8266: retry reset attempt once in failure
Feb 6, 2019
5e245ef
Cellular: fix onboard modems powering failure
Feb 13, 2019
2ad2a8d
readme: fix space and . in license
0xc0170 Feb 14, 2019
8109c74
Add release notes section to PR template
orenc17 Feb 13, 2019
4c9ef7f
add mtu events
paul-szczepanek-arm Jan 9, 2019
1dc34ef
route ble events to gap
paul-szczepanek-arm Jan 9, 2019
87bc3d0
fix typos
paul-szczepanek-arm Jan 9, 2019
0e88062
handle mtu and data len events for softdevice
paul-szczepanek-arm Jan 15, 2019
95ef052
fix style
paul-szczepanek-arm Jan 15, 2019
2f2de9d
change event names
paul-szczepanek-arm Jan 15, 2019
880c3db
fix possible truncation
paul-szczepanek-arm Jan 16, 2019
bbbb451
add API to trigger MTU negotiation
paul-szczepanek-arm Jan 16, 2019
8bf2c23
fix type name
paul-szczepanek-arm Jan 30, 2019
a66fdb9
route mtu changed events to server and client instead of gap
paul-szczepanek-arm Feb 1, 2019
e68685c
Get the pal event handler from pal gattclient
paul-szczepanek-arm Feb 5, 2019
86f505b
remove unused converter
paul-szczepanek-arm Feb 5, 2019
e8e7090
require pal event handler to be complete
paul-szczepanek-arm Feb 5, 2019
8c6e8be
use grandfathered convention for class members names and initialise them
paul-szczepanek-arm Feb 5, 2019
58597a5
move cpp to sources
paul-szczepanek-arm Feb 5, 2019
213fe00
added spdx licence ident
paul-szczepanek-arm Feb 11, 2019
24f1b2d
fix nrf52 mtu
paul-szczepanek-arm Feb 12, 2019
45a80db
removed redundant qualifier tripping up GCC
paul-szczepanek-arm Feb 14, 2019
baf3848
cmsis conf: change license to apache 2.0
0xc0170 Feb 14, 2019
fa14249
wifi test: add license info
0xc0170 Feb 14, 2019
5b85d15
test mbedmicro: fix licenses
0xc0170 Feb 14, 2019
aad50d7
check release: add license header
0xc0170 Feb 14, 2019
cda6027
Reverting to original doxy configuration
Feb 13, 2019
4b4a6b2
Including CTest explicitly
Feb 4, 2019
96ae924
Proper size checking for link ADR commands
Feb 4, 2019
30b8717
Updating unit tests
Feb 4, 2019
71f85de
Add flash sum check
Feb 14, 2019
8005c1b
tools/utils: ensure default build profiles are processed first
Feb 14, 2019
67e7ae6
Greentea: Remove TLSSocket_simultaneous test
michalpasztamobica Feb 15, 2019
bdbc03b
Cellular: Fix sigio to be released in ATHandler destructor
Feb 15, 2019
22bacec
Greentea tests: user-configurable timeouts
michalpasztamobica Feb 14, 2019
3f315ce
tools: add license headers
0xc0170 Feb 15, 2019
f188b21
copyright 2019 fix
0xc0170 Feb 15, 2019
87ae141
Remove pyocd requirement and update icetea.
bridadan Feb 14, 2019
3fff878
ESP8266: connect() returns OK in non-blocking calls
michalpasztamobica Feb 15, 2019
0315512
tools: export: MCUXpresso: fix case inconsistencies in .templ file names
Feb 15, 2019
834f137
Fix typo in LICENSE
Feb 15, 2019
fcf2237
Add articles to README.md
Feb 15, 2019
21f6b9b
Fix incorrect return value in psa_security_lifecycle_state (emul)
Feb 17, 2019
f18ea38
Cellular: ATHandler debugging relieved
Feb 18, 2019
87bd129
Cellular: Handling of TCP endpoint closed
Feb 18, 2019
6faa729
Cellular: Fix Quectel M26 drivers
Feb 18, 2019
c9b02f2
Cellular: Fix Quectel BG96 driver RTS/CTS setup
Feb 18, 2019
8a62f4f
Cellular: Fix CellularDevice mutex unlock
Feb 18, 2019
e489255
Cellular: Non-IP doxygen updates
Jan 16, 2019
7a10269
Netsocket documentation cleanup
michalpasztamobica Feb 13, 2019
a8acd2e
Initialize platform in trng test
Jan 24, 2019
1b31ddb
Add mbedtls platform setup and teardown to modules
Feb 14, 2019
5374a62
Use a mutex in platform setup \ teardown functions
Feb 14, 2019
dbd9d07
Cellular: retire CellularBase class
Feb 18, 2019
bb8aacc
ESP8266: does OOB handling based on SIGIO and not on a certain interval
Jan 24, 2019
d05ed56
Cellular: Fix Gemalto/Cinterion socket open defer
Feb 18, 2019
bb123f0
[Wio BG96] Fix onboard modem initialization
ytsuboi Jan 29, 2019
df8a1f3
tools: fix hashbang
0xc0170 Feb 18, 2019
3790708
BLE:Cordio: ATTS setting for write cback should use bitwise or
desmond-blue Feb 19, 2019
4807633
ONME-3949 Configuration options for STM_EMAC buffer counts
Jan 9, 2019
0e90b6f
Cellular: Fix ATHandler set/restore_at_timeout with mutex lock
Feb 19, 2019
6ff4058
Cellular: Added explanatory comment for AT cellular stack's socket_op…
Feb 19, 2019
96ad795
Cellular: add SPDX identifier
Feb 19, 2019
55a3b0c
memap: remove not needed comment prior future import
0xc0170 Feb 19, 2019
0f94533
Cellular: Remove compiling warning
Feb 19, 2019
e67c95c
tools: move string description after import modules
0xc0170 Feb 19, 2019
c2f2975
Update Nanostack_HAL licenses and copyright year
Feb 19, 2019
18a228e
Fix SPM returning the wrong value
Feb 18, 2019
f2eb307
PSOC6: enable export to CMake
vmedcy Feb 5, 2019
1f9f21d
support in more types then just RSA_KEYPAIR
Feb 18, 2019
17b5a72
Add TF-M importer json
Dec 19, 2018
cbb3990
Add TF-M autogen tool
Feb 10, 2019
418f279
[trusted-firmware-m]: Updated to 45e5276
Feb 6, 2019
4fb7aeb
Add TF-M sources to .astyleignore
Jan 3, 2019
c9f846d
Generate partition files
Feb 7, 2019
093ca68
Add mbed_lib.json to TF-M SPE
Feb 10, 2019
9824da9
TF-M patch: General modifications
Feb 7, 2019
88b44f9
TF-M patch: Fix tfm_ns_lock_init issue (TF-M issue #239)
Feb 7, 2019
3d62499
TF-M patch: Fix service handles not cleared issue (TF-M issue #230)
Feb 7, 2019
d6912c3
TF-M patch: Fix fixed-size partitions stack size (TF-M issue #240)
Feb 7, 2019
e8ad05e
TF-M patch: Fix tfm_memory_check issue (TF-M issue #224)
Feb 7, 2019
3b05586
TF-M patch: Fix tfm_psa_call_venner wrong argument type (TF-M issue #…
Feb 7, 2019
342b91b
TF-M patch: Fix wrong check in tfm_spm_check_client_version (TF-M is…
Feb 7, 2019
d725dc9
TF-M patch: Fix psa_set_rhandle() issue during CONNECT (TF-M issue #216)
Feb 11, 2019
25c2703
Update tfm_importer.json with SHAs of patches
Feb 10, 2019
d14bd12
Align existing partitions to work with TF-M
Jan 17, 2019
dfc48b8
Call tfm_ns_lock_init() on TFM NSPE boot
Jan 21, 2019
d5e6a81
mbed_retarget changes
Jan 14, 2019
27c87ac
Build SPM tests only for MBED_SPM targets
Feb 10, 2019
f0c1bdc
Adding TF-M integration guide
Jan 28, 2019
d39922c
Consolidating tools/tfm and tools/spm into tools/psa
Feb 13, 2019
840303c
Add mbed_app.json for TF-M bare-metal build
Feb 14, 2019
fce512f
Update .travis.yml psa_autogen job with TF-M code generation tool
Feb 15, 2019
8f12b41
Re-generate TF-M partition files
Feb 15, 2019
a925969
allow calling hash or mac on large buffers without large memory alloc…
Feb 19, 2019
cf3a4c2
Add BSD3-clause license file to TF-M folder
Feb 19, 2019
994a8f6
PSOC6: update PDL to the latest version
vmedcy Feb 15, 2019
94638e0
Multihoming initial release
tymoteuszblochmobica Nov 14, 2018
9d1a433
Update copyright years
Feb 19, 2019
3891f3e
PSOC6: minor updates to Cypress HAL
vmedcy Feb 15, 2019
6e454ca
PSOC6: do not reconfigure BT GPIO pins in CYW43XXX HCIDriver
vmedcy Feb 15, 2019
61d1c77
PSOC6: update BSP generated sources with latest configurator
vmedcy Feb 15, 2019
306ffba
fixed initialisation order
paul-szczepanek-arm Feb 19, 2019
a077579
tools/export: move hex_files selection to base Exporter class
vmedcy Feb 19, 2019
e92da00
Remove ITM from NRF52_DK and DELTA_DFBM_NQ620 targets
TacoGrandeTX Feb 19, 2019
cabca98
Add config header to assembly compilation
Feb 19, 2019
5eff703
Cellular: fix for binary compability requirement for CY8CKIT_062_4343W
Feb 20, 2019
3ce56d9
license: use .md extension
0xc0170 Feb 20, 2019
59c3675
crypto: Update Mbed Crypto to 1.0.0d3
Patater Feb 18, 2019
1ed1ee4
crypto: test: Use new PSA error codes
Patater Feb 18, 2019
9a3fb95
Multiple memory handling fixes
michalpasztamobica Feb 20, 2019
68324d4
[Wio 3G] Fix onboard modem initialization
ytsuboi Jan 29, 2019
dd7ed1e
PSOC6: fix port_write API
vmedcy Feb 20, 2019
1cbc618
Added new target RHOMBIO_L476DMW1K
guialonsoalb Feb 20, 2019
7a7c572
Multiple memory handling fixes
michalpasztamobica Feb 20, 2019
acc9aec
Multihoming change parameter orded in gethostbyname
tymoteuszblochmobica Feb 19, 2019
9f5216c
Rebuild new Wiced binaries
Feb 19, 2019
916a977
adv builder helper now returns an object
ConradBraam Feb 20, 2019
480c3ab
Adding STM32_L475 as a new MTB target
Feb 20, 2019
606ca67
Adding SPDX license identifier
Feb 20, 2019
651c42b
Adding SPDX license identifer for all new files
Feb 20, 2019
f5d6cd1
Removing redundant code comments
Feb 20, 2019
fb2f536
added licence identifier texts
guialonsoalb Feb 20, 2019
f1eb084
crypto: Update to Mbed Crypto 1.0.0d4
Patater Feb 20, 2019
a20deef
PSOC6: correctly align hex files with split text sections
vmedcy Feb 20, 2019
b943eb1
Change EventFlag timeout paramter
kegilbert Feb 20, 2019
2e59e50
Ensure header CRC is written as unsigned int
bridadan Feb 20, 2019
6dc4e83
Changing SPDX license identifier to BSD-3-Clause
Feb 21, 2019
1c0b6e7
Change in license identifier, removed commented dead code
guialonsoalb Feb 21, 2019
230dc28
Support mbed_start_application for Cortex-M0+
sarahmarshy Feb 21, 2019
37685dd
New Wiced binaries
Feb 21, 2019
b352996
STM32 LPTICKER (LPTIM): correct init execution after bootloader
jeromecoutant Feb 21, 2019
e3a365c
TF-M patch: More fixes to tfm_memory_check issue (TF-M issue #224)
Feb 18, 2019
f5a5dd7
TFM: Add defines to mbed_lib.json
Feb 19, 2019
21b6dac
TFM Importer: Update SHAa of TFM patches
Feb 20, 2019
4e5c21a
Add image signing scripts from TF-M bl2 library
Feb 21, 2019
564e886
Reuse nvic powerdown code block for M0+
sarahmarshy Feb 21, 2019
e6be093
Fix psa_system_reset on PSA IPC platform
Feb 21, 2019
ce02cc4
Implement PSA protected storage & restructure PSA storage implementation
Feb 7, 2019
8be3ef0
Update crypto IPC handling of negative errors
Feb 21, 2019
28087f4
Add flash IAP to sequana_psa m4
Feb 21, 2019
0a79cdc
Update mbed_stats.c to use __ARMCC_VERSION flag to be compatible with…
SenRamakri Feb 21, 2019
fcd26e5
Define delivery directory for FUTURE_SEQUANA_PSA
Feb 14, 2019
40c871e
Update secure binaries
orenc17 Feb 22, 2019
780d409
Add missing wifi parameters to test configs
michalpasztamobica Feb 20, 2019
ae31e54
Document network parameters in netsocket/mbed_lib.json
michalpasztamobica Feb 21, 2019
8e9c819
put cordio cfg in mbed_lib.json
paul-szczepanek-arm Feb 22, 2019
ed66032
mention config in readme
paul-szczepanek-arm Feb 22, 2019
4bef162
Change MOV to MOVS for M0+
sarahmarshy Feb 22, 2019
8ae38e5
prepared writes options
paul-szczepanek-arm Feb 22, 2019
c070b30
Change to MOVS for all targets
sarahmarshy Feb 22, 2019
021c397
PSOC6: send HCI reset after patch RAM download
cydriftcloud Feb 23, 2019
67a48fd
return the new values for key type & size even if function fails
Feb 24, 2019
99b689b
Remove unnecessary prints in FileSystemStore class
Feb 24, 2019
45118b8
a-style fixes for code
Feb 24, 2019
dbbed4c
fix comment issues
Feb 24, 2019
88c7dac
a-style fix for unrelated code
Feb 24, 2019
ddb6fa7
Add platform TT_M4G9
Jan 3, 2019
91118d3
Add "SPDX-License-Identifier: Apache-2.0"
Jan 16, 2019
b19752a
Update code
Jan 16, 2019
f7ccd1f
Modify license
Jan 23, 2019
d27de2b
Modify license about file GPIO, SPI and system
Feb 14, 2019
cd8cd4e
Add license in file cmsis_nvic.h
Feb 14, 2019
cd7abd8
Add USER_BUTTON and SPI in file PinNames.h
Feb 19, 2019
221390c
Add ARM_LIB_STACK to resolve CI Error
Feb 21, 2019
0362946
Add api about I2C and SPI ....
Feb 25, 2019
3f6d1aa
use existing macro names
paul-szczepanek-arm Feb 25, 2019
7f95f86
revert macros
paul-szczepanek-arm Feb 25, 2019
f863fab
reopening #9754 after the changes where overrun
Feb 25, 2019
66c01c6
Update mbed-cloud-sdk to latest version 2.0.4
teetak01 Feb 25, 2019
34b3e71
Remove Arm Beetle target
Feb 25, 2019
3e0b8e0
Add missing copyright header to STM32 driver
Feb 25, 2019
fcfce67
Replace Copyright ARM with a proper Apache 2 license header
Feb 25, 2019
1657e51
TF-M patch: Free connection handle in psa_reply (TF-M issue #263)
Feb 22, 2019
b159fc4
TFM Importer: Update SHAa of TFM patches
Feb 25, 2019
bd74a2b
Change all wifi and WiFi occurences to Wi-Fi
michalpasztamobica Feb 25, 2019
46392b6
Refactor tcpsocket tests to use sigio and not to wait
michalpasztamobica Feb 21, 2019
bf6678d
stray comma
paul-szczepanek-arm Feb 25, 2019
fffed94
fixed names
paul-szczepanek-arm Feb 25, 2019
6ce34a6
typos
paul-szczepanek-arm Feb 25, 2019
67e54f5
Add missing license description to RZ/A1 driver
d-kato Feb 26, 2019
861f974
Remove window and sleep mode options for watchdog API
Dec 4, 2017
2669641
Disable Watchdog on Odin as it fails intermittently
bulislaw Mar 19, 2018
4afd738
update:Remove DEVICE_WATCHDOG and added RESET_RESON in stm32 family
rajkan01 Feb 26, 2019
93b5503
Remove window and sleep mode options for watchdog API
Dec 4, 2017
7aaf331
Add RESET_REASON and WATCHDOG to doxygen options
bulislaw Mar 15, 2018
db2491a
NCS36510: Added watchdog implementation.
Mar 28, 2018
bf0f920
[Nuvoton] Support watchdog timer
ccli8 Jul 16, 2018
2b181d6
Added reset_reason feature for TMPM066 & TMPM46B
Oct 26, 2018
facdc4b
Remove window and sleep mode options for watchdog API
Dec 4, 2017
539755d
[Nuvoton] Support watchdog timer
ccli8 Jul 16, 2018
e740ce5
Added reset_reason feature for TMPM066 & TMPM46B
Oct 26, 2018
aba1c22
travis-ci fix for spell check
rajkan01 Feb 4, 2019
9bc2b03
Watchdog refactoring to multithreaded thread.
rajkan01 Jan 3, 2019
45e8451
HwWatchdog role :
rajkan01 Jan 9, 2019
04b63c6
SW Watchdog role:
rajkan01 Jan 17, 2019
ed34898
HW Watchdog and SW watchdog interface
rajkan01 Jan 18, 2019
dc1419b
Hw Watchdog UnitTest cases
rajkan01 Jan 23, 2019
7de2af7
SW watchdog unittest cases
rajkan01 Jan 25, 2019
a628339
fix: Fixing rebased created bugs
rajkan01 Feb 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .astyleignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ TESTS/mbed_hal/trng/pithy
targets
components/802.15.4_RF
components/wifi
components/TARGET_PSA/TARGET_TFM
tools
15 changes: 11 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### Description

<!--
<!--
Required
Add here detailed changes summary, testing results, dependencies
Add here detailed changes summary, testing results, dependencies
Good example: https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html (Pull request template)
-->


### Pull request type

<!--
<!--
Required
Please add only one X to one of the following types. Do not fill multiple types (split the pull request otherwise).
Please note this is not a GitHub task list, indenting the boxes or changing the format to add a '.' or '*' in front
Expand All @@ -26,8 +26,15 @@

### Reviewers

<!--
<!--
Optional
Request additional reviewers with @username
-->

### Release Notes

<!--
Optional
In case of breaking changes, functionality changes or refactors, please add release notes here.
For more information, please see [the contributing guidelines](https://os.mbed.com/docs/mbed-os/latest/contributing /workflow.html#pull-request-types).
-->
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ matrix:
- env:
- NAME=psa-autogen
script:
# Run SPM code generator and check that changes are not needed
- python tools/spm/generate_partition_code.py
# Run SPM code generators and check that changes are not needed
- python tools/psa/generate_mbed_spm_partition_code.py
- git diff --exit-code
- python tools/psa/generate_tfm_partition_code.py
- git diff --exit-code
File renamed without changes.
23 changes: 23 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Unless specifically indicated otherwise in a file, files are licensed under the Apache 2.0 license,
as can be found in: LICENSE-apache-2.0.txt

Folders containing files under different permissive license than Apache 2.0 are listed below. Each folder should contain its own README file with license specified for its files. The original license text is included in those source files.

- [cmsis](./cmsis) - MIT, BSD-3-Clause
- [components/802.15.4_RF/mcr20a-rf-driver](./components/802.15.4_RF/mcr20a-rf-driver) - BSD-3-Clause
- [components/TARGET_PSA/TARGET_TFM](./components/TARGET_PSA/TARGET_TFM) - BSD-3-Clause
- [features/cryptocell/FEATURE_CRYPTOCELL310](./features/cryptocell/FEATURE_CRYPTOCELL310) - ARM Object Code and Header Files License
- [features/FEATURE_BOOTLOADER](./features/FEATURE_BOOTLOADER) - PBL
- [features/FEATURE_BLE/targets](./features/FEATURE_BLE/targets) - BSD-style, PBL, MIT-style
- [features/lorawan](./features/lorawan) - Revised BSD
- [features/lwipstack](./features/lwipstack) - BSD-style, MIT-style
- [features/nanostack/sal-stack-nanostack](./features/nanostack/sal-stack-nanostack) - BSD-3-Clause
- [features/storage](./features/storage) - BSD-style, MIT
- [features/netsocket/emac-drivers](./features/netsocket/emac-drivers) - BSD-style
- [features/frameworks/unity/unity](./features/frameworks/unity/unity) - MIT
- [features/unsupported](./features/unsupported) - MIT-style, BSD-style
- [rtos](./rtos) - MIT
- [drivers](./drivers) - MIT
- [TESTS/mbed_hal/trng/pithy](./TESTS/mbed_hal/trng/pithy) - BSD-3-Clause
- [tools/data/rpc](./tools/data/rpc) - MIT
- [targets](./targets) - PBL, BSD-style, MIT-style, Zlib-style, Public-domain
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ The [release notes](https://os.mbed.com/releases) detail the current release. Yo

## License and contributions

The software is provided under [Apache-2.0 license](LICENSE). Contributions to this project are accepted under the same license. Please see [contributing.md](CONTRIBUTING.md) for more info.
The software is provided under the [Apache-2.0 license](LICENSE-apache-2.0.txt). Contributions to this project are accepted under the same license. Please see [contributing.md](CONTRIBUTING.md) for more information.

This project contains code from other projects. The original license text is included in those source files. They must comply with our [license guide](https://os.mbed.com/docs/latest/reference/license.html)
This project contains code from other projects. The original license text is included in those source files. They must comply with our [license guide](https://os.mbed.com/docs/latest/reference/license.html).

Folders containing files under different permissive license than Apache 2.0 are listed in the [LICENSE](LICENSE) file.

## Getting started for developers

Expand Down
163 changes: 163 additions & 0 deletions TESTS/host_tests/reset_reason.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
"""
Copyright (c) 2018 ARM Limited
SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import time
from mbed_host_tests import BaseHostTest
from mbed_host_tests.host_tests_runner.host_test_default import DefaultTestSelector

DEFAULT_SYNC_DELAY = 4.0

MSG_VALUE_WATCHDOG_PRESENT = 'wdg_present'
MSG_VALUE_DUMMY = '0'
MSG_VALUE_RESET_REASON_GET = 'get'
MSG_VALUE_RESET_REASON_CLEAR = 'clear'
MSG_VALUE_DEVICE_RESET_NVIC = 'nvic'
MSG_VALUE_DEVICE_RESET_WATCHDOG = 'watchdog'

MSG_KEY_DEVICE_READY = 'ready'
MSG_KEY_RESET_REASON_RAW = 'reason_raw'
MSG_KEY_RESET_REASON = 'reason'
MSG_KEY_DEVICE_RESET = 'reset'
MSG_KEY_SYNC = '__sync'

RESET_REASONS = {
'POWER_ON': '0',
'PIN_RESET': '1',
'BROWN_OUT': '2',
'SOFTWARE': '3',
'WATCHDOG': '4',
'LOCKUP': '5',
'WAKE_LOW_POWER': '6',
'ACCESS_ERROR': '7',
'BOOT_ERROR': '8',
'MULTIPLE': '9',
'PLATFORM': '10',
'UNKNOWN': '11'
}


def raise_if_different(expected, actual, text=''):
"""Raise a RuntimeError if actual is different than expected."""
if expected != actual:
raise RuntimeError('{}Got {!r}, expected {!r}'
.format(text, actual, expected))


class ResetReasonTest(BaseHostTest):
"""Test for the Reset Reason HAL API.

Given a device supporting a Reset Reason API.
When the device is restarted using various methods.
Then the device returns a correct reset reason for every restart.
"""

def __init__(self):
super(ResetReasonTest, self).__init__()
self.device_has_watchdog = None
self.raw_reset_reasons = set()
self.sync_delay = DEFAULT_SYNC_DELAY
self.test_steps_sequence = self.test_steps()
# Advance the coroutine to it's first yield statement.
self.test_steps_sequence.send(None)

def setup(self):
sync_delay = self.get_config_item('forced_reset_timeout')
self.sync_delay = sync_delay if sync_delay is not None else DEFAULT_SYNC_DELAY
self.register_callback(MSG_KEY_DEVICE_READY, self.cb_device_ready)
self.register_callback(MSG_KEY_RESET_REASON_RAW, self.cb_reset_reason_raw)
self.register_callback(MSG_KEY_RESET_REASON, self.cb_reset_reason)
self.register_callback(MSG_KEY_DEVICE_RESET, self.cb_reset_reason)

def cb_device_ready(self, key, value, timestamp):
"""Request a raw value of the reset_reason register.

Additionally, save the device's watchdog status on the first call.
"""
if self.device_has_watchdog is None:
self.device_has_watchdog = (value == MSG_VALUE_WATCHDOG_PRESENT)
self.send_kv(MSG_KEY_RESET_REASON_RAW, MSG_VALUE_RESET_REASON_GET)

def cb_reset_reason_raw(self, key, value, timestamp):
"""Verify that the raw reset_reason register value is unique.

Fail the test suite if the raw reset_reason value is not unique.
Request a platform independent reset_reason otherwise.
"""
if value in self.raw_reset_reasons:
self.log('TEST FAILED: The raw reset reason is not unique. '
'{!r} is already present in {!r}.'
.format(value, self.raw_reset_reasons))
self.notify_complete(False)
else:
self.raw_reset_reasons.add(value)
self.send_kv(MSG_KEY_RESET_REASON, MSG_VALUE_RESET_REASON_GET)

def cb_reset_reason(self, key, value, timestamp):
"""Feed the test_steps coroutine with reset_reason value.

Pass the test suite if the coroutine yields True.
Fail the test suite if the iterator stops or raises a RuntimeError.
"""
try:
if self.test_steps_sequence.send(value):
self.notify_complete(True)
except (StopIteration, RuntimeError) as exc:
self.log('TEST FAILED: {}'.format(exc))
self.notify_complete(False)

def test_steps(self):
"""Generate a sequence of test steps.

This coroutine calls yield to wait for the input from the device
(the reset_reason). If the device gives the wrong response, the
generator raises a RuntimeError exception and fails the test.
"""
# Ignore the first reason.
__ignored_reset_reason = yield
self.raw_reset_reasons.clear()
self.send_kv(MSG_KEY_RESET_REASON, MSG_VALUE_RESET_REASON_CLEAR)
__ignored_clear_ack = yield

# Request a NVIC_SystemReset() call.
self.send_kv(MSG_KEY_DEVICE_RESET, MSG_VALUE_DEVICE_RESET_NVIC)
__ignored_reset_ack = yield
time.sleep(self.sync_delay)
self.send_kv(MSG_KEY_SYNC, MSG_VALUE_DUMMY)
reset_reason = yield
raise_if_different(RESET_REASONS['SOFTWARE'], reset_reason, 'Wrong reset reason. ')
self.send_kv(MSG_KEY_RESET_REASON, MSG_VALUE_RESET_REASON_CLEAR)
__ignored_clear_ack = yield

# Reset the device using DAP.
self.reset_dut(DefaultTestSelector.RESET_TYPE_SW_RST)
reset_reason = yield
raise_if_different(RESET_REASONS['PIN_RESET'], reset_reason, 'Wrong reset reason. ')
self.send_kv(MSG_KEY_RESET_REASON, MSG_VALUE_RESET_REASON_CLEAR)
__ignored_clear_ack = yield

# Start a watchdog timer and wait for it to reset the device.
if not self.device_has_watchdog:
self.log('DUT does not have a watchdog. Skipping this reset reason.')
else:
self.send_kv(MSG_KEY_DEVICE_RESET, MSG_VALUE_DEVICE_RESET_WATCHDOG)
__ignored_reset_ack = yield
time.sleep(self.sync_delay)
self.send_kv(MSG_KEY_SYNC, MSG_VALUE_DUMMY)
reset_reason = yield
raise_if_different(RESET_REASONS['WATCHDOG'], reset_reason, 'Wrong reset reason. ')

# The sequence is correct -- test passed.
yield True
73 changes: 73 additions & 0 deletions TESTS/host_tests/sync_on_reset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
"""
mbed SDK
Copyright (c) 2017 ARM Limited

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import time
from mbed_host_tests import BaseHostTest

DEFAULT_SYNC_DELAY = 4.0

MSG_VALUE_DUMMY = '0'
MSG_KEY_DEVICE_READY = 'ready'
MSG_KEY_START_CASE = 'start_case'
MSG_KEY_DEVICE_RESET = 'reset_on_case_teardown'
MSG_KEY_SYNC = '__sync'


class SyncOnReset(BaseHostTest):
"""Host side test that handles device reset during case teardown.

Given a device that performs a reset during a test case teardown.
When the device notifies the host about the reset.
Then the host:
* keeps track of the test case index of the current test suite,
* performs a dev-host handshake,
* advances the test suite to next test case.

Note:
Developed for a watchdog test, so that it can be run on devices that
do not support watchdog timeout updates after the initial setup.
As a solution, after testing watchdog with one set of settings, the
device performs a reset and notifies the host with the test case number,
so that the test suite may be advanced once the device boots again.
"""

def __init__(self):
super(SyncOnReset, self).__init__()
self.test_case_num = 0
self.sync_delay = DEFAULT_SYNC_DELAY

def setup(self):
sync_delay = self.get_config_item('forced_reset_timeout')
self.sync_delay = sync_delay if sync_delay is not None else DEFAULT_SYNC_DELAY
self.register_callback(MSG_KEY_DEVICE_READY, self.cb_device_ready)
self.register_callback(MSG_KEY_DEVICE_RESET, self.cb_device_reset)

def cb_device_ready(self, key, value, timestamp):
"""Advance the device test suite to the next test case."""
self.send_kv(MSG_KEY_START_CASE, self.test_case_num)

def cb_device_reset(self, key, value, timestamp):
"""Wait for the device to boot and perform a handshake.

Additionally, keep track of the last test case number.
"""
try:
self.test_case_num = int(value)
except ValueError:
pass
self.test_case_num += 1
time.sleep(self.sync_delay)
self.send_kv(MSG_KEY_SYNC, MSG_VALUE_DUMMY)
Loading