Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
397d228b
Commit
397d228b
authored
8 years ago
by
ziggurat29
Browse files
Options
Downloads
Patches
Plain Diff
let nucleo (stm32l4) support proc fs for info useful for debug
parent
0252909f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs/nucleo-l476rg/src/nucleo-l476rg.h
+10
-0
10 additions, 0 deletions
configs/nucleo-l476rg/src/nucleo-l476rg.h
configs/nucleo-l476rg/src/stm32_appinit.c
+19
-0
19 additions, 0 deletions
configs/nucleo-l476rg/src/stm32_appinit.c
with
29 additions
and
0 deletions
configs/nucleo-l476rg/src/nucleo-l476rg.h
+
10
−
0
View file @
397d228b
...
...
@@ -52,9 +52,19 @@
************************************************************************************/
/* Configuration ********************************************************************/
#define HAVE_PROC 1
#define HAVE_RTC_DRIVER 1
#define HAVE_MMCSD 1
#if !defined(CONFIG_FS_PROCFS)
# undef HAVE_PROC
#endif
#if defined(HAVE_PROC) && defined(CONFIG_DISABLE_MOUNTPOINT)
# warning Mountpoints disabled. No procfs support
# undef HAVE_PROC
#endif
/* Check if we can support the RTC driver */
#if !defined(CONFIG_RTC) || !defined(CONFIG_RTC_DRIVER)
...
...
This diff is collapsed.
Click to expand it.
configs/nucleo-l476rg/src/stm32_appinit.c
+
19
−
0
View file @
397d228b
...
...
@@ -39,7 +39,11 @@
#include
<nuttx/config.h>
#include
<sys/types.h>
#include
<sys/mount.h>
#include
<stdio.h>
#include
<string.h>
#include
<fcntl.h>
#include
<syslog.h>
#include
<errno.h>
...
...
@@ -118,6 +122,21 @@ int board_app_initialize(uintptr_t arg)
cpuload_initialize_once
();
#endif
#ifdef HAVE_PROC
/* mount the proc filesystem */
syslog
(
LOG_INFO
,
"Mounting procfs to /proc
\n
"
);
ret
=
mount
(
NULL
,
CONFIG_NSH_PROC_MOUNTPOINT
,
"procfs"
,
0
,
NULL
);
if
(
ret
<
0
)
{
syslog
(
LOG_ERR
,
"ERROR: Failed to mount the PROC filesystem: %d (%d)
\n
"
,
ret
,
errno
);
return
ret
;
}
#endif
#ifdef HAVE_RTC_DRIVER
/* Instantiate the STM32L4 lower-half RTC driver */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment