'embeded > risc-v' 카테고리의 다른 글
| risc-v sbc (0) | 2025.07.08 |
|---|---|
| risc-v sv39 (0) | 2023.11.18 |
| milk-v duo(risc-v) (0) | 2023.11.18 |
| 부품 도착! + 주문 취소! (0) | 2023.11.02 |
| 오늘의 지름 (0) | 2023.11.01 |
| risc-v sbc (0) | 2025.07.08 |
|---|---|
| risc-v sv39 (0) | 2023.11.18 |
| milk-v duo(risc-v) (0) | 2023.11.18 |
| 부품 도착! + 주문 취소! (0) | 2023.11.02 |
| 오늘의 지름 (0) | 2023.11.01 |
esp32 보다가 멀티플랫폼 개발용 미들웨어라고 해야하나.. 그런걸 발견함
[링크 : https://platformio.org/]
[링크 : https://blog.humminglab.io/posts/platformio-1/]
먼가.. arduino 기반의 무언간가?
회사가 망했나 안보이네?
whois 조회해보니 2024년 11우러 이후로는 업데이트 된적이 없다는데
2027년까진 구매되어있다는데 서버는 터진듯.
| %kwhois Domain Name: JCZN1688.COM Registry Domain ID: 2661762794_DOMAIN_COM-VRSN Registrar WHOIS Server: grs-whois.hichina.com Registrar URL: http://wanwang.aliyun.com Updated Date: 2024-11-15T01:42:33Z Creation Date: 2021-12-15T06:22:58Z Registry Expiry Date: 2027-12-15T06:22:58Z Registrar: Alibaba Cloud Computing Ltd. d/b/a HiChina (http://www.net.cn) Registrar IANA ID: 1599 Registrar Abuse Contact Email: DomainAbuse@service.aliyun.com Registrar Abuse Contact Phone: +86.95187 Domain Status: ok https://icann.org/epp#ok Name Server: DNS19.HICHINA.COM Name Server: DNS20.HICHINA.COM DNSSEC: unsigned URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ >>> Last update of whois database: 2026-01-17T09:30:40Z <<< |
[링크 : http://www.jczn1688.com/zlxz]
jczn 멀 어떻게 줄인거냐 -ㅁ-?!?!

확장 io와 온도/습도 센서용 인터페이스라..

usb-c 가 하나만 있는 녀석으로 v2인가? 내꺼랑은 다르네 ㅠㅠ
[링크 : https://ko.aliexpress.com/item/1005005138982767.html?gatewayAdapt=bra2kor]
위의 링크는 깨진것 같아서 다시 상위부터 접속해보니 먼가 나오긴 한다.
2.8과 3.2를 받아봤는데 아무튼 내꺼랑은 다른 모델인듯..
LCD가 달라져서 바이너리 그대로 쓸수도 없을 것 같은데..

[링크 : http://pan.jczn1688.com/1/ESP32%20module]
2.8인치 에서 받아서 보는 중
microSD는 TF라고 해서 IO5 / IO18 / IO19 / IO23 으로 연결되고 esp-wroom-32 에서는 VSPI 로 연결된다.
LED-RGB는 단순(?) gpio로 on/off 하는 스타일
DAC는 io26 핀이고 dac2로 표시되어있는 부분

그 와중에 flash 라고 U4가 있는데 내꺼에는 부품이 없다. NC 처리된 모델인듯.
없으면 확인할게 하나 줄었으니 머 다행인가? ㅋㅋ

[링크 : https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/issues/261]
lcm이 TFT 인데 io2 / io12~1015 / io21 을 이용하여 연결되고
io2는 그냥 gpio 같고
io12~io15는 HSPI 포트로 연결된다. 이름부터 웬지 빨라보이네


원하는건 못 찾았는데
HSPI(spi2) VSPI (spi3)는 아무튼 빠르니까 이름이 좀더 붙은건가? qspi 같은 건 아닌거 같은데..

[링크 : https://documentation.espressif.com/esp32_technical_reference_manual_en.pdf#iomuxgpio]
| esp32-wroom-32 보드 / arduino 개발툴 (0) | 2026.01.23 |
|---|---|
| esp32-2432S028 데모 빌드 (0) | 2026.01.21 |
| esp32-2432S028 보드 st7789 spi lcd driver? (0) | 2026.01.16 |
| esp32 와 spi lcd 성능 비..교? (0) | 2026.01.12 |
| esp32 c6 zigbee thread matter (0) | 2026.01.10 |
왜 끝나지 않아?!?! 해서 공략을 찾아보니 토템을 뿌셨어야 했군
무한인 덕분에 열파랑 마이크로 미사일 숙련 끝냄 ㅋㅋㅋ
[링크 : https://youtu.be/4Vy8auiT1K0?t=818]
어찌어찌 야곰야곰 진행중

아우 망할 이녀석만 나오면 난이도가 팍팍 오르네 ㅠㅠ

여기서는 크루시블로 썰어 버렸군
[링크 : https://youtu.be/4Vy8auiT1K0?t=1513]
+
2026.01.18
아크바일 까지 어떻게 넘기면 이제는 머로더 나와서 사람 환장하게 하네 아우
| 둠 이터널 노말 난이도 끝 (0) | 2026.01.24 |
|---|---|
| 둠 이터널 - 우르닥 (0) | 2026.01.19 |
| 둠 이터널 타라스 나바드 끝 (0) | 2026.01.10 |
| 둠 이터널.. 접어야 하나? ㅠㅠ (0) | 2026.01.02 |
| 둠 이터널 - 수직 동기화 문제 -_- (2) | 2025.12.20 |
한번에 두개나 주는군. 그런데 먼가 안끌린다!?

| 에픽 유출은 역시 구라였군 (0) | 2025.12.20 |
|---|---|
| 오랫만에 지르기 (0) | 2025.11.29 |
| 에픽 무료게임 (0) | 2025.11.14 |
| 윈도우 11에서 JASF 실행 실패 (0) | 2025.11.02 |
| 스팀 단상 (0) | 2025.10.05 |
액정은 뜯을수가 없어서 포기하고, 뒷면 전체를 보면
평범한(?) esp32-wroom-32 , 터치ic, sd 카드, rgb led, usb 시리얼 칩 그리고 ldo가 보인다.

esp32-wroom-32
xpt2046 터치 ic
rgb led

스피커 단자도 있는데 esp32의 dac 기능이 있었나?
AMS1117 LDO 2개
LTK8002D 오디오 앰프. 읭?

2채널 DAC가 있다고 하니 그걸 사용하면 될 것 같긴한데 일단 스피커와 앰프는 1채널만 해둔 듯?
[링크 : https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/dac.html]
[링크 : https://blog.naver.com/mapes_khkim/222284886951]
CH430C usb to serial

윈도우에서 보니 드라이버가 없는지 안 잡혀서

sparkfun에서 받아서 설치하니 잡힌다.
micro USB 나 USB-C 양쪽모두 시리얼 포트가 연결되어 있다.

[링크 : https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all#windows-710]
시리얼 포트를 115200bps로 연결하고 reset을 눌러보니 친숙한(?)
esp32 부트로더가 보이는 듯.

같이 준 케이스에 먼가 써있어서 구글 렌즈의 힘을 빌어보니
터치기능이 있는 7789라.. st7789 LCD 드라이버를 쓴걸려나?
![]() |
![]() |
맞다면.. 실험적으로는 65fps까지 나온다는 건데 오호.. 1.5만원에 사온거 치고는 좋은 액정이군(!)
| ESP32 LCDs performance report 1. ST7796 4-wire SPI 16fps 2. ST7796 8-bit 34fps 3. ILI9488 4-wire SPI 11fps 4. ILI9488 8-bit 34fps 5. ST7789 4-wire SPI 65fps 6. ST7789 8-bit 5xfps(weird) 7. ILI9341 4-wire SPI 65fps 8. GC9A01 8xfps 9. ST7789 240x240 8xfps |
[링크 : https://www.facebook.com/groups/797613180807626/posts/1048617505707191/]
내껀 v3 인 듯? (usb-c랑 micro usb가 있음)
| ESP32-2432S028R は 3つのバージョンがあります。(R=XPT2046 抵抗膜タッチセンス) 1. ESP32-2432S028R v1 (ILI9341 SPI):初期。U4 ICの設計ミス。 2. ESP32-2432S028R v2 (ILI9341 SPI):U4 IC Remove。External Pin Assign change. 3. ESP32-2432S028R v3 (ST7789 SPI, MODE 3):A type with two USB ports.:YD2USB |
[링크 : https://macsbug.wordpress.com/2022/08/17/esp32-2432s028/]
+
2026.01.19
헤더 바꾸고 나서 한번 해봐야 할 듯.
| User_Setup.h #define ILI9341_2_DRIVER // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172 //#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display |
[링크 : lvgl-gemini/arduino_lib/TFT_eSPI/User_Setup.h at main · MYusufY/lvgl-gemini · GitHub ]
| esp32-2432S028 데모 빌드 (0) | 2026.01.21 |
|---|---|
| esp32-2432S028 데이터 시트 (0) | 2026.01.17 |
| esp32 와 spi lcd 성능 비..교? (0) | 2026.01.12 |
| esp32 c6 zigbee thread matter (0) | 2026.01.10 |
| esp32 benchmark (0) | 2025.11.18 |
qt widget 에서 qml을 다루거나
qml 에서 c++로 기존 socket 등을 쓴다거나 하는걸 찾는 중
[링크 : https://doc.qt.io/qt-6/qtqml-cppintegration-interactqmlfromcpp.html]
[링크 : https://doc.qt.io/archives/qt-5.15/qtqml-cppintegration-topic.html]
[링크 : https://forum.qt.io/topic/87143/udp-and-tcp-sockets-with-qml]
[링크 : https://wiki.qt.io/QWidget-in-QML/ja]
[링크 : https://qt-dev.com/board.php?board=qnaboard&page=3&category=1&command=body&no=810]
| qt quick websocket (0) | 2026.01.14 |
|---|---|
| qt qml loader (0) | 2026.01.14 |
| qstackedwidget, qstackedlayout (0) | 2026.01.13 |
| qt quick 예제 calqlatr 코드분석 (0) | 2026.01.13 |
| qt qml view (0) | 2026.01.13 |
오랫만에 쓰려니 다 까먹어서 다시 조사
빌드
-g 옵션을 통해 디버깅 심볼을 넣어준다.
| $ gcc -g tt.c |
이거 안하면 소스코드가 안나옴
| Reading symbols from ./a.out... (No debugging symbols found in ./a.out) (gdb) l No symbol table is loaded. Use the "file" command. |
gdb 실행 (인자 없이)
| $ gdb ./a.out $ gdb (gdb) file ./a.out |
gdb 실행 (인자 필요시)
| $ gdb --args ./a.out arg1 arg2 |
브레이크 포인트 설정 및 소스 보기
소스는 list (혹은 소문자 l) 과 라인수를 넣고
브레이크 포인트는 b로 추가한다. b 뒤에는 라인수 혹은 함수 명을 넣으면 된다.
브레이크 포인트 목록 확인은 info b를 통해 가능하다.
clear 를 통해 b 명령을 통해 추가하는 것과 정반대로 삭제가 가능하고
delete(소문자 d) 명령은 info b의 num 을 이용하여 삭제한다.
| (gdb) l 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 void main() 5 { 6 int *arr = NULL; 7 arr = (int*)malloc(10 * sizeof(int)); 8 int idx = 0; 9 for(idx = 0; idx < 10000; idx++) 10 arr[idx] = idx; (gdb) l 10 5 { 6 int *arr = NULL; 7 arr = (int*)malloc(10 * sizeof(int)); 8 int idx = 0; 9 for(idx = 0; idx < 10000; idx++) 10 arr[idx] = idx; 11 12 // iprintf("before\n"); 13 // fflush(stdout); 14 (gdb) l 14 9 for(idx = 0; idx < 10000; idx++) 10 arr[idx] = idx; 11 12 // iprintf("before\n"); 13 // fflush(stdout); 14 15 free(arr); 16 17 printf("after\n"); 18 fflush(stdout); (gdb) b 15 Breakpoint 1 at 0x1201: file t2.c, line 15. (gdb) b No default breakpoint address now. (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x0000000000001201 in main at t2.c:15 (gdb) b main Breakpoint 2 at 0x11b5: file t2.c, line 6. (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x0000000000001201 in main at t2.c:15 2 breakpoint keep y 0x00000000000011b5 in main at t2.c:6 (gdb) d Delete all breakpoints? (y or n) n (gdb) clear main Deleted breakpoint 2 (gdb) d 1 (gdb) info b No breakpoints or watchpoints. (gdb) b main Breakpoint 3 at 0x11b5: file t2.c, line 6. (gdb) b 15 Breakpoint 4 at 0x1201: file t2.c, line 15. (gdb) b 10 if idx = 200 Breakpoint 5 at 0x11db: file t2.c, line 10. (gdb) info b Num Type Disp Enb Address What 3 breakpoint keep y 0x00000000000011b5 in main at t2.c:6 4 breakpoint keep y 0x0000000000001201 in main at t2.c:15 5 breakpoint keep y 0x00000000000011db in main at t2.c:10 stop only if idx = 200 |
[링크 : https://dining-developer.tistory.com/13]
디버깅 시작, 디버깅 제어
run을 통해 시작하고 인자가 필요할땐
(gdb) r 1 2 3
처럼 인자를 공백으로 띄워서 넣어준다.
c는 break 포인트 까지 실행(continue)
print 를 이용하여 변수 값을 출력할수 있다.
r을 눌러 실행하나 main() 함수에서 한번 브레이크 걸리고
c를 눌러 진행하지만 10 라인에 브레이크가 걸려있어 한번 멈추고
c를 눌러 진행하지만 조건부 브레이크에 의해 idx가 200인 경우에 멈춘다.
| (gdb) r Starting program: /home/minimonk/work/src/malloc/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 3, main () at t2.c:6 6 int *arr = NULL; (gdb) c Continuing. Breakpoint 5, main () at t2.c:10 10 arr[idx] = idx; (gdb) c Continuing. Breakpoint 5, main () at t2.c:10 10 arr[idx] = idx; (gdb) print idx $1 = 200 |
next는 한줄 실행 (함수 진입 x)
step은 한줄 실행 (함수 진입)
finish는 함수 종료까지 실행(함수에서 벗어날때 까지)
| gdb attach (0) | 2025.11.11 |
|---|---|
| gdbserver taget (0) | 2023.07.19 |
| gdb conditional break (0) | 2023.07.19 |
| gdb 디버깅 타겟을 인자와 함께 실행하기 (0) | 2022.10.17 |
| gdb break (0) | 2021.04.09 |
비슷한걸 만들어 보려고 하는데 영 안되는데 신기한 옵션을 찾아서 글 써봄
의도적으로 heap을 넘기는 코드를 작성하고 free() 시에 정말 segmentation fault 가 뜨나 해보는데
| $ cat t2.c #include <stdio.h> #include <stdlib.h> void main() { int *arr = NULL; arr = (int*)malloc(10 * sizeof(int)); int idx = 0; for(idx = 0; idx < 10000; idx++) arr[idx] = idx; printf("before\n"); fflush(stdout); free(arr); printf("after\n"); fflush(stdout); } |
아쉽게도 free가 아니라 arr[idx] 에서 범위를 넘어서 에러가 발생함
| $ gcc t2.c -g $ ./a.out malloc(): corrupted top size 중지됨 (코어 덤프됨) |
fsanitize 라는 플래그를 주면 좀더 잡아 준다는데 컴파일 타임이 아니라 런타임에 작동한다.
해당 플래그를 추가하면 빌드된 용량이 증가한다.
| $ gcc t2.c -g -fsanitize=address $ ls -al 합계 40 -rwxrwxr-x 1 minimonk minimonk 23536 1월 16 10:33 a.out -rw-rw-r-- 1 minimonk minimonk 271 1월 16 10:30 t2.c $ gcc t2.c -g $ ls -al 합계 36 -rwxrwxr-x 1 minimonk minimonk 18704 1월 16 10:35 a.out -rw-rw-r-- 1 minimonk minimonk 271 1월 16 10:30 t2.c |
[링크 :https://k0n9.tistory.com/entry/AddressSanitizer]
[링크 : https://stackoverflow.com/questions/58262749/how-to-use-gcc-with-fsanitize-address]
실행해서 터트리면 아래와 같이 먼가 나오는데, 엄청 컬러풀하게 터진다.
눈에 들어오는건 summay 항목의 heap-buffer-overflow
특이한게 배열 loop 돌다 터지는게 아니라 다 돌고 나서 free 가려다가 터진다. 신기하네
| $ gcc t2.c -g -fsanitize=address $ ./a.out ================================================================= ==2713847==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x504000000038 at pc 0x609d568b42e0 bp 0x7ffdaa34e820 sp 0x7ffdaa34e810 WRITE of size 4 at 0x504000000038 thread T0 #0 0x609d568b42df in main /home/minimonk/work/src/malloc/t2.c:9 #1 0x7cc2e8429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #2 0x7cc2e8429e3f in __libc_start_main_impl ../csu/libc-start.c:392 #3 0x609d568b41a4 in _start (/home/minimonk/work/src/malloc/a.out+0x11a4) 0x504000000038 is located 0 bytes to the right of 40-byte region [0x504000000010,0x504000000038) allocated by thread T0 here: #0 0x7cc2e88b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x609d568b4286 in main /home/minimonk/work/src/malloc/t2.c:7 #2 0x7cc2e8429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/minimonk/work/src/malloc/t2.c:9 in main Shadow bytes around the buggy address: 0x0a087fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0a087fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0a087fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0a087fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0a087fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0a087fff8000: fa fa 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa 0x0a087fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0a087fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0a087fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0a087fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0a087fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==2713847==ABORTING ![]() |
idx 값을 보면 10000번 돌았는데
printf 하려고 하면 바로 malloc(): corrupted top size 하면서 터진다.
| $ gdb ./a.out GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./a.out... (gdb) l 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 void main() 5 { 6 int *arr = NULL; 7 arr = (int*)malloc(10 * sizeof(int)); 8 int idx = 0; 9 for(idx = 0; idx < 10000; idx++) 10 arr[idx] = idx; (gdb) l 11 6 int *arr = NULL; 7 arr = (int*)malloc(10 * sizeof(int)); 8 int idx = 0; 9 for(idx = 0; idx < 10000; idx++) 10 arr[idx] = idx; 11 12 printf("before\n"); 13 fflush(stdout); 14 15 free(arr); (gdb) b 12 Breakpoint 1 at 0x1201: file t2.c, line 12. (gdb) r Starting program: /home/minimonk/work/src/malloc/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, main () at t2.c:12 12 printf("before\n"); (gdb) print idx $1 = 10000 (gdb) n malloc(): corrupted top size Program received signal SIGABRT, Aborted. __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737353705280) at ./nptl/pthread_kill.c:44 44 ./nptl/pthread_kill.c: 그런 파일이나 디렉터리가 없습니다. |
그래서 printf / fflush 주석처리하고 free를 바로 브레이크 포인트 잡아서 해도 동일하게
루프 종료되면서 바로 에러가 나는 것 같기도...
| 15 free(arr); (gdb) c Continuing. malloc(): corrupted top size Program received signal SIGABRT, Aborted. __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737353705280) at ./nptl/pthread_kill.c:44 44 ./nptl/pthread_kill.c: 그런 파일이나 디렉터리가 없습니다. (gdb) |
| float 자릿수 제한 (0) | 2025.10.11 |
|---|---|
| free(): invalid next size (normal) (0) | 2023.12.18 |
| c에서 cpp 함수 불러오기 (0) | 2023.01.04 |
| MSB / LSB 변환 (0) | 2022.08.29 |
| kore - c restful api server (1) | 2022.07.07 |