'잡동사니'에 해당되는 글 13318건

  1. 2023.07.19 stm32 reset 없이 JTAG 붙이기
  2. 2023.07.19 gdbserver taget
  3. 2023.07.19 vscode 조건부 디버깅
  4. 2023.07.19 tek.com fft 관련 문서
  5. 2023.07.19 gdb conditional break
  6. 2023.07.18 현타
  7. 2023.07.18 휴가 2일차
  8. 2023.07.17 휴가 1일차
  9. 2023.07.16 악당 2호 아빠 새끼 발톱 공격
  10. 2023.07.15 토닉워터 먹어봄
embeded/Cortex-M3 STM2023. 7. 19. 19:19

stm32를 찾아봐야 하나..

gdb 문법은 아닌듯 한데 stm32 전용 구문들이려나?

 

# custom.cfg
source [find interface/stlink-v2-1.cfg]
transport select "hla_swd"

source [find stm32f4x.cfg]

reset_config none

 

 

[링크 : https://www.openstm32.org/forumthread1967]

Posted by 구차니

target remote를 이용하여 접속을 할때 사용하는 명령인데

target remote 이후에 포트를 적어주면 된다.

(gdb) help target
Connect to a target machine or process.
The first argument is the type or protocol of the target machine.
Remaining arguments are interpreted by the target protocol.  For more
information on the arguments for a particular protocol, type
`help target ' followed by the protocol name.

List of target subcommands:

target core -- Use a core file as a target.
target ctf -- (Use a CTF directory as a target.
target exec -- Use an executable file as a target.
target extended-remote -- Use a remote computer via a serial line, using a gdb-specific protocol.
target native -- Native process (started by the "run" command).
target record-btrace -- Collect control-flow trace and provide the execution history.
target record-core -- Log program while executing and replay execution from log.
target record-full -- Log program while executing and replay execution from log.
target remote -- Use a remote computer via a serial line, using a gdb-specific protocol.
target tfile -- Use a trace file as a target.

Type "help target" followed by target subcommand name for full documentation.
Type "apropos word" to search for commands related to "word".
Type "apropos -v word" for full documentation of commands related to "word".
Command name abbreviations are allowed if unambiguous.

(gdb) help target remote
Use a remote computer via a serial line, using a gdb-specific protocol.
Specify the serial device it is connected to
(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).

(gdb) help monitor
Send a command to the remote monitor (remote targets only).

 

monitor는 remote로 붙었을때만 보내는 명령인데 reset은 검색되진 않는다.

(gdb) file C:/temp/Blinky.elf
Reading symbols from C:/temp/Blinky.elf...done.
(gdb) target remote localhost:2331
Remote debugging using localhost:2331
0x00000000 in ?? ()
(gdb) monitor reset
Resetting target
(gdb) load

[링크 : https://wiki.segger.com/J-Link_GDB_Server]

Posted by 구차니
Microsoft/vscode2023. 7. 19. 19:05

conditional break 하위에

hit count나 expression으로 존재한다.

 

[링크 : https://code.visualstudio.com/docs/editor/debugging#_conditional-breakpoints]

    [링크 : https://stackoverflow.com/questions/43311058/vscode-debugger-conditional-breakpoints]

 

+

vscode 1.80.0 버전에서 확인해보니

아래와 같이 3가지가 나온다.

 

 

Add Conditional Breakpoint를 누르면, Expression / Hit Count / Log Message가 나온다.

 

Posted by 구차니

 

 

Fundamentals of Real-Time Spectrum Analysis

[링크 : https://download.tek.com/document/37W_17249_5_HR_Letter.pdf]

 

Understanding FFT Overlap Processing Fundamentals

[링크 : https://download.tek.com/document/37W_18839_1.pdf]

 

FFT 오버랩 프로세싱의 이해

[링크 : https://download.tek.com/document/37K_18839_0.pdf]

 

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fft 결과에 N(입력 샘플 갯수)로 나누는 이유  (0) 2023.09.21
FFT RBW  (0) 2023.09.19
sfft  (0) 2023.07.12
fft window type과 진폭 보정계수  (0) 2023.07.04
fft window 함수  (0) 2023.07.03
Posted by 구차니

 

Set a breakpoint
The first step in setting a conditional breakpoint is to set a breakpoint as you normally would. I.e.

(gdb) break <file_name> : <line_number>
(gdb) break <function_name>
This will set a breakpoint and output the breakpoint number

Check breakpoints
If you forget which breakpoints you can add a condition to, you can list the breakpoints using:

(gdb) info breakpoints
Set a condition for a breakpoint
Set an existing breakpoint to only break if a certain condition is true:

(gdb) condition <breakpoint_number> condition
The condition is written in syntax similar to c using operators such as == != and <.

 

break 줄여서 br

$ gdb factorial
Reading symbols from factorial...done.
(gdb) br 28
Breakpoint 1 at 0x11bf: file factorial.c, line 28.
(gdb) condition 1 i > 5

 

아래 소스에서 28라인 i++ 에 break를 걸고, 해당 라인에서 i > 5 인 조건에서 잡히게 한다.

반복문의 경우 확실히 디버깅 할 때 편할 듯.

//This program calculates and prints out the factorials of 5 and 17


#include <stdio.h>
#include <stdlib.h>

int factorial(int n);

int main(void) {

int n = 5;
int f = factorial(n);
printf("The factorial of %d is %d.\n", n, f);
n = 17;
f = factorial(n);
printf("The factorial of %d is %d.\n", n, f);

return 0;

}
//A factorial is calculated by n! = n * (n - 1) * (n - 2) * ... * 1
//E.g. 5! = 5 * 4 * 3 * 2 * 1 = 120
int factorial(int n) {
int f = 1;
int i = 1;
while (i <= n) {
f = f * i;
i++; // 28 line
}
return f;
}

 

[링크 : https://www.cse.unsw.edu.au/~learn/debugging/modules/gdb_conditional_breakpoints/]

Posted by 구차니

아하하 난 개발자가 아니었나?!

 

[링크 : https://v.daum.net/v/20230718175602958]

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

오늘의 지름  (2) 2023.08.02
줘같네  (0) 2023.07.31
지하철 연착  (0) 2023.07.11
doom eternal 질러?  (0) 2023.07.01
하루가 짧다  (0) 2023.06.29
Posted by 구차니

컴백해서

노트북 써멀 바르러  AS 센터 방문하고

감자도 배달하고 끝

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

국립 한글박물관 현장예매  (0) 2023.07.30
피곤  (0) 2023.07.29
휴가 1일차  (0) 2023.07.17
악당 2호 아빠 새끼 발톱 공격  (0) 2023.07.16
토닉워터 먹어봄  (0) 2023.07.15
Posted by 구차니

하이원 리조트 옴

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

피곤  (0) 2023.07.29
휴가 2일차  (0) 2023.07.18
악당 2호 아빠 새끼 발톱 공격  (0) 2023.07.16
토닉워터 먹어봄  (0) 2023.07.15
기절 2  (0) 2023.07.09
Posted by 구차니

킥보드로 밟아 버림.. -_-

또 한 달은 넘게 고생하겠네 -_-

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

휴가 2일차  (0) 2023.07.18
휴가 1일차  (0) 2023.07.17
토닉워터 먹어봄  (0) 2023.07.15
기절 2  (0) 2023.07.09
개피곤  (0) 2023.07.08
Posted by 구차니

음.. 사이다에 구연산 바몬드 섞은 느낌 -ㅁ-!

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

휴가 1일차  (0) 2023.07.17
악당 2호 아빠 새끼 발톱 공격  (0) 2023.07.16
기절 2  (0) 2023.07.09
개피곤  (0) 2023.07.08
더워어어어어  (0) 2023.06.28
Posted by 구차니