-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
128 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
*.map | ||
*.out | ||
*.html | ||
board.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef __BOARD_H__ | ||
#define __BOARD_H__ | ||
|
||
#include <stdbool.h> | ||
#include <libopencm3/stm32/rcc.h> | ||
#include <libopencm3/stm32/gpio.h> | ||
|
||
#define BOARD_USE_DEBUG_PINS_AS_GPIO false | ||
|
||
#define BOARD_RCC_LED RCC_GPIOB | ||
#define BOARD_PORT_LED GPIOB | ||
#define BOARD_PIN_LED GPIO1 | ||
#define BOARD_LED_HIGH_IS_BUSY false /* We only have IDLE LED on it, which is active high. */ | ||
|
||
#define BOARD_RCC_USB_PULLUP RCC_GPIOB | ||
#define BOARD_PORT_USB_PULLUP GPIOB | ||
#define BOARD_PIN_USB_PULLUP GPIO9 | ||
#define BOARD_USB_HIGH_IS_PULLUP false /* Active low */ | ||
|
||
/* Currently you can only use SPI1, since it has highest clock. */ | ||
|
||
#endif /* __BOARD_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
stm32f103.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef __BOARD_H__ | ||
#define __BOARD_H__ | ||
|
||
#include <stdbool.h> | ||
#include <libopencm3/stm32/rcc.h> | ||
#include <libopencm3/stm32/gpio.h> | ||
|
||
#define BOARD_USE_DEBUG_PINS_AS_GPIO true /* We have to disable JTAG / SWD to access PB3 */ | ||
|
||
#define BOARD_RCC_LED RCC_GPIOA | ||
#define BOARD_PORT_LED GPIOA | ||
#define BOARD_PIN_LED GPIO0 | ||
#define BOARD_LED_HIGH_IS_BUSY true | ||
|
||
#define BOARD_RCC_USB_PULLUP RCC_GPIOB | ||
#define BOARD_PORT_USB_PULLUP GPIOB | ||
#define BOARD_PIN_USB_PULLUP GPIO3 | ||
#define BOARD_USB_HIGH_IS_PULLUP true | ||
|
||
/* Currently you can only use SPI1, since it has highest clock. */ | ||
|
||
#endif /* __BOARD_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
stm32f103.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef __BOARD_H__ | ||
#define __BOARD_H__ | ||
|
||
#include <stdbool.h> | ||
#include <libopencm3/stm32/rcc.h> | ||
#include <libopencm3/stm32/gpio.h> | ||
|
||
#define BOARD_USE_DEBUG_PINS_AS_GPIO true /* We have to disable JTAG / SWD to access PA13 */ | ||
|
||
#define BOARD_RCC_LED RCC_GPIOA | ||
#define BOARD_PORT_LED GPIOA | ||
#define BOARD_PIN_LED GPIO0 | ||
#define BOARD_LED_HIGH_IS_BUSY true | ||
|
||
#define BOARD_RCC_USB_PULLUP RCC_GPIOA | ||
#define BOARD_PORT_USB_PULLUP GPIOA | ||
#define BOARD_PIN_USB_PULLUP GPIO13 | ||
#define BOARD_USB_HIGH_IS_PULLUP true | ||
|
||
/* Currently you can only use SPI1, since it has highest clock. */ | ||
|
||
#endif /* __BOARD_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
stm32f103.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ARCH_FLAGS = -DSTM32F1 -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd | ||
LDSCRIPT = libopencm3/lib/stm32/f1/stm32f103x8.ld | ||
LIBOPENCM3 = libopencm3/lib/libopencm3_stm32f1.a | ||
OPENCM3_MK = lib/stm32/f1 |
Submodule libopencm3
updated
2 files
+5 −5 | include/libopencm3/efm32/lg/cmu.h | |
+4 −4 | include/libopencm3/efm32/lg/gpio.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters