Added configure and DFU support.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
for full details of how and when the exception can be applied.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
|
||||
@@ -33,8 +34,7 @@
|
||||
* segments initialization.
|
||||
*/
|
||||
void hwinit0(void) {
|
||||
|
||||
stm32_clock_init();
|
||||
#include "../common/hwinit0.c"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -43,14 +43,5 @@ void hwinit0(void) {
|
||||
* and before invoking the main() function.
|
||||
*/
|
||||
void hwinit1(void) {
|
||||
|
||||
/*
|
||||
* HAL initialization.
|
||||
*/
|
||||
halInit();
|
||||
|
||||
/*
|
||||
* ChibiOS/RT initialization.
|
||||
*/
|
||||
chSysInit();
|
||||
#include "../common/hwinit1.c"
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
for full details of how and when the exception can be applied.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
|
||||
@@ -33,8 +34,7 @@
|
||||
* segments initialization.
|
||||
*/
|
||||
void hwinit0(void) {
|
||||
|
||||
stm32_clock_init();
|
||||
#include "../common/hwinit0.c"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -43,16 +43,7 @@ void hwinit0(void) {
|
||||
* and before invoking the main() function.
|
||||
*/
|
||||
void hwinit1(void) {
|
||||
|
||||
/*
|
||||
* HAL initialization.
|
||||
*/
|
||||
halInit();
|
||||
|
||||
/*
|
||||
* ChibiOS/RT initialization.
|
||||
*/
|
||||
chSysInit();
|
||||
#include "../common/hwinit1.c"
|
||||
|
||||
/*
|
||||
* Clear LED and SHUTDOWN output.
|
||||
|
||||
9
boards/common/hwinit0.c
Normal file
9
boards/common/hwinit0.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Common code for hwinit0
|
||||
*/
|
||||
|
||||
#ifdef DFU_SUPPORT
|
||||
SCB->VTOR = 0x08003000;
|
||||
#endif
|
||||
|
||||
stm32_clock_init();
|
||||
14
boards/common/hwinit1.c
Normal file
14
boards/common/hwinit1.c
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Common code for hwinit1
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* HAL initialization.
|
||||
*/
|
||||
halInit();
|
||||
|
||||
/*
|
||||
* ChibiOS/RT initialization.
|
||||
*/
|
||||
chSysInit();
|
||||
Reference in New Issue
Block a user