Linux之ARM(MX6U)裸机篇----5.仿stm32的LED驱动实验

一,启动文件


.global _start
.global _bss_start      /* 类似宏定义把__bss_start定义为_bss_start */
_bss_start:.word __bss_start.global _bss_end
_bss_end:.word __bss_end_start:#设置处理器进入SVC模式mrs r0, cpsr        /* 读取cpsr到r0 */bic r0, r0, #0x1f   /* 清除cpsr的bit4-0 */orr r0, r0, #0x13   /* 使用svc模式 */msr cpsr, r0        /* 将r0写入到cpsr */#清除BSS段,全置0ldr r0, _bss_startldr r1, _bss_endmov r2, #0          /* 向r2地址写0 */
bss_loop:stmia r0!, {r2}     /* 把r2寄存器的值写入r0寄存器中,r0再自增4个字节 */cmp r0, r1          /* 比较r0和r1里的值 */ble bss_loop        /* 如果r0地址小于等于r1,跳转到bss_loop中,继续清除bss段 */ldr sp, =0x80200000 /* 设置sp指针起始地址,此处已初始化ddr,若开发板未初始化ddr,则要手动初始化 */b main              /* 跳转到C语言main函数 */

二,  main文件

采用结构体外交base基地址来访问外设

#include "imx6u.h"/* 使能外设时钟 */
void clk_enable(void)
{CCM->CCGR0 = 0xFFFFFFFF;CCM->CCGR1 = 0xFFFFFFFF;CCM->CCGR2 = 0xFFFFFFFF;CCM->CCGR3 = 0xFFFFFFFF;CCM->CCGR4 = 0xFFFFFFFF;CCM->CCGR5 = 0xFFFFFFFF;CCM->CCGR6 = 0xFFFFFFFF;
}void led_init(void)
{IOMUX_SW_MUX->GPIO1_IO03 = 0x5;     /* 复用为GPIO1-IO03 */IOMUX_SW_PAD->GPIO1_IO03 = 0x10B0;  /* 设置GPIO1_IO03电气属性 *//* GPIO初始化 */GPIO1->GDIR = 0x8;                  /* 设置为输出 */GPIO1->DR = 0x0;                    /* 打开LED灯 */
}/* 短延时 */
void delay_short(volatile unsigned int n)
{while(n--){}
}void delay(volatile unsigned int n)
{while(n--){delay_short(0x7ff);}
}/* 打开LED灯 */
void led_on(void)
{GPIO1->DR &= -(1<<3);       /* bit3清零 */
}/* 关闭LED灯 */
void led_off(void)
{GPIO1->DR |= (1<<3)         /* bit3置1 */
}int main(void)
{clk_enable();               /* 使能外设时钟 */led_init();                 /* 初始化LED *//* 设置LED闪烁 */while(1){led_on();delay(500);led_off();delay(500);}return 0;
}#define CCM_BASE					(0X020C4000)
#define CCM_ANALOG_BASE				(0X020C8000)
#define IOMUX_SW_MUX_BASE			(0X020E0014)
#define IOMUX_SW_PAD_BASE			(0X020E0204)
#define GPIO1_BASE                  (0x0209C000)
#define GPIO2_BASE                  (0x020A0000)
#define GPIO3_BASE                  (0x020A4000)
#define GPIO4_BASE                  (0x020A8000)
#define GPIO5_BASE                  (0x020AC000)/* * CCM寄存器结构体定义,分为CCM和CCM_ANALOG */
typedef struct 
{volatile unsigned int CCR;volatile unsigned int CCDR;volatile unsigned int CSR;volatile unsigned int CCSR;volatile unsigned int CACRR;volatile unsigned int CBCDR;volatile unsigned int CBCMR;volatile unsigned int CSCMR1;volatile unsigned int CSCMR2;volatile unsigned int CSCDR1;volatile unsigned int CS1CDR;volatile unsigned int CS2CDR;volatile unsigned int CDCDR;volatile unsigned int CHSCCDR;volatile unsigned int CSCDR2;volatile unsigned int CSCDR3;	volatile unsigned int RESERVED_1[2];volatile unsigned int CDHIPR;  volatile unsigned int RESERVED_2[2];volatile unsigned int CLPCR;volatile unsigned int CISR;volatile unsigned int CIMR;volatile unsigned int CCOSR;volatile unsigned int CGPR;volatile unsigned int CCGR0;volatile unsigned int CCGR1;volatile unsigned int CCGR2;volatile unsigned int CCGR3;volatile unsigned int CCGR4;volatile unsigned int CCGR5;volatile unsigned int CCGR6;volatile unsigned int RESERVED_3[1];volatile unsigned int CMEOR;	
} CCM_Type; typedef struct 
{volatile unsigned int PLL_ARM;volatile unsigned int PLL_ARM_SET;volatile unsigned int PLL_ARM_CLR;volatile unsigned int PLL_ARM_TOG;volatile unsigned int PLL_USB1;volatile unsigned int PLL_USB1_SET;volatile unsigned int PLL_USB1_CLR;volatile unsigned int PLL_USB1_TOG;volatile unsigned int PLL_USB2;volatile unsigned int PLL_USB2_SET;volatile unsigned int PLL_USB2_CLR;volatile unsigned int PLL_USB2_TOG;volatile unsigned int PLL_SYS;volatile unsigned int PLL_SYS_SET;volatile unsigned int PLL_SYS_CLR;volatile unsigned int PLL_SYS_TOG;volatile unsigned int PLL_SYS_SS;volatile unsigned int RESERVED_1[3];volatile unsigned int PLL_SYS_NUM;volatile unsigned int RESERVED_2[3];volatile unsigned int PLL_SYS_DENOM; volatile unsigned int RESERVED_3[3];volatile unsigned int PLL_AUDIO;volatile unsigned int PLL_AUDIO_SET;volatile unsigned int PLL_AUDIO_CLR;volatile unsigned int PLL_AUDIO_TOG;volatile unsigned int PLL_AUDIO_DENOM;volatile unsigned int RESERVED_4[3];volatile unsigned int PLL_VIDEO;volatile unsigned int PLL_VIDEO_SET;volatile unsigned int PLL_VIDEO_CLR;volatile unsigned int PLL_VIDEO_TOG;volatile unsigned int PLL_VIDEO_NUM;volatile unsigned int RESERVED_5[3];volatile unsigned int PLL_VIDEO_DENOM;volatile unsigned int RESERVED_6[7];volatile unsigned int PLL_ENET;volatile unsigned int PLL_ENET_SET;volatile unsigned int PLL_ENET_CLR;volatile unsigned int PLL_ENET_TOG;volatile unsigned int PFD_480;volatile unsigned int PFD_480_SET;volatile unsigned int PFD_480_CLR;volatile unsigned int PFD_480_TOG;volatile unsigned int PFD_528;volatile unsigned int PFD_528_SET;volatile unsigned int PFD_528_CLR;volatile unsigned int PFD_528_TOG;volatile unsigned int RESERVED_7[16];volatile unsigned int MISC0;volatile unsigned int MISC0_SET;volatile unsigned int MISC0_CLR;volatile unsigned int MISC0_TOG;volatile unsigned int MISC1;volatile unsigned int MISC1_SET;volatile unsigned int MISC1_CLR;volatile unsigned int MISC1_TOG;volatile unsigned int MISC2;volatile unsigned int MISC2_SET;volatile unsigned int MISC2_CLR;volatile unsigned int MISC2_TOG;
} CCM_ANALOG_Type; /* * IOMUX寄存器组*/
typedef struct 
{volatile unsigned int BOOT_MODE0;volatile unsigned int BOOT_MODE1;volatile unsigned int SNVS_TAMPER0;volatile unsigned int SNVS_TAMPER1;volatile unsigned int SNVS_TAMPER2;volatile unsigned int SNVS_TAMPER3;volatile unsigned int SNVS_TAMPER4;volatile unsigned int SNVS_TAMPER5;volatile unsigned int SNVS_TAMPER6;volatile unsigned int SNVS_TAMPER7;volatile unsigned int SNVS_TAMPER8;volatile unsigned int SNVS_TAMPER9;volatile unsigned int JTAG_MOD;volatile unsigned int JTAG_TMS;volatile unsigned int JTAG_TDO;volatile unsigned int JTAG_TDI;volatile unsigned int JTAG_TCK;volatile unsigned int JTAG_TRST_B;volatile unsigned int GPIO1_IO00;volatile unsigned int GPIO1_IO01;volatile unsigned int GPIO1_IO02;volatile unsigned int GPIO1_IO03;volatile unsigned int GPIO1_IO04;volatile unsigned int GPIO1_IO05;volatile unsigned int GPIO1_IO06;volatile unsigned int GPIO1_IO07;volatile unsigned int GPIO1_IO08;volatile unsigned int GPIO1_IO09;volatile unsigned int UART1_TX_DATA;volatile unsigned int UART1_RX_DATA;volatile unsigned int UART1_CTS_B;volatile unsigned int UART1_RTS_B;volatile unsigned int UART2_TX_DATA;volatile unsigned int UART2_RX_DATA;volatile unsigned int UART2_CTS_B;volatile unsigned int UART2_RTS_B;volatile unsigned int UART3_TX_DATA;volatile unsigned int UART3_RX_DATA;volatile unsigned int UART3_CTS_B;volatile unsigned int UART3_RTS_B;volatile unsigned int UART4_TX_DATA;volatile unsigned int UART4_RX_DATA;volatile unsigned int UART5_TX_DATA;volatile unsigned int UART5_RX_DATA;volatile unsigned int ENET1_RX_DATA0;volatile unsigned int ENET1_RX_DATA1;volatile unsigned int ENET1_RX_EN;volatile unsigned int ENET1_TX_DATA0;volatile unsigned int ENET1_TX_DATA1;volatile unsigned int ENET1_TX_EN;volatile unsigned int ENET1_TX_CLK;volatile unsigned int ENET1_RX_ER;volatile unsigned int ENET2_RX_DATA0;volatile unsigned int ENET2_RX_DATA1;volatile unsigned int ENET2_RX_EN;volatile unsigned int ENET2_TX_DATA0;volatile unsigned int ENET2_TX_DATA1;volatile unsigned int ENET2_TX_EN;volatile unsigned int ENET2_TX_CLK;volatile unsigned int ENET2_RX_ER;volatile unsigned int LCD_CLK;volatile unsigned int LCD_ENABLE;volatile unsigned int LCD_HSYNC;volatile unsigned int LCD_VSYNC;volatile unsigned int LCD_RESET;volatile unsigned int LCD_DATA00;volatile unsigned int LCD_DATA01;volatile unsigned int LCD_DATA02;volatile unsigned int LCD_DATA03;volatile unsigned int LCD_DATA04;volatile unsigned int LCD_DATA05;volatile unsigned int LCD_DATA06;volatile unsigned int LCD_DATA07;volatile unsigned int LCD_DATA08;volatile unsigned int LCD_DATA09;volatile unsigned int LCD_DATA10;volatile unsigned int LCD_DATA11;volatile unsigned int LCD_DATA12;volatile unsigned int LCD_DATA13;volatile unsigned int LCD_DATA14;volatile unsigned int LCD_DATA15;volatile unsigned int LCD_DATA16;volatile unsigned int LCD_DATA17;volatile unsigned int LCD_DATA18;volatile unsigned int LCD_DATA19;volatile unsigned int LCD_DATA20;volatile unsigned int LCD_DATA21;volatile unsigned int LCD_DATA22;volatile unsigned int LCD_DATA23;volatile unsigned int NAND_RE_B;volatile unsigned int NAND_WE_B;volatile unsigned int NAND_DATA00;volatile unsigned int NAND_DATA01;volatile unsigned int NAND_DATA02;volatile unsigned int NAND_DATA03;volatile unsigned int NAND_DATA04;volatile unsigned int NAND_DATA05;volatile unsigned int NAND_DATA06;volatile unsigned int NAND_DATA07;volatile unsigned int NAND_ALE;volatile unsigned int NAND_WP_B;volatile unsigned int NAND_READY_B;volatile unsigned int NAND_CE0_B;volatile unsigned int NAND_CE1_B;volatile unsigned int NAND_CLE;volatile unsigned int NAND_DQS;volatile unsigned int SD1_CMD;volatile unsigned int SD1_CLK;volatile unsigned int SD1_DATA0;volatile unsigned int SD1_DATA1;volatile unsigned int SD1_DATA2;volatile unsigned int SD1_DATA3;volatile unsigned int CSI_MCLK;volatile unsigned int CSI_PIXCLK;volatile unsigned int CSI_VSYNC;volatile unsigned int CSI_HSYNC;volatile unsigned int CSI_DATA00;volatile unsigned int CSI_DATA01;volatile unsigned int CSI_DATA02;volatile unsigned int CSI_DATA03;volatile unsigned int CSI_DATA04;volatile unsigned int CSI_DATA05;volatile unsigned int CSI_DATA06;volatile unsigned int CSI_DATA07;
}IOMUX_SW_MUX_Type;typedef struct 
{volatile unsigned int DRAM_ADDR00;volatile unsigned int DRAM_ADDR01;volatile unsigned int DRAM_ADDR02;volatile unsigned int DRAM_ADDR03;volatile unsigned int DRAM_ADDR04;volatile unsigned int DRAM_ADDR05;volatile unsigned int DRAM_ADDR06;volatile unsigned int DRAM_ADDR07;volatile unsigned int DRAM_ADDR08;volatile unsigned int DRAM_ADDR09;volatile unsigned int DRAM_ADDR10;volatile unsigned int DRAM_ADDR11;volatile unsigned int DRAM_ADDR12;volatile unsigned int DRAM_ADDR13;volatile unsigned int DRAM_ADDR14;volatile unsigned int DRAM_ADDR15;volatile unsigned int DRAM_DQM0;volatile unsigned int DRAM_DQM1;volatile unsigned int DRAM_RAS_B;volatile unsigned int DRAM_CAS_B;volatile unsigned int DRAM_CS0_B;volatile unsigned int DRAM_CS1_B;volatile unsigned int DRAM_SDWE_B;volatile unsigned int DRAM_ODT0;volatile unsigned int DRAM_ODT1;volatile unsigned int DRAM_SDBA0;volatile unsigned int DRAM_SDBA1;volatile unsigned int DRAM_SDBA2;volatile unsigned int DRAM_SDCKE0;volatile unsigned int DRAM_SDCKE1;volatile unsigned int DRAM_SDCLK0_P;volatile unsigned int DRAM_SDQS0_P;volatile unsigned int DRAM_SDQS1_P;volatile unsigned int DRAM_RESET;volatile unsigned int TEST_MODE;volatile unsigned int POR_B;volatile unsigned int ONOFF;volatile unsigned int SNVS_PMIC_ON_REQ;volatile unsigned int CCM_PMIC_STBY_REQ;volatile unsigned int BOOT_MODE0;volatile unsigned int BOOT_MODE1;volatile unsigned int SNVS_TAMPER0;volatile unsigned int SNVS_TAMPER1;volatile unsigned int SNVS_TAMPER2;volatile unsigned int SNVS_TAMPER3;volatile unsigned int SNVS_TAMPER4;volatile unsigned int SNVS_TAMPER5;volatile unsigned int SNVS_TAMPER6;volatile unsigned int SNVS_TAMPER7;volatile unsigned int SNVS_TAMPER8;volatile unsigned int SNVS_TAMPER9;volatile unsigned int JTAG_MOD;volatile unsigned int JTAG_TMS;volatile unsigned int JTAG_TDO;volatile unsigned int JTAG_TDI;volatile unsigned int JTAG_TCK;volatile unsigned int JTAG_TRST_B;volatile unsigned int GPIO1_IO00;volatile unsigned int GPIO1_IO01;volatile unsigned int GPIO1_IO02;volatile unsigned int GPIO1_IO03;volatile unsigned int GPIO1_IO04;volatile unsigned int GPIO1_IO05;volatile unsigned int GPIO1_IO06;volatile unsigned int GPIO1_IO07;volatile unsigned int GPIO1_IO08;volatile unsigned int GPIO1_IO09;volatile unsigned int UART1_TX_DATA;volatile unsigned int UART1_RX_DATA;volatile unsigned int UART1_CTS_B;volatile unsigned int UART1_RTS_B;volatile unsigned int UART2_TX_DATA;volatile unsigned int UART2_RX_DATA;volatile unsigned int UART2_CTS_B;volatile unsigned int UART2_RTS_B;volatile unsigned int UART3_TX_DATA;volatile unsigned int UART3_RX_DATA;volatile unsigned int UART3_CTS_B;volatile unsigned int UART3_RTS_B;volatile unsigned int UART4_TX_DATA;volatile unsigned int UART4_RX_DATA;volatile unsigned int UART5_TX_DATA;volatile unsigned int UART5_RX_DATA;volatile unsigned int ENET1_RX_DATA0;volatile unsigned int ENET1_RX_DATA1;volatile unsigned int ENET1_RX_EN;volatile unsigned int ENET1_TX_DATA0;volatile unsigned int ENET1_TX_DATA1;volatile unsigned int ENET1_TX_EN;volatile unsigned int ENET1_TX_CLK;volatile unsigned int ENET1_RX_ER;volatile unsigned int ENET2_RX_DATA0;volatile unsigned int ENET2_RX_DATA1;volatile unsigned int ENET2_RX_EN;volatile unsigned int ENET2_TX_DATA0;volatile unsigned int ENET2_TX_DATA1;volatile unsigned int ENET2_TX_EN;volatile unsigned int ENET2_TX_CLK;volatile unsigned int ENET2_RX_ER;volatile unsigned int LCD_CLK;volatile unsigned int LCD_ENABLE;volatile unsigned int LCD_HSYNC;volatile unsigned int LCD_VSYNC;volatile unsigned int LCD_RESET;volatile unsigned int LCD_DATA00;volatile unsigned int LCD_DATA01;volatile unsigned int LCD_DATA02;volatile unsigned int LCD_DATA03;volatile unsigned int LCD_DATA04;volatile unsigned int LCD_DATA05;volatile unsigned int LCD_DATA06;volatile unsigned int LCD_DATA07;volatile unsigned int LCD_DATA08;volatile unsigned int LCD_DATA09;volatile unsigned int LCD_DATA10;volatile unsigned int LCD_DATA11;volatile unsigned int LCD_DATA12;volatile unsigned int LCD_DATA13;volatile unsigned int LCD_DATA14;volatile unsigned int LCD_DATA15;volatile unsigned int LCD_DATA16;volatile unsigned int LCD_DATA17;volatile unsigned int LCD_DATA18;volatile unsigned int LCD_DATA19;volatile unsigned int LCD_DATA20;volatile unsigned int LCD_DATA21;volatile unsigned int LCD_DATA22;volatile unsigned int LCD_DATA23;volatile unsigned int NAND_RE_B;volatile unsigned int NAND_WE_B;volatile unsigned int NAND_DATA00;volatile unsigned int NAND_DATA01;volatile unsigned int NAND_DATA02;volatile unsigned int NAND_DATA03;volatile unsigned int NAND_DATA04;volatile unsigned int NAND_DATA05;volatile unsigned int NAND_DATA06;volatile unsigned int NAND_DATA07;volatile unsigned int NAND_ALE;volatile unsigned int NAND_WP_B;volatile unsigned int NAND_READY_B;volatile unsigned int NAND_CE0_B;volatile unsigned int NAND_CE1_B;volatile unsigned int NAND_CLE;volatile unsigned int NAND_DQS;volatile unsigned int SD1_CMD;volatile unsigned int SD1_CLK;volatile unsigned int SD1_DATA0;volatile unsigned int SD1_DATA1;volatile unsigned int SD1_DATA2;volatile unsigned int SD1_DATA3;volatile unsigned int CSI_MCLK;volatile unsigned int CSI_PIXCLK;volatile unsigned int CSI_VSYNC;volatile unsigned int CSI_HSYNC;volatile unsigned int CSI_DATA00;volatile unsigned int CSI_DATA01;volatile unsigned int CSI_DATA02;volatile unsigned int CSI_DATA03;volatile unsigned int CSI_DATA04;volatile unsigned int CSI_DATA05;volatile unsigned int CSI_DATA06;volatile unsigned int CSI_DATA07;volatile unsigned int GRP_ADDDS;volatile unsigned int GRP_DDRMODE_CTL;volatile unsigned int GRP_B0DS;volatile unsigned int GRP_DDRPK;volatile unsigned int GRP_CTLDS;volatile unsigned int GRP_B1DS;volatile unsigned int GRP_DDRHYS;volatile unsigned int GRP_DDRPKE;volatile unsigned int GRP_DDRMODE;volatile unsigned int GRP_DDR_TYPE;
}IOMUX_SW_PAD_Type;/* * GPIO寄存器结构体*/
typedef struct 
{volatile unsigned int DR;							volatile unsigned int GDIR; 							volatile unsigned int PSR;								volatile unsigned int ICR1; 							volatile unsigned int ICR2; 							 volatile unsigned int IMR;								 volatile unsigned int ISR;			volatile unsigned int EDGE_SEL;  
}GPIO_Type;/* * 外设指针 */
#define CCM					((CCM_Type *)CCM_BASE)
#define CCM_ANALOG			((CCM_ANALOG_Type *)CCM_ANALOG_BASE)
#define IOMUX_SW_MUX		((IOMUX_SW_MUX_Type *)IOMUX_SW_MUX_BASE)
#define IOMUX_SW_PAD		((IOMUX_SW_PAD_Type *)IOMUX_SW_PAD_BASE)
#define GPIO1				((GPIO_Type *)GPIO1_BASE)
#define GPIO2				((GPIO_Type *)GPIO2_BASE)
#define GPIO3				((GPIO_Type *)GPIO3_BASE)
#define GPIO4				((GPIO_Type *)GPIO4_BASE)
#define GPIO5				((GPIO_Type *)GPIO5_BASE)

