Skip to content

Commit 741254c

Browse files
committed
SAML21J18: Implement FlashIAP
1 parent b426589 commit 741254c

File tree

8 files changed

+2378
-0
lines changed

8 files changed

+2378
-0
lines changed

components/storage/blockdevice/COMPONENT_FLASHIAP/TESTS/filesystem/fopen/fopen.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ static char fslittle_fopen_utest_msg_g[FSLITTLE_UTEST_MSG_BUF_SIZE];
8888
#define FSLITTLE_FOPEN_TEST_MOUNT_PT_PATH "/" FSLITTLE_FOPEN_TEST_MOUNT_PT_NAME
8989
#define FSLITTLE_FOPEN_TEST_WORK_BUF_SIZE_1 64
9090
#define FSLITTLE_FOPEN_TEST_FILEPATH_MAX_DEPTH 20
91+
#ifdef TARGET_SAML21J18A
92+
static const int MAX_TEST_SIZE = 64 * 1024;
93+
#else
9194
static const int MAX_TEST_SIZE = 256 * 1024 * 2;
95+
#endif
9296
static const char *sd_badfile_path = "/sd/badfile.txt";
9397
static const char *sd_testfile_path = "/sd/test.txt";
9498

@@ -1427,7 +1431,11 @@ control_t fslittle_fopen_test_15(const size_t call_count)
14271431
{
14281432
int32_t ret = 0;
14291433
fslittle_kv_data_t *node = fslittle_fopen_test_15_kv_data;
1434+
#ifdef TARGET_SAML21J18A
1435+
const int32_t num_blocks = 3; /* each file 768b */
1436+
#else
14301437
const int32_t num_blocks = 100; /* each file ~25kB */
1438+
#endif
14311439

14321440
FSLITTLE_DBGLOG("%s:entered\n", __func__);
14331441
(void) call_count;

components/storage/blockdevice/COMPONENT_FLASHIAP/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"REALTEK_RTL8195AM": {
1515
"base-address": "0x1C0000",
1616
"size": "0x40000"
17+
},
18+
"SAML21J18A": {
19+
"base-address": "0x30000",
20+
"size": "0x10000"
1721
}
1822
}
1923
}

0 commit comments

Comments
 (0)