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
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
c56af05c
Unverified
Commit
c56af05c
authored
5 years ago
by
gendx
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into add-debug-allocations
parents
7703ddb4
dbacd7c9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/cargo_audit.yml
+1
-1
1 addition, 1 deletion
.github/workflows/cargo_audit.yml
.pylintrc
+13
-0
13 additions, 0 deletions
.pylintrc
deploy.py
+13
-9
13 additions, 9 deletions
deploy.py
with
27 additions
and
10 deletions
.github/workflows/cargo_audit.yml
+
1
−
1
View file @
c56af05c
...
@@ -6,7 +6,7 @@ on:
...
@@ -6,7 +6,7 @@ on:
jobs
:
jobs
:
audit
:
audit
:
runs-on
:
ubuntu-18.04
runs-on
:
ubuntu-18.04
if
:
env.GITHUB_HEAD_REF ==
0
if
:
github.repository == 'google/OpenSK'
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
-
uses
:
actions-rs/toolchain@v1
-
uses
:
actions-rs/toolchain@v1
...
...
This diff is collapsed.
Click to expand it.
.pylintrc
+
13
−
0
View file @
c56af05c
...
@@ -12,6 +12,12 @@ cache-size=500
...
@@ -12,6 +12,12 @@ cache-size=500
# Ignore Py3 files
# Ignore Py3 files
ignore=get_references_web.py,get_references_web_single_group.py
ignore=get_references_web.py,get_references_web_single_group.py
load-plugins=
pylint.extensions.bad_builtin,
pylint.extensions.docparams,
pylint.extensions.docstyle,
pylint.extensions.redefined_variable_type,
pylint.extensions.overlapping_exceptions,
[REPORTS]
[REPORTS]
...
@@ -32,6 +38,8 @@ disable-report=R0001,R0002,R0003,R0004,R0101,R0102,R0201,R0202,R0220,R0401,R0402
...
@@ -32,6 +38,8 @@ disable-report=R0001,R0002,R0003,R0004,R0101,R0102,R0201,R0202,R0220,R0401,R0402
# Error message template (continued on second line)
# Error message template (continued on second line)
msg-template={msg_id}:{line:3} {obj}: {msg} [{symbol}]
msg-template={msg_id}:{line:3} {obj}: {msg} [{symbol}]
# We don't need evaluation score
score=no
[MESSAGES CONTROL]
[MESSAGES CONTROL]
# List of checkers and warnings to enable.
# List of checkers and warnings to enable.
...
@@ -220,3 +228,8 @@ ignore-exceptions=AssertionError,NotImplementedError,StopIteration,TypeError
...
@@ -220,3 +228,8 @@ ignore-exceptions=AssertionError,NotImplementedError,StopIteration,TypeError
# Number of spaces of indent required when the last token on the preceding line
# Number of spaces of indent required when the last token on the preceding line
# is an open (, [, or {.
# is an open (, [, or {.
indent-after-paren=4
indent-after-paren=4
# Set the linting for string quotes
string-quote=double
triple-quote=double
docstring-quote=double
This diff is collapsed.
Click to expand it.
deploy.py
+
13
−
9
View file @
c56af05c
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# Lint as: python3
# Lint as: python3
# pylint: disable=C0111
from
__future__
import
absolute_import
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
division
...
@@ -26,8 +27,10 @@ import subprocess
...
@@ -26,8 +27,10 @@ import subprocess
import
sys
import
sys
import
colorama
import
colorama
from
tockloader
import
tab
from
tockloader
import
tbfh
from
tockloader
import
tockloader
as
loader
from
tockloader.exceptions
import
TockLoaderException
from
tockloader.exceptions
import
TockLoaderException
from
tockloader
import
tab
,
tbfh
,
tockloader
# This structure allows us in the future to also support out-of-tree boards.
# This structure allows us in the future to also support out-of-tree boards.
SUPPORTED_BOARDS
=
{
SUPPORTED_BOARDS
=
{
...
@@ -78,7 +81,7 @@ def info(msg):
...
@@ -78,7 +81,7 @@ def info(msg):
class
RemoveConstAction
(
argparse
.
Action
):
class
RemoveConstAction
(
argparse
.
Action
):
#pylint: disable=W0622
#
pylint: disable=W0622
def
__init__
(
self
,
def
__init__
(
self
,
option_strings
,
option_strings
,
dest
,
dest
,
...
@@ -155,7 +158,7 @@ class OpenSKInstaller:
...
@@ -155,7 +158,7 @@ class OpenSKInstaller:
# associated to the version and split will only return 1 item.
# associated to the version and split will only return 1 item.
# To avoid failing later when accessing the date, we insert an
# To avoid failing later when accessing the date, we insert an
# empty value.
# empty value.
target_toolchain
.
append
(
''
)
target_toolchain
.
append
(
""
)
current_version
=
self
.
checked_command_output
([
"
rustc
"
,
"
--version
"
])
current_version
=
self
.
checked_command_output
([
"
rustc
"
,
"
--version
"
])
if
not
all
((
target_toolchain
[
0
]
in
current_version
,
if
not
all
((
target_toolchain
[
0
]
in
current_version
,
target_toolchain
[
1
]
in
current_version
)):
target_toolchain
[
1
]
in
current_version
)):
...
@@ -209,7 +212,7 @@ class OpenSKInstaller:
...
@@ -209,7 +212,7 @@ class OpenSKInstaller:
assert
self
.
args
.
application
assert
self
.
args
.
application
package_parameter
=
"
-n
"
package_parameter
=
"
-n
"
elf2tab_ver
=
self
.
checked_command_output
([
"
elf2tab
"
,
"
--version
"
]).
split
(
elf2tab_ver
=
self
.
checked_command_output
([
"
elf2tab
"
,
"
--version
"
]).
split
(
'
'
,
maxsplit
=
1
)[
1
]
"
"
,
maxsplit
=
1
)[
1
]
# Starting from v0.5.0-dev the parameter changed.
# Starting from v0.5.0-dev the parameter changed.
# Current pyblished crate is 0.4.0 but we don't want developers
# Current pyblished crate is 0.4.0 but we don't want developers
# running the HEAD from github to be stuck
# running the HEAD from github to be stuck
...
@@ -232,7 +235,7 @@ class OpenSKInstaller:
...
@@ -232,7 +235,7 @@ class OpenSKInstaller:
setattr
(
args
,
"
erase
"
,
self
.
args
.
clear_apps
)
setattr
(
args
,
"
erase
"
,
self
.
args
.
clear_apps
)
setattr
(
args
,
"
make
"
,
False
)
setattr
(
args
,
"
make
"
,
False
)
setattr
(
args
,
"
no_replace
"
,
False
)
setattr
(
args
,
"
no_replace
"
,
False
)
tock
=
tock
loader
.
TockLoader
(
args
)
tock
=
loader
.
TockLoader
(
args
)
tock
.
open
(
args
)
tock
.
open
(
args
)
tabs
=
[
tab
.
TAB
(
tab_filename
)]
tabs
=
[
tab
.
TAB
(
tab_filename
)]
try
:
try
:
...
@@ -251,7 +254,7 @@ class OpenSKInstaller:
...
@@ -251,7 +254,7 @@ class OpenSKInstaller:
info
(
"
Flashing padding application
"
)
info
(
"
Flashing padding application
"
)
args
=
copy
.
copy
(
self
.
tockloader_default_args
)
args
=
copy
.
copy
(
self
.
tockloader_default_args
)
setattr
(
args
,
"
address
"
,
0x30000
)
setattr
(
args
,
"
address
"
,
0x30000
)
tock
=
tock
loader
.
TockLoader
(
args
)
tock
=
loader
.
TockLoader
(
args
)
tock
.
open
(
args
)
tock
.
open
(
args
)
try
:
try
:
tock
.
flash_binary
(
padding
,
args
.
address
)
tock
.
flash_binary
(
padding
,
args
.
address
)
...
@@ -262,7 +265,7 @@ class OpenSKInstaller:
...
@@ -262,7 +265,7 @@ class OpenSKInstaller:
args
=
copy
.
copy
(
self
.
tockloader_default_args
)
args
=
copy
.
copy
(
self
.
tockloader_default_args
)
setattr
(
args
,
"
app_address
"
,
0x40000
)
setattr
(
args
,
"
app_address
"
,
0x40000
)
info
(
"
Erasing all installed applications
"
)
info
(
"
Erasing all installed applications
"
)
tock
=
tock
loader
.
TockLoader
(
args
)
tock
=
loader
.
TockLoader
(
args
)
tock
.
open
(
args
)
tock
.
open
(
args
)
try
:
try
:
tock
.
erase_apps
(
False
)
tock
.
erase_apps
(
False
)
...
@@ -271,9 +274,10 @@ class OpenSKInstaller:
...
@@ -271,9 +274,10 @@ class OpenSKInstaller:
info
((
"
A non-critical error occured while erasing
"
info
((
"
A non-critical error occured while erasing
"
"
apps: {}
"
.
format
(
str
(
e
))))
"
apps: {}
"
.
format
(
str
(
e
))))
# pylint: disable=W0212
def
verify_flashed_app
(
self
,
expected_app
):
def
verify_flashed_app
(
self
,
expected_app
):
args
=
copy
.
copy
(
self
.
tockloader_default_args
)
args
=
copy
.
copy
(
self
.
tockloader_default_args
)
tock
=
tock
loader
.
TockLoader
(
args
)
tock
=
loader
.
TockLoader
(
args
)
app_found
=
False
app_found
=
False
with
tock
.
_start_communication_with_board
():
with
tock
.
_start_communication_with_board
():
apps
=
[
app
.
name
for
app
in
tock
.
_extract_all_app_headers
()]
apps
=
[
app
.
name
for
app
in
tock
.
_extract_all_app_headers
()]
...
@@ -322,7 +326,7 @@ def main(args):
...
@@ -322,7 +326,7 @@ def main(args):
OpenSKInstaller
(
args
).
run
()
OpenSKInstaller
(
args
).
run
()
if
__name__
==
'
__main__
'
:
if
__name__
==
"
__main__
"
:
shared_parser
=
argparse
.
ArgumentParser
(
add_help
=
False
)
shared_parser
=
argparse
.
ArgumentParser
(
add_help
=
False
)
shared_parser
.
add_argument
(
shared_parser
.
add_argument
(
"
--dont-clear-apps
"
,
"
--dont-clear-apps
"
,
...
...
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