threadx netxduo stm32f407上实现http server

这次用的是CubeIDE + CubeMX

要把NX_APP的mem分配的大一些,在app_azure_rtos.c中,我给的是40*1024,如果给的不够,会导致后面无法分配pool和thread等等

需要用到filex 要在CubeMX里面勾选上,还要用到http_server和dhcp

netxduo/addons/auto_ip at v6.1.11_rel · eclipse-threadx/netxduo · GitHub

选择自己对应版本的即可

在nx_stm32_eth_config.h里添加

#define NX_ETH_CABLE_CONNECTION_CHECK_PERIOD 600

 

 在app_filex.c里删除多余的东西,就保留这样

 app_netxduo.c

/* USER CODE BEGIN Header */
/********************************************************************************* @file    app_netxduo.c* @author  MCD Application Team* @brief   NetXDuo applicative file******************************************************************************* @attention** Copyright (c) 2021 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header *//* Includes ------------------------------------------------------------------*/
#include "app_netxduo.h"
#include "nx_stm32_eth_config.h"
#include "usart.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "tx_api.h"
/* USER CODE END Includes *//* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
extern void fx_stm32_sram_driver(FX_MEDIA *media_ptr);
VOID        nx_stm32_eth_driver(NX_IP_DRIVER *driver_req_ptr);
static VOID App_Main_Thread_Entry(ULONG thread_input);
TX_SEMAPHORE Semaphore;
FX_MEDIA        ram_disk;
UCHAR           ram_disk_memory[32000];
NX_HTTP_SERVER  my_server;
NX_PACKET_POOL  server_pool;
NX_PACKET_POOL tx_pool;
TX_THREAD AppWebServerThread;
TX_THREAD AppMainThread;
TX_THREAD AppLinkThread;
NX_IP             ip_0;
NX_DHCP DHCPClient;
ULONG IpAddress;
ULONG NetMask;
static uint8_t nx_server_pool[SERVER_POOL_SIZE];
uint32_t DataBuffer[512];
void            nx_server_thread_entry(ULONG thread_input);
static VOID ip_address_change_notify_callback(NX_IP *ip_instance, VOID *ptr);
UINT webserver_request_notify_callback(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr);
static VOID ip_address_change_notify_callback(NX_IP *ip_instance, VOID *ptr);
static VOID App_Link_Thread_Entry(ULONG thread_input);
/* USER CODE END PTD *//* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD *//* USER CODE END PD *//* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* App memory pointer. *//* USER CODE END PM *//* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV *//* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP *//* USER CODE END PFP */
/*** @brief  Application NetXDuo Initialization.* @param memory_ptr: memory pointer* @retval int*/UINT MX_NetXDuo_Init(VOID *memory_ptr)
{UCHAR *pointer ;UINT ret = NX_SUCCESS;TX_BYTE_POOL *byte_pool = (TX_BYTE_POOL*)memory_ptr;/* USER CODE BEGIN MX_NetXDuo_MEM_POOL *//* Initialize the NetX system.  */nx_system_initialize();ret = tx_byte_allocate(byte_pool, (VOID **) &pointer, NX_PACKET_POOL_SIZE, TX_NO_WAIT);if (ret != NX_SUCCESS){printf("Packed pool memory allocation failed : 0x%02x\n", ret);Error_Handler();}/* Create a packet pool.  */ret =  nx_packet_pool_create(&tx_pool,"NetX Main txPacket Pool",1536,pointer ,NX_PACKET_POOL_SIZE);if (ret != NX_SUCCESS){printf("Packed creation failed : 0x%02x\n", ret);Error_Handler();}ret = tx_byte_allocate(byte_pool, (VOID **) &pointer, SERVER_POOL_SIZE, TX_NO_WAIT);if (ret != NX_SUCCESS){printf("Packed pool memory allocation failed : 0x%02x\n", ret);Error_Handler();}ret =  nx_packet_pool_create(&server_pool, "HTTP Server Packet Pool", SERVER_PACKET_SIZE,nx_server_pool, SERVER_POOL_SIZE);if (ret != NX_SUCCESS){printf("Server pool creation failed : 0x%02x\n", ret);Error_Handler();}// ip instanceret = tx_byte_allocate(byte_pool, (VOID **) &pointer, 2 * DEFAULT_MEMORY_SIZE, TX_NO_WAIT);if (ret != NX_SUCCESS){printf("NetX IP Instance memory allocation failed : 0x%02x\n", ret);Error_Handler();}/* Create an IP instance.  */ret = nx_ip_create(&ip_0, "NetX IP Instance 0", IP_ADDRESS(192, 168,3, 36), 0xFFFFFF00UL, &tx_pool, nx_stm32_eth_driver,pointer, 2 * DEFAULT_MEMORY_SIZE, DEFAULT_PRIORITY);if (ret != NX_SUCCESS){printf("IP Instance creation failed : 0x%02x\n",ret);Error_Handler();}// arpret = tx_byte_allocate(byte_pool, (VOID **) &pointer, ARP_CACHE_SIZE, TX_NO_WAIT);if (ret != NX_SUCCESS){printf("ARP cache memory allocation failed : 0x%02x\n", ret);Error_Handler();}ret =  nx_arp_enable(&ip_0, (void *) pointer, ARP_CACHE_SIZE);if (ret != NX_SUCCESS){printf("ARP Enable for IP error : 0x%02x\n", ret);Error_Handler();}ret = nx_icmp_enable(&ip_0);if (ret != NX_SUCCESS){printf("ICMP enable for IP error : 0x%02x\n", ret);Error_Handler();}ret =  nx_udp_enable(&ip_0);if (ret != NX_SUCCESS){printf("UDP enable for IP error : 0x%02x\n", ret);Error_Handler();}ret =  nx_tcp_enable(&ip_0);if (ret!=NX_SUCCESS){printf("TCP enable for IP error : 0x%02x\n", ret);Error_Handler();}ret = tx_byte_allocate(byte_pool, (VOID **) &pointer, SERVER_STACK, TX_NO_WAIT);if (ret != NX_SUCCESS){printf("Server stack memory allocation failed : 0x%02x\n", ret);Error_Handler();}ret = nx_http_server_create(&my_server, "My HTTP Server", &ip_0, &ram_disk,pointer, SERVER_STACK, &server_pool, NX_NULL, webserver_request_notify_callback);if (ret != NX_SUCCESS){printf("HTTP WEB Server creation failed: 0x%02x\n", ret);Error_Handler();}// web threadret = tx_byte_allocate(byte_pool, (VOID **) &pointer, 2 * DEFAULT_MEMORY_SIZE, TX_NO_WAIT);if (ret != TX_SUCCESS){printf("Main thread memory allocation failed : 0x%02x\n", ret);Error_Handler();}ret = tx_thread_create(&AppMainThread, "App Main thread", App_Main_Thread_Entry, 0, pointer, 2 * DEFAULT_MEMORY_SIZE,DEFAULT_MAIN_PRIORITY, DEFAULT_MAIN_PRIORITY, TX_NO_TIME_SLICE, TX_AUTO_START);if (ret != TX_SUCCESS){return NX_NOT_ENABLED;}/* Allocate the TCP server thread stack. */ret = tx_byte_allocate(byte_pool, (VOID **) &pointer, 2 * DEFAULT_MEMORY_SIZE, TX_NO_WAIT);/* Check server thread memory allocation. */if (ret != TX_SUCCESS){printf("Server thread memory allocation failed : 0x%02x\n", ret);Error_Handler();}ret = tx_thread_create(&AppWebServerThread, "App Web Server Thread", nx_server_thread_entry, 0, pointer, 2 * DEFAULT_MEMORY_SIZE,DEFAULT_PRIORITY, DEFAULT_PRIORITY, TX_NO_TIME_SLICE, TX_DONT_START);if (ret != TX_SUCCESS){return NX_NOT_ENABLED;}/* Allocate the memory for Link thread   */if (tx_byte_allocate(byte_pool, (VOID **) &pointer,2 *  DEFAULT_MEMORY_SIZE, TX_NO_WAIT) != TX_SUCCESS){return TX_POOL_ERROR;}/* create the Link thread */ret = tx_thread_create(&AppLinkThread, "App Link Thread", App_Link_Thread_Entry, 0, pointer, 2 * DEFAULT_MEMORY_SIZE,LINK_PRIORITY, LINK_PRIORITY, TX_NO_TIME_SLICE, TX_AUTO_START);if (ret != TX_SUCCESS){return NX_NOT_ENABLED;}/* Create the DHCP instance. */ret = nx_dhcp_create(&DHCPClient, &ip_0, "dhcp_client");if (ret != NX_SUCCESS){printf("DHCP Instance creation failed : 0x%02x\n", ret);}ret = nx_ip_address_change_notify(&ip_0, ip_address_change_notify_callback, NULL);if (ret != NX_SUCCESS){Error_Handler();}ret = tx_semaphore_create(&Semaphore, "App Semaphore", 0);if (ret != TX_SUCCESS){printf("Semaphore creation failed : 0x%02x\n", ret);Error_Handler();}
/* USER CODE END MX_NetXDuo_MEM_POOL *//* USER CODE BEGIN MX_NetXDuo_Init *//* USER CODE END MX_NetXDuo_Init */return ret;
}/* USER CODE BEGIN 1 */
void    nx_server_thread_entry(ULONG thread_input)
{UINT  status;tx_thread_sleep(NX_IP_PERIODIC_RATE);NX_PARAMETER_NOT_USED(thread_input);
//	status = fx_media_open(&ram_disk, "STM32_SDIO_DISK", fx_stm32_sram_driver, (VOID *)SRAM2_BASE, DataBuffer, sizeof(DataBuffer));
//	if (status != FX_SUCCESS)
//    {
//	  /*Print Media Opening error. */
//	  printf("FX media opening failed : 0x%02x\n", status);
//	  /* Error, call error handler.*/
//	  Error_Handler();
//    }
//	tx_thread_sleep(NX_IP_PERIODIC_RATE);status = nx_http_server_start(&my_server);if (status != NX_SUCCESS){/* Print HTTP WEB Server starting error. */printf("HTTP WEB Server Starting Failed, error: 0x%02x\n", status);/* Error, call error handler.*/Error_Handler();}tx_thread_sleep(NX_IP_PERIODIC_RATE);}UINT webserver_request_notify_callback(NX_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr)
{CHAR temp_string[30] = {'\0'};CHAR data[512] = {'\0'};UINT string_length;NX_PACKET *resp_packet_ptr;UINT status;NX_PARAMETER_NOT_USED(server_ptr);NX_PARAMETER_NOT_USED(request_type);NX_PARAMETER_NOT_USED(packet_ptr);if (strcmp(resource, "/GetTXData") == 0){/* Let HTTP server know the response has been sent. */sprintf(data, "%lu.%lu.%lu.%lu,%u", (IpAddress >> 24) & 0xff, (IpAddress >> 16) & 0xff, (IpAddress >> 8) & 0xff, IpAddress& 0xff, CONNECTION_PORT);}else{return NX_SUCCESS;}nx_http_server_type_get(server_ptr, server_ptr -> nx_http_server_request_resource, temp_string);temp_string[string_length] = '\0';status = nx_http_server_callback_generate_response_header(server_ptr, &resp_packet_ptr, NX_HTTP_STATUS_OK,strlen(data), temp_string, NX_NULL);status = nx_packet_data_append(resp_packet_ptr, data, strlen(data), server_ptr->nx_http_server_packet_pool_ptr, NX_WAIT_FOREVER);status = nx_http_server_callback_packet_send(server_ptr, resp_packet_ptr);if (status != NX_SUCCESS){nx_packet_release(resp_packet_ptr);return status;}return(NX_HTTP_CALLBACK_COMPLETED);
}static VOID ip_address_change_notify_callback(NX_IP *ip_instance, VOID *ptr)
{/* as soon as the IP address is ready, the semaphore is released to let the web server start */tx_semaphore_put(&Semaphore);
}static VOID App_Main_Thread_Entry(ULONG thread_input)
{UINT ret;ret = nx_ip_address_change_notify(&ip_0, ip_address_change_notify_callback, NULL);if (ret != NX_SUCCESS){Error_Handler();}ret = nx_dhcp_start(&DHCPClient);if (ret != NX_SUCCESS){Error_Handler();}/* wait until an IP address is ready */
//  if(tx_semaphore_get(&Semaphore, TX_WAIT_FOREVER) != TX_SUCCESS)
//  {
//    Error_Handler();
//  }/* get IP address */ret = nx_ip_address_get(&ip_0, &IpAddress, &NetMask);if (ret != TX_SUCCESS){Error_Handler();}/* the network is correctly initialized, start the nx_server_thread_entry */tx_thread_resume(&AppWebServerThread);/* this thread is not needed any more, we relinquish it */tx_thread_relinquish();return;
}static VOID App_Link_Thread_Entry(ULONG thread_input)
{ULONG actual_status;UINT linkdown = 0, status;while(1){/* Get Physical Link stackavailtus. */status = nx_ip_interface_status_check(&ip_0, 0, NX_IP_LINK_ENABLED,&actual_status, 10);if(status == NX_SUCCESS){if(linkdown == 1){linkdown = 0;status = nx_ip_interface_status_check(&ip_0, 0, NX_IP_ADDRESS_RESOLVED,&actual_status, 10);if(status == NX_SUCCESS){/* The network cable is connected again. */printf("The network cable is connected again.\n");/* Print Webserver Client is available again. */printf("Webserver Client is available again.\n");}else{/* The network cable is connected. */printf("The network cable is connected.\n");/* Send command to Enable Nx driver. */nx_ip_driver_direct_command(&ip_0, NX_LINK_ENABLE,&actual_status);/* Restart DHCP Client. */nx_dhcp_stop(&DHCPClient);nx_dhcp_start(&DHCPClient);}}}else{if(0 == linkdown){linkdown = 1;/* The network cable is not connected. */printf("The network cable is not connected.\n");}}tx_thread_sleep(NX_ETH_CABLE_CONNECTION_CHECK_PERIOD);}
}
/* USER CODE END 1 */

app_netxduo.h

/* USER CODE BEGIN Header */
/********************************************************************************* @file    app_netxduo.h* @author  MCD Application Team* @brief   NetXDuo applicative header file******************************************************************************* @attention** Copyright (c) 2020-2021 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __APP_NETXDUO_H__
#define __APP_NETXDUO_H__#ifdef __cplusplus
extern "C" {
#endif/* Includes ------------------------------------------------------------------*/
#include "nx_api.h"/* Private includes ----------------------------------------------------------*/
#include "nx_stm32_eth_driver.h"/* USER CODE BEGIN Includes */
#include "app_filex.h"
#include "tx_thread.h"
#include "main.h"
#include "nxd_http_server.h"
#include "tx_thread.h"
#include "nxd_dhcp_client.h"
/* USER CODE END Includes *//* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
#define DEFAULT_MEMORY_SIZE              1024
#define SERVER_PACKET_SIZE  (NX_HTTP_SERVER_MIN_PACKET_SIZE * 2)
#define NX_PACKET_POOL_SIZE             ((1536 + sizeof(NX_PACKET)) * 8)
#define SERVER_POOL_SIZE                 (SERVER_PACKET_SIZE * 4)
#define ARP_CACHE_SIZE                   1024
#define SERVER_STACK                     4096
#define DEFAULT_MAIN_PRIORITY            10
#define DEFAULT_PRIORITY                 5
#define LINK_PRIORITY                    11
#define CONNECTION_PORT                  80
/* USER CODE END ET *//* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC *//* USER CODE END EC *//* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM *//* USER CODE END EM *//* Exported functions prototypes ---------------------------------------------*/
UINT MX_NetXDuo_Init(VOID *memory_ptr);/* USER CODE BEGIN EFP *//* USER CODE END EFP *//* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN PD *//* USER CODE END PD *//* USER CODE BEGIN 1 */
/* USER CODE END 1 */#ifdef __cplusplus
}
#endif
#endif /* __APP_NETXDUO_H__ */

 

 

 在这里设置导航,我写了一个/GetTXData,让它返回当前IP地址,大家自己实现自己的东西就可以。

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/44646.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

