From 2e3f1327bd1ad326716cf90630a542dfdbe25b7b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 30 Nov 2015 16:05:32 -0600 Subject: [PATCH] configs/same70-xplained/nsh: The NSH configuration now appears to be fully functional --- configs/same70-xplained/README.txt | 26 +++++++------------ configs/same70-xplained/nsh/defconfig | 17 +++++++++--- configs/same70-xplained/src/sam_hsmci.c | 2 +- configs/same70-xplained/src/same70-xplained.h | 14 +++++----- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/configs/same70-xplained/README.txt b/configs/same70-xplained/README.txt index ee31489752..dbbe9ef6f3 100644 --- a/configs/same70-xplained/README.txt +++ b/configs/same70-xplained/README.txt @@ -25,15 +25,9 @@ Contents Status/Open Issues ================== -Although this configuration is not particualarly different from the -SAMV71-XULT board, my initial attempts to debug the board have not been -successful. The code is just not behaving correctly in excuting the first -few instructions after reset. I have very early realease boards and I am -suspected some tool/board issue: It appears that I write the code -correctly to FLASH and the GPNVM is configured so that the FLASH lies at -address 0x00000000, but trying to step through with AtmelStudio 7 results -in uninterpretble behavior. Using the Segger J-Link, I get errors trying -to reset and halt the board so I am unable to use that debugger either. +2015-11-30: The basic NSH configuration is function with serial console + via the EDBG VCOM and LED and buttons support. SDRAM and the HSMCI + SD card slot also appear to be fully functional. WARNING: This README derives heavily from the SAMV71-XULT README file and may still contain some logic that pertains only to that board. This is a @@ -144,7 +138,7 @@ E70. SD card connector: PA27 MCDA3 (DAT3) Camera PA25 MCCK (CLK) Shield PA28 MCCDA (CMD) - PD18 Card Detect (C/D) Shield + PC16 Card Detect (C/D) Shield ------ ----------------- --------------------- Configuration Settings @@ -1280,19 +1274,17 @@ Configuration sub-directories nsh> i2c dev 3 77 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- - 10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- 28 -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- 37 -- -- -- -- -- -- -- -- - 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 4e -- + 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- 5f 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- - nsh> - Where 0x28 is the address of TWI interface to the EDBG, 0x4e is the - address of the CP2100CP programmable PLL, and 0x57 and 0x5f are thei - addresses of the AT2 EEPROM (I am not sure what the other address,i - 0x37, is as this writing). + Where 0x28 is the address of TWI interface to the EDBG and 0x57 and + 0x5f are the addresses of the AT24 EEPROM (I am not sure what the + other address, 0x37, is as this writing). 7. TWIHS0 is also used to support 256 byte non-volatile storage for configuration data using the MTD configuration as described above diff --git a/configs/same70-xplained/nsh/defconfig b/configs/same70-xplained/nsh/defconfig index 4dedce2437..e6ea3fc4fb 100644 --- a/configs/same70-xplained/nsh/defconfig +++ b/configs/same70-xplained/nsh/defconfig @@ -256,9 +256,9 @@ CONFIG_SAMV7_USART1=y # CONFIG_SAMV7_WDT1 is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y -CONFIG_SAMV7_GPIOB_IRQ=y -# CONFIG_SAMV7_GPIOC_IRQ is not set -CONFIG_SAMV7_GPIOD_IRQ=y +# CONFIG_SAMV7_GPIOB_IRQ is not set +CONFIG_SAMV7_GPIOC_IRQ=y +# CONFIG_SAMV7_GPIOD_IRQ is not set # CONFIG_SAMV7_GPIOE_IRQ is not set # CONFIG_SAMV7_PROGMEM is not set @@ -681,7 +681,15 @@ CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set # CONFIG_FS_BINFS is not set -# CONFIG_FS_PROCFS is not set +CONFIG_FS_PROCFS=y + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set +# CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set # @@ -953,6 +961,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_CMDOPT_DF_H is not set CONFIG_NSH_CODECS_BUFSIZE=128 CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_PROC_MOUNTPOINT="/proc" CONFIG_NSH_FILEIOSIZE=512 # diff --git a/configs/same70-xplained/src/sam_hsmci.c b/configs/same70-xplained/src/sam_hsmci.c index f166a3e59b..6c134309de 100644 --- a/configs/same70-xplained/src/sam_hsmci.c +++ b/configs/same70-xplained/src/sam_hsmci.c @@ -47,7 +47,7 @@ * PA27 MCDA3 (DAT3) Camera * PA25 MCCK (CLK) Shield * PA28 MCCDA (CMD) - * PD18 Card Detect (C/D) Shield + * PC16 Card Detect (C/D) Shield * ------ ----------------- --------------------- */ diff --git a/configs/same70-xplained/src/same70-xplained.h b/configs/same70-xplained/src/same70-xplained.h index 3072efd874..1c823d0cfb 100644 --- a/configs/same70-xplained/src/same70-xplained.h +++ b/configs/same70-xplained/src/same70-xplained.h @@ -77,10 +77,10 @@ # undef HAVE_HSMCI #endif -/* We need PIO interrupts on GPIOD to support card detect interrupts */ +/* We need PIO interrupts on GPIOC to support card detect interrupts */ -#if defined(HAVE_HSMCI) && !defined(CONFIG_SAMV7_GPIOD_IRQ) -# warning PIOD interrupts not enabled. No MMC/SD support. +#if defined(HAVE_HSMCI) && !defined(CONFIG_SAMV7_GPIOC_IRQ) +# warning PIOC interrupts not enabled. No MMC/SD support. # undef HAVE_HSMCI #endif @@ -231,7 +231,7 @@ #define GPIO_EMAC0_RESET (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \ GPIO_PORT_PIOC | GPIO_PIN10) -#define IRQ_EMAC0_INT SAM_IRQ_PA19 +#define IRQ_EMAC0_INT SAM_IRQ_PA14 /* LEDs * @@ -273,13 +273,13 @@ * PA27 MCDA3 (DAT3) Camera * PA25 MCCK (CLK) Shield * PA28 MCCDA (CMD) - * PD18 Card Detect (C/D) Shield + * PC16 Card Detect (C/D) Shield * ------ ----------------- --------------------- */ #define GPIO_MCI0_CD (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_CFG_DEGLITCH | \ - GPIO_INT_BOTHEDGES | GPIO_PORT_PIOD | GPIO_PIN18) -#define IRQ_MCI0_CD SAM_IRQ_PD18 + GPIO_INT_BOTHEDGES | GPIO_PORT_PIOC | GPIO_PIN16) +#define IRQ_MCI0_CD SAM_IRQ_PC16 /* USB Host *