stm32/stm32wlx: Add support for stm32wl55_cm4
board/stm32: Add support for GNSE (Generic Node Sensor Edition) Thanks to @jamestait for his help on GNSE port
Этот коммит содержится в:
родитель
b4503c1e37
коммит
93ac7cec0d
15 изменённых файлов: 100 добавлений и 22 удалений
|
@ -43,7 +43,7 @@ See the [getting started instructions](https://tinygo.org/getting-started/) for
|
|||
|
||||
You can compile TinyGo programs for microcontrollers, WebAssembly and Linux.
|
||||
|
||||
The following 74 microcontroller boards are currently supported:
|
||||
The following 75 microcontroller boards are currently supported:
|
||||
|
||||
* [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333)
|
||||
* [Adafruit Circuit Playground Express](https://www.adafruit.com/product/3333)
|
||||
|
@ -119,6 +119,7 @@ The following 74 microcontroller boards are currently supported:
|
|||
* [ST Micro STM32F103XX "Bluepill"](https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill)
|
||||
* [ST Micro STM32F407 "Discovery"](https://www.st.com/en/evaluation-tools/stm32f4discovery.html)
|
||||
* [X9 Pro smartwatch](https://github.com/curtpw/nRF5x-device-reverse-engineering/tree/master/X9-nrf52832-activity-tracker/)
|
||||
* [The Things Industries Generic Node Sensor Edition](https://www.genericnode.com/docs/sensor-edition/)
|
||||
|
||||
For more information, see [this list of boards](https://tinygo.org/microcontrollers/). Pull requests for additional support are welcome!
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build stm32wle5
|
||||
// +build stm32wle5
|
||||
//go:build stm32wlx
|
||||
// +build stm32wlx
|
||||
|
||||
package rand
|
||||
|
||||
|
|
58
src/machine/board_gnse.go
Обычный файл
58
src/machine/board_gnse.go
Обычный файл
|
@ -0,0 +1,58 @@
|
|||
//go:build gnse
|
||||
// +build gnse
|
||||
|
||||
package machine
|
||||
|
||||
import (
|
||||
"device/stm32"
|
||||
"runtime/interrupt"
|
||||
)
|
||||
|
||||
const (
|
||||
LED_RED = PB5
|
||||
LED_GREEN = PB6
|
||||
LED_BLUE = PB7
|
||||
LED1 = LED_RED // Red
|
||||
LED2 = LED_GREEN // Green
|
||||
LED3 = LED_BLUE // Blue
|
||||
LED = LED_GREEN // Default
|
||||
|
||||
BUTTON = PB3
|
||||
|
||||
// SPI0
|
||||
SPI0_NSS_PIN = PA4
|
||||
SPI0_SCK_PIN = PA5
|
||||
SPI0_SDO_PIN = PA6
|
||||
SPI0_SDI_PIN = PA7
|
||||
|
||||
//MCU USART2
|
||||
UART2_RX_PIN = PA3
|
||||
UART2_TX_PIN = PA2
|
||||
|
||||
// DEFAULT USART
|
||||
UART_RX_PIN = UART2_RX_PIN
|
||||
UART_TX_PIN = UART2_TX_PIN
|
||||
)
|
||||
|
||||
var (
|
||||
// STM32 UART2 is connected to the embedded STLINKV3 Virtual Com Port
|
||||
UART0 = &_UART0
|
||||
_UART0 = UART{
|
||||
Buffer: NewRingBuffer(),
|
||||
Bus: stm32.USART2,
|
||||
TxAltFuncSelector: 7,
|
||||
RxAltFuncSelector: 7,
|
||||
}
|
||||
|
||||
DefaultUART = UART0
|
||||
|
||||
// SPI
|
||||
SPI3 = SPI{
|
||||
Bus: stm32.SPI3,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Enable UARTs Interrupts
|
||||
UART0.Interrupt = interrupt.New(stm32.IRQ_USART2, _UART0.handleInterrupt)
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
//go:build atmega || nrf || sam || (stm32 && !stm32wle5) || fe310 || k210 || rp2040
|
||||
// +build atmega nrf sam stm32,!stm32wle5 fe310 k210 rp2040
|
||||
//go:build atmega || nrf || sam || (stm32 && !stm32wlx) || fe310 || k210 || rp2040
|
||||
// +build atmega nrf sam stm32,!stm32wlx fe310 k210 rp2040
|
||||
|
||||
package machine
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build stm32 && !stm32f1 && !stm32l5 && !stm32wle5
|
||||
// +build stm32,!stm32f1,!stm32l5,!stm32wle5
|
||||
//go:build stm32 && !stm32f1 && !stm32l5 && !stm32wlx
|
||||
// +build stm32,!stm32f1,!stm32l5,!stm32wlx
|
||||
|
||||
package machine
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build stm32wle5
|
||||
// +build stm32wle5
|
||||
//go:build stm32wlx
|
||||
// +build stm32wlx
|
||||
|
||||
package machine
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build stm32 && !stm32l4 && !stm32l5 && !stm32wle5
|
||||
// +build stm32,!stm32l4,!stm32l5,!stm32wle5
|
||||
//go:build stm32 && !stm32l4 && !stm32l5 && !stm32wlx
|
||||
// +build stm32,!stm32l4,!stm32l5,!stm32wlx
|
||||
|
||||
package machine
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build stm32wle5
|
||||
// +build stm32wle5
|
||||
//go:build stm32wlx
|
||||
// +build stm32wlx
|
||||
|
||||
package machine
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build stm32wle5
|
||||
// +build stm32wle5
|
||||
//go:build stm32wlx
|
||||
// +build stm32wlx
|
||||
|
||||
package machine
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
//go:build stm32wle5
|
||||
// +build stm32wle5
|
||||
//go:build stm32wlx
|
||||
// +build stm32wlx
|
||||
|
||||
package runtime
|
||||
|
12
targets/gnse.json
Обычный файл
12
targets/gnse.json
Обычный файл
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"inherits": [
|
||||
"stm32wl5x_cm4"
|
||||
],
|
||||
"build-tags": [
|
||||
"gnse"
|
||||
],
|
||||
"serial": "uart",
|
||||
"flash-method": "openocd",
|
||||
"openocd-interface": "stlink",
|
||||
"openocd-target": "stm32wlx"
|
||||
}
|
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
"inherits": [
|
||||
"stm32wle5"
|
||||
"stm32wl5x_cm4"
|
||||
],
|
||||
"build-tags": [
|
||||
"nucleowl55jc"
|
||||
],
|
||||
"serial": "uart",
|
||||
"linkerscript": "targets/stm32wle5.ld",
|
||||
"flash-method": "openocd",
|
||||
"openocd-interface": "stlink",
|
||||
"openocd-target": "stm32wlx"
|
||||
|
|
8
targets/stm32wl5x_cm4.json
Обычный файл
8
targets/stm32wl5x_cm4.json
Обычный файл
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"inherits": ["cortex-m4"],
|
||||
"build-tags": [ "stm32wl5x_cm4","stm32wlx", "stm32"],
|
||||
"extra-files": [
|
||||
"src/device/stm32/stm32wl5x_cm4.s"
|
||||
],
|
||||
"linkerscript": "targets/stm32wlx.ld"
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"inherits": ["cortex-m4"],
|
||||
"build-tags": ["stm32wle5", "stm32"],
|
||||
"build-tags": [ "stm32wle5","stm32wlx", "stm32"],
|
||||
"extra-files": [
|
||||
"src/device/stm32/stm32wle5.s"
|
||||
],
|
||||
"linkerscript": "targets/stm32wle5.ld"
|
||||
"linkerscript": "targets/stm32wlx.ld"
|
||||
}
|
Загрузка…
Создание таблицы
Сослаться в новой задаче