Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cortex-m-rtfm-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
KLEE
cortex-m-rtfm-klee
Commits
93e2c898
Commit
93e2c898
authored
7 years ago
by
Henrik Tjäder
Browse files
Options
Downloads
Plain Diff
Merge branch 'klee' of gitlab.henriktjader.com:KLEE/cortex-m-rtfm-klee into klee
parents
6014cabd
0d9b6d7c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
macros/src/trans.rs
+26
-8
26 additions, 8 deletions
macros/src/trans.rs
with
26 additions
and
8 deletions
macros/src/trans.rs
+
26
−
8
View file @
93e2c898
...
...
@@ -18,7 +18,9 @@ pub fn app(app: &App, ownerships: &Ownerships) -> Tokens {
::
trans
::
tasks
(
app
,
ownerships
,
&
mut
root
);
root
.push
(
quote!
{
#[allow(private_no_mangle_fns)]
#[allow(unsafe_code)]
//#[no_mangle]
fn
main
()
{
#
(
#
main
)
*
}
...
...
@@ -427,15 +429,11 @@ fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) {
});
});
}
else
{
// wcet_mode
// panic!();
for
(
name
,
_task
)
in
&
app
.tasks
{
let
_name
=
Ident
::
new
(
format!
(
"stub_{}"
,
name
.as_ref
()));
// wcet_mode, call to wcet_start
main
.push
(
quote!
{
#
_name
();
wcet_start
();
});
}
}
}
else
{
// code generation for klee_mode
let
mut
tasks
=
vec!
[];
...
...
@@ -713,4 +711,24 @@ fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>) {
}
});
}
if
cfg!
(
feature
=
"wcet_bkpt"
)
{
let
mut
stubs
=
vec!
[];
for
(
name
,
_task
)
in
&
app
.tasks
{
let
_name
=
Ident
::
new
(
format!
(
"stub_{}"
,
name
.as_ref
()));
stubs
.push
(
quote!
{
#
_name
();
});
}
root
.push
(
quote!
{
extern
crate
cortex_m
;
#[inline(never)]
#[allow(private_no_mangle_fns)]
#[no_mangle]
pub
fn
wcet_start
()
{
#
(
#
stubs
)
*
cortex_m
::
asm
::
bkpt
();
}
});
}
}
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