Commit Graph

175 Commits (cdcef4babe74e9d4cf3ea8262b359be3eeed2970)

Author SHA1 Message Date
Chris Snow 157debffa6 Change erase size to pages to reduce memory usage 2019-05-15 16:23:16 -06:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
Anna Bridge 97e1c9cbaf
Merge pull request #10287 from linlingao/pr10177
Enable MTS_DRAGONFLY_F411RE to register with Pelion
2019-05-10 16:21:46 +01:00
Lin Gao 438a52f15a Fix handoff issue from the bootloader to the application on MTS_DRAGONFLY_F411RE 2019-05-02 11:25:19 -05:00
Ben Cooke 3d68a53b81 Correct the default pins for the spi flash for the mts dragonfly - on behalf of Ben C. 2019-05-02 11:25:19 -05:00
Ryan Morse a8570ffe6c Added support for QSPI to Cypress Boards 2019-05-01 07:09:58 -07:00
David Saada f73544ed7e Remove excessive info and debug prints in SPIF driver. 2019-04-28 12:27:47 +03:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Martin Kojtal 6081727cbf
Merge pull request #10115 from enebular/raven
Uhuru RAVEN: Adding platform HAL
2019-04-04 11:05:23 +02:00
Martin Kojtal 040388370f
Merge pull request #10171 from offirko/offir_qspi_bus_mask_fix
Fix QSPIF Bus mode mask and quad enable write SR size
2019-04-01 11:17:23 +02:00
Offir Kochalsky 15fdb6ea7e
Update QSPIFBlockDevice.cpp 2019-03-29 17:37:00 +03:00
offirko e8e0fb4fdf If QER is undefined: do nothing but log warning and continue 2019-03-28 10:18:16 +02:00
jk 23cb826314 Add definition of RAVEN 2019-03-27 17:02:55 +09:00
Ari Parkkila a6c44f87b0 SPIF: Fix SPI_FREQ for MTB_ADV_WISE_1570 2019-03-21 01:11:40 -07:00
offirko 1a4c11e3b5 Fixed Bus Mode bit mask to select best mode.
When setting Quad Enable, either SR1, SR2 or CR setup is required.
Either way register size is up to 2 bytes.
2019-03-20 15:24:46 +02:00
offirko ce5194f2f8 Fix Bus mode mask and status register write size in
some modes in quad enable
2019-03-20 14:27:49 +02:00
Amir Cohen 4d6240d26e Add flashiap block device comment 2019-03-18 14:34:00 +02:00
Amir Cohen 7fac0722a4 Fix functionality for FlashIAPBD & SlicingBD
Due to discovery of inconsistent sector sizes in devices storage the is_valid_erase function was adjusted,
For FlashIAPBD the 'code size' was included to the calculation, preventing faulty "virtual" addresses calculation.
For SlicingBD the same error was fixed and in all 3 validation functions that sent addresses for validation and program/read/erase
different addresses.
2019-03-14 17:46:10 +02:00
Kevin Bracey c368021e37 SPIFBlockDevice.h: include SingletonPtr.h
SPIFBlockDevice was using SingletonPtr without an include,
and only getting it via SPI.h.