三,链接脚本文件

链接脚本文件中对地址操作时要进行四字节对齐,很重要

SECTIONS{. = 0X87800000;.text :{obj/start.o *(.text)}.rodata ALIGN(4) : {*(.rodata*)}.data ALIGN(4)   : { *(.data) }. = ALIGN(4);	#把_bass_start的地址四字节对齐,很重要__bss_start = . ;    .bss ALIGN(4)  : { *(.bss)  *(COMMON) }    __bss_end = . ;
}

四,makefile文件

objs    := start.o main.o
ld  	:= arm-linux-gnueabihf-ld
gcc  	:= arm-linux-gnueabihf-gcc
objcopy := arm-linux-gnueabihf-objcopy
objdump := arm-linux-gnueabihf-objdumpledc.bin : $(objs)$(ld)  -Timx6u.lds -o ledc.elf $^$(objcopy) -O binary -S ledc.elf $@$(objdump) -D -m arm ledc.elf > ledc.dis%.0 : %.c$(gcc) -Wall -nostdlib -c -O2 -o $@ $<
%.0 : %.s$(gcc) -Wall -nostdlib -c -O2 -o $@ $<clean:rm -rf *.o ledc.bin ledc.elf ledc.dis

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

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

相关文章

直观解读 JuiceFS 的数据和元数据设计(一)

