Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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 - Software
Commits
9c6fae70
Commit
9c6fae70
authored
Nov 27, 2012
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: add VME A32 relocation script
parent
f3cf4e41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
relocate
tools/relocate
+22
-0
No files found.
tools/relocate
0 → 100755
View file @
9c6fae70
#! /bin/sh
if
[
x
"$#"
=
x
"1"
]
;
then
ADDRESS
=
$1
else
echo
"usage:
$0
address"
exit
1
fi
if
!
(
echo
$ADDRESS
|
grep
-qi
'^0x[0-9a-f]\{8\}'
)
;
then
echo
"address must be of the form 0xhhhhhhhh, h = hex digit"
exit
1
fi
BYTE1
=
`
echo
$ADDRESS
|
sed
's!\(0x\)\?\([0-9a-fA-F][0-9a-fA-F]\)......!\2!'
`
BYTE2
=
`
echo
$ADDRESS
|
sed
's!\(0x\)\?..\([0-9a-fA-F][0-9a-fA-F]\)....!\2!'
`
BYTE3
=
`
echo
$ADDRESS
|
sed
's!\(0x\)\?....\([0-9a-fA-F][0-9a-fA-F]\)..!\2!'
`
BYTE4
=
`
echo
$ADDRESS
|
sed
's!\(0x\)\?......\([0-9a-fA-F][0-9a-fA-F]\)!\2!'
`
echo
./vme
-v
CR_CSR_BASE
-a
0x2f
-s
0x7ff60
-n
0x1
-w
$BYTE1
echo
./vme
-v
CR_CSR_BASE
-a
0x2f
-s
0x7ff64
-n
0x1
-w
$BYTE2
echo
./vme
-v
CR_CSR_BASE
-a
0x2f
-s
0x7ff68
-n
0x1
-w
$BYTE3
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