Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mock-turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
5a374dec
Commit
5a374dec
authored
Sep 05, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/hotfix'
It applies some hotfixes done on Mock Turtle 3.1
parents
a278d847
9e8843cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
libmockturtle.c
software/lib/libmockturtle.c
+11
-5
No files found.
software/lib/libmockturtle.c
View file @
5a374dec
...
...
@@ -580,7 +580,9 @@ int trtl_cpu_load_application_raw(struct trtl_dev *trtl,
{
struct
trtl_desc
*
wdesc
=
(
struct
trtl_desc
*
)
trtl
;
char
path
[
TRTL_PATH_LEN
];
int
fd
,
i
=
0
;
int
fd
;
ssize_t
ret
;
size_t
i
=
0
;
snprintf
(
path
,
TRTL_PATH_LEN
,
"%s/%s-%02d"
,
wdesc
->
path
,
wdesc
->
name
,
index
);
...
...
@@ -589,12 +591,16 @@ int trtl_cpu_load_application_raw(struct trtl_dev *trtl,
return
-
1
;
lseek
(
fd
,
offset
,
SEEK_SET
);
do
{
i
+=
write
(
fd
,
code
,
length
);
}
while
(
i
<
length
);
errno
=
ENOMEM
;
while
(
i
<
length
)
{
ret
=
write
(
fd
,
code
,
length
);
if
(
ret
<=
0
)
break
;
i
+=
ret
;
}
close
(
fd
);
return
i
;
return
ret
<=
0
?
ret
:
i
;
}
...
...
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