Skip to content
Snippets Groups Projects
Commit a5c8e6e5 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

viewtool-stm32f107: Add support to auto-mount the procfs file system

parent 0eee0f22
No related branches found
No related tags found
No related merge requests found
/****************************************************************************
* config/viewtool-stm32f107/src/stm32_appinit.c
*
* Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2013, 2016-2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
......@@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <syslog.h>
#include <errno.h>
#include <debug.h>
......@@ -156,6 +157,17 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#ifdef CONFIG_FS_PROCFS
/* Mount the procfs file system */
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
if (ret < 0)
{
serr("ERROR: Failed to mount procfs at %s: %d\n",
STM32_PROCFS_MOUNTPOINT, ret);
}
#endif
#ifdef HAVE_MMCSD
ret = stm32_sdinitialize(CONFIG_NSH_MMCSDSLOTNO);
if (ret < 0)
......
......@@ -98,6 +98,16 @@
# undef HAVE_RTC_DRIVER
#endif
/* procfs File System */
#ifdef CONFIG_FS_PROCFS
# ifdef CONFIG_NSH_PROC_MOUNTPOINT
# define STM32_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT
# else
# define STM32_PROCFS_MOUNTPOINT "/proc"
# endif
#endif
/* GPIO Configuration *******************************************************/
/* LEDs
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment