Commit Graph

801 Commits (bce345f3984fdb41db4ea6c6d56ae9af00178385)

Author SHA1 Message Date
Anna Bridge 80fe861f1d
Merge pull request #12035 from kjbracey-arm/callback_prep
Preparation for Callback changes
2020-01-21 11:50:43 +00:00
Martin Kojtal 67cf9f7bc5
Merge pull request #12213 from hugueskamba/hk-replace-uartserial-esp
ESP8266: Replace UARTSerial references with BufferedSerial
2020-01-17 09:10:01 +00:00
Martin Kojtal d6e69ef57b
Merge pull request #12208 from hugueskamba/hk-replace-uartserial-st
ST targets: Replace UARTSerial references with BufferedSerial
2020-01-17 08:19:09 +00:00
Hugues Kamba efb512706f ESP8266: Replace UARTSerial references with BufferedSerial
`BufferedSerial` is `UARTSerial` renamed to convey the original purpose
of the class. It is the recommended buffered I/O serial class.
2020-01-16 10:34:14 +00:00
Martin Kojtal 194fc6667e
Merge pull request #12234 from michalpasztamobica/esp8266_builtin_dns
ESP8266: Add built-in hostname resolution handling (disabled by default)
2020-01-15 13:00:57 +01:00
Martin Kojtal f4842c7c6d
Merge pull request #12157 from michalpasztamobica/esp8266_send_retry
ESP8266: Avoid duplicate data sends
2020-01-15 12:57:12 +01:00
Michal Paszta ea2f36eadf ESP8266: accept partial writes for TCP and clean up code 2020-01-10 16:53:23 +02:00
Michal Paszta f032274729 ESP8266: Add built-in DNS resolution (disabled by default) 2020-01-10 09:17:12 +02:00
Kevin Bracey d6a48b5124 Turn NULLs into nullptr
Avoids overload problems with Callback(nullptr) versus Callback(fnptr).
2020-01-09 14:52:54 +02:00
Martin Kojtal 974baaf199
Merge pull request #12143 from VeijoPesonen/blockdevices_testable
Blockdevice config changes to make it possible to run littlefs filesystem tests
2020-01-09 12:04:20 +01:00
Chun-Chieh Li 4405ab46b6 ESP8266: Simplify flow control and enable per-socket reconnection
1.  Fix 'spurious close' by adding close() in open(). 'spurious close' gets frequent and cannot ignore when send() changes to asynchronous. User can retry open() until 'spurious close' gets true.
2.  Allow only one actively sending socket because:
    (1) ESP8266 AT packets 'SEND OK'/'SEND FAIL' are not associated with socket ID. No way to tell them.
    (2) In original implementation, ESP8266::send() is synchronous, which implies only one actively sending socket.
3.  Register 'SEND OK'/'SEND FAIL' oobs, like others in ESP8266::ESP8266 constructor. Don't get involved in oob management with send status because ESP8266 modem possibly doesn't reply these packets on error case.
4.  Now that ESP8266::send() changes to asynchronous, drop the code with _parser.recv("SEND OK")/_parser.recv("SEND FAIL"). _parser.recv("SEND OK")/_parser.recv("SEND FAIL") and 'SEND OK'/'SEND FAIL' oobs both consume 'SEND OK'/'SEND FAIL' packets and complicate flow control.
2020-01-09 12:48:22 +02:00
Martin Kojtal af03f839e2
Merge pull request #10959 from OpenNuvoton/nuvoton_m2351_psa
M2351: Support TFM level 1
2020-01-08 16:09:35 +01:00
Hugues Kamba 03cff0a02c ST targets: Replace UARTSerial references with BufferedSerial
BufferedSerial is UARTSerial renamed to convey the original purpose of
the class. It is the recommended buffered I/O serial class.
2020-01-08 08:34:20 +00:00
Martin Kojtal 39daa5fd77
Merge pull request #12109 from hugueskamba/hk-replace-rawserial-usage
Replace RawSerial as it has been deprecated
2020-01-07 12:59:57 +01:00
Hugues Kamba dbaeeaf758 Replace RawSerial instances as it has been deprecated 2020-01-06 15:48:49 +00:00
Chun-Chieh Li 85dfc1a971 TFM: Change NS lock functions to weak
Default NS lock functions use mutex to guarantee serialization into secure world.
But this mechanism doesn't support pre-rtos and interrupt-disabled.
This commit changes these functions to weak so that platform can override them to provide another mechanism.
This approach is just what TF-M repository is adopting.

