Commit Graph

29223 Commits (e6084562b4a13e1722dcef51a13c16f9df9c61ff)

Author SHA1 Message Date
phst 413b6d62f4 Fix Astyle error 2020-03-25 15:37:13 +01:00
phst ac20dfc745 Fix Astyle error 2020-03-25 14:20:21 +01:00
Martin Kojtal ddd3b013e8
Merge pull request #12632 from evedon/ed-minimal-snprintf
Fix snprintf in minimal-printf library
2020-03-25 11:34:23 +01:00
Martin Kojtal b62fdaed1f
Merge pull request #12685 from kivaisan/remove_deprecated_netsocket_methods
Remove deprecated netsocket methods
2020-03-25 10:12:55 +01:00
Michal Paszta cf2ba1d37d ESP8266: SNTP config only runs when enabled 2020-03-25 10:47:26 +02:00
Martin Kojtal fff23428de
Merge pull request #12686 from jeromecoutant/PR_REVERT_ETHERNET
STM32 EMAC : remove TIMEOUT issue when cable is not plugged yet
2020-03-25 08:59:55 +01:00
Maciej Bocianski 1ffb4d7356 update USBMSD::memoryWrite implementation
Fix prevents unaligned USB transfers
2020-03-24 22:05:46 +01:00
Maciej Bocianski 89e67d3136 update USBMSD::memoryRead implementation
Fix protects underlaying block device from out-of-bound reads
2020-03-24 21:52:03 +01:00
Maciej Bocianski ac105f5a18 update USBMSD::infoTransfer implementation
Fix protects underlaying block device from out-of-bound read/writes
 - prevents the host from setting block device addres larger then block device size
 - prevents the host from setting wrong read/write lenght
2020-03-24 21:28:23 +01:00
Kyle Kearney 85d2e8f2f2 Add kvstore/conf to unittest includes
The unittests compile DirectAccessDeviceKey.cpp which depends on
kv_config.h, which lives in features/storage/kvstore/conf
2020-03-24 12:36:36 -07:00
Kyle Kearney ab8ac8871c Remove stray include of TDBStore.h 2020-03-24 12:27:21 -07:00
Kyle Kearney ae7c6203cc kv_config: Remove hard fail on too few pages
STORE_SECTORS is a hard requirement. If there are fewer than 2 pages
then the kvstore will not work, because the garbage collection process
relies on having at least two sectors to work with.
STORE_PAGES is a heuristic. It is a reasonable default to use if the
application does not specify the amount of flash to use for TDBStore.
But if an application knows that a smaller number of pages will suffice
for its specific needs, then that is valid and should be permitted.
2020-03-24 12:27:21 -07:00
Kyle Kearney 7f18a6ce49 Move flash bounds helpers from TDBStore to kv_config 2020-03-24 12:27:21 -07:00
Kyle Kearney 926423c109 Reuse TDBStore default size computation in devicekey test
Replace custom caluation that always assumed two sectors with the standard
calculation exposed on TDBStore.
2020-03-24 12:27:21 -07:00
Kyle Kearney 622a50ff6a KV_CONFIG: Change errors to use tr_error not tr_warning 2020-03-24 12:27:21 -07:00
Kyle Kearney e1b857078a Remove unnecessary reference-typed arguments
No callers make use of the modified argument values, so change
them to a more straightforward pass by value.
2020-03-24 12:27:21 -07:00
Kyle Kearney 3ef04db1a3 TDBStore: Increase min pages to 14
Increase minimum page count from 10 to 14 based on further experiments
with features-storage-tests-kvstore-static_tests.
2020-03-24 12:27:21 -07:00
Kyle Kearney 0002830c03 TDBStore: remove get_flash_bounds input constraint
Handle the case where the entirety of flash (size = 0) is required
for a flash memory starting at address 0, instead of erroring out.
2020-03-24 12:27:20 -07:00
Kyle Kearney 9d414316da TDBStore: Fix potential alignment issue in default addresses
When 10 pages is larger than 2 sectors, align the selected size
down to be an even multiple of the sector size, to ensure that
the allocated space divides cleanly in half for garbage collection.
2020-03-24 12:27:20 -07:00
Kyle Kearney 7cd4d11a8a Expand error checks in _calculate_blocksize_match_tdbstore
The minimum size required by tdbstore is either 2 sectors or 10 pages,
whichever is larger. Correspondingly, adjust the error checks in
_calculate_blocksize_match_tdbstore to match this requirement.
2020-03-24 12:27:20 -07:00
Kyle Kearney cda0af66eb Move TDB bounds computation for better reuse
Migrate into TDBStore so that DirectAccessDeviceKey can use it as well.
2020-03-24 12:27:20 -07:00
Kyle Kearney afa88b76d4 Refactor internal flash TDB bounds determination
Default the size to the larger of two sectors or 10 pages, so that the
  computation works better on devices with a low sector to page size ratio.
Reduce code duplication.
2020-03-24 12:27:20 -07:00
petroborys 3f6a48fcc8 Added RGB LEDs to PinNames.h 2020-03-24 21:05:07 +02:00
jeromecoutant a1c159e0b5 STM32 GCC Unspecified RTOS error 2020-03-24 17:32:13 +01:00
Kevin Bracey 1ecd9604f6 Disable C++ static denstructors in ARMC6 compiler
We disable C++ static destructors as best as possible in the various
toolchains, trying to eliminate unwanted destructor code. We don't want
to waste RAM or ROM on the C++-standard-specified behaviour of running
all statically-constructed objects' destructors in reverse order on
exit; we're never going to perform an orderly exit.

