diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-02-22 02:26:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-02-22 02:26:15 +0000 |
commit | dbf4ba6371fc539eb768eb59f112982db9a0a0c2 (patch) | |
tree | 437fb91209f87858ec226b4fc0e38d8f17caf940 /nuttx/arch/hc | |
parent | 516d19572814f036bce14726ccb2ceeed7f777ad (diff) | |
download | px4-nuttx-dbf4ba6371fc539eb768eb59f112982db9a0a0c2.tar.gz px4-nuttx-dbf4ba6371fc539eb768eb59f112982db9a0a0c2.tar.bz2 px4-nuttx-dbf4ba6371fc539eb768eb59f112982db9a0a0c2.zip |
Call call to low-level UART initialization logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3309 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/hc')
-rwxr-xr-x | nuttx/arch/hc/src/m9s12/m9s12_lowputc.S | 5 | ||||
-rwxr-xr-x | nuttx/arch/hc/src/m9s12/m9s12_start.S | 34 |
2 files changed, 37 insertions, 2 deletions
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S b/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S index 1a251ec22..271d66ec0 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S +++ b/nuttx/arch/hc/src/m9s12/m9s12_lowputc.S @@ -126,6 +126,11 @@ /************************************************************************** * Name: up_lowsetup + * + * Note: This function is called from the boot logic very early in the + * initialization sequence: After the stack pointer has been setup, but + * before .bss has been cleared and .data initialized. + * **************************************************************************/ .text diff --git a/nuttx/arch/hc/src/m9s12/m9s12_start.S b/nuttx/arch/hc/src/m9s12/m9s12_start.S index ad5a39c0d..1a3ec463f 100755 --- a/nuttx/arch/hc/src/m9s12/m9s12_start.S +++ b/nuttx/arch/hc/src/m9s12/m9s12_start.S @@ -59,9 +59,11 @@ * Global Symbols ****************************************************************************/ + .file "m9s12_start.S" .globl __start .globl os_start - .file "m9s12_start.S" + .globl up_lowsetup + .globl hcs12_boardinitialize /**************************************************************************** * Macros @@ -72,8 +74,17 @@ */ .macro showprogress, code -#if defined(CONFIG_DEBUG) && defined(CONFIG_HCS12_SERIALMON) +#ifdef CONFIG_DEBUG + ldab \code +#ifdef CONFIG_HCS12_SERIALMON jsr #PutChar +#else +#ifdef CONFIG_HCS12_NONBANKED + jsr up_lowputc +#else + call up_lowputc +#endif +#endif #endif .endm @@ -161,6 +172,16 @@ __start: /* Setup the stack pointer */ lds .Lstackbase + + /* Perform early, low-level initialization */ + +#ifndef CONFIG_HCS12_SERIALMON +#ifdef CONFIG_HCS12_NONBANKED + jsr up_lowsetup +#else + call up_lowsetup +#endif +#endif showprogress 'A' /* Clear BSS */ @@ -196,6 +217,15 @@ __start: .Ldatainitialized: showprogress 'C' + /* Perform early board-level initialization */ + +#ifdef CONFIG_HCS12_NONBANKED + jsr hcs12_boardinitialize +#else + call hcs12_boardinitialize +#endif + showprogress 'D' + /* Now, start the OS */ showprogress '\n' |