configs/arduino-due and flipnclick-sam3x: Enable PROCFS in nsh configurations.

This commit is contained in:
Gregory Nutt
2018-01-06 17:54:48 -06:00
parent 20c11e918f
commit bc320c7878
7 changed files with 53 additions and 17 deletions
+2 -2
View File
@@ -1,6 +1,4 @@
# CONFIG_ARCH_RAMFUNCS is not set
# CONFIG_NSH_DISABLE_IFCONFIG is not set
# CONFIG_NSH_DISABLE_PS is not set
CONFIG_ARCH_BOARD_ARDUINO_DUE=y
CONFIG_ARCH_BOARD="arduino-due"
CONFIG_ARCH_CHIP_ATSAM3X8E=y
@@ -18,6 +16,7 @@ CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_POLL=y
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
CONFIG_EXAMPLES_NSH=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_MAX_TASKS=16
@@ -26,6 +25,7 @@ CONFIG_MM_REGIONS=3
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_MQ_MSGS=4
+16 -8
View File
@@ -39,7 +39,7 @@
MEMORY
{
flash (rx) : ORIGIN = 0x00080000, LENGTH = 1024K
flash (rx) : ORIGIN = 0x00080000, LENGTH = 512K
sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 32K
nfcram (rwx) : ORIGIN = 0x20100000, LENGTH = 4K
@@ -49,7 +49,8 @@ OUTPUT_ARCH(arm)
ENTRY(_stext)
SECTIONS
{
.text : {
.text :
{
_stext = ABSOLUTE(.);
*(.vectors)
*(.text .text.*)
@@ -65,23 +66,27 @@ SECTIONS
_etext = ABSOLUTE(.);
} > flash
.init_section : {
.init_section :
{
_sinit = ABSOLUTE(.);
*(.init_array .init_array.*)
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
.ARM.extab :
{
*(.ARM.extab*)
} >flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
.ARM.exidx :
{
*(.ARM.exidx*)
} >flash
__exidx_end = ABSOLUTE(.);
.data : {
.data :
{
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
@@ -91,7 +96,8 @@ SECTIONS
_eronly = LOADADDR(.data);
.ramfunc ALIGN(4): {
.ramfunc ALIGN(4):
{
_sramfuncs = ABSOLUTE(.);
*(.ramfunc .ramfunc.*)
_eramfuncs = ABSOLUTE(.);
@@ -99,7 +105,8 @@ SECTIONS
_framfuncs = LOADADDR(.ramfunc);
.bss : {
.bss :
{
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
@@ -108,6 +115,7 @@ SECTIONS
} > sram0
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
+15
View File
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
#include <sys/mount.h>
#include <stdio.h>
#include <syslog.h>
@@ -88,6 +89,19 @@
int sam_bringup(void)
{
int ret;
#ifdef CONFIG_FS_PROCFS
/* Mount the procfs file system */
ret = mount(NULL, "/proc", "procfs", 0, NULL);
if (ret < 0)
{
syslog(LOG_ERR,"ERROR: Failed to mount procfs at /proc: %d\n",
ret);
}
#endif
#if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \
defined(CONFIG_MMCSD_SPI)
/* Initialize the SPI-based MMC/SD slot */
@@ -104,5 +118,6 @@ int sam_bringup(void)
}
#endif
UNUSED(ret);
return OK;
}
+2 -2
View File
@@ -1,6 +1,4 @@
# CONFIG_ARCH_RAMFUNCS is not set
# CONFIG_NSH_DISABLE_IFCONFIG is not set
# CONFIG_NSH_DISABLE_PS is not set
CONFIG_ARCH_BOARD_FLIPNCLICK_SAM3X=y
CONFIG_ARCH_BOARD="flipnclick-sam3x"
CONFIG_ARCH_CHIP_ATSAM3X8E=y
@@ -15,6 +13,7 @@ CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_POLL=y
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
CONFIG_EXAMPLES_NSH=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_HOST_WINDOWS=y
@@ -24,6 +23,7 @@ CONFIG_MM_REGIONS=3
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_MQ_MSGS=4
+3 -3
View File
@@ -33,13 +33,13 @@
*
****************************************************************************/
/* The ATSAM3X8E has 1024KB of FLASH beginning at address 0x0008:0000 and
* up to 64KB SRAM in three memory regions.
/* The ATSAM3X8E has 512KB of FLASH beginning at address 0x0008:0000 and
* up to 100KB SRAM in three memory regions.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x00080000, LENGTH = 1024K
flash (rx) : ORIGIN = 0x00080000, LENGTH = 512K
sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 32K
nfcram (rwx) : ORIGIN = 0x20100000, LENGTH = 4K
@@ -186,8 +186,6 @@ void board_autoled_on(int led)
void board_autoled_off(int led)
{
switch (led)
{
/* SYMBOL MEANING LED STATE
* L A B C D
* ------------------- ----------------------- --- --- --- --- ---
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
#include <sys/mount.h>
#include <stdio.h>
#include <syslog.h>
@@ -70,5 +71,19 @@
int sam_bringup(void)
{
int ret;
#ifdef CONFIG_FS_PROCFS
/* Mount the procfs file system */
ret = mount(NULL, "/proc", "procfs", 0, NULL);
if (ret < 0)
{
syslog(LOG_ERR,"ERROR: Failed to mount procfs at /proc: %d\n",
ret);
}
#endif
UNUSED(ret);
return OK;
}