diff --git a/ChangeLog b/ChangeLog index b547735..72348d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-10-19 NIIBE Yutaka + + * boards/STM32_PRIMER2/board.mk (BOARDSRC): Use common/hw_config.c. + * boards/OLIMEX_STM32_H103/board.mk (BOARDSRC): Likewise. + + * boards/common/hw_config.c: Move board specific functions to ... + * boards/STM32_PRIMER2/board.c (USB_Cable_Config, set_led): ... here. + * boards/OLIMEX_STM32_H103/board.c (USB_Cable_Config, set_led): Ditto. + + * boards/{OLIMEX_STM32_H103,STM32_PRIMER2}/hw_config.c: Removed. + * boards/common/hw_config.c: New file (was: boards/*/hw_config.c). + + * .gitignore: New file. + 2010-10-16 NIIBE Yutaka Implement "INTERNAL AUTHENTICATE" command. diff --git a/boards/OLIMEX_STM32_H103/board.c b/boards/OLIMEX_STM32_H103/board.c index ba87239..0e22542 100644 --- a/boards/OLIMEX_STM32_H103/board.c +++ b/boards/OLIMEX_STM32_H103/board.c @@ -1,49 +1,19 @@ -/* - ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. - - This file is part of ChibiOS/RT. - - ChibiOS/RT is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - ChibiOS/RT is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - --- - - A special exception to the GPL can be applied should you wish to distribute - a combined work that includes ChibiOS/RT, without being obliged to provide - the source code for any proprietary components. See the file exception.txt - for full details of how and when the exception can be applied. -*/ - #include "config.h" #include "ch.h" #include "hal.h" -/* - * Early initialization code. - * This initialization is performed just after reset before BSS and DATA - * segments initialization. - */ -void hwinit0(void) { -#include "../common/hwinit0.c" +#include "../common/hwinit.c" + +void +hwinit0 (void) +{ + hwinit0_common (); } -/* - * Late initialization code. - * This initialization is performed after BSS and DATA segments initialization - * and before invoking the main() function. - */ -void hwinit1(void) { -#include "../common/hwinit1.c" +void +hwinit1 (void) +{ + hwinit1_common (); } void diff --git a/boards/OLIMEX_STM32_H103/board.h b/boards/OLIMEX_STM32_H103/board.h index 82785e6..2dbe14d 100644 --- a/boards/OLIMEX_STM32_H103/board.h +++ b/boards/OLIMEX_STM32_H103/board.h @@ -28,7 +28,7 @@ #define _BOARD_H_ /* - * Setup for the Olimex STM33-P103 proto board. + * Setup for the Olimex STM32-P103 proto board. */ /* diff --git a/boards/STM32_PRIMER2/board.c b/boards/STM32_PRIMER2/board.c index d0648a9..b75d3eb 100644 --- a/boards/STM32_PRIMER2/board.c +++ b/boards/STM32_PRIMER2/board.c @@ -1,49 +1,19 @@ -/* - ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. - - This file is part of ChibiOS/RT. - - ChibiOS/RT is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - ChibiOS/RT is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - --- - - A special exception to the GPL can be applied should you wish to distribute - a combined work that includes ChibiOS/RT, without being obliged to provide - the source code for any proprietary components. See the file exception.txt - for full details of how and when the exception can be applied. -*/ - #include "config.h" #include "ch.h" #include "hal.h" -/* - * Early initialization code. - * This initialization is performed just after reset before BSS and DATA - * segments initialization. - */ -void hwinit0(void) { -#include "../common/hwinit0.c" +#include "../common/hwinit.c" + +void +hwinit0(void) +{ + hwinit0_common (); } -/* - * Late initialization code. - * This initialization is performed after BSS and DATA segments initialization - * and before invoking the main() function. - */ -void hwinit1(void) { -#include "../common/hwinit1.c" +void +hwinit1(void) +{ + hwinit1_common (); /* * Clear LED and SHUTDOWN output. diff --git a/boards/common/hwinit0.c b/boards/common/hwinit0.c deleted file mode 100644 index 642019e..0000000 --- a/boards/common/hwinit0.c +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Common code for hwinit0 - */ - -#ifdef DFU_SUPPORT - SCB->VTOR = 0x08003000; -#endif - - stm32_clock_init(); diff --git a/boards/common/hwinit1.c b/boards/common/hwinit1.c deleted file mode 100644 index aae1029..0000000 --- a/boards/common/hwinit1.c +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Common code for hwinit1 - * - */ - - /* - * HAL initialization. - */ - halInit(); - - /* - * ChibiOS/RT initialization. - */ - chSysInit(); diff --git a/src/configure b/src/configure index 6f6da43..7496e3b 100755 --- a/src/configure +++ b/src/configure @@ -69,7 +69,7 @@ Configuration: OLIMEX_STM32_H103 STM32_PRIMER2 --enable-debug debug with virtual COM port [no] - --with-dfu build image for DFU [no] + --with-dfu build image for DFU [] EOF exit 0 fi