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
e5c56a00
Commit
e5c56a00
authored
7 years ago
by
Per
Browse files
Options
Downloads
Patches
Plain Diff
with stubs
parent
096307ff
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/resource.rs
+44
-2
44 additions, 2 deletions
examples/resource.rs
with
44 additions
and
2 deletions
examples/resource.rs
+
44
−
2
View file @
e5c56a00
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
//#![deny(unsafe_code)]
//#![deny(unsafe_code)]
// IMPORTANT always include this feature gate
// IMPORTANT always include this feature gate
#![feature(proc_macro)]
#![feature(proc_macro)]
#![feature(used)]
#![no_std]
#![no_std]
extern
crate
cortex_m_rtfm
as
rtfm
;
extern
crate
cortex_m_rtfm
as
rtfm
;
...
@@ -56,6 +57,7 @@ fn exti1(t: &mut Threshold, EXTI1::Resources { X, mut Y }: EXTI1::Resources) {
...
@@ -56,6 +57,7 @@ fn exti1(t: &mut Threshold, EXTI1::Resources { X, mut Y }: EXTI1::Resources) {
}
}
});
});
});
});
rtfm
::
bkpt
();
}
}
fn
exti2
(
t
:
&
mut
Threshold
,
mut
r
:
EXTI2
::
Resources
)
{
fn
exti2
(
t
:
&
mut
Threshold
,
mut
r
:
EXTI2
::
Resources
)
{
...
@@ -74,14 +76,54 @@ fn exti3(_t: &mut Threshold, _r: EXTI3::Resources) {}
...
@@ -74,14 +76,54 @@ fn exti3(_t: &mut Threshold, _r: EXTI3::Resources) {}
#[allow(dead_code)]
#[allow(dead_code)]
fn
init
(
_p
:
init
::
Peripherals
,
_r
:
init
::
Resources
)
{}
fn
init
(
_p
:
init
::
Peripherals
,
_r
:
init
::
Resources
)
{}
extern
crate
cortex_m
;
use
cortex_m
::
register
::
basepri
;
// for wcet should be autogenerated...
#[inline(never)]
fn
readbasepri
()
->
u8
{
cortex_m
::
register
::
basepri
::
read
()
}
// The idle loop.
// The idle loop.
//
//
// This runs after `init` and has a priority of 0. All tasks can preempt this
// This runs after `init` and has a priority of 0. All tasks can preempt this
// function. This function can never return so it must contain some sort of
// function. This function can never return so it must contain some sort of
// endless loop.
// endless loop.
#[inline(never)]
#[allow(non_snake_case)]
#[no_mangle]
fn
stub_EXTI1
()
{
unsafe
{
_EXTI1
()
};
}
#[inline(never)]
#[no_mangle]
#[allow(non_snake_case)]
fn
stub_EXTI2
()
{
unsafe
{
_EXTI2
()
};
}
#[inline(never)]
#[no_mangle]
#[allow(non_snake_case)]
fn
stub_EXTI3
()
{
unsafe
{
_EXTI3
();
}
}
#[inline(never)]
#[inline(never)]
#[allow(dead_code)]
fn
idle
()
->
!
{
fn
idle
()
->
!
{
loop
{}
readbasepri
();
stub_EXTI1
();
stub_EXTI1
();
stub_EXTI1
();
loop
{
rtfm
::
nop
();
}
}
}
//
//0x80001dc 0x80001dc <cortex_m_rt::reset_handler+4>
//0x8000270 0x8000270 <resource::init>
//0x8000284 0x8000284 <resource::idle+10>
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