Skip to content

Commit

Permalink
all: move stm32 files to separate repository
Browse files Browse the repository at this point in the history
  • Loading branch information
aykevl authored and deadprogram committed Feb 18, 2022
1 parent 47a622a commit 644356c
Show file tree
Hide file tree
Showing 76 changed files with 81 additions and 89 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ 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,9 +20,6 @@
[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 @@ -35,3 +32,6 @@
[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: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ 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 @@ -165,10 +162,6 @@ 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: 0 additions & 1 deletion lib/stm32-svd
Submodule stm32-svd deleted from e6db8e
2 changes: 2 additions & 0 deletions loader/goroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ 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 "device/stm32"
import "tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 (
"device/stm32"
"tinygo.org/x/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 "device/stm32"
import "tinygo.org/x/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

0 comments on commit 644356c

Please sign in to comment.