1. InternLM - 入门岛

第1关 Linux 基础知识 1. 完成SSH连接与端口映射并运行hello_world.py SSH连接配置 # wsl2中生成密钥对(~/.ssh/id_rsa, ~/.ssh/id_rsa.pub) ssh-keygen -t rsa# 将id_rsa.pub在internStudio作为公钥导入SSH登录 $ ssh -p 38871 rootssh.intern-ai.o…

汽车免拆诊断案例 | 奥迪 Q7 e-tron无法通过插电式充电器充电

故障现象 车主反映,车辆无法使用自带的插电式充电器充电。(这种充电方法是“Mode 2充电”,3针插头,10 A,2.2 kW) 接车后验证故障,将Type 2充电插头连接到车辆时,充电口锁定销循环三…

3DSC(3D形状上下文特征)

形状上下文(shape context简写为SC)由Serge Belongie等人于2002年首次提出,是一种很流行的二维形状特征描述子,多用于目标识别和形状特征匹配。 2004年,Andrea Frome等人将形状上下文的工作从二维数据迁移到三维数据上提出了3D形状上下文(3DSC) 原理解析 2DSC的算法流程…

Git的基本知识点 + GitBash安装Pacman + Git命令含有中文,终端输出中文乱码

Git的基本知识点:整理自以下作者的文章繁华似锦Fighting的文章https://www.jianshu.com/nb/49854893另外还补充了git ls-file、.gitignore 等内容,涉及具体操作,还有命令总结。简略版可以看以上作者的文章,详细版可以看网盘里面的…

