[5e8726d0] | 1 | /* |
---|
| 2 | * This routine starts the application. It includes application, |
---|
| 3 | * board, and monitor specific initialization and configuration. |
---|
| 4 | * The generic CPU dependent initialization has been performed |
---|
| 5 | * before this routine is invoked. |
---|
| 6 | * |
---|
| 7 | * COPYRIGHT (c) 2001. |
---|
| 8 | * Ralf Corsepius (corsepiu@faw.uni-ulm.de). |
---|
| 9 | * |
---|
| 10 | * This program is distributed in the hope that it will be useful, |
---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
| 13 | * |
---|
| 14 | * COPYRIGHT (c) 2001. |
---|
| 15 | * On-Line Applications Research Corporation (OAR). |
---|
| 16 | * |
---|
| 17 | * The license and distribution terms for this file may be |
---|
| 18 | * found in the file LICENSE in this distribution or at |
---|
| 19 | * http://www.rtems.com/license/LICENSE. |
---|
| 20 | * |
---|
| 21 | * $Id$ |
---|
| 22 | */ |
---|
| 23 | |
---|
| 24 | #include <bsp.h> |
---|
| 25 | |
---|
| 26 | uint32_t bsp_clicks_per_second; |
---|
| 27 | |
---|
| 28 | #ifndef START_HW_INIT |
---|
| 29 | void bsp_hw_init(void); |
---|
| 30 | #endif |
---|
| 31 | |
---|
| 32 | /* |
---|
| 33 | * bsp_start |
---|
| 34 | * |
---|
| 35 | * This routine does the bulk of the system initialization. |
---|
| 36 | */ |
---|
| 37 | void bsp_start( void ) |
---|
| 38 | { |
---|
| 39 | /* |
---|
| 40 | * For real boards you need to setup the hardware |
---|
| 41 | * and need to copy the vector table from rom to ram. |
---|
| 42 | * |
---|
| 43 | * Depending on the board this can either be done from inside the rom |
---|
| 44 | * startup code, rtems startup code or here. |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | #ifndef START_HW_INIT |
---|
| 48 | /* board hardware setup here, or from 'start.S' */ |
---|
| 49 | bsp_hw_init(); |
---|
| 50 | #endif |
---|
| 51 | |
---|
| 52 | /* |
---|
| 53 | * initialize the interrupt stack for this BSP |
---|
| 54 | */ |
---|
| 55 | #if ( CPU_ALLOCATE_INTERRUPT_STACK == FALSE ) |
---|
| 56 | _CPU_Interrupt_stack_low = &CPU_Interrupt_stack_low ; |
---|
| 57 | _CPU_Interrupt_stack_high = &CPU_Interrupt_stack_high ; |
---|
| 58 | #endif |
---|
| 59 | |
---|
| 60 | /* |
---|
| 61 | * initialize the device driver parameters |
---|
| 62 | */ |
---|
| 63 | bsp_clicks_per_second = CPU_CLOCK_RATE_HZ; |
---|
| 64 | } |
---|