SAM4S Xplained Pro fixups from Bob DOIRON after the last big set of commits

This commit is contained in:
Gregory Nutt 2014-04-22 14:34:17 -06:00
parent 465bfcb4cf
commit 28b6e0a7f5
5 changed files with 37 additions and 12 deletions

View File

@ -125,12 +125,12 @@ CONFIG_ARCH_CORTEXM4=y
# CONFIG_ARCH_CORTEXA8 is not set
CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="sam34"
# CONFIG_ARMV7M_USEBASEPRI is not set
CONFIG_ARMV7M_USEBASEPRI=y
# CONFIG_ARCH_HAVE_FPU is not set
CONFIG_ARCH_HAVE_MPU=y
CONFIG_ARMV7M_MPU=y
CONFIG_ARMV7M_MPU_NREGIONS=8
# CONFIG_DEBUG_HARDFAULT is not set
CONFIG_DEBUG_HARDFAULT=y
#
# ARMV7M Configuration Options
@ -241,8 +241,8 @@ CONFIG_SAM34_EXTNANDSIZE=268435456
# AT91SAM3/4 GPIO Interrupt Configuration
#
CONFIG_SAM34_GPIO_IRQ=y
CONFIG_SAM34_GPIOA_IRQ=y
CONFIG_SAM34_GPIOB_IRQ=y
# CONFIG_SAM34_GPIOA_IRQ is not set
# CONFIG_SAM34_GPIOB_IRQ is not set
CONFIG_SAM34_GPIOC_IRQ=y
#
@ -408,7 +408,7 @@ CONFIG_NAME_MAX=32
#
# RTOS hooks
#
# CONFIG_BOARD_INITIALIZE is not set
CONFIG_BOARD_INITIALIZE=y
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set

View File

@ -86,7 +86,7 @@
/* We need PIO interrupts on PIOC to support card detect interrupts */
#if defined(HAVE_HSMCI) && !defined(CONFIG_GPIOC_IRQ)
#if defined(HAVE_HSMCI) && !defined(CONFIG_SAM34_GPIOC_IRQ)
# warning PIOC interrupts not enabled. No MMC/SD support.
# undef HAVE_HSMCI
#endif

View File

@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <debug.h>
#include <nuttx/watchdog.h>
#include "sam4s-xplained-pro.h"
@ -73,3 +74,27 @@ void sam_boardinitialize(void)
board_led_initialize();
#endif
}
/****************************************************************************
* Name: board_initialize
*
* Description:
* If CONFIG_BOARD_INITIALIZE is selected, then an additional
* initialization call will be performed in the boot-up sequence to a
* function called board_initialize(). board_initialize() will be
* called immediately after up_initialize() is called and just before the
* initial application is started. This additional initialization phase
* may be used, for example, to initialize board-specific device drivers.
*
****************************************************************************/
#ifdef CONFIG_BOARD_INITIALIZE
void board_initialize(void)
{
#if (defined(CONFIG_SAM34_WDT) && !defined(CONFIG_WDT_DISABLE_ON_RESET))
/* Enable watchdog timer kicker kernel thread. */
DEBUGASSERT(up_wdginitialize() >= 0);
#endif
}
#endif /* CONFIG_BOARD_INITIALIZE */

View File

@ -112,7 +112,7 @@ int nsh_archinitialize(void)
ret = cdcacm_initialize(CONFIG_SAM4S_XPLAINED_PRO_CDCACM_DEVMINOR, NULL);
if (ret < 0)
{
message("ERROR: Failed to create the CDC/ACM serial device: %d\n", errno);
message("ERROR: Failed to create the CDC/ACM serial device: %d (%d)\n", ret, errno);
return ret;
}
#endif
@ -124,7 +124,7 @@ int nsh_archinitialize(void)
ret = sam_hsmci_initialize();
if (ret < 0)
{
message("ERROR: sam_hsmci_initialize() failed: %d\n", ret);
message("ERROR: sam_hsmci_initialize() failed: %d (%d)\n", ret, errno);
return ret;
}
#endif
@ -136,7 +136,7 @@ int nsh_archinitialize(void)
ret = mount(NULL, "/proc", "procfs", 0, NULL);
if (ret < 0)
{
message("ERROR: Failed to mount the PROC filesystem: %d\n", errno);
message("ERROR: Failed to mount the PROC filesystem: %d (%d)\n", ret, errno);
return ret;
}
#endif
@ -146,7 +146,7 @@ int nsh_archinitialize(void)
ret = mount("/dev/mmcsd0", "/fat", "vfat", 0, NULL);
if (ret < 0)
{
message("ERROR: Failed to mount the FAT filesystem: %d\n", errno);
message("ERROR: Failed to mount the FAT filesystem: %d (%d)\n", ret, errno);
return ret;
}
#endif
@ -164,7 +164,7 @@ int nsh_archinitialize(void)
ret = usbmonitor_start(0, NULL);
if (ret != OK)
{
message("nsh_archinitialize: Start USB monitor: %d\n", ret);
message("nsh_archinitialize: Start USB monitor: %d (%d)\n", ret, errno);
return ret;
}
#endif

View File

@ -158,7 +158,7 @@ void up_initialize(void);
* If CONFIG_BOARD_INITIALIZE is selected, then an additional
* initialization call will be performed in the boot-up sequence to a
* function called board_initialize(). board_initialize() will be
* called immediately after up_intiialize() is called and just before the
* called immediately after up_initialize() is called and just before the
* initial application is started. This additional initialization phase
* may be used, for example, to initialize board-specific device drivers.
*