~aleteoryx/muditaos

ref: 1a6ea1f4b3eb85b3c3018ecf51016cb35d5172cb muditaos/run.sh -rwxr-xr-x 835 bytes
1a6ea1f4 — Alek Rudnik [EGD-4205] mudita 1st audio assets (#940) 5 years ago
                                                                                
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
#!/bin/bash -e
# Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

source config/common.sh

BIN_DIR="build-rt1051-Debug"
GDB_ARM=$( hash arm-none-eabi-gdb-py 2> /dev/null && echo "arm-none-eabi-gdb-py" || echo "arm-none-eabi-gdb" )

help() 
{
cat<<EOF
Script accept one parameter: build catalog
- It will accept any catalog with "build" in name
- default ${BIN_DIR} is taken

It will try tu use "arm-none-eabi-gdb-py" if exists
in path else it will use "arm-none-eabi-gdb"
EOF
}

while [[ $# -gt 0 ]]; do
    case $1 in
        build*)
            BIN_DIR="$1"
            ;;
        *)
            help
            exit 0
            ;;
    esac;
    shift
done

check_target_rt1051 "${BIN_DIR}"

${GDB_ARM} "${BIN_DIR}"/PurePhone.elf -x .gdbinit-1051