Skip to content

Commit b8d2183

Browse files
committed
Updated scripts
1 parent 0c7cc9f commit b8d2183

File tree

6 files changed

+30
-21
lines changed

6 files changed

+30
-21
lines changed

.vscode/tasks.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@
1717
},
1818
{
1919
// Build the Bootloader.
20-
"label": "1️⃣ Build bluepill_boot",
20+
"label": "1️⃣ Build Bootloader",
2121
"type": "shell",
2222
"windows": {
2323
"command": "cmd",
2424
"args": [
2525
"/c",
26-
" newt\\newt.exe build -v bluepill_boot && newt\\newt.exe size -v bluepill_boot && echo ✅ ◾ ️Done! "
26+
" scripts\\stm32l4\\build-boot.cmd && echo ✅ ◾ ️Done! "
2727
]
2828
},
2929
"osx": {
3030
"command": "bash",
3131
"args": [
3232
"-c", "-l",
33-
" newt build -v bluepill_boot && newt size -v bluepill_boot && echo ✅ ◾ ️Done! "
33+
" scripts/stm32l4/build-boot.sh && echo ✅ ◾ ️Done! "
3434
],
3535
},
3636
"linux": {
3737
"command": "bash",
3838
"args": [
3939
"-c", "-l",
40-
" newt build -v bluepill_boot && newt size -v bluepill_boot && echo ✅ ◾ ️Done! "
40+
" scripts/stm32l4/build-boot.sh && echo ✅ ◾ ️Done! "
4141
],
4242
},
4343
"problemMatcher": [ "$gcc" ],
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
// Build the Application.
50-
"label": "2️⃣ Build bluepill_my_sensor",
50+
"label": "2️⃣ Build Application",
5151
"type": "shell",
5252
"windows": {
5353
"command": "cmd",
@@ -95,27 +95,27 @@
9595
},
9696
{
9797
// Create the Application ROM Image.
98-
"label": "3️⃣ Image bluepill_my_sensor",
98+
"label": "3️⃣ Image Application",
9999
"type": "shell",
100100
"windows": {
101101
"command": "cmd",
102102
"args": [
103103
"/c",
104-
" newt\\newt.exe create-image -v bluepill_my_sensor 1.0.0 && newt\\newt.exe size -v bluepill_my_sensor && echo ✅ ◾ ️Done! "
104+
" scripts\\stm32l4\\image-app.cmd && echo ✅ ◾ ️Done! "
105105
]
106106
},
107107
"osx": {
108108
"command": "bash",
109109
"args": [
110110
"-c", "-l",
111-
" newt create-image -v bluepill_my_sensor 1.0.0 && newt size -v bluepill_my_sensor && echo ✅ ◾ ️Done! "
111+
" scripts/stm32l4/image-app.sh && echo ✅ ◾ ️Done! "
112112
],
113113
},
114114
"linux": {
115115
"command": "bash",
116116
"args": [
117117
"-c", "-l",
118-
" newt create-image -v bluepill_my_sensor 1.0.0 && newt size -v bluepill_my_sensor && echo ✅ ◾ ️Done! "
118+
" scripts/stm32l4/image-app.sh && echo ✅ ◾ ️Done! "
119119
],
120120
},
121121
"problemMatcher": [],
@@ -125,29 +125,29 @@
125125
},
126126
{
127127
// Flash the Bootloader to Blue Pill. We use custom scripts instead of "newt load" because "newt" runs in Ubuntu while the ST Link driver runs under Windows.
128-
"label": "4️⃣ Load bluepill_boot",
128+
"label": "4️⃣ Load Bootloader",
129129
"type": "shell",
130130
"windows": {
131131
"command": "cmd",
132132
"args": [
133133
"/c",
134-
" openocd\\bin\\openocd -f scripts/flash-init.ocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -f scripts/flash-boot.ocd "
134+
" scripts\\stm32l4\\flash-boot.cmd && echo ✅ ◾ ️Done! "
135135
]
136136
},
137137
"osx": {
138138
// Previously: " newt load -v bluepill_boot && echo '**** Done!' "
139139
"command": "bash",
140140
"args": [
141141
"-c", "-l",
142-
" openocd/bin/openocd -f scripts/flash-init.ocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -f scripts/flash-boot.ocd "
142+
" scripts/stm32l4/flash-boot.sh && echo ✅ ◾ ️Done! "
143143
],
144144
},
145145
"linux": {
146146
// Previously: " newt load -v bluepill_boot && echo '**** Done!' "
147147
"command": "bash",
148148
"args": [
149149
"-c", "-l",
150-
" openocd/bin/openocd -f scripts/flash-init.ocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -f scripts/flash-boot.ocd "
150+
" scripts/stm32l4/flash-boot.sh && echo ✅ ◾ ️Done! "
151151
],
152152
},
153153
"problemMatcher": [],
@@ -157,29 +157,29 @@
157157
},
158158
{
159159
// Flash the Application to Blue Pill. We use custom scripts instead of "newt load" because "newt" runs in Ubuntu while the ST Link driver runs under Windows.
160-
"label": "5️⃣ Load bluepill_my_sensor",
160+
"label": "5️⃣ Load Application",
161161
"type": "shell",
162162
"windows": {
163163
"command": "cmd",
164164
"args": [
165165
"/c",
166-
" openocd\\bin\\openocd -f scripts/flash-init.ocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -f scripts/flash-app.ocd "
166+
" scripts\\stm32l4\\flash-app.cmd && echo ✅ ◾ ️Done! "
167167
]
168168
},
169169
"osx": {
170170
// Previously: " newt load -v bluepill_my_sensor && echo '**** Done!' "
171171
"command": "bash",
172172
"args": [
173173
"-c", "-l",
174-
" openocd/bin/openocd -f scripts/flash-init.ocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -f scripts/flash-app.ocd "
174+
" scripts/stm32l4/flash-app.sh && echo ✅ ◾ ️Done! "
175175
],
176176
},
177177
"linux": {
178178
// Previously: " newt load -v bluepill_my_sensor && echo '**** Done!' "
179179
"command": "bash",
180180
"args": [
181181
"-c", "-l",
182-
" openocd/bin/openocd -f scripts/flash-init.ocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -f scripts/flash-app.ocd "
182+
" scripts/stm32l4/flash-app.sh && echo ✅ ◾ ️Done! "
183183
],
184184
},
185185
"problemMatcher": [],
@@ -189,7 +189,7 @@
189189
},
190190
{
191191
// Generate Rust bindings for C libraries.
192-
"label": "⛓ Generate Rust bindings",
192+
"label": "⛓ Generate Rust Bindings",
193193
"type": "shell",
194194
"command": "bash",
195195
"args": [
@@ -203,7 +203,7 @@
203203
},
204204
{
205205
// Build Rust library with macros expanded, output to logs/libmylib-expanded.rs.
206-
"label": "👓 Expand Rust macros",
206+
"label": "👓 Expand Rust Macros",
207207
"type": "shell",
208208
"command": "bash",
209209
"args": [

scripts/stm32l4/flash-app.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: Flash Mynewt application on Windows
2+
3+
openocd\bin\openocd.exe -f scripts/stm32l4/flash-init.ocd -f interface/stlink-v2-1.cfg -c "transport select hla_swd" -f target/stm32l4x.cfg -f scripts/stm32l4/flash-app.ocd

scripts/stm32l4/flash-app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Flash Mynewt Bootloader
2+
# Flash Mynewt Bootloader on macOS and Linux
33

44
set -e # Exit when any command fails.
55
set -x # Echo all commands.

scripts/stm32l4/flash-boot.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: Flash Mynewt bootloader on Windows
2+
3+
openocd\bin\openocd.exe -f scripts/stm32l4/flash-init.ocd -f interface/stlink-v2-1.cfg -c "transport select hla_swd" -f target/stm32l4x.cfg -f scripts/stm32l4/flash-boot.ocd

scripts/stm32l4/image-app.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: Create Mynewt Image for Windows
2+
3+
newt\newt.exe create-image -v stm32l4_my_sensor 1.0.0 && newt size -v stm32l4_my_sensor

scripts/stm32l4/image-app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Create Mynewt Image
2+
# Create Mynewt Image for macOS and Linux
33

44
set -e # Exit when any command fails.
55
set -x # Echo all commands.

0 commit comments

Comments
 (0)