VxWorks系统BSP配置文件及生成下载

%A VxWorks BSP主要配置文件 config.h , Makefile 注解和 BSP生成下载实例。
%A
%A 相关内容可参考 VxWorks BSP和启动过程
%A
%A config.h文件配置
%A
%A /*
%A This file contains the configuration parameters for the CPU evaluation board.
%A */
%A
%A #ifndef INCconfigh
%A #define INCconfigh
%A
%A /* BSP version/revision identification, before configAll.h */
%A #define BSP_VER_1_2 1
%A #define BSP_VER_1_1 1
%A #define BSP_VERSION "1.2" /* A Tornado 2.0 BSP */
%A #define BSP_REV "/3" /* 0 for first revision */
%A
%A #include "configAll.h"        /* 这个文件定义了VxWorks所有的缺省设置 */
%A
%A
%A /*
%A * Define ONE of the following to specify the revision of the PPC405GP chip
%A * you are using. Undefine all others. sysModel() will return
%A * "Unknown processor" if the correct selection is not made.
%A */
%A
%A /*
%A * Default boot line
%A */
%A
%A /*
%A
%A 解释: 这一行对配置网络,连通Target Server及下载调试程序非常重要
%A
%A DEFAULT_BOOT_LINE 的原意是为没有NVRAM的target设计的,这样用户就不需要在每次系统启动是手工输入这些参数了.
%A
%A 系统启动网络时xxxEndLoad()会解释这一行并按这一行的定义进行加载.
%A
%A Emac(0,0) : 启动设备,可是是软盘,硬盘,PCMCIA卡等 其他的设备名称如:
%A
%A fd为软盘,(0,0)表示第一个软驱,3.5寸盘.
%A dc则表示从DEC 21x4x 芯片启动,即系统有NVRAM存在,这种方式现在已不采用.
%A elpci表示启动设备为3COM EtherLink XL PCI网卡.
%A fei:Intel 82559 EtherExpress网卡.
%A ene: NE2000网卡
%A ELT: 3COM以太网卡
%A EEX: Intel网卡
%A ata: ATA/IDE 硬盘 ............
%A
%A 405GP: 主机名
%A vXworks 从主机加载的VxWorks文件
%A h=172.16.1.159   主机的IP地址    
%A
%A e=172.16.254.52 目标机的IP地址,若网络启动Target Server时,这个IP必须和主机上Target Server配置的Target IP地址一致,且设置Back End选项为wdbrpc
%A u=xxx  用户名,pw=xxx  密码: 若通过网络加载调试时,主机的Ftp服务器和目标机的用户名和密码必须相同
%A tn=vxTarget 目标机名称
%A
%A */
%A
%A #define DEFAULT_BOOT_LINE \
%A         "Emac(0,0)405GP:vxWorks h=172.16.1.159 e=172.16.254.52 \
%A                 u=xxx pw=xxx tn=vxTarget"
%A
%A /*
%A * 内存设置.
%A * 如果定义了LOCAL_MEM_AUTOSIZE则SDRAM的大小会在Boot时指定
%A */
%A
%A #undef LOCAL_MEM_AUTOSIZE                    /* 运行时内存大小 */
%A #define LOCAL_MEM_SIZE 0x02000000            /* 32MB 内存缺省 */
%A #define LOCAL_MEM_LOCAL_ADRS 0x00000000     /* 内存基地址为 0 */
%A #define USER_RESERVED_MEM 0                  /* see sysMemTop() */
%A
%A /*
%A * Define SDRAM_ECC_ENABLE to enable ECC if an ECC SDRAM DIMM is detected
%A * during SDRAM auto-configuration. If not defined, ECC will not be enabled
%A * if an ECC SDRAM DIMM is detected, and the DIMM will be used as a normal DIMM.
%A */
%A
%A #undef SDRAM_ECC_ENABLE
%A
%A
%A
%A /* 解释: 这里主要设置系统的内存分配定义,若分配不当,则系统不能正常加载和运行.
%A
%A ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, 和RAM_LOW_ADRS 在config.h和Makefile文件中都要定义,且必须要保持一致,这些地址的定义一定要参照VxWorks 加载执行过程,硬件手册,MMU和VxWorks的大小进行.主要原则是保证VxWorks image 在ROM和RAM中都要有一定的运行空间且高效运行,可参见 VxWorks BSP和启动过程.
%A
%A */
%A #define ROM_BASE_ADRS 0xfff80000                  /* ROM的基地址 */
%A #define ROM_TEXT_ADRS (ROM_BASE_ADRS + 0x100)    /* 程序指针和堆栈指针 */
%A #define ROM_WARM_ADRS (ROM_TEXT_ADRS+0x0004)     /* 热启动入口地址 */
%A #define ROM_SIZE 0x0007f000                       /* ROM大小 512KB */
%A #define RAM_LOW_ADRS 0x00010000                   /* RAM 低地址运行 vxWorks */
%A #define RAM_HIGH_ADRS 0x00C00000                  /* RAM 高地址存储 bootrom */
%A #define USER_RESERVED_MEM 0                       /* 用户保留地址 */
%A
%A
%A /*
%A * Cache options    定义缓存
%A */
%A
%A #define INCLUDE_CACHE_SUPPORT
%A
%A #define USER_D_CACHE_ENABLE
%A #define USER_I_CACHE_ENABLE
%A #undef USER_D_CACHE_MODE
%A #define USER_D_CACHE_MODE (CACHE_COPYBACK)
%A
%A
%A /*
%A * 405 timers (PIT, FIT, WDT) 可由外部时钟驱动或者CPU驱动
%A */
%A
%A #define TIMER_CLOCK_EXTERNAL
%A
%A /*
%A * Optional timestamp support
%A */
%A
%A #undef INCLUDE_TIMESTAMP
%A
%A /*
%A * Auxilliary Timer rates    定义辅助计时器频率
%A */
%A
%A #ifdef TIMER_CLOCK_EXTERNAL
%A #define AUX_CLK_RATE_MIN (EXT_TIMER_CLK_FREQ / (1 << 21) )
%A #define AUX_CLK_RATE_MAX (EXT_TIMER_CLK_FREQ / (1 << 9) )
%A #define AUX_CLK_RATE_DEFAULT (EXT_TIMER_CLK_FREQ / (1 << 17) )
%A #else
%A
%A /* ZZZZZZZZZZZ todo put rates in for system clock derived timer clock */
%A
%A #endif
%A
%A /*
%A * Watchdog Timer rates    
%A */
%A
%A #define WDT_RATE_MIN 1 /* minimum watchdog timer rate */
%A #define WDT_RATE_MAX 5000 /* maximum watchdog timer rate */
%A
%A /* 实时时钟设置 */
%A
%A #define INCLUDE_RTC
%A
%A /* 去除不需要的网络驱动 */
%A
%A #undef INCLUDE_EI
%A #undef INCLUDE_EX
%A #undef INCLUDE_ENP
%A #undef INCLUDE_LN
%A #undef INCLUDE_SM_NET
%A #undef INCLUDE_SM_SEQ_ADDR
%A
%A
%A /* #define for software floating point support */
%A
%A #undef INCLUDE_SW_FP
%A
%A /* 定义串口 Serial port configuration */
%A
%A #define INCLUDE_SERIAL
%A
%A
%A /* PCI 设置,PCI configuration */
%A
%A #define INCLUDE_PCI
%A
%A #ifdef INCLUDE_PCI
%A /*
%A * Three programmable processor local memory address to PCI memory address
%A * mappings. If a region is enabled, PMMx_LOCAL_ADRS must be between
%A * PCI_MEMORY_START and PCI_MEMORY_END. If PMMx_PCI_HIGH_ADRS is non-zero in
%A * an enabled region, 64 bit dual cycle addresses will be generated on the
%A * PCI bus for this region.
%A */
%A
%A //定义PCI设备的初始化地址 参见 PCI设备(网卡)初始化代码分析
%A
%A
%A # define PMM0_LOCAL_ADRS PCI_MEMORY_START      // 定义PCI空间起始地址
%A # define PMM0_PCI_LOW_ADRS 0x80000000           // 定义PCI空间低位地址
%A # define PMM0_PCI_HIGH_ADRS 0x00000000         // 定义PCI空间高位地址
%A # define PMM0_PCI_MASK_ATTRIB (PMM_MASK_512MB | PMM_ENABLE)
%A
%A # define PMM1_LOCAL_ADRS PMM_UNUSED
%A # define PMM1_PCI_LOW_ADRS PMM_UNUSED
%A # define PMM1_PCI_HIGH_ADRS PMM_UNUSED
%A # define PMM1_PCI_MASK_ATTRIB PMM_UNUSED
%A
%A # define PMM2_LOCAL_ADRS PMM_UNUSED
%A # define PMM2_PCI_LOW_ADRS PMM_UNUSED
%A # define PMM2_PCI_HIGH_ADRS PMM_UNUSED
%A # define PMM2_PCI_MASK_ATTRIB PMM_UNUSED
%A
%A /*
%A * PCI memory address to processor local memory address mapping. If a region
%A * is enabled, PTMx_LOCAL_ADRS must be within the two Local memory / peripheral
%A * regions (0x00000000-0x7FFFFFFF, or 0F0000000-0xFFFFFFFF)
%A */
%A # define PTM1_LOCAL_ADRS LOCAL_MEM_LOCAL_ADRS
%A # define PTM1_SIZE_ATTRIB PTM_SIZE_2GB | PTM_ENABLE
%A
%A # define PTM2_LOCAL_ADRS PTM_UNUSED
%A # define PTM2_SIZE_ATTRIB PTM_UNUSED
%A
%A #endif /* INCLUDE_PCI */
%A
%A /*
%A * 如果支持网络,本地EMAC和PCI网卡,必须有一个被选取,两者都是END形式驱动
%A */
%A #define INCLUDE_NETWORK             /* 支持网络 */
%A #define INCLUDE_EMAC_NETWORK       /* 405GP 本地 EMAC 网络 */
%A #undef INCLUDE_PCI_NETWORK         /* PCI 网络 */
%A
%A /*
%A * The board does not have the Ethernet MAC address of the EMAC stored
%A * in any sort of NVRAM. Modify the 12 digit string below to match the decal
%A * that is on your board.
%A */
%A
%A #ifdef INCLUDE_EMAC_NETWORK
%A     #define DEFAULT_EMAC_HW_ADDR "xxxxxxxxxxxx"         /* 网络硬件地址,即MAC地址 */
%A #endif
%A
%A /*
%A * WDB 通过网络Enhanced Network Driver加载调试程序,若网络加载调试,必须定义此项
%A */
%A
%A
%A #define WDB_COMM_TYPE WDB_COMM_SERIAL /*首先默认使用串口通信*/
%A #define WDB_TTY_CHANNEL 0 /*使用第一个串口
%A
%A
%A #ifdef INCLUDE_NETWORK
%A     #define INCLUDE_END
%A     #undef WDB_COMM_TYPE
%A     #define WDB_COMM_TYPE WDB_COMM_END      /* 定义网络通信, END 驱动 */
%A #else
%A     #undef WDB_COMM_TYPE
%A     #define WDB_COMM_TYPE     WDB_COMM_SERIAL /* 定义串口通信,和PC机串口连接 */
%A     #undef WDB_TTY_CHANNEL
%A     #define WDB_TTY_CHANNEL 0                        /* 串口1 */
%A #endif /* INCLUDE_NETWORK */
%A
%A /*************** 此处定义一些杂项 */
%A
%A #ifdef NUM_TTY
%A #undef NUM_TTY
%A #endif
%A #define NUM_TTY 2             /* 定义了两个串口终端,*/
%A
%A
%A #ifdef WDB_TTY_BAUD
%A #undef WDB_TTY_BAUD
%A #endif
%A #define WDB_TTY_BAUD 57600 /* 波特率设置 9600, 19200, 38400, 57600, 115200 */
%A
%A #ifdef CONSOLE_BAUD_RATE
%A #undef CONSOLE_BAUD_RATE
%A #endif
%A #define CONSOLE_BAUD_RATE 57600
%A
%A
%A #undef INCLUDE_ENV_VARS /* unix compatable environment variables */
%A #undef INCLUDE_TIMEX /* timexLib for exec timing */
%A #undef INCLUDE_HW_FP
%A #undef INCLUDE_TFTP_CLIENT /* used by autoboot from ftp server*/
%A
%A #define INCLUDE_SW_FP
%A #define INCLUDE_ELF
%A #define INCLUDE_NET_SHOW
%A #define INCLUDE_PING
%A #undef INCLUDE_DEMO /* only for vxWorks bsp test */
%A #define ETHERNET_ADR_SET /* only for bootrom used */
%A #define INCLUDE_USER_APPL /* Startup the user‘‘s application in dos makefile project */
%A #undef PCIDEBUG
%A
%A #ifdef INCLUDE_USER_APPL
%A #define USER_APPL_INIT _appEntry()
%A #endif
%A
%A #endif /* INCconfigh */
%A #if defined(PRJ_BUILD)
%A #include "prjParams.h"
%A #endif
%A
%A
%A
%A
%A Makefile文件配置
%A
%A
%A
%A # Makefile - make rules for board
%A #
%A #*/
%A
%A CPU = PPC40x
%A TOOL = gnu
%A
%A TGT_DIR=$(WIND_BASE)/target
%A include $(TGT_DIR)/h/make/defs.bsp
%A include $(TGT_DIR)/h/make/make.$(CPU)$(TOOL)
%A include $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
%A
%A ## Only redefine make definitions below this point, or your definitions will
%A ## be overwritten by the makefile stubs above.
%A
%A
%A TARGET_DIR = xxx
%A VENDOR = IBM
%A BOARD = xxx
%A
%A RELEASE = vxWorks vxWorks.st bootrom_uncmp.hex
%A
%A USR_ENTRY = usrInit
%A
%A
%A # ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, 和RAM_LOW_ADRS 在config.h,Makefile和Makefile.*文件中 # 都要定义,且必须要保持一致,
%A
%A
%A ROM_TEXT_ADRS = fff80100                 # ROM 起始地址
%A ROM_SIZE = 0007f000                      # ROM 空间大小
%A
%A RAM_LOW_ADRS = 00010000                  # RAM 低地址 vxWorks */
%A RAM_HIGH_ADRS = 00C00000                 # RAM 高地址存储 bootrom */
%A
%A HEX_FLAGS = -a 100
%A
%A #ADDED_CFLAGS = -gdwarf -O0 # for debug
%A
%A MACH_EXTRA = appentry.o                # 注意:这里加载用户的程序模块,程序调用在usrRoot()
%A
%A BOOTCONFIG = bootconfig.c               # bsp bootconfig.c for bootrom
%A
%A
%A ## Only redefine make definitions above this point, or the expansion of
%A ## makefile target dependencies may be incorrect.
%A
%A include $(TGT_DIR)/h/make/rules.bsp
%A include $(TGT_DIR)/h/make/rules.$(WIND_HOST_TYPE)
%A
%A
%A   Tornado for x86下BSP的生成,下载和Target Server的配置实例,Pentium主机,3Com网卡,软盘引导,ftp下载VxWorks映像。
%A
%A      1.在C:\Tornado\target\config\pcPentium目录下修改BSP文件config.h。
%A
%A
%A #elif (CPU_VARIANT == PENTIUM)
%A #define DEFAULT_BOOT_LINE
%A "elt(0,0)HOST:c:\\Tornado\\target\\config\\pcPentium\\vxWorks
%A h=90.0.0.3 e=90.0.0.50 u=target pw=target tn=target"
%A
%A #define INCLUDE_ELT //3Com网卡
%A #define INCLUDE_END //END驱动
%A
%A
%A 2.打开Tornado选择新建一个bootable vxworks image,选择建 A BSP,选择
%A   pcPentium,建完后编译就可以在相应的目录下生成vxworks的映像文件。
%A
%A 3.制作bootrom;选择Build Boot Rom,选择pcPentium,再选择bootrom_uncmp,
%A   生成 bootrom_uncmp。拷贝 bootrom_uncmp到host\x86-win32\bin下,插入空白
%A   盘到软区,在dos界面进入目录host\x86-win32\bin下,用命令"mkboot a:
%A   bootrom_uncmp "生成引导盘
%A
%A 4. 在Start > Programs > Tornado2 > FTP Server,点开Security下的
%A   user/rights菜单,新建用户User Name:target,Password:target,Home
%A   Directory为VxWorks映像所在目录如 C:\Tornado\target\config\pcPentium\。
%A   注意这些配置要和config.h中的一致。
%A
%A 5.将bootrom的启动盘插入目标机的软驱,启动目标机,系统从软驱启动,随后登
%A   陆FTP,从主机下载vxworks文件,目标机提示7秒内按任意键选择Boot方式(手工
%A   ,自动),手工方式可对FTP用户,口令,IP等参数进行修改。
%A   通常是等待7秒后系统autoboot。
%A   
%A
%A 屏幕显示:
%A
%A Attached TCP/IP interface to elt0.
%A Attaching network interface lo0... done. //TCP/IP网络连接成功
%A
%A Loading... 602128 //通过ftp下载VxWorks映像
%A Starting at 0x01080000 //下载成功,从RAM_LOW_ADRS 0x01080000
%A 开始执行VxWorks系统
%A
%A Attached TCP/IP interface to elt unit 0
%A Attaching interface lo0...done //TCP/IP网络连接成功
%A (注意这里网络初始化成功和上边的不同,上边是Bootrom映像网络初始化来下载VxWorks,这里VxWorks系统初始化网络。)
%A
%A VxWorks
%A
%A Copyright 1984-1998 Wind River Systems, Inc.
%A
%A CPU: xxxx --- Intel x82
%A VxWorks: 5.4
%A BSP version: 1.2/4
%A Creation date: Jan xx 2001
%A WDB: Ready.
%A
%A
%A
%A 至此目标机系统启动完成。
%A
%A
%A 6.配置Target Server下载应用程序.
%A
%A 打开Tornado,在Tools菜单下选择Target Sever再选择configure进行配置(Tools
%A > Target Server > Configure > New)给出Target Server名字描述如net00.在
%A (Target Server Properties > Back End)选择WdbRpc. Target Name/IP Address
%A 框内输入Target的IP: 90.0.0.50.
%A Core File and Symbols选项(Target Server Properties > Core File and
%A Symbols): C:\Tornado\target\config\pcPentium\vxWorks等等。
%A 配置的内容根据系统的具体情况定。点击Launch启动Target Sever,随后在主界
%A 面下选择已启动的Target Sever就可以下载 *.o或*.out程序。
%A
%A
%A

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

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

