Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cargo-klee
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
Per Lindgren
cargo-klee
Commits
b716f56a
Commit
b716f56a
authored
6 years ago
by
Per Lindgren
Browse files
Options
Downloads
Patches
Plain Diff
tmp
parent
6f374718
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#104
failed
6 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
klee-examples/Cargo.toml
+11
-7
11 additions, 7 deletions
klee-examples/Cargo.toml
klee-examples/src/peripheral.rs
+32
-0
32 additions, 0 deletions
klee-examples/src/peripheral.rs
klee-examples/src/register.rs
+2
-2
2 additions, 2 deletions
klee-examples/src/register.rs
with
45 additions
and
9 deletions
klee-examples/Cargo.toml
+
11
−
7
View file @
b716f56a
...
@@ -5,20 +5,20 @@ authors = ["Per Lindgren <per.lindgren@ltu.se>, Jorge Aparicio <jorge@japaric.io
...
@@ -5,20 +5,20 @@ authors = ["Per Lindgren <per.lindgren@ltu.se>, Jorge Aparicio <jorge@japaric.io
[dependencies]
[dependencies]
klee
=
{
git
=
"https://gitlab.henriktjader.com/pln/cargo-klee"
}
klee
=
{
git
=
"https://gitlab.henriktjader.com/pln/cargo-klee"
}
#
panic-abort = "0.3.1"
panic-abort
=
"0.3.1"
[dependencies.volatile-register]
[dependencies.volatile-register]
version
=
"0.3.0"
version
=
"0.3.0"
# [replace]
[dependencies.cortex-m]
[patch.crates-io]
version
=
"0.6.0"
"volatile-register"
=
{
git
=
"https://gitlab.henriktjader.com/pln/volatile-register.git"
,
branch
=
"klee-analysis"
}
# [dependencies.cortex-m]
# version = "0.6.0"
# #features = ["inline-asm", "klee-analysis"]
# #features = ["inline-asm", "klee-analysis"]
[patch.crates-io]
volatile-register
=
{
git
=
"https://gitlab.henriktjader.com/pln/volatile-register.git"
,
branch
=
"klee-analysis"
}
cortex-m
=
{
git
=
"https://github.com/perlindgren/cortex-m.git"
,
branch
=
"klee-analysis"
}
# [dependencies.stm32f413]
# [dependencies.stm32f413]
# version = "0.3.0"
# version = "0.3.0"
# path = "../stm32f413"
# path = "../stm32f413"
...
@@ -35,6 +35,10 @@ path = "src/foo.rs"
...
@@ -35,6 +35,10 @@ path = "src/foo.rs"
name
=
"register"
name
=
"register"
path
=
"src/register.rs"
path
=
"src/register.rs"
[[bin]]
name
=
"peripheral"
path
=
"src/peripheral.rs"
[profile.dev]
[profile.dev]
incremental
=
false
incremental
=
false
# lto = true
# lto = true
...
...
This diff is collapsed.
Click to expand it.
klee-examples/src/peripheral.rs
0 → 100644
+
32
−
0
View file @
b716f56a
#![no_std]
#![no_main]
#[macro_use]
extern
crate
klee
;
#[cfg(not(feature
=
"klee-analysis"
))]
extern
crate
panic_abort
;
extern
crate
cortex_m
;
use
core
::
ptr
;
use
cortex_m
::
peripheral
::
Peripherals
;
#[no_mangle]
fn
main
()
{
let
peripherals
=
Peripherals
::
take
()
.unwrap
();
let
mut
dwt
=
peripherals
.DWT
;
dwt
.enable_cycle_counter
();
unsafe
{
dwt
.ctrl
.write
(
0
);
}
if
dwt
.ctrl
.read
()
==
0
{
if
dwt
.ctrl
.read
()
==
0
{
klee
::
abort
();
};
};
unsafe
{
ptr
::
read_volatile
(
&
dwt
);
}
}
This diff is collapsed.
Click to expand it.
klee-examples/src/register.rs
+
2
−
2
View file @
b716f56a
//! showcase volatile register
//! showcase volatile register
//!
//!
//! $ cargo klee --bin
main2
-r -g
//! $ cargo klee --bin
register
-r -g
//! ...
//! ...
//! Reading symbols from
main2
.replay...done.
//! Reading symbols from
register
.replay...done.
//!
//!
//! (gdb) set env KTEST_FILE=klee-last/test000001.ktest
//! (gdb) set env KTEST_FILE=klee-last/test000001.ktest
//! (gdb) run
//! (gdb) run
...
...
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