Skip to content

Commit 7f3d37a

Browse files
author
Seppo Takalo
committed
Return proper error if internal storage configuration not given
If function _storage_config_TDB_INTERNAL() is called, but proper configuration for TDBStore location in flash is not given, return MBED_ERROR_UNSUPPORTED instead of dummy, that does not work.
1 parent 5e69377 commit 7f3d37a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

features/storage/kvstore/conf/kv_config.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,9 @@ MBED_WEAK BlockDevice *get_other_blockdevice()
691691

692692
int _storage_config_TDB_INTERNAL()
693693
{
694-
#if COMPONENT_FLASHIAP
694+
#if COMPONENT_FLASHIAP && \
695+
MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE && \
696+
MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS
695697
bd_size_t internal_size = MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE;
696698
bd_addr_t internal_start_address = MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS;
697699
int ret;

0 commit comments

Comments
 (0)