Blog post video excerpt

Deep understanding of the network stack

https://blog.csdn.net/qq_24313621/article/details/131757225

There will be problems when accessing Baidu directly with IP

https://mp.weixin.qq.com/s/EeMcK1pTeCXVShX7kjZ53w

The network debugging assistant directly connects to Alibaba Cloud (MQTT)

https://www.bilibili.com/read/cv12045128

FreeRTOS implements mqtt client

Product implementation of mqtt protocol-FreeRTOS implements mqtt client

[Original] Build MQTT terminal device based on FreeRTOS

Porting MQTT on FreeRTOS

Solve the DEBUG when FreeRTOS transplants MQTT

Four ways to operate UART at the application layer under Linux (polling/interrupt/signal/thread)

https://mp.weixin.qq.com/s/3OADFTBQb0Bt0CH42NEf1Q

10 Common Memory-Related Mistakes in C Programs

https://mp.weixin.qq.com/s/zMJZa2mkagzcrGvLBdaYKQ

[Network Principles] How does the TCP protocol achieve reliable transmission (post-packet processing)

https://blog.csdn.net/weixin_64916311/article/details/131151053

python tutorial

python3——https://www.runoob.com/python3/python3-tutorial.html

python2——https://www.runoob.com/python/python-tutorial.htmlOn
the basis of C language, quickly learn python (C language to python) (python3)

send_data = [0xA4,0x03,0x08,0x23,0xD2] #Serial port packet to be sent

Pyhon: Serial port application and data analysis process
python + embedded - serial port communication (sending, receiving and unpacking)

python function pointer

Defining (declaring) structures in Python

UML sequence diagram drawing

https://blog.csdn.net/Edraw_Max/article/details/115396739

visio draws timing diagram

Python session and cookie use

https://blog.csdn.net/weiyi47/article/details/131643458

MQTT automatic reconnection best practice

https://mp.weixin.qq.com/s/IcIYg3E8CLNi9AojvOFlnA

pthread_cancel function: avoid pitfalls

Thread thread learning (3) Understand the pthread_cancel() function in Linux threads

Linux threads (3) - pthread_cancel() cancels a thread

pthread_cancel function: avoid pitfalls

A segfault occurs in a linux thread, how to let the whole process exit, pthread_cancel, pthread_killall Segmentation fault
The thread variable is a global variable and should be automatically initialized to zero. In other words, pthread_cancel(0) will cause a segfault

Use pthread_cancel to terminate the thread's pit filling process

Segfault caused by pthread_create

Thread cancellation (pthread_cancel)
If the thread is in an infinite loop and there is no necessary path to the cancellation point in the loop body, the thread cannot be terminated by the cancellation request of other external threads. Therefore, the pthread_testcancel() call should be added to the necessary path of such a loop body.
The cleanup work of thread termination calls functions in pairs:
void pthread_cleanup_push(void (*routine) (void *), void *arg)
void pthread_cleanup_pop(int execute)

Thread cancellation and cleanup
If there is no cancellation point, manually set one: void pthread_testcancel(void);
When the thread terminates abnormally, some resources need to be cleaned up.
void pthread_cleanup_push(void (*routine) (void *), void *arg)
void pthread_cleanup_pop(int execute)
give two examples:
1. Canceled by pthread_cancel
2. Execute pthread_exit

The thread exit function pthread_cancel() is pitted.
Blog comment: Is there any way to kill it directly instead of waiting for the execution to the system call? Use
the function pthread_setcanceltype to set the cancellation method

The thread terminates normally pthread_exit, pthread_join, pthread_kill, pthread_cancel, sigwait, sigaddset

Understand function calls and memory release in C:
malloc dynamically allocates memory, and it will not be released after the function call ends
. Research on Malloc memory leaks and memory out-of-bounds issues: there
are many reasons for memory leaks, whether there is malloc, the memory is not free, and whether the file is opened or not. For close, the socket has been created and sem is waiting for it to be released.
Detailed explanation and experiment of pthread_join():
In blocking state, thread A will continue to execute until thread B ends.
Its memory space will also be released (if the called thread is non-detached), and the released memory space is only the system space. , you must manually clear the space allocated by the program, such as the space allocated by malloc()

Distinguish between different grounding methods: power ground, logic ground, digital ground, analog ground, etc.

https://blog.csdn.net/qq_32515081/article/details/117195708

C language - dynamic memory functions (malloc, calloc, realloc, free)

https://blog.csdn.net/plj521/article/details/132264625

Espressif environment construction video

Command line installation: Download the one-click installation tool offline package from Espressif's official website (about 1G in size, including all components required for compilation, very convenient), check all options before installation (supports all Espressif's chip types and drivers), and keep clicking Agree (the computer environment will be checked during the process, and if a repair needs to be applied, click Apply Repair). When the esp-idf cmd terminal displays idf.py build, the installation is successful, as shown below.

Note: To install the same version as other development partners, we install version 4.4.3, otherwise the compilation will prompt errors such as mismatch with the official library data type and no corresponding header file.

Insert image description here

Usage: For the first time, compile it in the esp-idf cmd terminal and execute the command code. Jump to vscode to open the code (graphical IDE, which means that the command line installation can also bring up the graphic IDE function), select the serial port number, and automatically Jump out of the project path, click once, and click on the small flame below to compile, burn, and monitor.

idf.py set-target esp32s3		// 切换芯片环境,视频讲要到example路径下切换
idf.py menuconfig				// 图形化配置
idf.py build					// 编译,生成的bin文件在build文件夹
idf.py flash -p COM86			// 烧录
idf.py monitor -p COM86			// 监测
idf.py flash monitor -p COM86	// 一键烧录、监测
ctrl + ]						// 退出


code .							//调出vscode图形IDE  根目录下输入,这样能打开所有代码  最好到具体的项目下打开,这样才能正常使用图形IDE
ctrl+shift+p  					//vscode调出命令行
	>ESP-IDF: new project 		//通过命令行创建项目
	>>ESP-IDF:add vscode configuration folder//生成.vscode,里面c_cpp_properties.json给出所有头文件路径(解决在其他路径下创建工程找不到头文件的问题)
menuconfig						//点击vscode底部小齿轮,设置参数最终保存到sdkconfig文件里,比如修改wifi账号密码
								//直接改sdkconfig文件不行,执行build会覆盖掉。可以把配置信息拷贝到下面的sdkconfig.default文件里,比如wifi账号密码,这样开机就默认使用这里的配置

https://www.bilibili.com/video/BV1Mv4y1U7x9/?spm_id_from=333.788&vd_source=cc0e43b449de7e8663ca1f89dd5fea7d

https://www.bilibili.com/video/BV1ah4y177mR/?spm_id_from=333.788.recommend_more_video.18&vd_source=cc0e43b449de7e8663ca1f89dd5fea7d

https://www.bilibili.com/video/BV1V24y1T75n/?spm_id_from=333.788&vd_source=cc0e43b449de7e8663ca1f89dd5fea7d

Guess you like

Origin blog.csdn.net/zhuguanlin121/article/details/131273790