大家读完觉得有意义和帮助记得关注和点赞&#xff01;&#xff01;&#xff01; 1 JuiceFS 高层架构与组件2 搭建极简 JuiceFS 集群 2.1 搭建元数据集群2.2 搭建对象存储&#xff08;MinIO&#xff09; 2.2.1 启动 MinIO server2.2.2 创建 bucket2.3 下载 juicefs 客户端2.4 创…

分布式微服务项目___某污水处理项目

一.分布式微服务项目___污水处理项目 项目地址:https://gitee.com/yanyigege/collaborative-water-springboot.git ​ 1.项目背景 总公司在全国各地有处理污水的项目部,各项目部处理自己的污水,总部需要监控各地分项目部每天处理污水的原料用量,掌握各分部的污水处理情况 ​…

鸿蒙HarmonyOS开发:拨打电话、短信服务、网络搜索、蜂窝数据、SIM卡管理、observer订阅管理

文章目录 一、call模块&#xff08;拨打电话&#xff09;1、使用makeCall拨打电话2、获取当前通话状态3、判断是否存在通话4、检查当前设备是否具备语音通话能力 二、sms模块&#xff08;短信服务&#xff09;1、创建短信2、发送短信 三、radio模块&#xff08;网络搜索&#x…

TVS二极管选型【EMC】