Spotted while changing SPI to not use SingletonPtr - now
abandoned, but still this shouldn't have been relying on it.
2019-03-01 14:33:33 +02:00
Amir Cohen 5c7f6cb755 Merge SPIF & QSPIF components test to general block device tests
The SPIF and QPIF components tests are fully merged into general block device tests and were deleted
2019-02-26 10:28:45 -06:00
Deepika d2e11966fc Revert "rand() by default does increment of 1, randomizing more"
This reverts commit f7a6d254f6.
2019-02-26 09:21:19 -06:00
Deepika f7a6d254f6 rand() by default does increment of 1, randomizing more
Random number generation in case of IAR 8, requires TLS support.
Thread local storage is not part of Mbed OS, test is updated to have random
numbers sparse, but in future random number creation should be moved to main
thread, or use some other logic for randomization instead of rand() call.
2019-02-22 16:44:54 -06:00
offirko be1c887477 Ensure unique block address for multi threaded test.
The addresses dont have to change each run, just be unique.
Because address seeds repeat themselves each run, rand() will
produce repeating results that should not collide between
different threads.
2019-02-11 14:41:41 +02:00
Cruz Monrreal ffc52e6a5e
Merge pull request #9478 from deepikabhavnani/refactor_sd
Refactor storage components
2019-01-31 10:21:38 -06:00
Cruz Monrreal 39d46280e2
Merge pull request #9475 from davidsaada/david_flashiap_no_default
FlashIAP Block device: Assert if default constructor is used without setting config parameters
2019-01-31 10:21:20 -06:00
deepikabhavnani 2952735ac0 Moved util (common test folder) inside the TESTS directory
Util was common test folder, which was kept outside as we had
no mechanism to have common files for various tests in tools.
Now same can be achieved by having COMMON folder inside tests
directory
2019-01-30 16:51:05 -06:00
deepikabhavnani 0d6bd2798f Moved `mbed_lib.json` outside config folder
This is to have consistency across all storage components
2019-01-30 16:51:05 -06:00
Martin Kojtal 88d7ef155b
Merge pull request #9531 from theamirocohen/remove_flashiap_tests
Remove COMPONENT_FLASHIAP tests
2019-01-30 09:57:35 +01:00
Martin Kojtal 1031e2d464
Merge pull request #9236 from jeromecoutant/PR_SD_TEST
COMPONENT_SD tests update for small RAM targets
2019-01-30 09:54:41 +01:00
Amir Cohen 35df2de703 Remove COMPONENT_FLASHIAP tests
FlashIAPBlockDevice LittleFS ‘fopen’ falls on nightly tests
LittleFS test on FlashIAP is not relevant and thus removed
2019-01-29 13:54:40 +02:00
Cruz Monrreal 1b1c108528
Merge pull request #9484 from offirko/offir_test_fopen_fixes
Start Component SD test by formatting SD Card
2019-01-24 13:28:33 -06:00
offirko 0bf071809c Start test by formatting SD Card, otherwise FATFS mount might fail
Fix Jira: IOTSTOR-752
2019-01-24 12:44:04 +02:00
j3hill 2a72bb67a3 NRF5x: QSPI SFDP read implementation 2019-01-23 10:24:02 -06:00
j3hill e9f08cb4d4 NRF5x: min read/write implementation 2019-01-23 09:55:27 -06:00
David Saada 22309c93d0 FlashIAP BD: Assert if default constructor is used w/o config change 2019-01-23 16:30:36 +02:00
Cruz Monrreal 0c85d441d2
Merge pull request #9408 from evva-sfw/feature/SPIF_ULBPR
SPIF - Fix command to unlock Global Block-Protection register
2019-01-22 23:59:21 -06:00
jeromecoutant f3ba34a344 DIRS and SEEK SD tests update for small RAM targets
Test buffer size can now be specified for each target
2019-01-18 09:23:40 +01:00
Philipp Steiner f0ec813d71 Update Comments 2019-01-17 11:13:16 -06:00
Philipp Steiner 167a3098c8 Add SPIF_ULBPR command also to QSPIFBlockDevice and SPIFReducedBlockDevice 2019-01-17 11:13:16 -06:00
Philipp Steiner 5f4ff5de8c Add SPIF_ULBPR command and replace wrong command to clear all write-protection bits in the Block-Protection register. 2019-01-17 11:13:16 -06:00
jeromecoutant b070fb47d7 COMPONENT_SD default configuration for ST boards is already defined in TARGET_STM 2019-01-15 17:08:54 +01:00
Mel W 66f5358c4b
some minor streamlining and editorial changes 2019-01-10 14:18:11 +02:00
Juha Ylinen a4a99d61d2 SDBlockDevice docs update 2019-01-10 13:44:10 +02:00
Juha Ylinen 96877b80e6 SPIFBlockDevice docs update 2019-01-09 15:29:34 +02:00
Martin Kojtal a9ce91686c
Merge pull request #9264 from offirko/offir_qspif_reduce_trace_level
reduce info traces to debug level to prevent logs overflow
2019-01-08 12:38:51 +00:00
Martin Kojtal 1c3b6f4f94
Merge pull request #9268 from yossi2le/yossi_fix_flashiap_test
Calculate FlashIAPBlockDevice start address and size automatically for test only
2019-01-08 09:51:28 +00:00
Yossi Levy bdeb54592f This commit fixes an issue in which boards with FlashIAP block device enabled fails the FlashIAP block device tests exists under the component directory. That's because they have no start address and size configured in the mbed_lib.json file. In order to simplify the test for targets with no definitions in the mbed_lib.json, the test will calculate the start address as the first sector after the application ends and up to the max size available. 2019-01-07 15:20:58 +02:00
Martin Kojtal 0eabafa551
Merge pull request #9135 from yossi2le/yossi_get_type_for_bd
Get type for BlockDevice
2019-01-07 12:26:29 +00:00
offirko a270cffe39 reduce info traces to debug level to prevent logs overflow 2019-01-06 12:11:30 +02:00
Cruz Monrreal 54f759176b
Merge pull request #9210 from AnttiKauppila/mbed_h_fix
mbed.h includes removed
2019-01-04 10:27:30 -06:00
Antti Kauppila 02b0f79e15 mbed.h includes removed 2018-12-28 14:36:10 +02:00
Yossi Levy b17d13e75e Documnent changes and adding const to get_type method 2018-12-23 14:27:14 +02:00
Yossi Levy b8b7292d8e astyle fix 2018-12-23 11:03:45 +02:00
Yossi Levy 1d71fb1c9f Add get_type method to block devices. 2018-12-23 11:03:45 +02:00
Deepika 5f57b89c10 Resolved: [Error] main.cpp@115,34: [Pe266]: "size" is ambiguous
`size` is part of std library since c++17, and results in build
errors for IAR 8.x.
https://en.cppreference.com/w/cpp/iterator/size
2018-12-21 14:29:06 -06:00
Deepika a356db19aa Resolved warning: variable declared but never referenced 2018-12-21 13:34:00 -06:00
Deepika 7b5fe2d8ba Resolve string literal error
Space needed between 2 string literals
    [Error] fopen.cpp@204,97: [Pe2486]: user-defined literal operator not found
