Revert "all: move stm32 files to separate repository"

This reverts commit 644356c220.
Этот коммит содержится в:
sago35 2022-02-25 19:11:49 +09:00 коммит произвёл Ron Evans
родитель cbfa85be6a
коммит d65e3deccf
76 изменённых файлов: 89 добавлений и 81 удалений

3
.gitignore предоставленный
Просмотреть файл

@ -11,10 +11,13 @@ src/device/sam/*.go
src/device/sam/*.s
src/device/sifive/*.go
src/device/sifive/*.s
src/device/stm32/*.go
src/device/stm32/*.s
src/device/kendryte/*.go
src/device/kendryte/*.s
src/device/rp/*.go
src/device/rp/*.s
vendor
llvm-build
llvm-project
build/*

6
.gitmodules предоставленный
Просмотреть файл

@ -20,6 +20,9 @@
[submodule "lib/picolibc"]
path = lib/picolibc
url = https://github.com/keith-packard/picolibc.git
[submodule "lib/stm32-svd"]
path = lib/stm32-svd
url = https://github.com/tinygo-org/stm32-svd
[submodule "lib/musl"]
path = lib/musl
url = git://git.musl-libc.org/musl
@ -32,6 +35,3 @@
[submodule "lib/macos-minimal-sdk"]
path = lib/macos-minimal-sdk
url = https://github.com/aykevl/macos-minimal-sdk.git
[submodule "src/vendor/tinygo.org/x/device"]
path = src/vendor/tinygo.org/x/device
url = https://github.com/tinygo-org/device.git

Просмотреть файл

@ -126,6 +126,9 @@ fmt-check:
gen-device: gen-device-avr gen-device-esp gen-device-nrf gen-device-sam gen-device-sifive gen-device-kendryte gen-device-nxp gen-device-rp
ifneq ($(STM32), 0)
gen-device: gen-device-stm32
endif
gen-device-avr:
@if [ ! -e lib/avr/README.md ]; then echo "Submodules have not been downloaded. Please download them using:\n git submodule update --init"; exit 1; fi
@ -162,6 +165,10 @@ gen-device-kendryte: build/gen-device-svd
./build/gen-device-svd -source=https://github.com/posborne/cmsis-svd/tree/master/data/Kendryte-Community -interrupts=software lib/cmsis-svd/data/Kendryte-Community/ src/device/kendryte/
GO111MODULE=off $(GO) fmt ./src/device/kendryte
gen-device-stm32: build/gen-device-svd
./build/gen-device-svd -source=https://github.com/tinygo-org/stm32-svd lib/stm32-svd/svd src/device/stm32/
GO111MODULE=off $(GO) fmt ./src/device/stm32
gen-device-rp: build/gen-device-svd
./build/gen-device-svd -source=https://github.com/posborne/cmsis-svd/tree/master/data/RaspberryPi lib/cmsis-svd/data/RaspberryPi/ src/device/rp/
GO111MODULE=off $(GO) fmt ./src/device/rp

1
lib/stm32-svd Подмодуль

@ -0,0 +1 @@
Subproject commit e6db8e32d5d42293a528434ec12e7f88479a8649

Просмотреть файл

@ -241,8 +241,6 @@ func pathsToOverride(needsSyscallPackage bool) map[string]bool {
"runtime/": false,
"sync/": true,
"testing/": true,
"vendor/": true,
"vendor/tinygo.org/": false,
}
if needsSyscallPackage {
paths["syscall/"] = true // include syscall/js

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -3,7 +3,7 @@
package machine
import "tinygo.org/x/device/stm32"
import "device/stm32"
const deviceName = stm32.Device

Просмотреть файл

@ -4,7 +4,7 @@
package machine
import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Просмотреть файл

@ -4,7 +4,7 @@
package machine
import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)
func getEXTIConfigRegister(pin uint8) *volatile.Register32 {

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)
func getEXTIConfigRegister(pin uint8) *volatile.Register32 {

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)
func getEXTIConfigRegister(pin uint8) *volatile.Register32 {

Просмотреть файл

@ -4,8 +4,8 @@
package machine
import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)
func getEXTIConfigRegister(pin uint8) *volatile.Register32 {

Просмотреть файл

@ -4,7 +4,7 @@
package machine
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
// This variant of the GPIO input interrupt logic is for

Просмотреть файл

@ -4,7 +4,7 @@
package machine
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
// This variant of the GPIO input interrupt logic is for

Просмотреть файл

@ -4,7 +4,7 @@
package machine
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
//

Просмотреть файл

@ -7,7 +7,7 @@ package machine
// of MCUs.
import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Просмотреть файл

@ -4,7 +4,7 @@
package machine
import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Просмотреть файл

@ -4,7 +4,7 @@
package machine
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
// GPIO for the stm32 families except the stm32f1xx which uses a simpler but

Просмотреть файл

@ -3,7 +3,7 @@
package machine
import "tinygo.org/x/device/stm32"
import "device/stm32"
var rngInitDone = false

Просмотреть файл

@ -6,8 +6,8 @@ package machine
// Peripheral abstraction layer for SPI on the stm32 family
import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -7,9 +7,9 @@ package machine
// depending on the size of that register in the MCU's TIM_Type structure.
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)
const PWM_MODE1 = 0x6

Просмотреть файл

@ -6,9 +6,9 @@ package machine
// Peripheral abstraction layer for UARTs on the stm32 family.
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -6,9 +6,9 @@ package machine
// Peripheral abstraction layer for the stm32.
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -6,10 +6,10 @@ package machine
// Peripheral abstraction layer for the stm32f4
import (
"device/stm32"
"math/bits"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -6,9 +6,9 @@ package machine
// Peripheral abstraction layer for the stm32f4
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -6,7 +6,7 @@ package machine
// Peripheral abstraction layer for the stm32f407
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
func CPUFrequency() uint32 {

Просмотреть файл

@ -6,8 +6,8 @@ package machine
// Peripheral abstraction layer for the stm32l0
import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)
func CPUFrequency() uint32 {

Просмотреть файл

@ -6,9 +6,9 @@ package machine
// Peripheral abstraction layer for the stm32l0
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -6,9 +6,9 @@ package machine
// Peripheral abstraction layer for the stm32l0
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -4,9 +4,9 @@
package machine
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -6,9 +6,9 @@ package machine
// Peripheral abstraction layer for the stm32l5
import (
"device/stm32"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -6,7 +6,7 @@ package machine
// Peripheral abstraction layer for the stm32f407
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
func CPUFrequency() uint32 {

Просмотреть файл

@ -6,10 +6,10 @@ package machine
// Peripheral abstraction layer for the stm32wle5
import (
"device/stm32"
"math/bits"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
"unsafe"
)

Просмотреть файл

@ -11,10 +11,10 @@ package runtime
// Output Comparator used for fine-grained sleeps.
import (
"device/stm32"
"machine"
"runtime/interrupt"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)
type timerInfo struct {

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
func init() {

Просмотреть файл

@ -5,8 +5,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
func init() {

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -3,7 +3,7 @@
package runtime
import "tinygo.org/x/device/stm32"
import "device/stm32"
/*
clock settings

Просмотреть файл

@ -3,7 +3,7 @@
package runtime
import "tinygo.org/x/device/stm32"
import "device/stm32"
/*
clock settings

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
/*

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
const (

Просмотреть файл

@ -4,7 +4,7 @@
package runtime
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
/*

Просмотреть файл

@ -4,7 +4,7 @@
package runtime
import (
"tinygo.org/x/device/stm32"
"device/stm32"
)
/*

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
/*

Просмотреть файл

@ -4,8 +4,8 @@
package runtime
import (
"device/stm32"
"machine"
"tinygo.org/x/device/stm32"
)
const (

1
src/vendor/tinygo.org/x/device сгенерированный предоставленный

@ -1 +0,0 @@
Subproject commit c873563f9ed5a213be5f037c007e27ce733007d1

Просмотреть файл

@ -4,7 +4,7 @@
"serial": "uart",
"linkerscript": "targets/stm32.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32f103.s"
"src/device/stm32/stm32f103.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink-v2",

Просмотреть файл

@ -5,7 +5,7 @@
"automatic-stack-size": false,
"linkerscript": "targets/stm32f405.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32f405.s"
"src/device/stm32/stm32f405.s"
],
"flash-method": "command",
"flash-command": "dfu-util --alt 0 --dfuse-address 0x08000000 --download {bin}",

Просмотреть файл

@ -4,7 +4,7 @@
"serial": "uart",
"linkerscript": "targets/stm32f103rb.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32f103.s"
"src/device/stm32/stm32f103.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink-v2-1",

Просмотреть файл

@ -4,7 +4,7 @@
"serial": "uart",
"linkerscript": "targets/stm32f7x2zetx.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32f7x2.s"
"src/device/stm32/stm32f7x2.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink-v2-1",

Просмотреть файл

@ -4,9 +4,9 @@
"serial": "uart",
"linkerscript": "targets/stm32l031k6.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32l0x1.s"
"src/device/stm32/stm32l0x1.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink",
"openocd-target": "stm32l0"
}
}

Просмотреть файл

@ -4,9 +4,9 @@
"serial": "uart",
"linkerscript": "targets/stm32l4x2.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32l4x2.s"
"src/device/stm32/stm32l4x2.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink-v2-1",
"openocd-target": "stm32l4x"
}
}

Просмотреть файл

@ -4,9 +4,9 @@
"serial": "uart",
"linkerscript": "targets/stm32l5x2xe.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32l552.s"
"src/device/stm32/stm32l552.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink",
"openocd-target": "stm32l5x"
}
}

Просмотреть файл

@ -4,7 +4,7 @@
"serial": "uart",
"linkerscript": "targets/stm32f469.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32f469.s"
"src/device/stm32/stm32f469.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink",

Просмотреть файл

@ -4,7 +4,7 @@
"serial": "uart",
"linkerscript": "targets/stm32f407.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32f407.s"
"src/device/stm32/stm32f407.s"
],
"flash-method": "openocd",
"openocd-interface": "stlink-v2",

Просмотреть файл

@ -8,6 +8,6 @@
"stm32"
],
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32l0x2.s"
"src/device/stm32/stm32l0x2.s"
]
}
}

Просмотреть файл

@ -2,7 +2,7 @@
"inherits": ["cortex-m4"],
"build-tags": [ "stm32wl5x_cm4","stm32wlx", "stm32"],
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32wl5x_cm4.s"
"src/device/stm32/stm32wl5x_cm4.s"
],
"linkerscript": "targets/stm32wlx.ld"
}

Просмотреть файл

@ -2,7 +2,7 @@
"inherits": ["cortex-m4"],
"build-tags": [ "stm32wle5","stm32wlx", "stm32"],
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32wle5.s"
"src/device/stm32/stm32wle5.s"
],
"linkerscript": "targets/stm32wlx.ld"
}

Просмотреть файл

@ -4,10 +4,10 @@
"serial": "uart",
"linkerscript": "targets/stm32l4x5.ld",
"extra-files": [
"src/vendor/tinygo.org/x/device/stm32/stm32l4x5.s"
"src/device/stm32/stm32l4x5.s"
],
"flash-method": "command",
"flash-command": "dfu-util --alt 0 --dfuse-address 0x08000000 --download {bin}",
"openocd-interface": "stlink",
"openocd-target": "stm32l4x"
}
}