Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rtfm-app
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
Per Lindgren
rtfm-app
Commits
9772de8b
Commit
9772de8b
authored
7 years ago
by
Henrik Tjäder
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.henriktjader.com:pln/rtfm-app
parents
c2fcf1ad
ccddbada
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
.vscode/launch.json
+35
-8
35 additions, 8 deletions
.vscode/launch.json
.vscode/tasks.json
+4
-124
4 additions, 124 deletions
.vscode/tasks.json
examples/bare6.rs
+5
-3
5 additions, 3 deletions
examples/bare6.rs
with
44 additions
and
135 deletions
.vscode/launch.json
+
35
−
8
View file @
9772de8b
...
@@ -355,11 +355,13 @@
...
@@ -355,11 +355,13 @@
"interface/stlink.cfg"
,
"interface/stlink.cfg"
,
"target/stm32f4x.cfg"
"target/stm32f4x.cfg"
],
],
"cwd"
:
"${workspaceRoot}"
,
"postLaunchCommands"
:
[
"monitor arm semihosting enable"
],
"swoConfig"
:
{
"swoConfig"
:
{
"enabled"
:
true
,
"enabled"
:
true
,
"cpuFrequency"
:
16000000
,
"cpuFrequency"
:
16000000
,
"swoFrequency"
:
1
000000
,
"swoFrequency"
:
2
000000
,
"source"
:
"probe"
,
"source"
:
"probe"
,
"decoders"
:
[
"decoders"
:
[
{
{
...
@@ -368,26 +370,51 @@
...
@@ -368,26 +370,51 @@
"port"
:
0
"port"
:
0
}
}
]
]
},
"cwd"
:
"${workspaceRoot}"
},
{
"type"
:
"cortex-debug"
,
"request"
:
"launch"
,
"servertype"
:
"openocd"
,
"name"
:
"c bare6 16Mhz"
,
"executable"
:
"./target/thumbv7em-none-eabihf/debug/examples/bare6"
,
"configFiles"
:
[
"interface/stlink.cfg"
,
"target/stm32f4x.cfg"
],
"swoConfig"
:
{
"enabled"
:
true
,
"cpuFrequency"
:
16000000
,
"swoFrequency"
:
2000000
,
//
you
may
try
1000000
if
not
working
"source"
:
"probe"
,
"decoders"
:
[
{
"type"
:
"console"
,
"label"
:
"Name"
,
"port"
:
0
}
}
]
},
"cwd"
:
"${workspaceRoot}"
},
},
{
{
"type"
:
"cortex-debug"
,
"type"
:
"cortex-debug"
,
"request"
:
"launch"
,
"request"
:
"launch"
,
"servertype"
:
"openocd"
,
"servertype"
:
"openocd"
,
"name"
:
"c bare6"
,
"name"
:
"c bare6
64Mhz
"
,
"executable"
:
"./target/thumbv7em-none-eabihf/debug/examples/bare6"
,
"executable"
:
"./target/thumbv7em-none-eabihf/debug/examples/bare6"
,
"configFiles"
:
[
"configFiles"
:
[
"interface/stlink.cfg"
,
"interface/stlink.cfg"
,
"target/stm32f4x.cfg"
"target/stm32f4x.cfg"
],
],
"postLaunchCommands"
:
[
"postLaunchCommands"
:
[
"monitor tpiu config internal /tmp/itm.log uart off 16000000"
,
"monitor reset init"
"monitor itm port 0 on"
],
],
"swoConfig"
:
{
"swoConfig"
:
{
"enabled"
:
true
,
"enabled"
:
true
,
"cpuFrequency"
:
1
6000000
,
"cpuFrequency"
:
6
4
000000
,
"swoFrequency"
:
1
000000
,
"swoFrequency"
:
2
000000
,
//
you
may
try
1000000
if
not
working
"source"
:
"probe"
,
"source"
:
"probe"
,
"decoders"
:
[
"decoders"
:
[
{
{
...
...
This diff is collapsed.
Click to expand it.
.vscode/tasks.json
+
4
−
124
View file @
9772de8b
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
"tasks"
:
[
"tasks"
:
[
{
{
"type"
:
"shell"
,
"type"
:
"shell"
,
"label"
:
"xargo build"
,
"label"
:
"xargo build
--examples
"
,
"command"
:
"xargo build"
,
"command"
:
"xargo build
--examples
"
,
"problemMatcher"
:
[
"problemMatcher"
:
[
"$rustc"
"$rustc"
],
],
...
@@ -17,128 +17,8 @@
...
@@ -17,128 +17,8 @@
},
},
{
{
"type"
:
"shell"
,
"type"
:
"shell"
,
"label"
:
"xargo build --release"
,
"label"
:
"xargo build --examples --release"
,
"command"
:
"xargo build --release"
,
"command"
:
"xargo build --examples --release"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example loop"
,
"command"
:
"xargo build --example loop"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example gpio"
,
"command"
:
"xargo build --example gpio"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example gpio_raw"
,
"command"
:
"xargo build --example gpio_raw"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example bare0"
,
"command"
:
"xargo build --example bare0"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example bare1"
,
"command"
:
"xargo build --example bare1"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example bare2"
,
"command"
:
"xargo build --example bare2"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example bare3"
,
"command"
:
"xargo build --example bare3"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example bare4"
,
"command"
:
"xargo build --example bare4"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example bare5"
,
"command"
:
"xargo build --example bare5"
,
"problemMatcher"
:
[
"$rustc"
],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"type"
:
"shell"
,
"label"
:
"xargo build --example bare6"
,
"command"
:
"xargo build --example bare6"
,
"problemMatcher"
:
[
"problemMatcher"
:
[
"$rustc"
"$rustc"
],
],
...
...
This diff is collapsed.
Click to expand it.
examples/bare6.rs
+
5
−
3
View file @
9772de8b
...
@@ -39,15 +39,17 @@ fn idle(dwt: &mut DWT, rcc: &mut RCC, gpioa: &mut GPIOA) {
...
@@ -39,15 +39,17 @@ fn idle(dwt: &mut DWT, rcc: &mut RCC, gpioa: &mut GPIOA) {
// configure PA5 as output, RM0368 8.4.1
// configure PA5 as output, RM0368 8.4.1
gpioa
.moder
.modify
(|
_
,
w
|
w
.moder5
()
.bits
(
1
));
gpioa
.moder
.modify
(|
_
,
w
|
w
.moder5
()
.bits
(
1
));
// at 16 Mhz, 8000_0000 cycles = 0.5s
// at 64 Mhz, 8000_0000 cycles = 0.125s
loop
{
loop
{
ipln!
(
"led on"
);
ipln!
(
"led on"
);
// set PA5 high, RM0368 8.4.7
// set PA5 high, RM0368 8.4.7
gpioa
.bsrr
.write
(|
w
|
w
.bs5
()
.set_bit
());
gpioa
.bsrr
.write
(|
w
|
w
.bs5
()
.set_bit
());
wait_cycles
(
dwt
,
1
0_000
);
wait_cycles
(
dwt
,
800
0_000
);
ipln!
(
"
id
le off"
);
ipln!
(
"le
d
off"
);
// set PA5 low, RM0368 8.4.7
// set PA5 low, RM0368 8.4.7
gpioa
.bsrr
.write
(|
w
|
w
.br5
()
.set_bit
());
gpioa
.bsrr
.write
(|
w
|
w
.br5
()
.set_bit
());
wait_cycles
(
dwt
,
1
0_000
);
wait_cycles
(
dwt
,
800
0_000
);
}
}
}
}
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