Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
141383cb
Commit
141383cb
authored
Oct 05, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add blobify script
parent
a2ec2372
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
README
sw/blobify/README
+8
-0
blobify.py
sw/blobify/blobify.py
+30
-0
No files found.
sw/blobify/README
0 → 100644
View file @
141383cb
Make a binary blob (bootloader + application) for direct download to EFM32
flash. The script asks for the binary and the application bitstreams and
produces a blob with the following memory map:
0x0000 bootloader
0x8000 application
NOTE: only supports .bin files for now.
sw/blobify/blobify.py
0 → 100755
View file @
141383cb
#!/usr/bin/python
if
__name__
==
"__main__"
:
fn1
=
raw_input
(
"bootloader (.bin): "
)
fn2
=
raw_input
(
"application (.bin): "
)
fn3
=
raw_input
(
"blob output (.bin): "
)
f1
=
open
(
fn1
,
'rb'
)
f2
=
open
(
fn2
,
'rb'
)
f3
=
open
(
fn3
,
'wb'
)
a1
=
[]
a2
=
[]
# read contents
a1
=
f1
.
read
()
a2
=
f2
.
read
()
# Pad with zeroes up to bootloader start
lt
=
0x8000
-
(
len
(
a1
)
%
0x8000
)
for
i
in
range
(
0
,
lt
):
a1
+=
'
\0
'
# write output files
f3
.
write
(
a1
+
a2
)
print
(
"SUCCESS -- Output written to "
+
fn3
)
f1
.
close
()
f2
.
close
()
f3
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment