-
Notifications
You must be signed in to change notification settings - Fork 4
/
build_03_gdb.sh
executable file
·75 lines (62 loc) · 1.57 KB
/
build_03_gdb.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
source include.sh
#################
### gdb #########
#################
gdb_ver=7.2a
arch_url=http://ftp.gnu.org/gnu/gdb/gdb-$gdb_ver.tar.bz2
arch_dir=gdb-7.2
arch_name=gdb-$gdb_ver.tar.bz2
cd $stm_dir_tools
did_it_work $?
if [ -f $arch_name ]; then
echo file exists - $arch_name
else
wget $arch_url
did_it_work $?
fi
if [ -d $arch_dir ]; then
echo old dir exists - rm -rf $arch_dir
rm -rf $arch_dir
did_it_work $?
fi
tar -xvjf $arch_name
did_it_work $?
cd $arch_dir
did_it_work $?
mkdir build
did_it_work $?
cd build
did_it_work $?
../configure --target=arm-none-eabi \
--prefix=$TOOLPATH_STM32 \
--enable-languages=c,c++ \
--enable-thumb \
--enable-interwork \
--enable-multilib \
--enable-tui \
--with-newlib \
--disable-werror \
--disable-libada \
--disable-libssp
did_it_work $?
make $PARALLEL
did_it_work $?
make install
did_it_work $?
cd $TOOLPATH_STM32/bin
did_it_work $?
mv arm-none-eabi-gdb arm-none-eabi-gdb-$gdb_ver
did_it_work $?
mv arm-none-eabi-gdbtui arm-none-eabi-gdbtui-$gdb_ver
did_it_work $?
mv arm-none-eabi-run arm-none-eabi-run-$gdb_ver
did_it_work $?
ln -s arm-none-eabi-gdb-$gdb_ver arm-none-eabi-gdb
did_it_work $?
ln -s arm-none-eabi-gdbtui-$gdb_ver arm-none-eabi-gdbtui
did_it_work $?
ln -s arm-none-eabi-run-$gdb_ver arm-none-eabi-run
did_it_work $?
echo "Done:"$0
exit 0