Techniques used include:

* `SingletonPtr` - makes an object be "lazily constructed" on first use,
  and also eliminates its destructor. Lazy construction adds ROM+RAM
  overhead.
* `__eabi_atexit` is stubbed out, preventing RAM usage by run-time
  registration of static destructors.
* GCC has `exit` wrapped to kill shutdown code
* IAR has static destructors disabled in the compiler flags

Killing static destructors in the compiler is the optimum; if we only
stub out `__eabi_atexit`, the compiler is still inserting calls to it,
and referencing the destructors in those call.

Clang 8 added the compiler option `-fno-c++-static-destructors` (and the
object attributes `[[clang::no_destroy]]` and
`[[clang::always_destroy]]` for fine control).

We can hence enable that option in ARMC6 tool profiles, matching IAR.

This option appears to exist in ARM Compiler 6.11, but generates an
apparently spurious linker error about `EthernetInterface`. It works in
ARM Compiler 6.13, so this PR needs to wait until the compiler is
updated.
2020-03-24 15:30:39 +00:00
Kimmo Vaisanen 619a5a7bcc Netsocket: Remove deprecated constructor with open
Default constructor with separate open call should be used instead.
2020-03-24 12:46:30 +02:00
Kimmo Vaisanen 4918bc6aad TCPSocket: Remove deprecated contructor with open
Default constructor and separate open call should be used instead.
2020-03-24 12:46:30 +02:00
Kimmo Vaisanen 2cfee7be71 Netsocket: Remove deprecated InternetSocket::attach methods
InternetSocket::sigio should be used instead.
2020-03-24 12:46:30 +02:00
Kimmo Vaisanen 62170dd721 Netsocket: Fix SocketAddress stub for new API 2020-03-24 11:05:58 +02:00
Kevin Bracey 4eda58893e SocketAddress rework
* Add optimised constexpr default constructor. Default construction
  was previously by a heavyweight defaulted `nsapi_addr_t` parameter.
* Remove deprecated resolving constructor.
* Take `nsapi_addr_t` inputs by constant reference rather than value.
* Inline the trivial getters and setters.
* Use `unique_ptr` to manage the text buffer.
* Make `operator bool` explicit.
* Optimise some methods.
* Update to C++11 style (default initialisers, nullptr etc)
2020-03-24 11:05:33 +02:00
jeromecoutant 6c57c9fd67 mbed test with dual core targets
For Dual Core targets, there are in fact 2 sub-targets, CM4 and CM7 targets.
This allows to execute tests with boards detected by mbedls.
2020-03-24 09:53:36 +01:00
jeromecoutant 7b0ac0669f MBED TRACE default level is INFO 2020-03-24 09:36:21 +01:00
Marcin Tomczyk 116a8a75b6 [IOTSTOR-990] SPIFBlockDevice doesn't play nice on shared SPI bus. Fix by use valid constructor SPI 2020-03-24 01:22:59 -07:00
Martin Kojtal 5d64e55880
Merge pull request #12651 from kivaisan/add_ec2x_start_timout_configuration
Cellular: Make Quectel EC2x modem start up timeout configurable
2020-03-24 08:53:59 +01:00
Martin Kojtal 2c5660ae35
Merge pull request #12642 from OpenNuvoton/nuvoton_m263_custom_board
M263: Support custom board
2020-03-24 08:52:47 +01:00
Chun-Chieh Li e6823c6af5 M2351: Add SPDX license identifier for BSP files 2020-03-24 10:47:03 +08:00
Chun-Chieh Li d1655854c9 M2351: Add SPDX license identifier 2020-03-24 10:03:44 +08:00
Dustin Crossman 1e000bb9ae QSPI driver also acquires ownership upon initialization now. 2020-03-23 12:11:47 -07:00
Volodymyr Medvid 0ac62d0317 PSoC6: enable export to uVision and IAR 2020-03-23 20:08:30 +01:00
Martin Kojtal e805b582c0
Merge pull request #12673 from ARMmbed/mergify-update
Mergify update
2020-03-23 19:59:47 +01:00
Martin Kojtal ae0ec86d59
Merge pull request #12667 from boomer41/fix-devicekey
Add check for return code in DeviceKey to avoid injecting invalid ROT
2020-03-23 19:59:10 +01:00
jeromecoutant 249752e7bc STM32H7: enable QSPI
- DISCO_H747I board has MT25QL512 embedded QSPI
2020-03-23 18:46:26 +01:00
adbridge f65b886f6d Fix inverted logic for label release-version present 2020-03-23 17:44:12 +00:00
Michal Paszta 8175e32717 Add get_time function for ESP8266
get_time function allows access to SNTP functionalities of ESP8266
2020-03-23 19:20:48 +02:00
Lingkai Dong de89b9a572 BLE DeviceInformationService: fix deprecated addService usage 2020-03-23 16:37:21 +00:00
Lingkai Dong 682927d0a7 Remove deprecated BLE:: API
Note: The BLE() constructor is now private.
2020-03-23 16:14:20 +00:00
Lingkai Dong 266de6a69a Remove BLE services that are not maintained anymore 2020-03-23 16:14:19 +00:00
adbridge b048e7b822 Mergify has no open condition! Change to not closed 2020-03-23 16:01:14 +00:00
adbridge 7479817a17 Move True to true 2020-03-23 15:50:59 +00:00
adbridge 0c0233c5ee Mergify: Fix remove_all logical condition 2020-03-23 15:41:44 +00:00