相关文章

float32精度_PyTorch 1.6来了:新增自动混合精度训练、Windows版开发维护权移交微软...

刚刚&#xff0c;Facebook 通过 PyTorch 官方博客宣布&#xff1a;PyTorch 1.6 正式发布&#xff01;新版本增加了一个 amp 子模块&#xff0c;支持本地自动混合精度训练。Facebook 还表示&#xff0c;微软已扩大了对 PyTorch 社区的参与&#xff0c;现在拥有 PyTorch 在 Windo…

神经网络与深度学习——TensorFlow2.0实战(笔记)(三)(python语句)

1.if语句 #if语句 x,y 3,5 if x<y:print("x<y") elif xy:print("xy") else:print("x>y") 2.条件表达式 x,y3,5 #表达式1(条件为真的结果) if 判断条件 else 表达式2(条件为假的结果) print(x if x>y else y) 3.while语句 #死循环…

建立调试环境

建立调试环境 Tornado采用支持主机/目标机开发模式。本节以x86系列目标机为例介绍调试环境的建立 。 7.1.1 配置文件config.h 目标机运行的程序包括两部分&#xff1a;引导文件bootrom.sys和操作系统影像文件VxWorks。 引导文件bootrom.sys的主要作用类似于BIOS&#xf…

天气预报的获取

