Basic i.MX1 low-level boot

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1695 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-04-10 22:07:20 +00:00
parent 6d36232e5e
commit f3e7adc8ee
4 changed files with 59 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -54,6 +54,22 @@
* Private Functions
****************************************************************************/
/****************************************************************************
* 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 */