Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nucleo-generic
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-generic
Commits
9b941828
Commit
9b941828
authored
Nov 14, 2017
by
Per
Browse files
Options
Downloads
Patches
Plain Diff
examples
parent
06fdb4a0
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.vscode/launch.json
+20
-5
20 additions, 5 deletions
.vscode/launch.json
.vscode/tasks.json
+12
-0
12 additions, 0 deletions
.vscode/tasks.json
examples/itm.rs
+1
-0
1 addition, 0 deletions
examples/itm.rs
examples/panic.rs
+2
-1
2 additions, 1 deletion
examples/panic.rs
with
35 additions
and
6 deletions
.vscode/launch.json
+
20
−
5
View file @
9b941828
...
@@ -73,15 +73,14 @@
...
@@ -73,15 +73,14 @@
"request"
:
"attach"
,
"request"
:
"attach"
,
"name"
:
"Debug itm"
,
"name"
:
"Debug itm"
,
"gdbpath"
:
"/usr/bin/arm-none-eabi-gdb"
,
"gdbpath"
:
"/usr/bin/arm-none-eabi-gdb"
,
//
"executable"
:
"./target/thumbv7em-none-eabihf/debug/
nucleo
"
,
"executable"
:
"./target/thumbv7em-none-eabihf/debug/
examples/itm
"
,
"target"
:
":3333"
,
"target"
:
":3333"
,
"remote"
:
true
,
"remote"
:
true
,
"autorun"
:
[
"autorun"
:
[
"monitor reset init"
,
"monitor reset init"
,
//
"monitor arm semihosting enable"
,
"monitor arm semihosting enable"
,
"monitor tpiu config internal /tmp/itm.fifo uart off 64000000"
,
"monitor tpiu config internal /tmp/itm.log uart off 16000000 2000000"
,
//
"monitor tpiu config internal /tmp/itm.fifo uart off 16000000"
,
"monitor itm port 0 on"
,
"file ./target/thumbv7em-none-eabihf/debug/examples/itm"
,
"load"
"load"
],
],
"cwd"
:
"${workspaceRoot}"
"cwd"
:
"${workspaceRoot}"
...
@@ -101,6 +100,22 @@
...
@@ -101,6 +100,22 @@
"load"
"load"
],
],
"cwd"
:
"${workspaceRoot}"
"cwd"
:
"${workspaceRoot}"
},
{
"type"
:
"gdb"
,
"request"
:
"attach"
,
"name"
:
"Debug panic"
,
"gdbpath"
:
"/usr/bin/arm-none-eabi-gdb"
,
//
"executable"
:
"./target/thumbv7em-none-eabihf/debug/nucleo"
,
"target"
:
":3333"
,
"remote"
:
true
,
"autorun"
:
[
"monitor reset init"
,
"monitor arm semihosting enable"
,
"file ./target/thumbv7em-none-eabihf/debug/examples/panic"
,
"load"
],
"cwd"
:
"${workspaceRoot}"
}
}
]
]
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.vscode/tasks.json
+
12
−
0
View file @
9b941828
...
@@ -74,6 +74,18 @@
...
@@ -74,6 +74,18 @@
"problemMatcher"
:
[
"problemMatcher"
:
[
"$rustc"
"$rustc"
]
]
},
{
"taskName"
:
"xargo build --example panic"
,
"type"
:
"shell"
,
"command"
:
"xargo build --example panic"
,
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
},
"problemMatcher"
:
[
"$rustc"
]
}
}
]
]
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
examples/itm.rs
+
1
−
0
View file @
9b941828
...
@@ -27,6 +27,7 @@ fn main() {
...
@@ -27,6 +27,7 @@ fn main() {
let
itm
=
peripheral
::
ITM
.borrow
(
&
cs
);
let
itm
=
peripheral
::
ITM
.borrow
(
&
cs
);
iprintln!
(
&
itm
.stim
[
0
],
"Hello, world!"
);
iprintln!
(
&
itm
.stim
[
0
],
"Hello, world!"
);
loop
{}
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
examples/panic.rs
+
2
−
1
View file @
9b941828
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#![feature(core_intrinsics)]
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![feature(lang_items)]
#![feature(used)]
#![feature(used)]
#![allow(private_no_mangle_fns)]
#![no_std]
#![no_std]
extern
crate
cortex_m
;
extern
crate
cortex_m
;
...
@@ -33,7 +34,7 @@ unsafe extern "C" fn rust_begin_unwind(
...
@@ -33,7 +34,7 @@ unsafe extern "C" fn rust_begin_unwind(
args
:
core
::
fmt
::
Arguments
,
args
:
core
::
fmt
::
Arguments
,
file
:
&
'static
str
,
file
:
&
'static
str
,
line
:
u32
,
line
:
u32
,
col
:
u32
,
_
col
:
u32
,
)
->
!
{
)
->
!
{
if
let
Ok
(
mut
stdout
)
=
hio
::
hstdout
()
{
if
let
Ok
(
mut
stdout
)
=
hio
::
hstdout
()
{
write!
(
stdout
,
"panicked at '"
)
write!
(
stdout
,
"panicked at '"
)
...
...
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