好久没有写技术文章了&#xff0c;2010年工作太忙&#xff0c;奔波在国内各地&#xff0c;也没什么时间关注一些技术方面的事情&#xff0c;最近有一个项目封闭开发&#xff0c;有些时间来写些琐碎的东西&#xff0c;就当是整理下最近的东西吧&#xff0c;没什么技术价值&#…

神经网络与深度学习——TensorFlow2.0实战(笔记)(四)(python列表与元组)

序列数据结构 1.成员是有序排列的 2.每个元素的位置称为下标或索引 3.通过索引访问序列中的成员 4.Python中的序列数据类型有字符串、列表、元组 "abc" ≠ "bca" 5.Python中的列表和元组&#xff0c;可以存放不同类型的数据 列表使用方括号[ ]表示&a…

apktoolkit apk反编译没有文件_[工具] Mac下一键APK逆向环境

安装apktool和dex2jar,jd-guihomebrew安装&#xff1a; brew install apktool brew install dex2jar JD-GUI去http://jd.benow.ca/下载 dmg可能不支持最新版本的mac用不了&#xff0c;打开就报错反编译流程执行脚本apktool d xxx.apk 注&#xff1a;xxx.apk为你要反编译的apk…

搭建你的嵌入式Vxworks开发环境

3.1 最常见的开发环境配置使用串口和网络连接&#xff08;host和target之间&#xff09;。串口连接用于和boot loader之间的通信&#xff08;如输出信息在host上的显示&#xff09;&#xff0c;网络连接用于传输文件&#xff0c;包括Vxworks system image。默认情况下使用网络连…