TVS器件并联在电路中&#xff0c;当电路正常工作时&#xff0c;他处于截止状态&#xff08;高阻态&#xff09;&#xff0c;不影响线路正常工作&#xff0c;当线路处于异常过压并达到其击穿电压时&#xff0c;他迅速由高阻态变为低阻态&#xff0c;给瞬间电流提供一个低阻抗导通…

sqlalchemy-access库操作MS Access

因目前项目中数据处理的量稍大&#xff0c;为了方便和业务进行交互&#xff0c;对数据的加工和处理放到微软桌面数据库MS Access中。然后有些地方通过 Python 来操作 MS Access 数据库&#xff0c;用到 sqlalchemy-access库。本文对操作的要点做简单的描述。 之前写过一篇 Pyt…

UnityRenderStreaming使用记录(三)

测试UnityRenderStreaming在Ubuntu24.04.1LTS上的表现 先放上运行图操作系统 Ubuntu24.04.1LTSUnity测试工程环境相关修改遇到的问题 先放上运行图 操作系统 Ubuntu24.04.1LTS 系统下载地址 https://cn.ubuntu.com/download/desktop安装UnityHub https://blog.csdn.net/AWNUXC…

==和===的区别,被坑的一天

在 JavaScript 中&#xff0c; 和 都用于比较两个值&#xff0c;但它们有一个重要的区别&#xff1a; 1. (宽松相等运算符) 进行比较时&#xff0c;会 自动类型转换&#xff08;也叫做强制类型转换&#xff09;&#xff0c;即如果比较的两个值的类型不同&#xff0c;JavaScr…