https://review.trustedfirmware.org/c/trusted-firmware-m/+/1460
2020-01-06 15:46:09 +08:00
Veijo Pesonen 9763ad3b2d DataFlashBlockDevice: Makes default configuration to use mbed_lib.json settings
DataFlashBlockDevice parameters come from mbed_lib.json if not provided
explicitly.
2020-01-03 15:31:01 +02:00
Veijo Pesonen 67676dc123 SPIFReducedBlockDevice: Makes default configuration to use mbed_lib.json settings
SPIFReducedBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests with RSPIF
block device
2020-01-03 15:30:13 +02:00
Veijo Pesonen 23f87877a1 SPIFBlockDevice: Makes default configuration to use mbed_lib.json settings
SPIFBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests with SPIF
modules
2020-01-03 15:28:41 +02:00
Veijo Pesonen 3be2b8bf12 QSPIFBlockDevice: Makes default configuration to use mbed_lib.json settings
QSPIFBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests with QSPIF
modules
2020-01-03 15:25:40 +02:00
Veijo Pesonen 803ae3444d SDBlockDevice: Makes default configuration to use mbed_lib.json settings
SDBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests.
2020-01-03 15:25:40 +02:00
Martin Kojtal 4feca5942a
Merge pull request #12178 from tymoteuszblochmobica/lpctls
Fixes for LPC55S69_NS TLS tests
2020-01-03 11:29:49 +00:00
Michal Paszta d23d55c24a ESP8266: Introduce single send_status instead of two flags 2020-01-02 17:21:04 +02:00
Tymoteusz Bloch 0adb47b3aa Fixed ESP8266 nullpointer dereference. 2019-12-31 16:45:51 +01:00
Michal Paszta 902feddf2e ESP8266: Improve error handling and partial sends 2019-12-31 10:30:37 +02:00
Michal Paszta de2896c659 ESP8266: add a retry mechanism to avoid duplicate data sends
We are now checking if ESP8266 has confirmed receiving data over serial
port with an undocumented (but existing) "Recv x bytes" message. Next we
are explicitly waiting for an official "SEND OK".
2019-12-31 10:30:37 +02:00
Ron Eldor dadb621a97 Change size embedded in the temp_ram_page_data
The size stated in the struct header was 0xB0, however
the actual size(including the header) is 0xAC. Changed the
len value in the header, to avoid memory corruption.
Raised in #12171
2019-12-29 17:28:56 +02:00
Anna Bridge 03e29df0c4
Merge pull request #12098 from ARMmbed/AnttiKauppila-patch-1
Wrong order of code fixed
2019-12-17 16:26:40 +00:00
Antti Kauppila abf2ea94ba
Wrong order of code fixed
The source file had dead code because code was behind return and therefore unreachable. Order was changed to have correct behaviour
2019-12-13 08:40:59 +02:00
Antti Kauppila d5fdcfdab8 busy s... fix (ONME-4352)
oob handling added for OK in busy scenario

Fixed spellcheck error

trace added for ok
2019-12-12 09:36:34 +02:00
Martin Kojtal 5c8d46f4e9
Merge pull request #12022 from anttiylitokola/master
Make ESP8266 compatible with bare metal profile
2019-12-11 14:23:46 +01:00
Przemyslaw Stekiel ee5953ad74 Add static pinmap support: SDBlockDevice, kvstore, system storage
This is done in order to enable static pin-map for Mbed Cloud Client Example. This should give extra ROM savings, ~1KB.
2019-12-10 12:26:23 +01:00
Martin Kojtal 412a9317de
Merge pull request #12017 from VeijoPesonen/remove_nvstore
NVStore: already deprecated implementation removed
2019-12-05 09:10:30 +01:00
Martin Kojtal 020e508e42
Merge pull request #12011 from jeromecoutant/PR_STMOD_DEBUG
STMOD_CELLULAR: improve debug print
2019-12-04 10:10:44 +01:00
Antti Yli-Tokola 10687d6c3f Make ESP8266 compatible with non rtos build 2019-12-04 09:23:18 +02:00
Veijo Pesonen 060a1c6df7 NVStore: deprecated implementation removed 2019-12-03 15:36:31 +02:00
jeromecoutant 00d91149cc STMOD_CELLULAR: improve debug print 2019-12-03 14:22:47 +01:00
Kevin Bracey c67816b5ff Adjust code for MbedCRC changes
* Make mbed_error use bitwise MbedCRC call rather than local
  implementation.