2018-12-21 13:28:23 -06:00
Alastair D'Silva 2617c5d55b Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
Cruz Monrreal ce1929b5df
Merge pull request #9045 from fredlee12001/patch-1
Fix wrong PIN config for RTL8195AM platform
2018-12-18 10:32:59 -06:00
Cruz Monrreal 64e7e468b2
Merge pull request #9089 from jeromecoutant/DEV_QSPI_TEST
STM32 QSPI update
2018-12-14 10:14:13 -06:00
jeromecoutant fc548cdc05 STM32 QSPIF: add DISCO_L496AG, DISCO_F746NG and DISCO_F769NI 2018-12-13 10:56:36 +01:00
offirko b79c64ec53 Favor QSPI Bus mode 1-4-4 over QPI
QPI may have slightly better performance, but it is not supported by all targets.
It requires register setup between each Read and Program/Erase commands,
which might damage the overall performance eventually.
2018-12-12 10:54:48 +02:00
Fred.Li fb1e4de3ba
Fix wrong PIN config for RTL8195AM platform
Merge from https://github.com/ARMmbed/sd-driver/pull/110
2018-12-11 14:37:09 +08:00
Martin Kojtal bf36ff77c1
Merge pull request #8855 from michalpasztamobica/warnings_fix
Fix compilation warnings (apart from nanostack)
2018-12-03 13:31:55 +01:00
deepikabhavnani da69da972f Add BlockDevice and Filesystem classes inside mbed namespace.
Adding new modules inside the namespace could be breaking change for existing code base
hence add `using namespace::class` for classes newly added to mbed namespace to maintian
backwards compatibility.

MBED_NO_GLOBAL_USING_DIRECTIVE is added to remove auto-addition of namespace
Macro guard `MBED_NO_GLOBAL_USING_DIRECTIVE` is added around namespace, to avoid
polluting users namespace.
2018-11-26 13:35:40 -06:00
Michal Paszta e101943cce Fix compilation warnings (apart from nanostack) 2018-11-26 14:27:48 +01:00
Martin Kojtal 6d6c09bb80 blockdevice: fix coding style 2018-11-15 07:20:13 +00:00
Martin Kojtal 7d7bfd7bf2 blockdevice: fix components coding style 2018-11-15 07:20:09 +00:00
Cruz Monrreal 72253b7b06
Merge pull request #8573 from deepikabhavnani/flag_Crc
Compile time config flag MBED_CONF_SD_CRC_ENABLED for CRC in SD
2018-11-08 19:49:03 -06:00
Cruz Monrreal 3046e31349
Merge pull request #8589 from davidsaada/david_flash_erase_value
Support erase value in Flash HAL drivers, FlashIAP and block devices
2018-11-08 10:06:58 -06:00
Martin Kojtal 14eadfac44
Merge pull request #8653 from u-blox/r410m_sdcard
mbed_lib.json updated for other all C030 targets and code corrected t…
2018-11-08 14:54:58 +01:00
David Saada 542744d03c Support erase value in Flash HAL drivers, FlashIAP and block devices 2018-11-07 14:23:07 +02:00
Cruz Monrreal II fd744e79d9 Merge branch 'sdblockdevice_deselect' of ssh://github.com/jarlamsa/mbed-os into rollup 2018-11-06 21:29:09 -06:00
Cruz Monrreal 6042ea30d3
Merge pull request #8639 from offirko/offir-mbed-qspif3
Add get_erase_value() support
2018-11-06 14:44:25 -06:00
deepikabhavnani e7bdf3c575 Corrected `INIT_FREQUENCY` macro SD is appended by tools 2018-11-06 10:53:49 -06:00
deepikabhavnani a0f3fdc286 Compile time flag MBED_SD_CRC_ENABLE for CRC in SD
CRC class adds to the ROM size even when disabled runtime, because
of addition of ROM tables. Addition a compile time option to disable
CRC is required for reducing code size of SD driver component.

