tinygo-org / bluetooth

Cross-platform Bluetooth API for Go and TinyGo. Supports Linux, macOS, Windows, and bare metal using Nordic SoftDevice or HCI
https://tinygo.org
Other
755 stars 137 forks source link

header files not found nrf52840 #40

Open SpringHawk opened 4 years ago

SpringHawk commented 4 years ago

I am using an Adafruit Feather nrf52840 Express and try to flash it with the advertising example from the ReadMe. I am on MacOS using VSCode.

$tinygo flash -target feather-nrf52840  main.go 
tinygo.org/x/bluetooth
../../../../go/src/tinygo.org/x/bluetooth/adapter_nrf528xx.go:10:10: fatal: 'nrf_sdm.h' file not found
../../../../go/src/tinygo.org/x/bluetooth/gap_nrf528xx.go:17:10: fatal: 'ble_gap.h' file not found
../../../../go/src/tinygo.org/x/bluetooth/gattc_sd.go:10:10: fatal: 'ble_gattc.h' file not found
../../../../go/src/tinygo.org/x/bluetooth/gatts_sd.go:10:10: fatal: 'ble_gap.h' file not found
../../../../go/src/tinygo.org/x/bluetooth/uuid_sd.go:10:10: fatal: 'ble.h' file not found
aykevl commented 4 years ago

I cannot reproduce this error, not on Linux and not on MacOS. How are you running this from VS Code? I'm testing this directly from a shell where it works fine.

Could it be that you have Go modules disabled? I would recommend keeping the default value or enabling them, as the bluetooth package uses Go modules for dependencies (check using go env GO111MODULE).