Replies: 3 comments 1 reply
-
On Sun, Dec 29, 2024 at 06:19:07AM -0800, T0maas wrote:
I'tried
`cargo generate --git https://github.com/Rahix/avr-hal-template.git`
but it has no option for bare atmega328p (only arduino UNO was closest)
and it uses arduino-hal instead of atmega-hal.
```
cargo generate --git https://github.com/Rahix/avr-hal-template.git
cd projectname
cargo build
```
From that "known good" start making changes.
Use `cargo build` to verify it still build.
And at some point deploy to the actual hardware.
Groeten
Geert Stappers
--
Silence is hard to parse
|
Beta Was this translation helpful? Give feedback.
1 reply
-
On Mon, Dec 30, 2024 at 12:16:46PM -0800, T0maas wrote:
> From that "known good" start making changes.
But how?
Yes, so true.
Which changes?
Your changes to a known good,
your changes that bring you closer to your goal.
What do I need to write to Cargo.toml to make correct configuration
for baremetal atmega328p with 8MHz clock?
https://github.com/Rahix/avr-hal/discussions?discussions_q=clock
did yield #318 which has
title "Target microcontroller directly instead of an arduino board"
Please advice how to improve our documentation. (Karma bonus points
for merge requests.)
And please accept my apology. I'm sorry that I did not ignore the
original posting. http://www.catb.org/~esr/faqs/smart-questions.html
says I should have ignored it.
Groeten
Geert Stappers
--
Silence is hard to parse
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Is there some complex documentation? I found only this: https://rahix.github.io/avr-hal/atmega_hal/index.html. I tried to run
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to start new project and what do I need to write to Cargo.toml? I've just downloaded cargo on my linux distro so I have fresh instalation of rust.
I want to use atmega-hal (not arduino-hal, because I need better control over MCU: timers, prescalers, PWM, ADC, ...), and I have those questions:
cargo search
how to add them to Cargo.toml?I've read some examples, but they are using relative paths like this:
And I cant use this in my project (where Cargo.toml is in project root directory). Do I need to download this repo somewhere and point path to this directory inside my project?
I have this setup:
I've found somewhere that I need to run
rustup target add avr-atmega328p
but it ended with error:I also tried this:
cargo doc --features atmega328p --open
but it wrote:
where atmega328example is name of my project directory. It's fresh directory just created using
cargo init
.I'tried
cargo generate --git https://github.com/Rahix/avr-hal-template.git
but it has no option for bare atmega328p (only arduino UNO was closest) and it uses arduino-hal instead of atmega-hal.Beta Was this translation helpful? Give feedback.
All reactions