diff --git a/src/machine/board_stm32l0x1.go b/src/machine/board_stm32l0x1.go new file mode 100644 index 0000000000..0d6ce14c39 --- /dev/null +++ b/src/machine/board_stm32l0x1.go @@ -0,0 +1,15 @@ +//go:build stm32l0x1 + +package machine + +const ( + I2C0_SCL_PIN = NoPin + I2C0_SDA_PIN = NoPin + + UART_TX_PIN = NoPin + UART_RX_PIN = NoPin + + SPI0_SDI_PIN = NoPin + SPI0_SDO_PIN = NoPin + SPI0_SCK_PIN = NoPin +) diff --git a/targets/stm32l031x6.ld b/targets/stm32l031x6.ld new file mode 100644 index 0000000000..c16de910ee --- /dev/null +++ b/targets/stm32l031x6.ld @@ -0,0 +1,10 @@ + +MEMORY +{ + FLASH_TEXT (rx) : ORIGIN = 0x08000000, LENGTH = 32K + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K +} + +_stack_size = 2K; + +INCLUDE "targets/arm.ld" diff --git a/targets/stm32l0x1.json b/targets/stm32l0x1.json new file mode 100644 index 0000000000..7f66d65895 --- /dev/null +++ b/targets/stm32l0x1.json @@ -0,0 +1,18 @@ +{ + "inherits": [ + "cortex-m0plus" + ], + "build-tags": [ + "stm32l031", + "stm32l0x1", + "stm32l0", + "stm32" + ], + "linkerscript": "targets/stm32l031x6.ld", + "extra-files": [ + "src/device/stm32/stm32l0x1.s" + ], + "flash-method": "openocd", + "openocd-interface": "cmsis-dap", + "openocd-target": "stm32l0" +}