-
Notifications
You must be signed in to change notification settings - Fork 3k
Add default block device support (SD, SPIF and FLASHIAP) #7774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…updated filesytem readme.
Fix default spi speed to 40mhz
… BlockDevice::size() const change.
…s due to incompatible versions of mbed-os and sd-driver.
Fix default spi speed to 40Mhz
…er block device examples.
Fix const attribute mismatch on size function
…FS test cases on first time initialisation.
…ation with 1ms wait between response queries.
Fix for armmbed/sd-driver issue 4: SDCard Initialisation fails for ES…
Into shell..
Modify example also similarly to match the PIN definitions. This encapsulates all the SD-card related stuff to this library. By including this library you also get the pin definitions on the same go.
Start using mbed_lib.json
Enable the internal SD-card reader in UBLOX_EVK_ODIN_W2. This will disable the CI-shield SD-card reader if you have, if you prefer using it you have to remove this target override section. Please note that there seem to be some reliability problems with the internal SD-card slot, in my case the mbed OS CI-shield works better.
Add UBLOX_EVK_ODIN_W2 override for int. SD-card
This is needed as the regular configuration does not work with this board due pin conflict with Ethernet and SD-card.
1. Added function to select/deselect the device 2. Init function for SPI
3. Removed redundant function _cmdx
1. Added enum for all commands supported. 2. Added error codes 3. Command Response defines 4. SPI Data Read/Write defines
5. Separated SPI functionality in different function call. 6. Used enums for existing commands using _cmd function.
Test : FAILUREBuild number : 2735 |
/morph test |
Test : SUCCESSBuild number : 2737 |
@yossi2le Of course! Thank you for all of the hard work on the PR! |
Hi It seems that added "SPI_PERSISTENT_MEM_CS" is not used anywhere ? Maybe you should remove it from all PinNames.h files ? Thx |
@jeromecoutant Thanks for pointing this. those are important and should be used in config files. it appears that we missed it in last releases. |
Hi Do you also plan to update https://github.com/ARMmbed/ci-test-shield ? |
We haven't added this in our plans. however, I believe someone does need to do so. |
And in https://github.com/ARMmbed/sd-driver Maybe we should indicate that this repo is “deprecated”, |
The Sd-driver, spif-driver, dataflash-driver and flashiap-driver repos have already has a pending PR just for that. |
…mit reverts those files excpet for K82F and K64F which are left as an example
Reverting PinNames.h after PR #7774 changes
…erts those files excpet for K82F and K64F which are left as an example
… Target should be K64F
…to the config files
Description
In this PR the SD, SPIF and FLASHIAP block device are moved into mbedos, enabling the addon of default block device and default filesystem functionality in favor of firmware update requirement.
SD, SPIF and FLASHIAP block devices are added under the new component label configured in target.json. Any board with SD or SPIF component enabled will have a default block device and filesystem. Using the new feature is as easy as:
The default implementation is implemented using MBED_WEAK enabling an easy way to override it if needed.
Using any desired block device and filesystem are not affected by this PR.
Directory structure
New block devices and their tests can be found under the following paths:
./components/storage/blockdevices/COMPONENT_SD
/components/storage/blockdevices/COMPONENT_SPIF
/components/storage/blockdevices/COMPONENT_FLASHIAP
The default block device and default filesystem implementation is found under SystemStorage namespace at:
./features/storage/system_storage
New filesystem test for default block device and filesystem are found at:
./features/storage/TESTS/filesystem/general_filesystem
The PR also includes reordering of the storage directory in order to maintain much cleaner and more structured environment in mbedos.
Common filesystem files were moved from ./feature/filesystem to ./feature/storage/filesystem.
Common block devices files were moved from ./features/filesystem/bd to ./features/storage/blockdevices
those changes has been done in order to follow the components design spirit.
configuration
Configuration of SPI pins has been moved into PinsNames.h under targets, however the option to override the default configuration or add one, if PinsName.h is missing the SPI pins, can be done from application config.
Example for SD:
Example for SPIF:
Dependencies
This PR is dependent on PR #7644
Pull request type