Терминал 1:
Код: Выделить всё
rm ./temp/trice.bin && JLinkRTTLogger -Device STM32G0B1RE -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin
SEGGER J-Link RTT Logger
...
Getting RTT data from target. Press any key to quit.
------------------------------------------------------------
Transfer rate: 0 Bytes/s Data written: 3.27 KB
Код: Выделить всё
touch ./temp/trice.bin && trice log -p FILE -args ./temp/trice.bin -prefix off -hs off -d16 -ts ms -i ../../demoTIL.json -li ../../demoLI.json -pf none
triceExamples.c 12 0,000 Hello! 👋🙂
...
Код: Выделить всё
JLinkRTTLogger -Device STM32G0B1RE -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin &
[4] 86285
th@P51-DebianKDE:~/repos/trice/examples/G0B1_inst$ SEGGER J-Link RTT Logger
Compiled Dec 18 2024 15:48:21
(c) 2016-2017 SEGGER Microcontroller GmbH, www.segger.com
Solutions for real time microcontroller applications
Default logfile path: /home/th/.config/SEGGER
------------------------------------------------------------
------------------------------------------------------------
Connected to:
SEGGER J-Link ST-LINK
S/N: 779220206
Searching for RTT Control Block...
Код: Выделить всё
...
Searching for RTT Control Block...fg
JLinkRTTLogger -Device STM32G0B1RE -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin
OK.
1 up-channels found:
0: Terminal
Selected RTT Channel description:
Index: 0
Name: Terminal
Size: 1024 bytes.
Output file: ./temp/trice.bin
Getting RTT data from target. Press any key to quit.
------------------------------------------------------------
Transfer rate: 734 Bytes/s Data written: 50.44 KB
Код: Выделить всё
// Unlike the "system" library call from C and other languages, the
// os/exec package intentionally does not invoke the system shell and
// does not expand any glob patterns or handle other expansions,
// pipelines, or redirections typically done by shells. The package
// behaves more like C's "exec" family of functions. To expand glob
// patterns, either call the shell directly, taking care to escape any
// dangerous input, or use the [path/filepath] package's Glob function.
Я безуспешно искал решение, и мне пришла в голову только идея использовать виртуальную машину, что не кажется разумным решением. Я знаю об openOCD, но здесь есть другие проблемы.
Подробнее здесь: https://stackoverflow.com/questions/793 ... nux-darwin