Library config option `SD_CRC_ENABLED` is added, set it to 0 to
disable CRC feature in SD.
2018-11-06 10:53:39 -06:00
Fahim Alavi 2806dd8216 mbed_lib.json updated for other all C030 targets and code corrected to use UBLOX_AT 2018-11-06 17:58:41 +05:00
Martin Kojtal 73cc54e5f7
Merge pull request #8524 from korjaa/more_blockdevice_tests
Add more generic BlockDevice tests.
2018-11-05 17:15:59 +01:00
Jarno Lamsa 36f1fa06d6 Remove extra _deselect to prevent possible hard fault
If read timeout happens, the _deselect will get called twice causing
a hard fault happening when mutex is released without being locked.
The SDBlockDevice::read is calling the _deselect in every case.
2018-11-05 16:08:48 +02:00
Offir Kochalsky 2df7258710 Add get_erase_value() support 2018-11-05 12:47:18 +02:00
Jaakko Korhonen 0d04f03882 Added missing mutex to DataFlash for thread safety. 2018-11-01 14:51:07 +02:00
Christopher Haster 761405592b Added mutex to DataFlash for thread safety 2018-11-01 14:51:07 +02:00
Kevin Bracey f4708bbb36 Fix up types in SDBlockDevice
Correct types passed to debug() calls - as part of this, block size and
erase size are changed to be 32-bit - using 64-bit variables for these
will cause unnecessary code bloat.

Many uses of bd_size_t in the BlockDevice API should really be uint32_t
or size_t, but that would be a bigger API change.
2018-10-31 14:49:22 +02:00
Cruz Monrreal fba0669194
Merge pull request #8563 from marcuschangarm/default_qspif
Add QSPIF block device to default system storage
2018-10-30 22:32:01 -05:00
Marcus Chang 063a7842ba Add QSPIF block device to default system storage 2018-10-26 13:00:38 -07:00
Martin Kojtal 93a17c1d65
Merge pull request #7979 from yossi2le/fix_spif_sd_config
Using SPI_ macros from PinNames in SPIF and SD config files.
2018-10-26 09:35:29 +01:00
Yossi Levy d9a84c42cf Remove SPI_PERSISTENT_MEM_CS macro and replace it with SPI_CS 2018-10-25 12:10:48 +03:00
Yossi Levy eddd2b1c68 Using the SPI_ macros which was added to PinNames.h in PR #7774 to the config files 2018-10-25 11:56:38 +03:00
Martin Kojtal 53f1397522 storage component: update astyle 2018-10-25 09:51:09 +01:00
Cruz Monrreal 41bffe1c87
Merge pull request #8352 from offirko/offir-mbed-qspif
QSPI SFDP Flash Block Device
2018-10-23 10:48:28 -05:00
Offir Kochalsky 5cebe43dfc mbed namespace removed add mbed indicator to QSPI 2018-10-21 11:50:17 +03:00
Offir Kochalsky 7d05fcb788 remove mbed namespace from h file and update test 2018-10-21 10:29:03 +03:00
Offir Kochalsky 638951aa86 Merge remote-tracking branch 'upstream/master' into offir-mbed-qspif 2018-10-21 08:51:49 +03:00
jeromecoutant 7bfa6bdcaf Component SD test: skip multiple thread test depending on RAM 2018-10-19 17:09:31 +02:00
Cruz Monrreal 515db95061
Merge pull request #8349 from offirko/offir-mbed-reduced-spif
A Reduced SPIF Block Device for Boot Loader
2018-10-17 20:19:26 -05:00
Offir Kochalsky 908233a177 Changes per Pull Request review 3 2018-10-17 14:42:21 +03:00
Offir Kochalsky 23bc67dfdc Fix DISCO_L475VG_IOT01A name at json 2018-10-17 11:16:57 +03:00
Deepika 9db31d299b Resolve build issues in test
mbed.h was added in test, via greentea and utest header files. 'mbed.h' is removed
from header files and required header file and namespace is added to CPP/C files
2018-10-16 11:50:16 -05:00
Offir Kochalsky ef40d6d1ee json formatted and include remarks removed 2018-10-16 10:47:21 +03:00
Offir Kochalsky 020685c473 Added error logging at set QPI 2018-10-16 10:15:36 +03:00