Git的使用流程(详细教程)

目录 01.Git是什么&#xff1f; 1.1 Git简介 1.2 SVN与Git的最主要的区别 1.3 GIt主要特点 02.Git是干什么的&#xff1f; 2.1.Git概念汇总 2.2 工作区/暂存区/仓库 2.3 Git使用流程 03.Git的安装配置 3.1 Git的配置文件 3.2 配置-初始化用户 3.3 Git可视化…

使用Docker部署最新版JupyterHub

拉取镜像 docker pull jupyterhub/jupyterhub:latest启动镜像 docker run -d -p 8000:8000 --name jupyterhub jupyterhub/jupyterhub:latest jupyterhub进入容器 docker exec -it jupyterhub bash生成jupyterhub的配置文件 jupyterhub --generate-config# 有需要可以安装中…

liunx下载gitlab

1.地址&#xff1a; https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ 安装 postfix 并启动 yum install postfix systemctl start postfix systemctl enable postfix ssh服务启动 systemctl enable sshd systemctl start sshd开放 ssh 以及 http 服务&#xff0c…

【AI大模型】深入GPT-2模型细节:揭秘其卓越性能的秘密

目录 &#x1f354; GPT2的架构 &#x1f354; GPT2模型的细节 2.1 模型过程 2.2 GPT2工作细节探究 &#x1f354; 小结 学习目标 掌握GPT2的架构掌握GPT2的训练任务和模型细节 &#x1f354; GPT2的架构 从模型架构上看, GPT2并没有特别新颖的架构, 它和只带有解码器模块…

