Commit Graph

837 Commits (2d7e1ba94333087bdb5852b3840171a563b31d45)

Author SHA1 Message Date
Martin Kojtal bde0f5660b
Merge pull request #12392 from GaborAbonyi/psa_crypto_fix
Fix psa_key_management_operations
2020-02-12 13:11:27 +00:00
Martin Kojtal d3078a39b1
Merge pull request #12379 from mprse/STDIO_UART_restricted_all
Add STDIO UART as restricted for FPGA testing for all targets and support for restricting GPIO
2020-02-11 10:20:25 +00:00
Martin Kojtal 8c51f4f163
Merge pull request #12395 from boomer41/fix-i2ceepromblockdevice
Fix I2CEEBlockdevice
2020-02-10 14:28:11 +00:00
Martin Kojtal deb4995dae
Merge pull request #12150 from Patater/update-tls-crypto-20191220
Update Mbed TLS and Mbed Crypto to latest as of 2019-12-20
2020-02-10 13:04:12 +00:00
Stephan Brunner d7f3fcc3d3
Add error check for _sync() in I2CEEBlockDevice::read 2020-02-10 10:31:41 +01:00
Przemyslaw Stekiel 0d9a54f92e Provide pinmap_uart_restricted_peripherals() function under DEVICE_SERIAL 2020-02-10 08:17:55 +01:00
Stephan Brunner 97c00f1a22 Fix I2CEEBlockDevice read()
When reading a data block, the returned error codes from the I2C subsystem
are different from normal single byte operations. We have to verify that
the read-function for multiple bytes does return zero, because it
returns "readBytes != expectedLength".

Additionally, sync before trying to read from the eeprom as slow devices
may not yet be ready to return data, especially with low-priced ones
used with fast controllers.
2020-02-07 22:57:04 +01:00
Gabor Abonyi c94b3e41ee Fix psa_key_management_operations
At these locations, psa_key_attribute variables are used without
initialisation. The function getting it (psa_get_key_attributes),
is freeing attributes->domain_parameters, which can contain random
address from the stack.

Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
2020-02-07 16:23:20 +01:00
Martin Kojtal d847f9f164
Merge pull request #12305 from kivaisan/remove_multi_athandler_support_v2
Cellular: Remove support for multiple ATHandlers
2020-02-07 11:00:41 +00:00
Przemyslaw Stekiel 3c0982d939 Add pinmap_gpio_restricted_pins() to provide list of restricted GPIO pins
This is a special case since targets do not provide by default GPIO pin-maps.
This extension is required for FPGA GPIO tests - if some pins have limitations (e.g. fixed pull-up) we need to skip these pins while testing.
To do that we were adding a dummy pin-map with commented out pins that can't be tested because of the limitations.
This solution is redundant and the proposition is to provide a list of restricted gpio pins if required (by default weak implementation is provided with an empty list).

This mechanism will be backward compatible, so the old method with dummy gpio pinmap will also work. The switch from dummy pin-maps to pinmap_gpio_restricted_pins() will be performed in separate commits/PRs.
2020-02-07 10:45:02 +01:00
Przemyslaw Stekiel 54f4777e64 Add STDIO UART as restricted for FPGA testing for all targets
Substantiation for this is that the STDIO UART peripheral is used by Mbed, so it should never be tested.

Also solve the potential problem with accidenty skipped peripherals in FPGA testing. Currently, we have a one `pinmap_restricted_peripherals()` function for all interfaces (UART, I2C, SPI, etc.).
The problem can be encountered if different interfaces have the same peripheral ids (e.g. `UART_0` = 0, `SPI_0` = 0). In this case, if `UART_0` is on the restricted list, then SPI tests will be also skipped for `SPI_0`.
The good news is that usually, the peripheral ids are the base addresses of the peripheral's register set, but we can't rely on this. It is also good that `pinmap_restricted_peripherals()` at this moment is only required for STDIO UART (Nuvoton and STM).

