Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "all: move stm32 files to separate repository" #2654

Merged
merged 1 commit into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/stm32-svd
Submodule stm32-svd added at e6db8e
2 changes: 0 additions & 2 deletions loader/goroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_bluepill.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_feather-stm32f405.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_gnse.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_lgt92.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_lorae5.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_nucleof103rb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_nucleof722ze.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_nucleol031k6.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_nucleol432kc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_nucleol552ze.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_nucleowl55jc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_stm32f469disco.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_stm32f4disco.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/board_swan.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/interrupt"
"tinygo.org/x/device/stm32"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package machine

import "tinygo.org/x/device/stm32"
import "device/stm32"

const deviceName = stm32.Device

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_adc_f1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package machine

import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_adc_f4.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package machine

import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_exti_afio.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)

func getEXTIConfigRegister(pin uint8) *volatile.Register32 {
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_exti_exti.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)

func getEXTIConfigRegister(pin uint8) *volatile.Register32 {
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_exti_syscfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)

func getEXTIConfigRegister(pin uint8) *volatile.Register32 {
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_exti_syscfg_noenable.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package machine

import (
"device/stm32"
"runtime/volatile"
"tinygo.org/x/device/stm32"
)

func getEXTIConfigRegister(pin uint8) *volatile.Register32 {
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_gpio_reva.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package machine

import (
"tinygo.org/x/device/stm32"
"device/stm32"
)

// This variant of the GPIO input interrupt logic is for
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_gpio_revb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package machine

import (
"tinygo.org/x/device/stm32"
"device/stm32"
)

// This variant of the GPIO input interrupt logic is for
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_gpio_revb_mp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package machine

import (
"tinygo.org/x/device/stm32"
"device/stm32"
)

//
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_i2c_reva.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package machine
// of MCUs.

import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_i2c_revb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package machine

import (
"tinygo.org/x/device/stm32"
"device/stm32"
"unsafe"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_moder_gpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_rng.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package machine

import "tinygo.org/x/device/stm32"
import "device/stm32"

var rngInitDone = false

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_spi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_tim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32_uart.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32f103.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32f4.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion src/machine/machine_stm32f7.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
Loading