ARMmbed / mbed-os-example-filesystem

The Mbed OS file system example
https://mbed.com
Apache License 2.0
16 stars 33 forks source link

Add components_add override to open up all storage components #69

Closed geky closed 6 years ago

geky commented 6 years ago

cc @yossi2le, @deepikabhavnani, @ARMmbed/mbed-os-storage related https://github.com/ARMmbed/mbed-os-example-blockdevice/pull/14

yossi2le commented 6 years ago

@geky you know this will compile but the pins of k64F will be correct only for SD.

deepikabhavnani commented 6 years ago

you know this will compile but the pins of k64F will be correct only for SD.

In this case we should add only specific components for targets. K64F - SD only K82F - All (?)

geky commented 6 years ago

The current instructions in the readme expect the user to change the block device constructors. They should also be expected to change the pins if they don't have a default. I would expect MBED_CONF_SPIF_DRIVER_SPI_MOSI to be a compile time error on the K64F.

We should still let users fly-wire storage chips they buy off the shelf with the example. Otherwise it looks like we're saying you can't use SPI flash with a K64F.

Although to your point, that means this doesn't fix https://github.com/ARMmbed/mbed-os/pull/8246.

deepikabhavnani commented 6 years ago

The current instructions in the readme expect the user to change the block device constructors.

We can update the readme to ask them to add Components, respective pins and constructors. target_overrides are for known pins/modules - working combination for specific target.

We should still let users fly-wire storage chips they buy off the shelf with the example. Otherwise it looks like we're saying you can't use SPI flash with a K64F.

Adding only specific component to target does not mean other components cannot be used.

yossi2le commented 6 years ago

@geky I says it will compile for sure but the MBED_CONF_SPIF macros will not be set correctly cause it will take the defaults from PinNames.h which are set to SD. That's of course do not say that one can't add components and set the pins in app config as he likes. The K82F is already set and ready to be compiled with the code. I still suggest to use it as the target for the example.

@deepikabhavnani regarding updating the README file. I already done it.

geky commented 6 years ago

Sorry, I didn't see this until now, my GitHub inbox has been overloaded for the past few months.

We can update the readme to ask them to add Components, respective pins and constructors.

Good point, I completely overlooked the fact that they are both related.

@yossi2le I noticed you updated both the filesystem/blockdevice example, thanks for that!