Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bare-boyes
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
Fredrik Pettersson
bare-boyes
Commits
21ff86c7
Commit
21ff86c7
authored
May 18, 2018
by
DevDoggo
Browse files
Options
Downloads
Patches
Plain Diff
Bare1.1 done
parent
5c792b31
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
compile.sh
+2
-2
2 additions, 2 deletions
compile.sh
examples/bare1.rs
+8
-1
8 additions, 1 deletion
examples/bare1.rs
gdb.sh
+2
-2
2 additions, 2 deletions
gdb.sh
with
12 additions
and
5 deletions
compile.sh
+
2
−
2
View file @
21ff86c7
#!/bin/bash
#!/bin/bash
#cargo build --target thumbv7em-none-eabihf --release
#cargo build --target thumbv7em-none-eabihf --release
cargo build
--target
thumbv7em-none-eabihf
--example
bare0
#
cargo build --target thumbv7em-none-eabihf --example bare0
#
cargo build --target thumbv7em-none-eabihf --example bare1
cargo build
--target
thumbv7em-none-eabihf
--example
bare1
This diff is collapsed.
Click to expand it.
examples/bare1.rs
+
8
−
1
View file @
21ff86c7
...
@@ -19,16 +19,19 @@ extern crate cortex_m_debug;
...
@@ -19,16 +19,19 @@ extern crate cortex_m_debug;
#[inline(never)]
#[inline(never)]
fn
main
()
{
fn
main
()
{
// ITM trace (fast)
// ITM trace (fast)
cortex_m
::
asm
::
bkpt
();
// start `itmdump` before `openocd`
// start `itmdump` before `openocd`
ipln!
(
"ITM: Hello World"
);
ipln!
(
"ITM: Hello World"
);
cortex_m
::
asm
::
bkpt
();
// semihosting trace (slow)
// semihosting trace (slow)
sprintln!
(
"SEMIHOSTING: Hello World"
);
sprintln!
(
"SEMIHOSTING: Hello World"
);
// to prevent returning
// to prevent returning
loop
{
loop
{
// cortex_m::asm::nop();
// cortex_m::asm::nop();
// cortex_m::asm::bkpt();
cortex_m
::
asm
::
bkpt
();
sprintln!
(
"SEMIHOSTING: boye"
);
}
}
}
}
...
@@ -43,9 +46,13 @@ fn main() {
...
@@ -43,9 +46,13 @@ fn main() {
// what is the output in the ITM console
// what is the output in the ITM console
// ** your answer here **
// ** your answer here **
//
//
// >> ITM: Hello World
//
// what is the output in the semihosting (openocd) console
// what is the output in the semihosting (openocd) console
// ** your answer here **
// ** your answer here **
//
//
// >> SEMIHOSTING: Hello World
//
// commit your answers (bare1_1)
// commit your answers (bare1_1)
//
//
// 2. inspecting the assembly
// 2. inspecting the assembly
...
...
This diff is collapsed.
Click to expand it.
gdb.sh
+
2
−
2
View file @
21ff86c7
#!/bin/bash
#!/bin/bash
TARGET
=
thumbv7em-none-eabihf
TARGET
=
thumbv7em-none-eabihf
#arm-none-eabi-gdb target/$TARGET/release/examples/bare0
#arm-none-eabi-gdb target/$TARGET/release/examples/bare0
#arm-none-eabi-gdb target/$TARGET/debug/examples/bare0
arm-none-eabi-gdb target/
$TARGET
/debug/examples/bare0
arm-none-eabi-gdb target/
$TARGET
/debug/examples/bare1
#arm-none-eabi-gdb target/$TARGET/debug/examples/bare1
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