【STM32学习】stm32cubemx基础配置,点亮/闪烁一个LED灯

1、cubemx开始 打开cubemx,在help栏中,点击,选择安装你所需要的stm32芯片版本, 打开后,选择你所配置的芯片型号,如我配置的是stm32f4系列,勾选,点击Install。 安装好后,…

HybridCLR原理中的重点总结

序言 该文章以一个新手的身份,讲一下自己学习的经过,大家更快的学习HrbirdCLR。 我之前的两个Unity项目中,都使用到了热更新功能,而热更新的技术栈都是用的HybridCLR。 第一个项目本身虽然已经集成好了热更逻辑(使用…

Java | Leetcode Java题解之第227题基本计算器II

题目&#xff1a; 题解&#xff1a; class Solution {public int calculate(String s) {Deque<Integer> stack new ArrayDeque<Integer>();char preSign ;int num 0;int n s.length();for (int i 0; i < n; i) {if (Character.isDigit(s.charAt(i))) {num…

Elasticseach学习

概念 是一个开源的分布式搜索引擎&#xff0c;可以应用于搜索、日志监控等 倒排索引 正向索引&#xff1a;基于文档id创建索引。查询词条时必须先找到文档&#xff0c;而后判断是否包含词条 倒排索引&#xff1a;对文档内容分词&#xff0c;对词条创建索引&#xff0c;并记录…

docker-compose mongodb 副本集

准备 cd /opt/mongos 把 3 个节点的数据目录创建好 mkdir -p ./mongos/{mongo1,mongo2,mongo3} mongodb 使用 keyFile 进行认证&#xff0c;副本集群中的每个节点的 mongodb 使用 keyFile 的内容作为认证其他成员的共享密码。mongodb 实例只有拥有正确的 keyFile 才可以加入副…

HCIP课堂笔记

第一章 1、数据转换---目标&#xff1a;抽象语言---二进制---电信号 2、应用程序---接收参数和指令&#xff08;编码&#xff1a;接收传递给计算机指令参数最终转换为二进制&#xff09; 3、二进制---电信号 4、对于整个互联网而言指定了统一的标准——OSI/RM参考模型 &…

GitLab和Git

GitLab保姆级教程 文章目录 GitLab保姆级教程一、GitLab安装二、添加组和用户三、新增项目四、Git上传项目说明五、命令行指引 根据以下说明从计算机中上传现有文件&#xff1a;六、创建与合并分支七、GitLab回滚到特定版本八、数据备份与恢复九、docker中创建gitlab GIT 常用命…

“金山-讯飞”杯2024年武汉理工大学程序设计竞赛 A. Mobiusp败走***(思维题-点双连通分量、连通性)

题目 思路来源 官方题解 题解 手玩发现&#xff0c;能换的话&#xff0c;当且仅当.和1在一个环里&#xff0c;而这就是点双连通分量 所以最优策略是先把.换到(x,y)的位置&#xff0c;然后判断.和1在不在一个环里 也就是&#xff1a; 1. 判断删掉1时&#xff0c;.和(x,y)联…

vue 搭建 pinia

文章目录 环境设置存储读取数据【 storeToRefs】借助storeToRefs将store中的数据转为ref对象&#xff0c;方便在模板中使用【getters】当state中的数据&#xff0c;需要经过处理后再使用时&#xff0c;可以使用getters配置【$subscribe】通过 store 的 $subscribe() 方法侦听 s…

SAP与易链SRM系统集成案例

一、项目环境 重庆润通控股&#xff08;集团&#xff09;有限公司成立于2007年&#xff0c;是一家集合汽柴油动力及终端、摩托车、储能电源、汽车零部件、金融服务等产业的多元化集团公司。现拥有员工超4000人&#xff0c;业务遍布全球80多个国家及地区&#xff0c;2021年营…

文件加密软件谁好用丨2024文件加密软件TOP6推荐

在数字化时代&#xff0c;数据安全已成为企业和个人不可忽视的重要议题。随着数据泄露事件频发&#xff0c;文件加密软件成为了保护敏感信息的首选工具。 本文将为您推荐2024年度最值得信赖的六大文件加密软件&#xff0c;帮助您选择最适合自己需求的加密工具。 1. 域智盾 软…

手机容器化 安装docker

旧手机-基于Termux容器化 1、安装app 在手机上安装Termux或ZeroTermux&#xff08;Termux扩展&#xff09; 1.1 切换源 注&#xff1a;可以将termux进行换源&#xff0c;最好采用国内源&#xff0c;例如&#xff1a;清华源等 更新包列表和升级包&#xff08;可选&#xff0…

数智驱动丨zAIoT 连续落地军工、科研院所和机械制造场景,推动数智化转型升级...

引言 在这个万物互联的时代&#xff0c;科技的进步正以不可阻挡之势&#xff0c;深刻地影响并重塑我们的生产和生活方式。数智化转型升级在各个领域展现出强大的动力&#xff0c;已经成为推动社会向前发展的关键力量。 最近&#xff0c;云和恩墨自主研发的数据智能分析处理平台…

FUSE(用户空间文件系统)命令参数

GPT-4 (OpenAI) FUSE (Filesystem in Userspace)是一个允许创建用户空间文件系统的接口。它提供了一个API&#xff0c;让开发者在未修改内核代码的情况下&#xff0c;通过自己的程序实现文件系统。FUSE 文件系统通常通过 mount 命令来挂载&#xff0c;而且这个命令可以接受各…

时序分解 | Matlab基于ESMD极点对称模态分解

时序分解 | Matlab基于ESMD极点对称模态分解 目录 时序分解 | Matlab基于ESMD极点对称模态分解效果一览基本介绍程序设计参考资料 效果一览 基本介绍 ESMD&#xff08;Extreme-point Symmetric Mode Decomposition&#xff09;是一种信号分解方法&#xff0c;用于提取信号中的模…

【C语言之高级编程】如何将指定变量或函数编译至固定的内存区域中?

如何将指定变量或函数编译至固定的内存区域&#xff1f; 1. 内存类型1.1 bss段&#xff08;Block Started by Symbol&#xff09;1.2 data段&#xff08;data segment&#xff09;1.3 text段&#xff08;code segment/text segment&#xff09;1.4 dec1.5 堆&#xff08;heap&a…