-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcmdlineTest4.sh
More file actions
executable file
·40 lines (32 loc) · 1.51 KB
/
Copy pathcmdlineTest4.sh
File metadata and controls
executable file
·40 lines (32 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# This file is part of progstm32.
#
# Copyright (C) 2018, Rishi Gupta. All rights reserved.
#
# The progstm32 is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# The progstm32 is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation,Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
source jar_names.sh
PORT=/dev/ttyACM0
WRTBIN="$(dirname '$0')"/../../../workspace/testhex/eeprom1.bin
### Don't modify anything after this line, run this test from tests folder only ###
cd "$(dirname '$0')"/../build
jars_in_classpath=".:$spttyjar:$spcorejar:$progstm32uart:$progstm32app"
# write and then read back from eeprom area, for STM32-L053R8 eeprom address is 08080000
# it should print all bytes as 46
echo -e "\n---> writing to eeprom"
java -cp $jars_in_classpath progstm32.ProgSTM32 -d $PORT -w $WRTBIN -s 08080000 -bn
echo -e "\n---> reading from eeprom"
java -cp $jars_in_classpath progstm32.ProgSTM32 -d $PORT -r stdout -s 08080000 -l 8
echo -e "\n---All Test Done---"
exit 0