To solve this issue we will change name of `pinmap_restricted_peripherals()` to `pinmap_uart_restricted_peripherals()`, make STDIO UART restricted by default for all targets and update FPGA test utilily functions to use `pinmap_uart_restricted_peripherals()` to skip only uart peripherals.
In the future if needed we can consider to add support to restrict peripherals of other interfaces(SPI, I2C, etc).
2020-02-07 10:45:02 +01:00
Martin Kojtal 952799ccc8
Merge pull request #12270 from VeijoPesonen/bugfix_sfdp_parse_sfdp_headers
BUGFIX: SFDP Sector Map Table Parameter ID LSB is 0x81
2020-02-06 08:48:16 +00:00
Martin Kojtal acece11e7a
Merge pull request #12320 from mtomczykmobica/ONME-3433
ONME-3433 ESP8266 driver support for UDP get - modified ESP8266 drive…
2020-02-06 08:10:00 +00:00
Martin Kojtal 32675cc6ac
Merge pull request #11874 from fkjagodzinski/armc6_build-enable_lto_for_release
ARMC6: Add a build profile extension with the link-time optimizer enabled
2020-02-05 14:42:16 +00:00
Martin Kojtal b33573ed27
Merge pull request #12317 from NXPmicro/MXRT_FlashSupport
MXRT1050 Flash support
2020-02-04 15:25:22 +00:00
Maciej Bocianski 57ac6c83d6 component PSA: keep SVCHandler_main/tfm_pendsv_do_schedule symbol in LTO builds
Add a "used" attribute to SVCHandler_main/tfm_pendsv_do_schedule to fix ARMC6 build with
the "-flto" flag.

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:38:38 +01:00
Mahesh Mahadevan b5eb7bc9a9 MIMXRT1050: Enable FlashIAP support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-02-03 12:23:59 -06:00
Pawel Zarembski 620442305f hani_iot: add spif storage config 2020-02-03 14:03:09 +01:00
Kevin Bracey 370a936147
Merge pull request #12330 from rajkan01/bug_fix_storage_sd
Fix FAT filesystem `ferror` greentea test(SD Component)
2020-01-31 16:22:53 +02:00
Kevin Bracey 268096dd79
Merge pull request #12296 from jeromecoutant/PR_FPGA_FORCE
FPGA_CI_TEST_SHIELD : force all peripheral to be tested
2020-01-31 15:00:20 +02:00
Marcin Tomczyk 46718d0430 ONME-3433 ESP8266 driver support for UDP get - modified ESP8266 driver to support UDP connection in server mode (get) 2020-01-31 09:03:14 +01:00
Kevin Bracey 44add981ff
Merge pull request #12331 from jeromecoutant/PR_OSPI
STM32: enable QSPI test with MX25LM51245G octo SPI
2020-01-30 15:46:52 +02:00
Kevin Bracey e8eed6ecd5
Merge pull request #12304 from michalpasztamobica/qpi
QSPIF: Enable QPI mode as a second option, if available
2020-01-30 10:21:29 +02:00
Rajkumar Kanagaraj c61cf3dc07 Incorporated the review comment 2020-01-29 09:24:21 -08:00
jeromecoutant 84b48410f0 STM32: enable QSPI test with MX25LM51245G octo SPI 2020-01-29 16:18:38 +01:00
Rajkumar Kanagaraj 0d95f7e765 Fix sd filesystem greentea test
- Disable the ferror() API test case as its not supported by microlib
2020-01-29 07:03:59 -08:00
Michal Paszta bf11bbd820 QSPIF: Enable QPI mode as a second option, if available 2020-01-23 09:47:53 +02:00
Kimmo Vaisanen bd0f939277 Cellular: Remove support for multiple ATHandlers
Major changes:
- Dependency to FileHandle removed from base classes
- AT_CellularDevice owns the default FileHandle and shares it with AT -classes
- Hang-up -detection moved as CellularContext::configure_hup(). Cannot be configured via CellularDevice any more.

Result on NRF52840_DK + BG96:
GCC:
Total Static RAM memory (data + bss): 29360(+296) bytes
Total Flash memory (text + data): 130660(-832) bytes

ARM:
Total Static RAM memory (data + bss): 261554(+8) bytes
Total Flash memory (text + data): 127573(-1193) bytes

IAR:
Total Static RAM memory (data + bss): 25479(+296) bytes
Total Flash memory (text + data): 102418(-527) bytes

RAM increase is because now ATHandler is no longer created with new -operator but is now member of AT_CellularDevice,
so image tool is able to count it. Actually total RAM consumption has decreased due to removed variables.
2020-01-23 09:27:44 +02:00
Andrew Chong 65e9cac918 Updated the code fix of timer and Mbed TLS. 2020-01-22 14:40:51 +09:00
jeromecoutant 0a1875924b FPGA_CI_TEST_SHIELD : force all peripheral to be tested 2020-01-21 17:17:55 +01:00
Anna Bridge 80fe861f1d
Merge pull request #12035 from kjbracey-arm/callback_prep
Preparation for Callback changes
2020-01-21 11:50:43 +00:00
Veijo Pesonen 6bd3933652 Q/SPIFBlockDevice: Separates SFDP Header retrieval
Separates SFDP header retrieval and moves it as a part of the earlier
introduced SFDP file.

Purpose is to abstract away differences between SPIF and QSPIF devices
when it comes to fetching the SFDP headers from a device.
2020-01-20 16:36:21 +02:00
Veijo Pesonen 58421efa8c SFDP: All the headers are same length 2020-01-17 14:43:03 +02:00
Veijo Pesonen cefae9020e SFDP: splits header parsing to its own file
SFDP logic is the same between SPIF and QSIP.
2020-01-17 14:43:03 +02: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
Veijo Pesonen ad43f23b09 SFDP: lists unknown headers on Q/SPIF debug prints 2020-01-16 13:00:18 +02:00
Veijo Pesonen 80f87e326a BUGFIX: SFDP Sector Map Parameter Header detection
The Sector Map Function Specific Table is assigned the ID LSB of 81
in hexadecimal, not in decimal[1].

[1] JESD216.01 p. 53
2020-01-16 13:00:17 +02: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