python开发应用程序错误_Python 程序员经常犯的 10 个错误

常见错误 #6: 不明白Python在闭包中是如何绑定变量的 看下面这个例子&#xff1a; >>> def create_multipliers(): ... return [lambda x : i * x for i in range(5)] >>> for multiplier in create_multipliers(): ... print multiplier(2) ... 你也许希望获…

神经网络与深度学习——TensorFlow2.0实战(笔记)(四)(python字典和集合)

字典和集合 字典 每个字典元素都是一个键(关键字)/值(关键字对应的取值)对 #创建字典 dic_score{"语文":80,"数学":99} #打印 print(dic_score) print(dic_score["语文"]) #长度 print(dic_score.__len__)#错误写法 print(len(dic_score)) #…

VxWorks动态加载.out文件

//Device.cpp #include "other.h" #ifdef __cplusplus extern "C" { #endif int initDevice(char *arg); #ifdef __cplusplus } #endif int initDevice(char *arg) { printf("%s\n", arg); } 生成的.out文件需对其使用如下命令 chmod.exe arx…

[Project Euler]加入欧拉 Problem 9

A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 b2 c2 For example, 32 42 9 16 25 52. There exists exactly one Pythagorean triplet for which a b c 1000.Find the product abc. 意思很明白找出这样的a, b, c abc 1000 a …

