Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
klee-examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Karlsson
klee-examples
Commits
4e416dd8
Commit
4e416dd8
authored
5 years ago
by
Per Lindgren
Browse files
Options
Downloads
Patches
Plain Diff
example
parent
54e25a25
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/f401_minimal.rs
+6
-6
6 additions, 6 deletions
examples/f401_minimal.rs
with
6 additions
and
6 deletions
examples/f401_minimal.rs
+
6
−
6
View file @
4e416dd8
...
...
@@ -46,8 +46,8 @@ fn main() -> ! {
// Breakpoint 1, main () at examples/f401_minimal.rs:14
// 14 #[entry]
//
// `main` is our "entry" point for the user applica
i
ton.
// It can be named anything by needs to annoted by #[entry].
// `main` is our "entry" point for the user applicat
i
on.
// It can be named anything by needs to annot
at
ed by #[entry].
// At this point global variables have been initiated.
//
// The `openocd.gdb` script defines the startup procedure, where we have set
...
...
@@ -95,19 +95,19 @@ fn main() -> ! {
//
// Some basic Rust.
// Use https://www.rust-lang.org/learn and in particular https://doc.rust-lang.org/book/.
// There is even a book on embedd
d
ed Rust available:
// There is even a book on embedded Rust available:
// https://rust-embedded.github.io/book/, it covers much more than we need here.
//
// Figure out a way to print the numbers 0..10 using a for loop.
//
// Figure out a way to store the numbers in 0..10 in a sta
c
ic (global) array using a loop.
// Figure out a way to store the numbers in 0..10 in a sta
t
ic (global) array using a loop.
//
// Print the resulting array (using a single println invocation, not a loop).
//
// (You may prototype the code directly on https://play.rust-lang.org/, and when it works
// backport that into the minimal example, and ch
a
ck that it works the same)
// back
-
port that into the minimal example, and ch
e
ck that it works the same)
//
// These two small ex
c
er
s
ises should get you warmed up.
// These two small exer
c
ises should get you warmed up.
//
// Some reflections:
// Why is does dealing with static variables require `unsafe`?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment