#Can't get rust code to build or get synta highlighting/code completion for avr-hal for arduino uno.

18 messages · Page 1 of 1 (latest)

steel echo
#

seems i got it to build but no code highlighting/ completion though still

tropic valve
#

What ide are you using?

steel echo
#

rust rover

tropic valve
#

Do you have a cargo.toml file?

steel echo
#

yeah

tropic valve
#

What’s the name of the file

steel echo
#
[package]
name = "test-arduino"
version = "0.1.0"
authors = ["Tim Kotowski <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"

[[bin]]
name = "test-arduino"
test = false
bench = false

[dependencies]
panic-halt = "0.2.0"
ufmt = "0.2.0"
nb = "1.1.0"
embedded-hal = "1.0"
pwm-pca9685 = "1.0.0"
infrared = "0.14.1"
bme280 = "0.5.1"


[dependencies.arduino-hal]
git = "https://github.com/rahix/avr-hal"
rev = "3e362624547462928a219c40f9ea8e3a64f21e5f"
features = ["arduino-uno"]

# The latest releases of `proc-macro2` do not support the rust toolchain that
# we use.  Thus, we must fix this dependency to an older version where our
# toolchain is still supported.  See https://github.com/Rahix/avr-hal/issues/537
[build-dependencies.proc-macro2]
version = "=1.0.79"

# Configure the build for minimal size - AVRs have very little program memory
[profile.dev]
panic = "abort"
lto = true
opt-level = "s"

[profile.release]
panic = "abort"
codegen-units = 1
debug = true
lto = true
opt-level = "s"

tropic valve
steel echo
#

yea

tropic valve
#

Have you tried restarting the ide?

steel echo
#

yes

#

its related to avr-hal and the generated template

#

normal rust without any avr-hal project is fine

tropic valve
#

What example did you use?

steel echo
#

its just the default example when project is created

tropic valve
#

Not sure what’s wrong

steel echo
#

have you work with arduino board before with avr-hal

#

its an avr-hal issue somewhere on my part