Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenSK
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
koenigl2
OpenSK
Commits
4a3ccb48
Commit
4a3ccb48
authored
Mar 11, 2020
by
Jean-Michel Picod
Browse files
Options
Downloads
Patches
Plain Diff
Allow flashing only the kernel without any app.
parent
b22832e9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
deploy.py
+41
-31
41 additions, 31 deletions
deploy.py
with
41 additions
and
31 deletions
deploy.py
+
41
−
31
View file @
4a3ccb48
...
...
@@ -485,6 +485,7 @@ class OpenSKInstaller:
kern_hex
.
frombytes
(
kernel
.
read
(),
offset
=
board_props
.
kernel_address
)
final_hex
.
merge
(
kern_hex
,
overlap
=
"
error
"
)
if
self
.
args
.
application
:
# Add padding
if
board_props
.
padding_address
:
padding_hex
=
intelhex
.
IntelHex
()
...
...
@@ -546,9 +547,6 @@ class OpenSKInstaller:
self
.
check_prerequisites
()
self
.
update_rustc_if_needed
()
if
self
.
args
.
application
is
None
:
fatal
(
"
Please specify an application to be flashed
"
)
# Compile what needs to be compiled
if
self
.
args
.
tockos
:
self
.
build_tockos
()
...
...
@@ -556,6 +554,8 @@ class OpenSKInstaller:
if
self
.
args
.
application
==
"
ctap2
"
:
self
.
generate_crypto_materials
(
self
.
args
.
regenerate_keys
)
self
.
build_opensk
()
elif
self
.
args
.
application
is
None
:
info
(
"
No application selected.
"
)
else
:
self
.
build_example
()
...
...
@@ -568,16 +568,19 @@ class OpenSKInstaller:
if
self
.
args
.
tockos
:
# Install Tock OS
self
.
install_tock_os
()
# Install padding and application
# Install padding and application if needed
if
self
.
args
.
application
:
self
.
install_padding
()
self
.
install_tab_file
(
"
target/tab/{}.tab
"
.
format
(
self
.
args
.
application
))
if
self
.
verify_flashed_app
(
self
.
args
.
application
):
info
(
"
You
'
re all set!
"
)
return
0
error
((
"
It seems that something went wrong. App/example not found
"
error
(
(
"
It seems that something went wrong. App/example not found
"
"
on your board. Ensure the connections between the programmer and
"
"
the board are correct.
"
))
return
1
return
0
if
self
.
args
.
programmer
in
(
"
pyocd
"
,
"
nordicdfu
"
,
"
none
"
):
dest_file
=
"
target/{}_merged.hex
"
.
format
(
self
.
args
.
board
)
...
...
@@ -734,7 +737,14 @@ if __name__ == "__main__":
"
storage (i.e. unplugging the key will reset the key).
"
),
)
apps_group
=
main_parser
.
add_mutually_exclusive_group
()
apps_group
=
main_parser
.
add_mutually_exclusive_group
(
required
=
True
)
apps_group
.
add_argument
(
"
--no-app
"
,
dest
=
"
application
"
,
action
=
"
store_const
"
,
const
=
None
,
help
=
(
"
Doesn
'
t compile nor install any application. Useful when you only
"
"
want to update Tock OS kernel.
"
))
apps_group
.
add_argument
(
"
--opensk
"
,
dest
=
"
application
"
,
...
...
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