Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nucleo-64-rtfm
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Lindgren
nucleo-64-rtfm
Commits
95ac0286
Commit
95ac0286
authored
7 years ago
by
Per
Browse files
Options
Downloads
Patches
Plain Diff
condintonal breakpoints
parent
ee25bd0e
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.vscode/launch.json
+17
-0
17 additions, 0 deletions
.vscode/launch.json
.vscode/tasks.json
+24
-0
24 additions, 0 deletions
.vscode/tasks.json
Cargo.toml
+4
-0
4 additions, 0 deletions
Cargo.toml
examples/nested.rs
+8
-1
8 additions, 1 deletion
examples/nested.rs
src/lib.rs
+5
-1
5 additions, 1 deletion
src/lib.rs
with
58 additions
and
2 deletions
.vscode/launch.json
+
17
−
0
View file @
95ac0286
...
@@ -38,6 +38,23 @@
...
@@ -38,6 +38,23 @@
],
],
"cwd"
:
"${workspaceRoot}"
"cwd"
:
"${workspaceRoot}"
},
},
{
"type"
:
"gdb"
,
"request"
:
"attach"
,
"name"
:
"Release nested"
,
"gdbpath"
:
"/usr/bin/arm-none-eabi-gdb"
,
"executable"
:
"./target/thumbv7em-none-eabihf/release/examples/nested"
,
"target"
:
":3333"
,
"remote"
:
true
,
"autorun"
:
[
"monitor reset init"
,
"monitor arm semihosting enable"
,
"monitor tpiu config internal /tmp/itm.log uart off 16000000"
,
"monitor itm port 0 on"
,
"load"
],
"cwd"
:
"${workspaceRoot}"
},
{
{
"type"
:
"gdb"
,
"type"
:
"gdb"
,
"request"
:
"attach"
,
"request"
:
"attach"
,
...
...
This diff is collapsed.
Click to expand it.
.vscode/tasks.json
+
24
−
0
View file @
95ac0286
...
@@ -27,6 +27,30 @@
...
@@ -27,6 +27,30 @@
"$rustc"
"$rustc"
]
]
},
},
{
"label"
:
"xargo build --example nested --features wcet_bkpt"
,
"type"
:
"shell"
,
"command"
:
"xargo build --features
\"
wcet_bkpt
\"
--example nested "
,
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
},
"problemMatcher"
:
[
"$rustc"
]
},
{
"label"
:
"xargo build --release --example nested --features wcet_bkpt"
,
"type"
:
"shell"
,
"command"
:
"xargo build --release --features
\"
wcet_bkpt
\"
--example nested"
,
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
},
"problemMatcher"
:
[
"$rustc"
]
},
{
{
"label"
:
"xargo build --example preemption"
,
"label"
:
"xargo build --example preemption"
,
"type"
:
"shell"
,
"type"
:
"shell"
,
...
...
This diff is collapsed.
Click to expand it.
Cargo.toml
+
4
−
0
View file @
95ac0286
...
@@ -30,5 +30,9 @@ git = "https://gitlab.henriktjader.com/pln/STM32F40x"
...
@@ -30,5 +30,9 @@ git = "https://gitlab.henriktjader.com/pln/STM32F40x"
features
=
[
"rt"
]
features
=
[
"rt"
]
version
=
"0.1.0"
version
=
"0.1.0"
[features]
wcet_bkpt
=
[]
[
profile.release
]
[
profile.release
]
lto
=
true
lto
=
true
debug
=
true
This diff is collapsed.
Click to expand it.
examples/nested.rs
+
8
−
1
View file @
95ac0286
...
@@ -43,6 +43,7 @@ app! {
...
@@ -43,6 +43,7 @@ app! {
fn
init
(
_p
:
init
::
Peripherals
,
_r
:
init
::
Resources
)
{}
fn
init
(
_p
:
init
::
Peripherals
,
_r
:
init
::
Resources
)
{}
#[inline(never)]
fn
idle
()
->
!
{
fn
idle
()
->
!
{
// A
// A
rtfm
::
bkpt
();
rtfm
::
bkpt
();
...
@@ -59,6 +60,7 @@ fn idle() -> ! {
...
@@ -59,6 +60,7 @@ fn idle() -> ! {
}
}
#[allow(non_snake_case)]
#[allow(non_snake_case)]
#[inline(never)]
fn
exti0
(
fn
exti0
(
t
:
&
mut
Threshold
,
t
:
&
mut
Threshold
,
EXTI0
::
Resources
{
mut
LOW
,
mut
HIGH
}:
EXTI0
::
Resources
,
EXTI0
::
Resources
{
mut
LOW
,
mut
HIGH
}:
EXTI0
::
Resources
,
...
@@ -116,13 +118,18 @@ fn exti0(
...
@@ -116,13 +118,18 @@ fn exti0(
// Once again the preemption threshold drops but this time to 1. Now the
// Once again the preemption threshold drops but this time to 1. Now the
// pending `exti1` task can preempt this task
// pending `exti1` task can preempt this task
// ~> exti1
// ~> exti1
// K
rtfm
::
bkpt
();
}
}
#[inline(never)]
fn
exti1
(
_t
:
&
mut
Threshold
,
_r
:
EXTI1
::
Resources
)
{
fn
exti1
(
_t
:
&
mut
Threshold
,
_r
:
EXTI1
::
Resources
)
{
// C,
I
// C,
J
rtfm
::
bkpt
();
rtfm
::
bkpt
();
}
}
#[inline(never)]
fn
exti2
(
_t
:
&
mut
Threshold
,
_r
:
EXTI2
::
Resources
)
{
fn
exti2
(
_t
:
&
mut
Threshold
,
_r
:
EXTI2
::
Resources
)
{
// E, H
// E, H
rtfm
::
bkpt
();
rtfm
::
bkpt
();
...
...
This diff is collapsed.
Click to expand it.
src/lib.rs
+
5
−
1
View file @
95ac0286
...
@@ -85,7 +85,7 @@ extern crate untagged_option;
...
@@ -85,7 +85,7 @@ extern crate untagged_option;
use
core
::
u8
;
use
core
::
u8
;
pub
use
rtfm_core
::{
Resource
,
Static
,
Threshold
};
pub
use
rtfm_core
::{
Resource
,
Static
,
Threshold
};
pub
use
cortex_m
::
asm
::{
bkpt
,
wfi
};
pub
use
cortex_m
::
asm
::{
bkpt
,
nop
,
wfi
};
pub
use
cortex_m_rtfm_macros
::
app
;
pub
use
cortex_m_rtfm_macros
::
app
;
#[doc(hidden)]
#[doc(hidden)]
pub
use
untagged_option
::
UntaggedOption
;
pub
use
untagged_option
::
UntaggedOption
;
...
@@ -140,7 +140,11 @@ where
...
@@ -140,7 +140,11 @@ where
let
old
=
basepri
::
read
();
let
old
=
basepri
::
read
();
let
hw
=
(
max_priority
-
ceiling
)
<<
(
8
-
_nvic_prio_bits
);
let
hw
=
(
max_priority
-
ceiling
)
<<
(
8
-
_nvic_prio_bits
);
basepri
::
write
(
hw
);
basepri
::
write
(
hw
);
if
cfg!
(
feature
=
"wcet_bkpt"
)
{
bkpt
();}
else
{
nop
();}
let
ret
=
f
(
data
,
&
mut
Threshold
::
new
(
ceiling
));
let
ret
=
f
(
data
,
&
mut
Threshold
::
new
(
ceiling
));
if
cfg!
(
feature
=
"wcet_bkpt"
)
{
bkpt
();}
else
{
nop
();}
basepri
::
write
(
old
);
basepri
::
write
(
old
);
ret
ret
}
}
...
...
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