java 在已有的so基础上封装jni_[干货]再见,Android JNI 封装

1 前言2 JNI 速查表2.1 Java 和 Native 数据类型映射表2.2 引用类型3 JNI 理论基础速览4 JNI 常用场景示例4.1 字符串传递(java->native)4.2 字符串返回(native->java)4.3 数组传递(java->native)4.4 其他复杂对象传递(java->native)4.5 复杂对象返回(native->j…

神经网络与深度学习——TensorFlow2.0实战(笔记)(四)(python函数)

函数&#xff08;function) &#xff1a;实现某种特定功能的代码块 优点&#xff1a;程序简洁&#xff0c;可重复调用、封装性好、便于共享 类别&#xff1a;系统函数和用户自定义函数 Python内置函数 数学运算函数 print(abs(-1)) print(pow(2,3)) print(round(3.1415926,…

arm B和BL指令浅析

B或BL指令引起处理器转移到“子程序名”处开始执行。两者的不同之处在于BL指令在转移到子 程序执行之前&#xff0c;将其下一条指令的地址拷贝到R14&#xff08;LR,链接寄存器&#xff09;。由于BL指令保存了下条指令的地 址&#xff0c;因此使用指令“MOV PC ,LR”即可实现子…

神经网络与深度学习——TensorFlow2.0实战(笔记)(四)(python模块、包和库)

模块&#xff08;Module&#xff09; 模块是一个python文件&#xff08;.py&#xff09;&#xff0c;拥有多个功能相近的函数或类。 便于代码复用&#xff0c;提高编程效率&#xff0c;提高了代码的可维护性。 避免函数名和变量名冲突。 包&#xff08;Package&#xff09;…

ARM uboot中的.lds

对于.lds文件&#xff0c;它定义了整个程序编译之后的连接过程&#xff0c;决定了一个可执行程序的各个段的存储位置。虽然现在我还没怎么用它&#xff0c;但感觉还是挺重要的&#xff0c;有必要了解一下。先看一下GNU官方网站上对.lds文件形式的完整描述&#xff1a;SECTIONS …

原生JS实现淡入淡出效果(fadeIn/fadeOut/fadeTo)

淡入淡出效果,在日常项目中经常用到,可惜原生JS没有类似的方法,而有时小的页面并不值得引入一个jQuery库,所以就自己写了一个,已封装, 有用得着的朋友, 可以直接使用. 代码中另附有一个设置元素透明度的方法, 是按IE规则(0~100)设置, 若改成标准设置方法(0.00~1.00), 下面使用时…

神经网络与深度学习——TensorFlow2.0实战(笔记)(四)(Python面向对象的编程)

面向对象的程序设计&#xff08;OOP&#xff09; 对象&#xff08;object&#xff09;: 将属性和方 法封装在一起。 类&#xff08;class)&#xff1a; 具有相同的属性和方法的对象集合。 对象是类的实例 子类继承了父类的全部属性和方法&#xff0c; 并且也有自己特有的属…

python实验四_python实验四

1.简单计算器的设计 请设计简单的“加减乘除”计算器并从键盘上输入数据进行计算 def add(x, y): """相加""" return x y def subtract(x, y): """相减""" return x - y def multiply(x, y): """…

adr和ldr的区别

其实这两个都是伪指令&#xff1a;adr是小范围的地址读取伪指令&#xff0c;ldr是大范围的读取地址伪指令。可实际上adr是将基于PC相对偏移的地址值或基于寄存器相对地址值读取的为指令&#xff0c;而ldr用于加载32为立即数或一个地址到指定的寄存器中。到这儿就会看到其中的区…