!ZAnLsPitgFNnrNRLOQ:matrix.org

Drone OS

160 Members
An Embedded Operating System for writing real-time applications in Rust.21 Servers

Load older messages


SenderMessageTime
26 Oct 2021
@valff:matrix.orgvalff
In reply to @miless:matrix.org
Is drone compatible with board-support crates like onebitsy or metro_m4?
I don't think so.
19:01:35
27 Oct 2021
@moerk:matrix.orgmoerk valff seams like they pursue the same goal as you. I am not sure of the difference yet. 10:43:08
31 Oct 2021
@chile09:matrix.orgrolodondo34 joined the room.02:15:02
@mustafara:matrix.orgmustafara joined the room.18:23:01
4 Nov 2021
@mglolenstine:matrix.orgMGlolenstine joined the room.07:04:57
@mglolenstine:matrix.orgMGlolenstineWill drone-os support Cortex M0+ CPUs in the future? It currently seems to favour M3 and M4Fs07:05:37
@valff:matrix.orgvalffAbsolutely, Cortex-M0+ support is currently in progress. Also there will be support for symmetrical multi-core.07:26:54
@mglolenstine:matrix.orgMGlolenstineamazing!07:41:33
@mglolenstine:matrix.orgMGlolenstine

I'm trying to build for STM32f469, but I get an error...

error[E0425]: cannot find function `fpu_init` in module `processor`
  --> src/bin/hello-world_stm.rs:34:25
   |
34 |     unsafe { processor::fpu_init(true) };
   |                         ^^^^^^^^ not found in `processor`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `hello-world_stm` due to previous error
error: Recipe `build` failed on line 26 with exit code 101

project is an unchanged version that's generated using

drone new --probe openocd --device stm32f469 --flash-size 2M --ram-size 324K hello-world_stm
09:11:29
@grawp:matrix.orggrawp
In reply to @valff:matrix.org
Absolutely, Cortex-M0+ support is currently in progress. Also there will be support for symmetrical multi-core.
If I remember correctly M0+ does not have atomic instructions required for lockless structures used in Drone? How is it going to work? Thx.
09:29:35
@valff:matrix.orgvalff
In reply to @mglolenstine:matrix.org

I'm trying to build for STM32f469, but I get an error...

error[E0425]: cannot find function `fpu_init` in module `processor`
  --> src/bin/hello-world_stm.rs:34:25
   |
34 |     unsafe { processor::fpu_init(true) };
   |                         ^^^^^^^^ not found in `processor`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `hello-world_stm` due to previous error
error: Recipe `build` failed on line 26 with exit code 101

project is an unchanged version that's generated using

drone new --probe openocd --device stm32f469 --flash-size 2M --ram-size 324K hello-world_stm
Looks like floating-point-unit feature for drone-cortexm is missing in your Cargo.toml. It should be something like this: drone-cortexm = { version = "0.13.0", features = ["bit-band", "floating-point-unit", "memory-protection-unit"] }
21:19:48
@mglolenstine:matrix.orgMGlolenstineWas there something wrong in the init command?21:20:29
@valff:matrix.orgvalff
In reply to @grawp:matrix.org
If I remember correctly M0+ does not have atomic instructions required for lockless structures used in Drone? How is it going to work? Thx.
We will have to use critical sections. And for RP2040 I plan to use its custom hardware spinlocks and FIFOs where possible.
21:25:26
@valff:matrix.orgvalff
In reply to @mglolenstine:matrix.org
Was there something wrong in the init command?
Not sure, need to test.
21:26:42
@grawp:matrix.orggrawp
In reply to @valff:matrix.org
We will have to use critical sections. And for RP2040 I plan to use its custom hardware spinlocks and FIFOs where possible.
And are RISC-V and M3/4 going to keep being critical-section-less?
21:31:23
@valff:matrix.orgvalffYes, of course.21:32:36
@grawp:matrix.orggrawpIf by the custom hardware you mean the PIOs, then that sounds very intriguing!21:44:10
@valff:matrix.orgvalffI didn't mean PIOs, doubt that they can be used for this. But RP2040 has hardware spinlocks and FIFOs as custom peripherals.21:51:50
5 Nov 2021
@mglolenstine:matrix.orgMGlolenstineA random, probably stupid question... Would Atmega328p CPUs be supported? They're running 8bit RISC CPU architecture...06:32:02
@mglolenstine:matrix.orgMGlolenstine
error: invalid register `r9`: r9 is used internally by LLVM and cannot be used as an operand for inline asm
   --> /home/void/drone_embedded/drone-cortexm/src/thr/init.rs:176:17
    |
