~aleteoryx/muditaos

ref: master muditaos/StartJLinkServer.sh -rwxr-xr-x 1.7 KiB
2cd0e472 — Lefucjusz [BH-000] Update Harmony 2.10.0 changelog 2 months 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
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
#!/usr/bin/env bash
# Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/blob/master/LICENSE.md

declare -A OPTS=( ['continous']=' -singlerun ' ['verify']='  ' ['speed']=' -speed 25000 ')
jlinkScriptFileName="evkbimxrt1050_sdram_init.jlinkscript"

help()
{
cat << EOF
For basic run with default values:
./StartJLinkServer.sh
Params:
    continous   - run in continous mode
    verify      - verify data loaded
    speed       - change speed (please mind 30000 is max by docs)
    T6          - run for the T6 board 
EOF
}
while [[ $# -gt 0 ]]; do
    case $1 in
        "continous")
            echo "change to continous mode"
            OPTS[$1]=' ';
            ;;
        "verify")
            OPTS[$1]=' -vf ';
            ;;
        "speed")
            OPTS[$1]=" -speed $2 "
            shift
            ;;
        "T6")
            echo "run for the T6 board"
            jlinkScriptFileName="evkbimxrt1050_sdram_init_T6.jlinkscript"
            ;;
        *)
            help
            ;;
    esac;
    shift
done
CMD="JLinkGDBServerCLExe -if SWD -device MCIMXRT1051                     \
    -jlinkscriptfile $jlinkScriptFileName -strict -ir    \
    -rtos GDBServer/RTOSPlugin_FreeRTOS                                  \
    ${OPTS[@]}"

echo "RUN: ${CMD}"

if [ "${OPTS['continous']}" == " " ]; then 

notify-send 'DEBUG WARNING!' "
When using continous mode, after full reset please remember to set PS_EN pin high. GDB command:

    monitor memU32 0x401BC000 = 128;

This will set PS_EN high so that after core reset power circuit would work while  loading software
ps. you can copy it from .gdbinit-rt1051
" \
--icon=dialog-information
fi

eval ${CMD}