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

  1. 2023.07.23 식물대 좀비 fatal error
  2. 2023.07.22 ftdi jtag
  3. 2023.07.21 cortex a9 ptm
  4. 2023.07.21 bind(): Address already in use
  5. 2023.07.21 xilinx zynq jtag 2
  6. 2023.07.20 gcov와 gcovr
  7. 2023.07.19 stm32 reset 없이 JTAG 붙이기
  8. 2023.07.19 gdbserver taget
  9. 2023.07.19 vscode 조건부 디버깅
  10. 2023.07.19 tek.com fft 관련 문서

왜 전체모드로 시작하면 죽는것인가.

 

링크의 경우는 스팀이지만 오리진의 경우 키 위치가 조금 다를뿐 동일한 레지스트리를 수정하면 해결된다.

HKEY_CURRENT_USER\SOFTWARE\PopCap\PlantsVsZombies
ScreenMode = 0 (창모드)

[링크 : https://prosecution.tistory.com/5]

'게임 > 오리진&스팀&유플레이' 카테고리의 다른 글

게임 지름 + 선물 강요  (0) 2024.10.28
갑자기 게임을 지르고 싶어짐  (2) 2024.10.25
오리진 계정 복구  (0) 2023.06.08
ea origin은 어디가고..  (2) 2023.06.06
abzu 플레이  (0) 2023.05.29
Posted by 구차니
embeded/FPGA - XILINX2023. 7. 22. 23:05

Xilinx FPGA용 그마나 저렴한 jtag인데 64$

[링크 : https://digilent.com/shop/jtag-hs2-programming-cable/]

 

정품은 270$

[링크 : https://www.xilinx.com/products/boards-and-kits/hw-usb-ii-g.html]

 

아무튼 jtag-hs2를 연결해서 리눅스에서 보면 그냥 시리얼 포트다 (연결되었다 끊어지지만)

$ lsusb -t -v
    |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 480M
        ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC

$ sudo dmesg
[  924.904844] usb 1-2: new high-speed USB device number 14 using xhci_hcd
[  925.059009] usb 1-2: New USB device found, idVendor=0403, idProduct=6014, bcdDevice= 9.00
[  925.059027] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  925.059034] usb 1-2: Product: Digilent USB Device
[  925.059040] usb 1-2: Manufacturer: Digilent
[  925.059045] usb 1-2: SerialNumber: 0000000000
[  925.066084] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
[  925.066178] usb 1-2: Detected FT232H
[  925.067712] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
[  925.104014] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[  925.104066] ftdi_sio 1-2:1.0: device disconnected

[링크 : https://www.ftdichip.com/old2020/Products/ICs/FT232H.htm]

 

FT232H 만은 싼데.. EVK 나 이런건 가격이 도대체 몇배가 뛰는거냐.. (억울하면 직접 만들어야?)

1: ₩5,301.6
25: ₩4,802.4
100: ₩4,667.5
250: ₩4,478.7

[링크 : https://www.mouser.kr/c/?marcom=123533426]

 

'embeded > FPGA - XILINX' 카테고리의 다른 글

EBAZ4205 zynq  (0) 2025.03.25
xilinx vdma  (0) 2025.01.16
xilinx zynq jtag  (2) 2023.07.21
zynq 7000 fsbl  (0) 2023.07.12
zynq fsbl  (0) 2023.07.07
Posted by 구차니
embeded/ARM2023. 7. 21. 19:04

PTM은 Program Trace Macrocell의 약자로 말그대로 프로그램을 추적하는 녀석이라

데이터만을 추적하는 기능은 제공하지 않는 듯.

 

CortexA9의 PTM과 같이 데이터 트레이스를 지원하지 않는 환경에서 ITM은 제한적으로나마 데이터 트레이스를 해볼 수 있는 방안을 제공한다

[링크 : https://www.epnc.co.kr/news/articleView.html?idxno=45715]

 

PTM interface
The Cortex-A9 processor optionally implements a Program Trace Macrocell (PTM) interface, that is compliant with the Program Flow Trace (PFT) instruction-only architecture protocol. Waypoints, changes in the program flow or events such as changes in context ID, are output to enable the trace to be correlated with the code image.

[링크 : https://developer.arm.com/documentation/100511/0401/functional-description/about-the-functions/ptm-interface]

 

 

'embeded > ARM' 카테고리의 다른 글

arm vsub operator  (0) 2023.08.09
ARM NEON SLP  (0) 2023.08.07
openOCD와 jtag  (0) 2023.07.06
cmsis (Common Microcontroller Software Interface Standard)  (0) 2023.02.27
i.mx8m plus arm trust zone  (0) 2023.02.24
Posted by 구차니
Linux API/network2023. 7. 21. 18:56

libmodbus 사용하면 희한하게 일정 시간 이후에나 해당 소켓이 사용가능하도록 풀리는데

libmodbus가 종료시 제대로 bind를 풀어주지 않아 발생하는 것으로 예측만 했는데, 일단은~ 회피법을 찾은 듯.

 

SO_REUSEADDR

[링크 : https://www.inflearn.com/questions/20648/%EC%97%90%EB%9F%AC-bind-address-already-in-use]

 

딱 내가 겪고 있던 증상

이는 기존 프로그램이 종료되었지만, 비정상종료된 상태로 아직 커널이 bind정보를 유지하고 있음으로 발생하는 문제다. 보통 1-2분 정도 지나만 커널이 알아서 정리를 하긴 하지만, 그 시간동안 기달려야 한다는 것은 상당히 번거로운 일이다. 이 경우 다음과 같은 코드를 삽입함으로써 문제를 해결할 수 있다.

int sock = socket(...);
setsockopt(sockSOL_SOCKETSO_REUSEADDR, (char *)&bf, (int)sizeof(bf));

이렇게 하면 커널은 기존에 bind로 할당된 소켓자원을 프로세스가 재 사용할 수 있도록 허락한다.

[링크 : https://www.joinc.co.kr/w/Site/Network_Programing/AdvancedComm/SocketOption]

 

+

2023.08.01

int      option;

server_socket = socket( PF_INET, SOCK_STREAM, 0);

option = 1;          // SO_REUSEADDR 의 옵션 값을 TRUE 로
setsockopt( server_socket, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option) );

[링크 : https://m.blog.naver.com/cache798/130080237440]

 

프로토 타입은 아래와 같은데 SO_REUSEADDR 은 optname으로 level이 SOL_SOCKET 이라..

optval에는 또 어떻게 넣어줘야 하려나

       #include <sys/types.h>          /* See NOTES */
       #include <sys/socket.h>

       int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
       int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);

[링크 : https://linux.die.net/man/2/setsockopt]

'Linux API > network' 카테고리의 다른 글

recv 와 read 차이  (0) 2023.06.23
AF_PACKET로 link layer 열기  (0) 2022.06.09
linux tcp server listen accept connect  (0) 2022.05.11
ssl socket 예제  (0) 2022.03.25
TCP timeout  (0) 2020.09.29
Posted by 구차니
embeded/FPGA - XILINX2023. 7. 21. 18:02

zynq 에서 PS와 PL 이 어떻게 디버깅 가능하려나 조사중

분위기만 봐서는 PL JTAG을 써도 ARM DAP 쪽으로 chain으로 연결되어 있어서 가능은 할 것 같은데..

 

[링크 : https://www.xilinx.com/content/dam/xilinx/support/documents/user_guides/ug585-Zynq-7000-TRM.pdf#nameddest=xJTAGAndDAPSubsystem]

 

갑자기 나온 PJTAG 얜 또 머냐

[링크 : https://docs.xilinx.com/r/en-US/ug1085-zynq-ultrascale-trm/Features?tocId=E4XCBg8P~M_uLRK6uggTiQ]

[링크 : https://docs.xilinx.com/r/en-US/ug1085-zynq-ultrascale-trm/JTAG-Chain-Boot-States]

 

[링크 : https://www.xilinx.com/support/documentation-navigation/design-hubs/dh0055-zynq-7000-debug-hub.html]

 

PJTAG 쓰면 된다는데 이제는 DAP과 TAP이 먼지공부하게 생겼네

Using PJTAG you can access DAP. With Xilinx JTAG you can access both TAP and DAP

[링크 : https://support.xilinx.com/s/question/0D52E00006hps2qSAA/difference-xilinx-jtag-and-arm-pjtag?language=en_US]

'embeded > FPGA - XILINX' 카테고리의 다른 글

xilinx vdma  (0) 2025.01.16
ftdi jtag  (0) 2023.07.22
zynq 7000 fsbl  (0) 2023.07.12
zynq fsbl  (0) 2023.07.07
zynq w/o ps  (0) 2023.06.30
Posted by 구차니

gcc 에서 빌드시에 아래의 플래그를 설정하고

-fprofile-arcs -ftest-coverage

 

빌드시에 생성되는 *.gnco 파일을 바이너리와 동일 경로에 두고 프로그램을 실행하면 *.gcda 파일이 생성된다.

그리고 gcovr을 아래 옵션을 주고 실행하면 html로 결과가 나온다.

소스 디렉토리 내에 bin/ 이 하위 디렉토리로 있어서

bin 에서 covr을 실행하였기에 상위 디렉토리(소스 디렉토리)를 지정해야 해서 "-r .." 을 사용해야 한다.

$ gcovr -r.. --html-details -o gcov.html

 

다만 크로스컴파일 환경에서 실행경로가 다르면 이래저래 번거로우니

profile-dir 플래그로 실행환경에 맞추어서 넣어주어야 편리할 듯 하다.

gcov uses two files for profiling. The names of these files are derived from the original object file by substituting the file suffix with either .gcno, or .gcda. The files contain coverage and profile data stored in a platform-independent format. The .gcno files are placed in the same directory as the object file. By default, the .gcda files are also stored in the same directory as the object file, but the GCC -fprofile-dir option may be used to store the .gcda files in a separate directory.

[링크 : https://gcc.gnu.org/onlinedocs/gcc/Gcov-Data-Files.html]

 

 

+

gcovr로 html 리포트를 생성하면 아래와 같이 나오는데

파일을 클릭하면 파일내에 branch 와 coverage가 나온다.

 

단일 파일 내에서는 Exec가 실행횟수 x는 실행이 한번도 되지 않은 영역이고

 

1/2 라고 나와서 눌러보면 머라고 나오는데 좀 이해가 안되네

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

gcovr - gocv 를 html로  (0) 2023.07.10
gprof gui  (0) 2023.07.10
gcc -p -pg  (0) 2016.02.25
gprof flat view 이해하기  (0) 2010.01.24
gcov, gprof  (0) 2010.01.23
Posted by 구차니
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 구차니