* Remove use of POLY_32BIT_REV_ANSI from LittleFS.
* Move some MbedCRC instances closer to use - construction cost is
  trivial, and visibility aids compiler optimisation.
2019-12-02 14:45:37 +02:00
Hugues Kamba 20f41a0540 LPC55S69_NS: Fix baremetal compilation error
As the `psa` library is not included in the baremetal profile, perform
a TFM system reset only if the `psa` library is included in
the build otherwise perform a normal CMSIS system reset.
2019-11-28 14:53:31 +00:00
Martin Kojtal ffdd54315f
Merge pull request #11941 from michalpasztamobica/remove_internal_string_apis
Remove string-based API usage within mbed-os
2019-11-28 14:26:03 +01:00
Michal Paszta 83cd0d6c1a ESP8266: add SocketAddress-based API for get_ip_address, get_gateway and get_netmask 2019-11-27 20:02:27 +02:00
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Jarkko Paso 41b25d5007 S2-LP: Preamble configuration to follow Wi-SUN FAN specification 2019-11-19 12:10:51 +02:00
Martin Kojtal fd22997b60
Merge pull request #11559 from kjbracey-arm/crc
MbedCRC and CRC HAL revisions
2019-11-13 18:24:04 +01:00
Kevin Bracey 8811972201 Adjust code for MbedCRC changes
* Make mbed_error use bitwise MbedCRC call rather than local
  implementation.
* Remove use of POLY_32BIT_REV_ANSI from LittleFS.
* Move some MbedCRC instances closer to use - construction cost is
  trivial, and visibility aids compiler optimisation.
2019-11-13 14:31:49 +02:00
Kyle Kearney 96cfc7393d Disable attempted 4-byte addressing for some boards
4-byte addressing has been seen to cause failures on NORDIC
boards and with Macronix memories. Suppress the attempt to enable it
on that hardware (via vendor quirks and a target check) until either
the failure cause can be fixed or a more robust suppression mechanism
is implemented.
2019-11-12 12:26:26 -08:00
Kyle Kearney 2526b9fc00 QSPIF: Handle fast mode enable via vendor quirks
Use a vendor id check to only perform this enable on devices which define the
 second configuration register where the fast mode enable bit lives.
Change _enable_fast_mode to use the standard status register reading and writing functions
2019-11-12 12:26:26 -08:00
Kyle Kearney 02dbf68e17 QSPIF: Handle parts with extra config registers
Default to 2 status registers, but update this value if necessary
 during vendor quirk handling for parts (currently only Macronix)
 which have one status register and two control registers. For the
 purposes of QSPIFBlockDevice, these are all considered status
 (or at least "status-like") registers because they are all written
 via the Write Status Register instruction.
Set the custom RDCR instruction for Macronix during quirk handling.
Update reading and writing of status registers to handle a variable
 number of status registers.
2019-11-12 12:26:25 -08:00
Kyle Kearney eb5494e7a9 QSPIF: Centralize handling of vendor quirks
Introduce a separate function for handling alterations to device interaction
which are not covered by the SFDP tables and therefore require checking against
the vendor id.
2019-11-12 12:26:25 -08:00
Kyle Kearney 26314d96c5 Don't clear quad enable when clearing block protection
QSPIFBlockDevice::_clear_block_protection() has logic to retain the
WIP and WEL bits in status register 1, but it failed to account for
the situation where the QE bit is also in status register 1.
In _sfdp_set_quad_enabled, note the status register and bit therein
for the quad enable, so that _clear_block_protection can retain it.
2019-11-12 12:26:25 -08:00