176 |                 out("r9") _,
    |                 ^^^^^^^^^^^
06:56:48
@thvdveld:rubdos.beThibaut Vandervelden set a profile picture.09:01:46
@grawp:matrix.orggrawp
In reply to @mglolenstine:matrix.org
A random, probably stupid question...
Would Atmega328p CPUs be supported?
They're running 8bit RISC CPU architecture...

AVR is kinda supported by Rust (https://www.avr-rust.com/) but supporting AVR MCUs does not make sense IMHO:

  • They are not debuggable with any of standard tools both on HW and SW side.
  • Most of them (my personal opinion is all) are legacy MCUs which are usually several times more expensive than nearest M0(+) counterparts which are still an order of magnitude more capable.
  • And finding them in stock is going to be harder and harder.
13:43:27
@mglolenstine:matrix.orgMGlolenstine Thank you for the useful insight.
I didn't know that AVR and Cortex were so far apart.
I used to do Arduino development at school (they said it was the cheapest way), but now I'm starting to doubt it.
What does the number in M0 stand for?
13:46:08
@grawp:matrix.orggrawpAt first you have an architecture like ARMv7E-M, ARMv7M, ARMv6-M which specifies instruction set and some other things (like system bus perhaps?). Then you have Cortex M0, 1, 3, 3F, 4, 4F which are like basic extensions of those architectures (e.g Cortex M4/7(F) extends ARMv7E-M). They bring some common things like interrupt handling workflow and its registers, basic system timer and some other things. Basically everything you need for running an OS and doing some common things. Vendor buys plans for those cores and add its peripheries. For example STM32F4xx can have completely different peripheries than some Atmel MCU based on CortexM4 buy they both have the same system timer and same final interrupt handling. Btw. I have not yet came accross something that implements those architectures like e.g. ARMv7E-M while not implementing Cortex M4/7 but technically it's possible. The M0 is just a name I think. Don't know whether there is some technicality it's derived from.14:01:31
@grawp:matrix.orggrawp

MGlolenstine:
Btw. don't be fooled by the name Arduino. It means many thing. There are
"many" Arduino boards with CortexM3/4 based micrcontroller
e.g. https://store.arduino.cc/products/arduino-nano-33-ble

There are many non-Arduino-HW boards which can run the Arduino libraries and be used with Arudino text editor (it's not really an IDE) which are also based on various architectures like AVR, ARM, and I think also RISC-V based architectures.

14:08:29
@mglolenstine:matrix.orgMGlolenstineWow, that's a lot of interesting information 😯 Thanks for wrapping it together. I have met with arm and cortex names, but didn't really connect them together in this way.14:48:21
8 Nov 2021
@mglolenstine:matrix.orgMGlolenstine https://paste.centos.org/view/4ca9293a
I'm having slight feelings of deprecation in drone-os.
I'm wondering what I can do about it.
Is the best way just pulling the repos and adding
use alloc::boxed::Box; to every file?
14:07:10
@jeandudey:matrix.orgjeandudey
In reply to @mglolenstine:matrix.org
https://paste.centos.org/view/4ca9293a
I'm having slight feelings of deprecation in drone-os.
I'm wondering what I can do about it.
Is the best way just pulling the repos and adding
use alloc::boxed::Box; to every file?
Try to use the compiler specified on the Drone OS `rust-toolchain` as some of these errors are related to newer rustc versions
14:19:27
@jeandudey:matrix.orgjeandudeyE.g: https://github.com/drone-os/drone-cortexm/blob/master/rust-toolchain#L214:20:03
@jeandudey:matrix.orgjeandudey rustup install nightly-2021-04-18 14:20:19

Show newer messages


Back to Room ListRoom Version: 4