oceanbase集群访问异常问题处理

1.报错现象 2.问题排查 检查obproxy状态发现为不可用状态 重启obproxy 依次重启Obproxy集群 观察任务状态 重启完成 Obproxy状态正常 3.验证登录 登录成功

Echarts+vue电商平台数据可视化——webSocket改造项目

websocket的基本使用&#xff0c;用于测试前端能否正常获取到后台数据 后台代码编写&#xff1a; const path require("path"); const fileUtils require("../utils/file_utils"); const WebSocket require("ws"); // 创建WebSocket服务端的…

【数据结构】双向循环链表的使用

双向循环链表的使用 1.双向循环链表节点设计2.初始化双向循环链表-->定义结构体变量 创建头节点&#xff08;1&#xff09;示例代码&#xff1a;&#xff08;2&#xff09;图示 3.双向循环链表节点头插&#xff08;1&#xff09;示例代码&#xff1a;&#xff08;2&#xff…

【深度学习】卷积网络代码实战ResNet

ResNet (Residual Network) 是由微软研究院的何凯明等人在2015年提出的一种深度卷积神经网络结构。ResNet的设计目标是解决深层网络训练中的梯度消失和梯度爆炸问题&#xff0c;进一步提高网络的表现。下面是一个ResNet模型实现&#xff0c;使用PyTorch框架来展示如何实现基本的…

