diff --git a/configs/arduino-due/nsh/defconfig b/configs/arduino-due/nsh/defconfig index 447c98a7cab..15814e72310 100644 --- a/configs/arduino-due/nsh/defconfig +++ b/configs/arduino-due/nsh/defconfig @@ -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 diff --git a/configs/arduino-due/scripts/arduino-due.ld b/configs/arduino-due/scripts/arduino-due.ld index 4a250f6eb84..4e3999c2029 100644 --- a/configs/arduino-due/scripts/arduino-due.ld +++ b/configs/arduino-due/scripts/arduino-due.ld @@ -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) } diff --git a/configs/arduino-due/src/sam_bringup.c b/configs/arduino-due/src/sam_bringup.c index fc431f24deb..298a5b0dbb9 100644 --- a/configs/arduino-due/src/sam_bringup.c +++ b/configs/arduino-due/src/sam_bringup.c @@ -39,6 +39,7 @@ #include +#include #include #include @@ -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; } diff --git a/configs/flipnclick-sam3x/nsh/defconfig b/configs/flipnclick-sam3x/nsh/defconfig index 10fa31c2046..79057461ad6 100644 --- a/configs/flipnclick-sam3x/nsh/defconfig +++ b/configs/flipnclick-sam3x/nsh/defconfig @@ -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 diff --git a/configs/flipnclick-sam3x/scripts/flash.ld b/configs/flipnclick-sam3x/scripts/flash.ld index 96d44ded1ca..e1d070b83d0 100644 --- a/configs/flipnclick-sam3x/scripts/flash.ld +++ b/configs/flipnclick-sam3x/scripts/flash.ld @@ -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 diff --git a/configs/flipnclick-sam3x/src/sam_autoleds.c b/configs/flipnclick-sam3x/src/sam_autoleds.c index 2a81232fd00..3ae7d231466 100644 --- a/configs/flipnclick-sam3x/src/sam_autoleds.c +++ b/configs/flipnclick-sam3x/src/sam_autoleds.c @@ -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 * ------------------- ----------------------- --- --- --- --- --- diff --git a/configs/flipnclick-sam3x/src/sam_bringup.c b/configs/flipnclick-sam3x/src/sam_bringup.c index 5259eccfa0d..28a9d427357 100644 --- a/configs/flipnclick-sam3x/src/sam_bringup.c +++ b/configs/flipnclick-sam3x/src/sam_bringup.c @@ -39,6 +39,7 @@ #include +#include #include #include @@ -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; }