SAMV71-XULT: Add support for the NSH network monitor

This commit is contained in:
Gregory Nutt 2015-09-25 10:14:40 -06:00
parent 94a014085a
commit 4f60d78d56
4 changed files with 27 additions and 24 deletions

View File

@ -788,6 +788,7 @@ config ARCH_BOARD_SAMV71_XULT
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
select ARCH_PHY_INTERRUPT if NETDEVICES
---help---
The port of NuttX to the Atmel SAMV71 Xplained Ultra evalutation board.

View File

@ -251,8 +251,8 @@ Enabling HSMCI support. The SAMV7-XULT provides a one, full-size SD memory card
CONFIG_SAMV7_XDMAC=y : XDMAC is needed by HSMCI0/1
System Type
CONFIG_SAMV7_PIO_IRQ=y : PIO interrupts needed
CONFIG_SAMV7_PIOD_IRQ=y : Card detect pin is on PD18
CONFIG_SAMV7_GPIO_IRQ=y : PIO interrupts needed
CONFIG_SAMV7_GPIOD_IRQ=y : Card detect pin is on PD18
Device Drivers -> MMC/SD Driver Support
CONFIG_MMCSD=y : Enable MMC/SD support
@ -591,7 +591,7 @@ Server or XML RPC and others. There are also other features that
you can enable like DHCP client (or server) or network name
resolution.
By default, the IP address of the SAMA4D4-EK will be 10.0.0.2 and
By default, the IP address of the SAMV71-XULT will be 10.0.0.2 and
it will assume that your host is the gateway and has the IP address
10.0.0.1.
@ -621,7 +621,7 @@ NOTE: In this configuration is is normal to have packet loss > 0%
the first time you ping due to the default handling of the ARP
table.
On the host side, you should also be able to ping the SAMA4D4-EK:
On the host side, you should also be able to ping the SAMV71-XULT:
$ ping 10.0.0.2
@ -1480,14 +1480,11 @@ Configuration sub-directories
Application Configuration:
CONFIG_NSH_BUILTIN_APPS=y : Enable starting apps from NSH command line
4. The network initialization thread is NOT enabled in this configuration.
As a result, networking initialization is performed serially with
NSH bring-up. The time from reset to the NSH prompt will be determined
primarily by this network initialization time. And can be especially
long, perhaps minutes, if the network cable is not connected!
If fast boot times are required, you need to perform asynchronous
network initialization as described under "Network Initialization Thread"
4. The network initialization thread and the NSH network montior are
enabled in this configuration. As a result, networking initialization
is performed asynchronously with NSH bring-up. For more information,
see the paragraphs above entitled "Network Initialization Thread" and
"Network Monitor".
5. SDRAM is NOT enabled in this configuration.

View File

@ -91,7 +91,7 @@
* Private Data
************************************************************************************/
#ifdef CONFIG_SAMV7_PIOA_IRQ
#ifdef CONFIG_SAMV7_GPIOA_IRQ
static xcpt_t g_emac0_handler;
#endif
@ -103,17 +103,17 @@ static xcpt_t g_emac0_handler;
* Name: sam_emac0_phy_enable
************************************************************************************/
#ifdef CONFIG_SAMV7_PIOA_IRQ
#ifdef CONFIG_SAMV7_GPIOA_IRQ
static void sam_emac0_phy_enable(bool enable)
{
phydbg("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable);
if (enable)
{
sam_pioirqenable(IRQ_EMAC0_INT);
sam_gpioirqenable(IRQ_EMAC0_INT);
}
else
{
sam_pioirqdisable(IRQ_EMAC0_INT);
sam_gpioirqdisable(IRQ_EMAC0_INT);
}
}
#endif
@ -301,13 +301,13 @@ int sam_emac0_setmac(void)
*
****************************************************************************/
#ifdef CONFIG_SAMV7_PIOA_IRQ
#ifdef CONFIG_SAMV7_GPIOA_IRQ
xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable)
{
irqstate_t flags;
xcpt_t *phandler;
xcpt_t oldhandler;
pio_pinset_t pinset;
gpio_pinset_t pinset;
phy_enable_t enabler;
int irq;
@ -346,7 +346,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable)
if (handler)
{
phydbg("Configure pin: %08x\n", pinset);
sam_pioirq(pinset);
sam_gpioirq(pinset);
phydbg("Attach IRQ%d\n", irq);
(void)irq_attach(irq, handler);
@ -360,7 +360,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable)
/* Return with the interrupt disabled in either case */
sam_pioirqdisable(irq);
sam_gpioirqdisable(irq);
/* Return the enabling function pointer */
@ -374,6 +374,6 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable)
irqrestore(flags);
return oldhandler;
}
#endif /* CONFIG_SAMV7_PIOA_IRQ */
#endif /* CONFIG_SAMV7_GPIOA_IRQ */
#endif /* HAVE_NETWORK */

View File

@ -91,9 +91,9 @@ Issues
As mentioned above, context switching is based on logic like setjmp() and
longjmp(). This context switching is available for 32-bit and 64-bit
targets. You must, however, set the correct target in the configuration
before you build: HOST_X86_64 or HOST_X86 for 62- and 32-bit targets,
respectively. On a 64-bit machine, you can also force the 32-bit build
with CONFIG_SIM_M32=y (which does not seem to be supported by more
before you build: CONFIG_HOST_X86_64 or CONFIG_HOST_X86 for 64- and 32-bit
targets, respectively. On a 64-bit machine, you can also force the 32-bit
build with CONFIG_SIM_M32=y (which does not seem to be supported by more
contemporary x86_64 compilers).
There are other 64-bit issues as well. For example, addresses are retained in
@ -179,6 +179,11 @@ There are some additional issues using the simulator with Cygwin64. Below is th
summary of the changes that I had to make to get the simulator working in that
environment:
CONFIG_HOST_X86_64=y
CONFIG_SIM_M32=n
Need to select X64_64. Cygwin64 tools do not seem to support any option
to build a 32-bit target.
CONFIG_SIM_CYGWIN_DECORATED=n
Older versions of Cygwin toolsdecorated C symbol names by adding an
underscore to the beginning of the symbol name. Newer versions of