drone-os / drone Goto Github PK
View Code? Open in Web Editor NEWCLI utility for Drone, an Embedded Operating System.
Home Page: https://www.drone-os.com/
License: Apache License 2.0
CLI utility for Drone, an Embedded Operating System.
Home Page: https://www.drone-os.com/
License: Apache License 2.0
I'm following along the drone book using 2 blue pills and when I get to the just f;ash
step I see the following error:
2080 >just flash
drone env thumbv7m-none-eabi -- cargo +nightly-2019-11-06 build --features "" --release
Finished release [optimized] target(s) in 0.03s
drone probe flash target/thumbv7m-none-eabi/release/bluepill-hello-world
Black Magic Probe (Firmware v1.6.1-446-g8851504) (Hardware Version 1)
Copyright (C) 2015 Black Sphere Technologies Ltd.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
Assert SRST during connect: enabled
Target voltage: ABSENT!
Available Targets:
No. Att Driver
1 STM32F1 medium density M3/M4
0x080002e0 in bluepill_hello_world::tasks::root::handler ()
/run/user/35029/.tmpf5GDh0:62: Error in sourced command file:
Error erasing flash with vFlashErase packet
[Inferior 1 (Remote target) detached]
Error: `"gdb-multiarch" "target/thumbv7m-none-eabi/release/bluepill-hello-world" "--quiet" "--nx" "--batch" "--command" "/run/user/35029/.tmpf5GDh0"` exited with status code: 1
error: Recipe `flash` failed on line 64 with exit code 1
I tried to cat the /run/user/35029/.tmpf5GDh0
file but it was deleted already. Are there any options that can be passed to drone to get the contents of that file to be printed?
For the above I was running on Ubuntu 19.10. I see the same error on my Mac.
drone env -- cargo test --features "std "
Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
error: failed to select a version for `drone-cortex-m`.
... required by package `drone-nav v0.1.0 (/home/qiubuyi/dev/drone-os/drone-nav)`
versions that meet the requirements `^0.12.0` are: 0.12.0
the package `drone-nav` depends on `drone-cortex-m`, with features: `floating_point_unit` but `drone-cortex-m` does not have these features
ag floating
src/device.rs
312: (crates::Platform::CortexM, "cortex_m4f_r0p1", &["floating_point_unit"])
315: "floating_point_unit",
probably need to replace floating_point_unit with floating-point-unit
When running the command cargo +nightly install drone
from the Drone book, there is an error when compiling drone v0.11.1 :
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
--> src/heap/trace.rs:71:33
|
71 | match self.gen.as_mut().resume() {
| ^^^^^^
|
help: expected the unit value `()`; create it with empty parentheses
|
71 | match self.gen.as_mut().resume(()) {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0061`.
When applying the change suggested, the command works fine.
When it is expected to see support for RISC-V based processors or microprocessors.
When I try to install drone with:
cargo install drone
it gives me those errors:
error[E0557]: feature has been removed
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/lib.rs:31:12
|
31 | #![feature(generators)]
| ^^^^^^^^^^ feature has been removed
|
= note: renamed to coroutines
error[E0432]: unresolved imports std::ops::Generator
, std::ops::GeneratorState
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/heap/trace.rs:7:11
|
7 | ops::{Generator, GeneratorState},
| ^^^^^^^^^ ^^^^^^^^^^^^^^ no GeneratorState
in ops
| |
| no Generator
in ops
error[E0432]: unresolved import std::ops::Generator
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/dso.rs:5:11
|
5 | use std::{ops::Generator, pin::Pin};
| ^^^^^^^^^^^^^^ no Generator
in ops
error[E0432]: unresolved import std::ops::Generator
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/swo.rs:5:11
|
5 | use std::{ops::Generator, pin::Pin};
| ^^^^^^^^^^^^^^ no Generator
in ops
error[E0432]: unresolved imports std::ops::Generator
, std::ops::GeneratorState
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/mod.rs:14:11
|
14 | ops::{Generator, GeneratorState},
| ^^^^^^^^^ ^^^^^^^^^^^^^^ no GeneratorState
in ops
| |
| no Generator
in ops
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/heap/trace.rs:187:21
|
187 | yield Packet::Alloc { size };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/heap/trace.rs:200:21
|
200 | yield Packet::Dealloc { size };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/heap/trace.rs:214:21
|
214 | yield Packet::Grow { old_size, new_size };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/heap/trace.rs:228:21
|
228 | yield Packet::Shrink { old_size, new_size };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/dso.rs:19:24
|
19 | byte = yield;
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/dso.rs:23:34
|
23 | payload.push(yield);
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/dso.rs:34:20
|
34 | byte = yield;
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/swo.rs:33:36
|
33 | let byte = yield;
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/swo.rs:57:36
|
57 | let byte = yield;
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/swo.rs:89:36
|
89 | let byte = yield;
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/swo.rs:114:38
|
114 | payload.push(yield);
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/log/swo.rs:119:28
|
119 | bytes.push(yield);
| ^^^^^
|
= note: see issue #43122 rust-lang/rust#43122 for more information
= help: add #![feature(coroutines)]
to the crate attributes to enable
= note: this compiler was built on 2024-04-23; consider upgrading it if it is out of date
error[E0635]: unknown feature generator_trait
--> /home/mister-coder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/drone-0.14.0/src/lib.rs:30:12
|
30 | #![feature(generator_trait)]
| ^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0432, E0557, E0635, E0658.
For more information about an error, try rustc --explain E0432
.
error: could not compile drone
(lib) due to 18 previous errors
error: failed to compile drone v0.14.0
, intermediate artifacts can be found at /tmp/cargo-installuKcIZW
.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR
to that path.
Ran
drone new --device nrf52832 --flash-size 512K --ram-size 64K --probe openocd --toolchain nightly-2020-08-26 hello_world
and got hello_world/Cargo.toml containing:
cargo-features = ["resolver"]
[package]
name = "hello_world"
version = "0.1.0"
authors = ["Michal Ulianko <[email protected]>"]
edition = "2018"
resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "hello_world"
path = "src/bin.rs"
test = false
doc = false
[features]
default = []
std = [
"drone-core/std",
"drone-cortexm/std",
"drone-nrf-map/std",
"futures/std",
]
heaptrace = ["drone-core/heaptrace"]
[dependencies]
drone-core = { version = "0.12.0" }
drone-cortexm = { version = "0.12.0", features = ["bit-band", "floating-point-unit", "memory-protection-unit"] }
drone-nrf-map = { version = "0.12.0" }
futures = { version = "0.3.0", default-features = false }
[profile.release]
lto = true
debug = true
panic = "abort"
I'm on drone version 0.12.2.
Looks like src/env.rs contains some unix-specific code which makes it impossible to install drone on Windows. Would it be possible to replace it with a platform-independent implementation?
Compilation log:
Compiling drone v0.11.1
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\env.rs:5:20
|
5 | use std::{env, os::unix::process::CommandExt, process::Command};
| ^^^^ could not find `unix` in `os`
error[E0432]: unresolved import `signal_hook::iterator`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\probe\bmp.rs:13:18
|
13 | use signal_hook::iterator::Signals;
| ^^^^^^^^ could not find `iterator` in `signal_hook`
error[E0432]: unresolved import `signal_hook::iterator`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\probe\openocd.rs:14:18
|
14 | use signal_hook::iterator::Signals;
| ^^^^^^^^ could not find `iterator` in `signal_hook`
error[E0432]: unresolved import `signal_hook::iterator`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\probe\mod.rs:14:18
|
14 | use signal_hook::iterator::Signals;
| ^^^^^^^^ could not find `iterator` in `signal_hook`
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:12:9
|
12 | os::unix::{ffi::OsStrExt, io::AsRawFd, process::CommandExt},
| ^^^^ could not find `unix` in `os`
error[E0432]: unresolved imports `signal_hook::iterator`, `signal_hook::SIGQUIT`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:5:19
|
5 | use signal_hook::{iterator::Signals, SIGINT, SIGQUIT, SIGTERM};
| ^^^^^^^^ ^^^^^^^ no `SIGQUIT` in the root
| |
| could not find `iterator` in `signal_hook`
error[E0425]: cannot find function `mkfifo` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:115:23
|
115 | if unsafe { libc::mkfifo(c_pipe.as_ptr(), 0o644) } == -1 {
| ^^^^^^ not found in `libc`
error[E0425]: cannot find function `fcntl` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:20
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^ not found in `libc`
error[E0425]: cannot find value `F_SETFL` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:50
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^^^ not found in `libc`
error[E0425]: cannot find value `O_NONBLOCK` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:65
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `setpgid` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:140:19
|
140 | libc::setpgid(0, 0);
| ^^^^^^^ help: a function with a similar name exists: `getpid`
error[E0599]: no method named `exec` found for type `std::process::Command` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\env.rs:21:33
|
21 | Err(anyhow!(command.exec()))
| ^^^^ method not found in `std::process::Command`
error[E0599]: no method named `as_bytes` found for type `&std::ffi::OsStr` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:114:48
|
114 | let c_pipe = CString::new(pipe.as_os_str().as_bytes())?;
| ^^^^^^^^ method not found in `&std::ffi::OsStr`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use clap::osstringext::OsStrExt3;`
error[E0599]: no method named `as_raw_fd` found for type `std::fs::File` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:31
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^^^^^ method not found in `std::fs::File`
error[E0599]: no method named `pre_exec` found for type `&mut std::process::Command` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:139:17
|
139 | openocd.pre_exec(|| {
| ^^^^^^^^ method not found in `&mut std::process::Command`
error: aborting due to 15 previous errors
thread 'main' panicked at 'attempt to subtract with overflow', src/heap/layout.rs:19:73
RP2040 is a CPU created by the Raspberry Pi organization.
It features two Cortex M0+ CPUs, 264Kb RAM and up to 16MB of flash.
I'm wondering if M0+ CPUs will be supported and what limitations do they pose to this OS.
I'd love to work on adding support for it, but I can't seem to find any information on how to do that, other than the drone-svd
part.
Currently extending the drone requires changing CLI code. This adds a layer of complexity if I just want to play around with a new board. Can you add an option to load the registry from some config file (say TOML)?
Hi, I tried to compile drone
with rustc
of version 1.57.0-nightly
but it failed, showing:
error[E0557]: feature has been removed
--> /home/jasper/.cargo/registry/src/github.com-1ecc6299db9ec823/drone-core-0.14.3/src/lib.rs:27:12
|
27 | #![feature(const_fn)]
| ^^^^^^^^ feature has been removed
|
= note: split into finer-grained feature gates
As this said, the feature has been removed and should use #![feature(const_mut_refs)]
instead.
When I run just itm
with my Black Magic Probe attached, I get this error:
831 >just itm
drone probe itm --reset 0,1 -- 0,1
stty: illegal option -- --file=/dev/tty.usbmodem7ABA4DC13
usage: stty [-a|-e|-g] [-f file] [options]
Error: `"stty" "--file=/dev/tty.usbmodem7ABA4DC13" "speed" "115200" "raw"` exited with status code: 1
error: Recipe `itm` failed on line 72 with exit code 1
And if I manually run stty:
$ stty --file=/dev/tty.usbmodem7ABA4DC13
stty: illegal option -- --file=/dev/tty.usbmodem7ABA4DC13
usage: stty [-a|-e|-g] [-f file] [options]
$ stty -f /dev/tty.usbmodem7ABA4DC13
speed 9600 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost -onlcr -oxtabs
cflags: cs8 -parenb
Using drone 0.14.0 on Linux with toolchain 1.67.0-nightly (234151769 2022-12-03).
When I execute drone print supported-devices
it segfaults for me.
Do you need any more information?
If I run just gdb
I get the following error:
$ just gdb
drone gdb target/thumbv7em-none-eabihf/release/weact-blinky --reset
GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from target/thumbv7em-none-eabihf/release/weact-blinky...
drone_cortexm::thr::thr_handler () at /Users/davehylands/.cargo/registry/src/github.com-1ecc6299db9ec823/drone-cortexm-0.12.0/src/thr/mod.rs:181
181 pub unsafe extern "C" fn thr_handler<T: ThrToken>() {
Black Magic Probe (Firmware v1.6.1) (Hardware Version 3)
Copyright (C) 2015 Black Sphere Technologies Ltd.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
Target voltage: 3.3V
Available Targets:
No. Att Driver
1 STM32F4xx
A program is being debugged already. Kill it? (y or n) [answered Y; input not from terminal]
core::intrinsics::write_bytes (dst=<optimized out>, val=0, count=<optimized out>) at /Users/davehylands/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/intrinsics.rs:2166
2166 write_bytes(dst, val, count)
/var/folders/th/d3131qsx7zvb7c_50lb3frb80000gp/T/.tmpAtuvAi:68: Error in sourced command file:
syntax error in expression, near `{int} 0xE0042004 = {int} 0xE0042004 | 0b00000100 | 0b00000010 | 0b00000001'.
(gdb)
The contents of the /var/folders/th/d3131qsx7zvb7c_50lb3frb80000gp/T/.tmpP65i5Y
file is:
set substitute-path /rustc/b2e36e6c2d229126b59e892c9147fbb68115d292 /Users/davehylands/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust
... many blank lines deleted ...
target extended-remote /dev/cu.usbmodem7ABA4DC11
monitor version
monitor connect_srst enable
monitor swdp_scan
attach 1
set mem inaccessible-by-default off
set {int} 0xE0042004 = {int} 0xE0042004 | \
0b00000100 | 0b00000010 | \
0b00000001
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.