Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
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
Simple VME FMC Carrier SVEC
Commits
ab93260c
Commit
ab93260c
authored
Aug 16, 2023
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tool: convert flags to stdbool
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
04f93b8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
svec-flasher.c
software/tools/vme-flasher/svec-flasher.c
+10
-8
No files found.
software/tools/vme-flasher/svec-flasher.c
View file @
ab93260c
...
...
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
...
...
@@ -301,7 +302,8 @@ flash_program_exit:
return
ret
;
}
static
int
program_flash
(
struct
bitstream
*
bitstream
,
int
program_boot
)
static
int
program_flash
(
struct
bitstream
*
bitstream
,
bool
fpga_bootloader_flash
)
{
int
ret
=
0
;
...
...
@@ -324,7 +326,7 @@ static int program_flash(struct bitstream *bitstream, int program_boot)
}
printf
(
"Flash ID: 0x%.7x, OK
\n
"
,
flash_id
);
if
(
program_boot
)
if
(
fpga_bootloader_flash
)
{
char
confirm
[
1024
];
printf
(
"
\n
WARNING! You're about to update the SVEC bootloader.
\n
If this operation fails (due to incorrect bitstream or power loss), the card "
...
...
@@ -441,8 +443,8 @@ int main(int argc, char *argv[])
void
*
buf
;
uint32_t
size
;
int
slot
;
int
program_boot
=
0
;
int
direct_boot
=
0
;
bool
fpga_bootloader_flash
=
false
;
bool
fpga_configure
=
false
;
int
rv
;
int
err
;
char
opt
;
...
...
@@ -456,10 +458,10 @@ int main(int argc, char *argv[])
exit
(
EXIT_SUCCESS
);
break
;
case
'b'
:
program_boot
=
1
;
fpga_bootloader_flash
=
true
;
break
;
case
'f'
:
direct_boot
=
1
;
fpga_configure
=
true
;
break
;
}
}
...
...
@@ -490,8 +492,8 @@ int main(int argc, char *argv[])
init_vme
(
slot
);
enter_bootloader
();
if
(
!
direct_boot
)
err
=
program_flash
(
&
bitstream
,
program_boot
);
if
(
!
fpga_configure
)
err
=
program_flash
(
&
bitstream
,
fpga_bootloader_flash
);
else
err
=
program_afpga
(
&
bitstream
);
...
...
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