summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-04-10 22:07:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-04-10 22:07:20 +0000
commit7b7fc55ce2dcc9adae56185d40e62e6c2276c98f (patch)
tree759bc03e7ba223c70abd7c3311ed3ffadf168bbb /nuttx/configs
parent6a80bc8280dfdd98426010f986928a142debddfd (diff)
downloadpx4-nuttx-7b7fc55ce2dcc9adae56185d40e62e6c2276c98f.tar.gz
px4-nuttx-7b7fc55ce2dcc9adae56185d40e62e6c2276c98f.tar.bz2
px4-nuttx-7b7fc55ce2dcc9adae56185d40e62e6c2276c98f.zip
Basic i.MX1 low-level boot
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1695 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/mx1ads/include/board.h14
-rw-r--r--nuttx/configs/mx1ads/ostest/Make.defs2
-rw-r--r--nuttx/configs/mx1ads/ostest/defconfig9
-rw-r--r--nuttx/configs/mx1ads/src/up_leds.c41
4 files changed, 59 insertions, 7 deletions
diff --git a/nuttx/configs/mx1ads/include/board.h b/nuttx/configs/mx1ads/include/board.h
index a71905566..6be596e47 100644
--- a/nuttx/configs/mx1ads/include/board.h
+++ b/nuttx/configs/mx1ads/include/board.h
@@ -48,6 +48,20 @@
/************************************************************************************
* Definitions
************************************************************************************/
+
+/* LED definitions ******************************************************************/
+
+/* The MX1ADS has only one usable LED: Port A, bit 2 */
+
+ /* ON OFF */
+#define LED_STARTED 0 /* OFF OFF */
+#define LED_HEAPALLOCATE 1 /* OFF OFF */
+#define LED_IRQSENABLED 2 /* OFF OFF */
+#define LED_STACKCREATED 3 /* OFF OFF */
+#define LED_INIRQ 4 /* ON OFF */
+#define LED_SIGNAL 5 /* ON OFF */
+#define LED_ASSERTION 6 /* ON OFF */
+#define LED_PANIC 7 /* ON OFF */
/************************************************************************************
* Inline Functions
diff --git a/nuttx/configs/mx1ads/ostest/Make.defs b/nuttx/configs/mx1ads/ostest/Make.defs
index 28994bbcf..134035c50 100644
--- a/nuttx/configs/mx1ads/ostest/Make.defs
+++ b/nuttx/configs/mx1ads/ostest/Make.defs
@@ -57,7 +57,7 @@ endif
ifeq ($(ARCHCCMAJOR),4)
ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin
else
- ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv5te -msoft-float -fno-builtin
+ ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin
endif
ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig
index fde5e2509..cca4dc73e 100644
--- a/nuttx/configs/mx1ads/ostest/defconfig
+++ b/nuttx/configs/mx1ads/ostest/defconfig
@@ -50,6 +50,8 @@
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_VSTART - The startaddress of DRAM (virtual)
+# CONFIG_ARCH_LOWVECTORS - Leave ARM interrupt vectors at 0x0000:0000
+# instead of moving to 0xffff:0000
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
@@ -64,9 +66,10 @@ CONFIG_ARCH_BOARD=mx1ads
CONFIG_ARCH_BOARD_MX1ADS=y
CONFIG_BOARD_LOOPSPERMSEC=16945
CONFIG_DRAM_SIZE=0x01000000
-CONFIG_DRAM_START=0x01000000
+CONFIG_DRAM_START=0x08000000
CONFIG_DRAM_VSTART=0x00000000
-CONFIG_DRAM_NUTTXENTRY=0x01008000
+CONFIG_DRAM_NUTTXENTRY=0x01004000
+CONFIG_ARCH_LOWVECTORS=y
CONFIG_ARCH_INTERRUPTSTACK=0
CONFIG_ARCH_STACKDUMP=y
@@ -158,7 +161,7 @@ CONFIG_HAVE_LIBM=n
CONFIG_EXAMPLE=ostest
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
-CONFIG_MM_REGIONS=1
+CONFIG_MM_REGIONS=2
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_INSTRUMENTATION=n
diff --git a/nuttx/configs/mx1ads/src/up_leds.c b/nuttx/configs/mx1ads/src/up_leds.c
index d34fe4143..effdb7fa4 100644
--- a/nuttx/configs/mx1ads/src/up_leds.c
+++ b/nuttx/configs/mx1ads/src/up_leds.c
@@ -55,6 +55,22 @@
****************************************************************************/
/****************************************************************************
+ * Name: imx_ledon
+ ****************************************************************************/
+
+static inline void imx_ledon(void)
+{
+}
+
+/****************************************************************************
+ * Name: imx_ledoff
+ ****************************************************************************/
+
+static void imx_ledoff(void)
+{
+}
+
+/****************************************************************************
* Public Funtions
****************************************************************************/
@@ -65,7 +81,9 @@
#ifdef CONFIG_ARCH_LEDS
void up_ledinit(void)
{
-# error "Missing implementation"
+ /* Configure Port A, Bit 2 as an output, initial value=1 */
+
+ imxgpio_configoutput(GPIOA, 2, 1);
}
/****************************************************************************
@@ -74,7 +92,23 @@ void up_ledinit(void)
void up_ledon(int led)
{
-# error "Missing implementation"
+ switch (led)
+ {
+ case LED_STARTED:
+ case LED_HEAPALLOCATE:
+ case LED_IRQSENABLED:
+ case LED_STACKCREATED:
+ imxgpio_setoutput(GPIOA, 2); /* Port A, Bit 2 = 1 */
+ break;
+
+ case LED_INIRQ:
+ case LED_SIGNAL:
+ case LED_ASSERTION:
+ case LED_PANIC:
+ default:
+ imxgpio_clroutput(GPIOA, 2); /* Port A, Bit 2 = 0 */
+ break;
+ }
}
/****************************************************************************
@@ -83,6 +117,7 @@ void up_ledon(int led)
void up_ledoff(int led)
{
-# error "Missing implementation"
+ imxgpio_clroutput(GPIOA, 2); /* Port A, Bit 2 = 0 */
}
+
#endif /* CONFIG_ARCH_LEDS */