Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Migration to cargo-embed #16

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

Merged
merged 2 commits into from
Nov 15, 2020
Merged

Migration to cargo-embed #16

merged 2 commits into from
Nov 15, 2020

Conversation

brainstorm
Copy link
Contributor

@brainstorm brainstorm commented Nov 14, 2020

Related twitter thread: https://twitter.com/korken89/status/1327567447654850560

Original authors, please, would you mind reviewing if this still works fine on your respective boards?

Please add the appropriate RTT statements and imports for better debugging experience (i.e, see: https://github.com/rtic-rs/rtic-examples/blob/master/rtic_v5/hid_mouse_stm32f0/src/main.rs#L154).

/cc @dbrgn @korken89 @cavokz @AfoHT

Fixes #9

Copy link
Contributor

@korken89 korken89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@korken89
Copy link
Contributor

bors merge

Copy link
Contributor

@dbrgn dbrgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few comments. Of course they apply to all the examples, not just to the one I commented on 🙂

# for the comprehensive list of options

[default.general]
chip = "STM32F103"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this even work? I thought the chip needs to be more specific than that. (That's the problem with cargo-embed config files, we cannot omit the chip 🙂 I think I'll open a feature request for that.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I just found out that apparently cargo-embed now supports specifying the chip on the command line! Very nice.

Therefore I'd suggest leaving away the chip configuration in the .embed.toml file and instead telling the user to run the command as cargo embed --release --chip <chip-spec>. That way no config files need to be adjusted!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed these comments. Could you transfer this to a new PR?


We will use openocd to upload the code wit simple one-line one-command script:
Flashing with a standard STLink v2 is easy with `cargo-embed`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why even mention the STLink? Any probe that is supported by probe-rs can be used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed these comments. Could you transfer this to a new PR?

```txt
source [find interface/stlink.cfg]
```
Please review the `.embed.toml` file to change your target IC among other options.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line should be moved up, so that people read it before running the cargo embed --release command (which will fail if the wrong chip is selected).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed these comments. Could you transfer this to a new PR?

@korken89
Copy link
Contributor

bors ping

@bors
Copy link
Contributor

bors bot commented Nov 15, 2020

pong

@korken89
Copy link
Contributor

bors try

bors bot added a commit that referenced this pull request Nov 15, 2020
@bors
Copy link
Contributor

bors bot commented Nov 15, 2020

try

Build succeeded:

@korken89
Copy link
Contributor

bors merge

@dbrgn
Copy link
Contributor

dbrgn commented Nov 15, 2020

@korken89 regarding the comments above, should they be in a separate PR, or do you disagree with them?

@dbrgn
Copy link
Contributor

dbrgn commented Nov 15, 2020

Ah, just saw your reply now! Yes, they can be in a separate PR.

@korken89
Copy link
Contributor

Sorry, I missed the comments. Could you transfer them to a new PR?

@bors
Copy link
Contributor

bors bot commented Nov 15, 2020

Build succeeded:

@bors bors bot merged commit 9cfd635 into rtic-rs:master Nov 15, 2020
@brainstorm
Copy link
Contributor Author

@dbrgn Yeah, I didn't expect @korken89 to merge that fast (thanks! ;P)... my fault, I should have opened as Draft PR until I had certainty that the original authors tested it on their respective boards (I don't own all those :-S). Granted, I could have tried with other targets, but then I might have fallen into a HAL differences rabbit hole, best to let the authors test if their boards still work and adjust things like RTT rprintln's to their liking ;)

@cavokz
Copy link
Contributor

cavokz commented Nov 16, 2020

@brainstorm the only note for the heartbeat-stm32l4 example is that rtt-target is actually not used (yet) and therefore a big warning is shown after flashing. Most probably at next update I'll use some rprintln so the issue will solve itself.
Thanks for your contribute!

@brainstorm brainstorm deleted the cargo-embed-migration branch November 17, 2020 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examples could be using cargo-embed instead of OpenOCD?
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.