-
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
Open
pdgilbert
wants to merge
7
commits into
rust-iot:master
Choose a base branch
from
pdgilbert:add-2-MCU-examples
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e68cbda
- Added examples lora_spi_send, lora_spi_receive, and lora_spi_gps. T…
pdgilbert fabd2df
bumped version for stm32h7xx-hal and stm32l0xx-hal as suggested by de…
pdgilbert 0af5f85
added compat feature to include/omit embedded-hal-compat.
pdgilbert ca69a91
removed example setup for devices other than bluepill and blackpill s…
pdgilbert 27d56e1
cleaned up workflow for reduced number of device crate examples.
pdgilbert 2b84764
Merge remote-tracking branch 'upstream/master'
pdgilbert 212f678
update to heapless 0.7.0 used in example lora_spi_gps.
pdgilbert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,32 @@ | ||
|
||
[target.armv7-unknown-linux-gnueabihf] | ||
linker = "arm-linux-gnueabihf-gcc" | ||
|
||
[target.thumbv7m-none-eabi] | ||
#runner = 'arm-none-eabi-gdb' | ||
runner = "gdb-multiarch -q -x openocd.gdb" | ||
rustflags = [ | ||
"-C", "link-arg=-Tlink.x", | ||
] | ||
|
||
[target.thumbv7em-none-eabi] | ||
#runner = 'arm-none-eabi-gdb' | ||
runner = "gdb-multiarch -q -x openocd.gdb" | ||
rustflags = [ | ||
"-C", "link-arg=-Tlink.x", | ||
] | ||
|
||
[target.thumbv7em-none-eabihf] | ||
#runner = 'arm-none-eabi-gdb' | ||
runner = "gdb-multiarch -q -x openocd.gdb" | ||
rustflags = [ | ||
"-C", "link-arg=-Tlink.x", | ||
] | ||
|
||
[target.riscv32imac-unknown-none-elf] | ||
#runner = 'riscv64-unknown-elf-gdb -x openocd.gdb' | ||
runner = "gdb-multiarch -q -x openocd.gdb" | ||
rustflags = [ | ||
#"-C", "link-arg=-memory-CB.x", | ||
"-C", "link-arg=-Tlink.x", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't personally use openocd but, it has to be here right (like, there's no way of having this be per-user really)?
you might like to check out probe-run (and defmt) if you haven't come across them yet, a bit of work to get going but a pretty neat dev experience.
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 withcargo-embed
https://probe.rs/guide/1_tools/cargo-embed/ andprobe-rs
https://probe.rs/. I'm not sure if/how it is related toprobe-run
. It does not seem to need thememory.x
file so would remove the need forbuild.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 inbxcan
and breaks multi-HAL testing, seestm32-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 thememory.x
file foropenocd
. So this would remove the need for thebuild.rs
file and theexamples/memoryMaps
directory. Theno_std
sections of.cargo/config
can either be removed or commented out. (Preferences?) Comments inexamples/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.