【51项目】51单片机自制小霸王游戏机

视频演示效果&#xff1a; 纳新作品——小霸王游戏机 目录&#xff1a; 目录 视频演示效果&#xff1a; 目录&#xff1a; 前言&#xff1a; 一、连接方式&#xff1a; 1.1 控制引脚 1.2. 显示模块 1.3. 定时器 1.4. 游戏逻辑与硬件结合 1.5. 中断处理 二、源码分析&#xff1a…

2024/12/29 黄冈师范学院计算机学院网络工程《路由期末复习作业一》

一、选择题 1.某公司为其一些远程小站点预留了网段 172.29.100.0/26&#xff0c;每一个站点有10个IP设备接到网络&#xff0c;下面那个VLSM掩码能够为该需求提供最小数量的主机数目 &#xff08; &#xff09; A./27 B./28 C./29 D./30 -首先审题我们需要搞清楚站点与网…

【OpenCV】使用Python和OpenCV实现火焰检测

1、 项目源码和结构&#xff08;转&#xff09; https://github.com/mushfiq1998/fire-detection-python-opencv 2、 运行环境 # 安装playsound&#xff1a;用于播放报警声音 pip install playsound # 安装opencv-python&#xff1a;cv2用于图像和视频处理&#xff0c;特别是…

Vue2: table加载树形数据的踩坑记录

table中需要加载树形数据,如图: 官网给了两个例子,且每个例子中的tree-props都是这么写的: :tree-props="{children: children, hasChildren: hasChildren}" 给我一种错觉,以为数据结构中要同时指定children和hasChildren字段,然而,在非懒加载模式下,数据结…

深度学习模型预测值集中在某一个值

深度学习模型&#xff0c;训练过程中&#xff0c;经常遇到预测的结果集中在某个值&#xff0c;而且在学习的过程中会变&#xff0c;样例如下。 主要有如下解决方案 1、更换relu ->tanh 或者其他激活函数 2、更改随机种子&#xff0c;估计是没有初始化好&#xff0c;或者调…