boards/esp32c3: Add tmpfs mounting when bringing up

This commit is contained in:
Dong Heng 2021-02-23 14:26:10 +08:00 committed by Xiang Xiao
parent c90fffcc09
commit 7c9c9907ef
1 changed files with 11 additions and 0 deletions

View File

@ -76,6 +76,17 @@ int esp32c3_bringup(void)
}
#endif
#ifdef CONFIG_FS_TMPFS
/* Mount the tmpfs file system */
ret = mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to mount tmpfs at %s: %d\n",
CONFIG_LIBC_TMPDIR, ret);
}
#endif
#ifdef CONFIG_DEV_GPIO
ret = esp32c3_gpio_init();
if (ret < 0)