-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 2 mcu examples #42
base: master
Are you sure you want to change the base?
Conversation
…hese work on several different MCUs. Documentation for building and running is in lora_spi_send.rs. - moved memoryMaps into examples/. - uncommented portions of workflow rust.yml that had mistakenly been comment out. - updated libusb-sys to version 0.2 and added optional=true but unsure what "Fix for libusb-sys package discovery" was thus why "https://github.com/cmsd2/libusb-sys" was used. This change and related rust.yml update to "libusb-1.0-0" fix some CI errors but there remains an obscure "dpkg: error: need an action option" in rust.yml "Install libusb (apt armv7)". - cleaned up some rust.yml for running examples. - added feature example = [] used as gate to prevent cargo "test" and "cargo build --examples" from attempting to build unless appropriate features ar also specified.
…pendabot. (Could not get merge of dependabot pull request to work because of habitual CI error.)
update to rust-radio-sx127x-0.11.0 using radio-0.9.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great and super useful for folks picking this up, thanks for your work!
only major is the build.rs
thing, and it seems like a sub-crate might be a good solution to that and the example deps?
|
||
# Next could be dev-dependencies since they are only for examples, but |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh TIL, hopefully one day
|
||
[target.thumbv7m-none-eabi] | ||
#runner = 'arm-none-eabi-gdb' | ||
runner = "gdb-multiarch -q -x openocd.gdb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are alternatives to openocd
. I started playing a bit with cargo-embed
https://probe.rs/guide/1_tools/cargo-embed/ and probe-rs
https://probe.rs/. I'm not sure if/how it is related to probe-run
. It does not seem to need the memory.x
file so would remove the need for build.rs
, but I don't yet understand how it links without a memory map. It seems like there may be a few developments on this front. Would you prefer to just build and not to provide a way to run? Maybe just give some suggestions of ways to do it?
defmt
I only know through the problems caused by its use of a link, which reduces version flexibility. That got passed through in bxcan
and breaks multi-HAL testing, see
stm32-rs/stm32f7xx-hal#114 (comment). This has resulted in me having to file several issues and a couple of PRs. Not a very positive introduction, but I should figure out what it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking at this a bit more I think the best approach is to just build and not attempt to provide linking/flashing/debugging capabilities. That avoids committing to changing tools and possibly conflicting with users needs and preferences. The build.rs
is only to provide the memory.x
file for openocd
. So this would remove the need for the build.rs
file and the examples/memoryMaps
directory. The no_std
sections of .cargo/config
can either be removed or commented out. (Preferences?) Comments in examples/lora_spi_send
would need to be adjusted and might point to different alternatives for linking/flashing/debugging.
I'll go ahead on this if you think it sounds good.
This is a continuation of PR #36. That PR seemed to be referring to a branch on my fork that was merged to my master and deleted. The CI was doing tests for all the MCUs in the original PR (so I was getting very confused). Relative to the last changes in #36, this PR has merged upstream and updated to radio-0.9.0. There is also a change for syntax of
heapless 0.7.0
used in examplelora_spi_gps
.