Linux第33步_TF-A移植的第1步_创建新的设备树

TF-A移植第1步就是创建新的设备树,并命名为“stm32mp157d-atk”。

和“TF-A移植”有关的知识点:

1)设备树英文名字叫做Device tree,用来描述板子硬件信息的,比如开发板上的 CPU有几个核 、每个CPU核主频是多少,IIC、SPI这些外设的寄存器范围是多少,IIC接口下都挂了哪些设备等等。

2)、TF-A移植主要是修改设备树

3)、DTC是设备树的编译器。“.dts”的设备树文件经过编译后,生成“.dtb”文件,有点类似C语言中的“.bin文件”

4)、设备树文件是一种文本格式的文件。

设备树文件后缀为“.dts”,类似于C语言中的“.c文件”

设备树头文件后缀为“.dtsi”,类似于C语言中的“.h文件”

因此“.dts”的设备树文件可以引用“.dtsi”的设备树头文件。

5)、设备树文件的位置:

linux/atk-mp1/atk-mp1/my-tfa/tf-a-stm32mp-2.2.r1\fdts

一、查看设备树文件

1、打开终端

输入“ls回车”,列出当前目录下所有的文件和文件夹

输入“cd linux回车”,切换“linux”目录下

输入“ls回车”,列出当前目录下所有的文件和文件夹

输入“cd my-tfa回车”,切换my-tfa”目录下

输入“ls回车”,列出“my-tfa”目录下所有的文件和文件夹

输入“cd tf-a-stm32mp-2.2.r1/回车”,进入到tf-a-stm32mp-2.2.r1目录下;

输入“ls回车”,列出“tf-a-stm32mp-2.2.r1”目录下所有的文件和文件夹

输入“cd fdts/回车”,进入到fdts目录下;

2、输入“ls回车”,列出“fdts”目录下的所有设备树文件

3、使用VSCode打开my-tfa目录下tf-a.code-workspace”;

找到“tf-a-stm32mp-2.2.r1/fdts”目录,就是设备树文件所在的目录。

见下图:

4、点击“stm32mpl57d-ev1.dts”,打开该文件,见下图:

 5、“stm32mpl57d-ev1.dts”的文件内容见下图:

6、为正点原子STM32MP157开发板要准备的设备树

“stm32mp157d-ev1.dts”文件很简洁,主要原因是它引用了“stm32mp157d-ed1.dts”文件,主要工作是由“stm32mp157d-ed1.dts”文件来完成的。因此,我们要以“stm32mp157d-ed1.dts”为蓝本,复制一份,并命名为 “stm32mp157d-atk.dts”,这就是我们为正点原子STM32MP157开发板要准备的设备树。 

输入“cp stm32mp157d-ed1.dts stm32mp157d-atk.dts回车”,复制文件;

输入“ls回车”,列出“fdts”目录下的所有设备树文件

发现了“stm32mp157d-atk.dts”文件,这就是我们为正点原子STM32MP157开发板准备的设备树文件

见下图:

7、回到VSCode,打开设备树文件stm32mp157d-atk.dts”,见下图:

设备树文件stm32mp157d-atk.dts”文件内容如下:

// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)

/*

 * Copyright (C) STMicroelectronics 2019 - All Rights Reserved

 * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.

 */

/dts-v1/;

#include "stm32mp157.dtsi"

#include "stm32mp15xd.dtsi"

#include "stm32mp15-pinctrl.dtsi"

#include "stm32mp15xxaa-pinctrl.dtsi"

#include "stm32mp15xx-edx.dtsi"

#include <dt-bindings/soc/st,stm32-etzpc.h>

/ {

model = "STMicroelectronics STM32MP157D eval daughter";

compatible = "st,stm32mp157d-ed1", "st,stm32mp157";

chosen {

stdout-path = "serial0:115200n8";

};

aliases {

serial0 = &uart4;

};

};

&cpu1 {

cpu-supply = <&vddcore>;

};

&etzpc {

st,decprot = <

DECPROT(STM32MP1_ETZPC_USART1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_SPI6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_I2C6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_RNG1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_HASH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_LOCK)

DECPROT(STM32MP1_ETZPC_IWDG1_ID, DECPROT_S_RW, DECPROT_LOCK)

>;

};

8、“stm32mp15xx-edx.dtsi”是edx系列开发板的设备树通用头文件。因此,

我们以stm32mp15xx-edx.dtsi为蓝本,创建正点原子STM32MP157开发板“设备树文件的头文件”

输入“cp stm32mp15xx-edx.dtsi stm32mp157d-atk.dtsi回车”,复制文件

输入“ls回车”,列出“fdts”目录下的所有设备树文件

发现了“stm32mp157d-atk.dtsi”文件,这就是我们为正点原子STM32MP157开发板准备的设备树头文件

见下图:

9、回到VSCode,打开设备树头文件stm32mp157d-atk.dtsi”,见下图: 

设备树头文件stm32mp157d-atk.dtsi”文件内容如下:

// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)

/*

 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved

 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.

 */

#include <dt-bindings/clock/stm32mp1-clksrc.h>

#include <dt-bindings/power/stm32mp1-power.h>

#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"

/ {

memory@c0000000 {

device_type = "memory";

reg = <0xC0000000 0x40000000>;

};

vin: vin {

compatible = "regulator-fixed";

regulator-name = "vin";

regulator-min-microvolt = <5000000>;

regulator-max-microvolt = <5000000>;

regulator-always-on;

};

};

&bsec {

board_id: board_id@ec {

reg = <0xec 0x4>;

st,non-secure-otp;

};

};

&clk_hse {

st,digbypass;

};

&cpu0{

cpu-supply = <&vddcore>;

};

&hash1 {

status = "okay";

};

&i2c4 {

pinctrl-names = "default";

pinctrl-0 = <&i2c4_pins_a>;

i2c-scl-rising-time-ns = <185>;

i2c-scl-falling-time-ns = <20>;

clock-frequency = <400000>;

status = "okay";

secure-status = "okay";

pmic: stpmic@33 {

compatible = "st,stpmic1";

reg = <0x33>;

interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;

interrupt-controller;

#interrupt-cells = <2>;

status = "okay";

secure-status = "okay";

regulators {

compatible = "st,stpmic1-regulators";

buck1-supply = <&vin>;

buck2-supply = <&vin>;

buck3-supply = <&vin>;

buck4-supply = <&vin>;

ldo1-supply = <&v3v3>;

ldo2-supply = <&v3v3>;

ldo3-supply = <&vdd_ddr>;

ldo4-supply = <&vin>;

ldo5-supply = <&v3v3>;

ldo6-supply = <&v3v3>;

vref_ddr-supply = <&vin>;

boost-supply = <&vin>;

pwr_sw1-supply = <&bst_out>;

pwr_sw2-supply = <&bst_out>;

vddcore: buck1 {

regulator-name = "vddcore";

regulator-min-microvolt = <1200000>;

regulator-max-microvolt = <1350000>;

regulator-always-on;

regulator-initial-mode = <0>;

regulator-over-current-protection;

lp-stop {

regulator-on-in-suspend;

regulator-suspend-microvolt = <1200000>;

};

lplv-stop {

regulator-on-in-suspend;

regulator-suspend-microvolt = <900000>;

};

standby-ddr-sr {

regulator-off-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

vdd_ddr: buck2 {

regulator-name = "vdd_ddr";

regulator-min-microvolt = <1350000>;

regulator-max-microvolt = <1350000>;

regulator-always-on;

regulator-initial-mode = <0>;

regulator-over-current-protection;

lp-stop {

regulator-suspend-microvolt = <1350000>;

regulator-on-in-suspend;

};

lplv-stop {

regulator-suspend-microvolt = <1350000>;

regulator-on-in-suspend;

};

standby-ddr-sr {

regulator-suspend-microvolt = <1350000>;

regulator-on-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

vdd: buck3 {

regulator-name = "vdd";

regulator-min-microvolt = <3300000>;

regulator-max-microvolt = <3300000>;

regulator-always-on;

st,mask-reset;

regulator-initial-mode = <0>;

regulator-over-current-protection;

lp-stop {

regulator-suspend-microvolt = <3300000>;

regulator-on-in-suspend;

};

lplv-stop {

regulator-suspend-microvolt = <3300000>;

regulator-on-in-suspend;

};

standby-ddr-sr {

regulator-suspend-microvolt = <3300000>;

regulator-on-in-suspend;

};

standby-ddr-off {

regulator-suspend-microvolt = <3300000>;

regulator-on-in-suspend;

};

};

v3v3: buck4 {

regulator-name = "v3v3";

regulator-min-microvolt = <3300000>;

regulator-max-microvolt = <3300000>;

regulator-always-on;

regulator-over-current-protection;

regulator-initial-mode = <0>;

standby-ddr-sr {

regulator-off-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

vdda: ldo1 {

regulator-name = "vdda";

regulator-min-microvolt = <2900000>;

regulator-max-microvolt = <2900000>;

standby-ddr-sr {

regulator-off-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

v2v8: ldo2 {

regulator-name = "v2v8";

regulator-min-microvolt = <2800000>;

regulator-max-microvolt = <2800000>;

standby-ddr-sr {

regulator-off-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

vtt_ddr: ldo3 {

regulator-name = "vtt_ddr";

regulator-min-microvolt = <500000>;

regulator-max-microvolt = <750000>;

regulator-always-on;

regulator-over-current-protection;

lp-stop {

regulator-off-in-suspend;

};

lplv-stop {

regulator-off-in-suspend;

};

standby-ddr-sr {

regulator-off-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

vdd_usb: ldo4 {

regulator-name = "vdd_usb";

regulator-min-microvolt = <3300000>;

regulator-max-microvolt = <3300000>;

regulator-always-on;

standby-ddr-sr {

regulator-on-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

vdd_sd: ldo5 {

regulator-name = "vdd_sd";

regulator-min-microvolt = <2900000>;

regulator-max-microvolt = <2900000>;

regulator-boot-on;

standby-ddr-sr {

regulator-off-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

v1v8: ldo6 {

regulator-name = "v1v8";

regulator-min-microvolt = <1800000>;

regulator-max-microvolt = <1800000>;

standby-ddr-sr {

regulator-off-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

vref_ddr: vref_ddr {

regulator-name = "vref_ddr";

regulator-always-on;

regulator-over-current-protection;

lp-stop {

regulator-on-in-suspend;

};

lplv-stop {

regulator-on-in-suspend;

};

standby-ddr-sr {

regulator-on-in-suspend;

};

standby-ddr-off {

regulator-off-in-suspend;

};

};

bst_out: boost {

regulator-name = "bst_out";

};

vbus_otg: pwr_sw1 {

regulator-name = "vbus_otg";

};

vbus_sw: pwr_sw2 {

regulator-name = "vbus_sw";

regulator-active-discharge = <1>;

};

};

};

};

&iwdg2 {

timeout-sec = <32>;

status = "okay";

secure-status = "okay";

};

&nvmem_layout {

nvmem-cells = <&cfg0_otp>,

      <&part_number_otp>,

      <&monotonic_otp>,

      <&nand_otp>,

      <&uid_otp>,

      <&package_otp>,

      <&hw2_otp>,

      <&pkh_otp>,

      <&board_id>;

nvmem-cell-names = "cfg0_otp",

   "part_number_otp",

   "monotonic_otp",

   "nand_otp",

   "uid_otp",

   "package_otp",

   "hw2_otp",

   "pkh_otp",

   "board_id";

};

&pwr_regulators {

system_suspend_supported_soc_modes = <

STM32_PM_CSLEEP_RUN

STM32_PM_CSTOP_ALLOW_LP_STOP

STM32_PM_CSTOP_ALLOW_LPLV_STOP

STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR

>;

system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>;

vdd-supply = <&vdd>;

vdd_3v3_usbfs-supply = <&vdd_usb>;

};

&rcc {

st,hsi-cal;

st,csi-cal;

st,cal-sec = <60>;

st,clksrc = <

CLK_MPU_PLL1P

CLK_AXI_PLL2P

CLK_MCU_PLL3P

CLK_PLL12_HSE

CLK_PLL3_HSE

CLK_PLL4_HSE

CLK_RTC_LSE

CLK_MCO1_DISABLED

CLK_MCO2_DISABLED

>;

st,clkdiv = <

1 /*MPU*/

0 /*AXI*/

0 /*MCU*/

1 /*APB1*/

1 /*APB2*/

1 /*APB3*/

1 /*APB4*/

2 /*APB5*/

23 /*RTC*/

0 /*MCO1*/

0 /*MCO2*/

>;

st,pkcs = <

CLK_CKPER_HSE

CLK_FMC_ACLK

CLK_QSPI_ACLK

CLK_ETH_DISABLED

CLK_SDMMC12_PLL4P

CLK_DSI_DSIPLL

CLK_STGEN_HSE

CLK_USBPHY_HSE

CLK_SPI2S1_PLL3Q

CLK_SPI2S23_PLL3Q

CLK_SPI45_HSI

CLK_SPI6_HSI

CLK_I2C46_HSI

CLK_SDMMC3_PLL4P

CLK_USBO_USBPHY

CLK_ADC_CKPER

CLK_CEC_LSE

CLK_I2C12_HSI

CLK_I2C35_HSI

CLK_UART1_HSI

CLK_UART24_HSI

CLK_UART35_HSI

CLK_UART6_HSI

CLK_UART78_HSI

CLK_SPDIF_PLL4P

CLK_FDCAN_PLL4R

CLK_SAI1_PLL3Q

CLK_SAI2_PLL3Q

CLK_SAI3_PLL3Q

CLK_SAI4_PLL3Q

CLK_RNG1_LSI

CLK_RNG2_LSI

CLK_LPTIM1_PCLK1

CLK_LPTIM23_PCLK3

CLK_LPTIM45_LSE

>;

/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */

pll2: st,pll@1 {

compatible = "st,stm32mp1-pll";

reg = <1>;

cfg = <2 65 1 0 0 PQR(1,1,1)>;

frac = <0x1400>;

};

/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */

pll3: st,pll@2 {

compatible = "st,stm32mp1-pll";

reg = <2>;

cfg = <1 33 1 16 36 PQR(1,1,1)>;

frac = <0x1a04>;

};

/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */

pll4: st,pll@3 {

compatible = "st,stm32mp1-pll";

reg = <3>;

cfg = <3 98 5 7 7 PQR(1,1,1)>;

};

};

&rng1 {

status = "okay";

secure-status = "okay";

};

&rtc {

status = "okay";

secure-status = "okay";

};

&sdmmc1 {

pinctrl-names = "default";

pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;

disable-wp;

st,sig-dir;

st,neg-edge;

st,use-ckin;

bus-width = <4>;

vmmc-supply = <&vdd_sd>;

sd-uhs-sdr12;

sd-uhs-sdr25;

sd-uhs-sdr50;

sd-uhs-ddr50;

sd-uhs-sdr104;

status = "okay";

};

&sdmmc2 {

pinctrl-names = "default";

pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;

non-removable;

no-sd;

no-sdio;

st,neg-edge;

bus-width = <8>;

vmmc-supply = <&v3v3>;

vqmmc-supply = <&vdd>;

mmc-ddr-3_3v;

status = "okay";

};

&timers15 {

secure-status = "okay";

st,hsi-cal-input = <7>;

st,csi-cal-input = <8>;

};

&uart4 {

pinctrl-names = "default";

pinctrl-0 = <&uart4_pins_a>;

status = "okay";

};

&usbotg_hs {

vbus-supply = <&vbus_otg>;

};

&usbphyc_port0 {

phy-supply = <&vdd_usb>;

};

&usbphyc_port1 {

phy-supply = <&vdd_usb>;

};

10、在VSCode中,打开设备树文件stm32mp157d-atk.dts”将第12行的“stm32mp15xx-edx.dtsi”修改为“stm32mp157d-atk.dtsi”;

点击“文件”,再点击“保存(S)”;

见下图:

11、回到终端,

输入“cd ..回车”,退回到“tf-a-stm32mp-2.2.r1”目录;

输入“ls回车”,列出“tf-a-stm32mp-2.2.r1”目录下所有的文件和文件夹

输入“cd ..回车”,退回到“my-tfa”目录

输入“ls回车”,列出“my-tfa”目录下所有的文件和文件夹

输入“vim Makefile.sdk回车”,使用vim命令打开已有的“Makefile.sdk”文件,见下图:

 “Makefile.sdk”文件见下图:

12、创建新的设备树名字stm32mp157d-atk

将“stm32mp157d-atk”添加到TFA DEVICETREE 配置项中;

见下图:

13、按“ESC键”+“:wq键”,保存退出。

14、输入“cd tf-a-stm32mp-2.2.r1/回车”,进入到“tf-a-stm32mp-2.2.r1”目录下;

输入“ls回车”,列出“tf-a-stm32mp-2.2.r1”目录下所有的文件和文件夹;

输入“make -f ../Makefile.sdk all回车”, 执行编译, '-f'的意思是重新指定Makefile。

如果需要加快编译速度,可是使用多线程编译,线程数量最好和自己给虚拟机分配的物理核心保持一致,使用-j来指定线程数,命令如下:

make -f ../Makefile.sdk -j8 all //使用8线程编译

见下图:

14、输入“cd ..回车”返回到“my-tfa”目录

输入“ls回车”,列出“my-tfa”目录下所有的文件和文件夹;

输入“cd build/回车”,切换到“build”目录下;

输入“ls回车”,列出“build”目录下所有的文件和文件夹

输入“cd trusted/回车”,切换到“trusted”目录下;

输入“ls 回车”,列出当前目录下所有的文件和文件夹

编译成功,在“/linux/atk-mp1/my-tfa/build/trusted/目录下,发现有以“tf-a-stm32mp157d-atk”开头的6个文件文件。

见下图:

 至此,我们完成了TF-A移植第1步,新的设备树“stm32mp157d-atk”创建好了,接下来,我们要修改设备树,在下一节再讲,文章太长了,吃多了会无法消化。

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

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

相关文章

JVM:垃圾收集器(7种)

垃圾收集器关系图&#xff1a; 如果两个收集器之间存在连线&#xff0c;就说明它们可以搭配使用。它们说在的区域则表示这个收集器属于新生代收集器还是老年代收集器。其中Serial&#xff08;串行&#xff09;、Parallel&#xff08;并行&#xff09; 1、Serial收集器 Serial收…

【力扣·每日一题】2182.构造限制重复的字符串(模拟 贪心 优先队列 C++ Go)

题目链接 题意 给你一个字符串 s 和一个整数 repeatLimit &#xff0c;用 s 中的字符构造一个新字符串 repeatLimitedString &#xff0c;使任何字母 连续 出现的次数都不超过 repeatLimit 次。你不必使用 s 中的全部字符。 返回 字典序最大的 repeatLimitedString 。 如果…

AutoDL——终端训练神经网络模型(忽略本地问题)

前言&#xff1a; 本人之前分享过一篇文章&#xff1a;使用pycharm连接远程GPU训练神经网络模型&#xff08;超详细&#xff01;&#xff09;&#xff0c;其中详细介绍了如何利用pycharm连接AutoDL算力云平台租用的GPU服务器训练神经模型。但有些小伙伴可能会因为一些原因而导…

unity-声音与声效OLD

声音与声效 基本概念audio clipaudio listeneraudio source 基本操作如何创建音频源&#xff08;背景音乐&#xff09;如何在测试的时候关闭声音 常用代码一般流程如何在一个物体上播放多个音效如何在代码中延时播放多个声音如何在代码中停止音频的播放如何判断当前是否在播放音…

大模型 RAG 面试篇

1.LLMs 存在模型幻觉问题&#xff0c;请问如何处理&#xff1f; 检索LLM。 先用问题在领域数据库里检索到候选答案&#xff0c;再用LLM对答案进行加工。 2.基于LLM向量库的文档对话 思路是怎么样&#xff1f; 加载文件读取文本文本分割文本向量化问句向量化在文本向量中匹配…

基于深度学习的车牌识别(YOLOv5和CNN)

基于深度学习的车牌识别(YOLOv5和CNN&#xff09; 目录 一、综述 二、车牌检测 一、综述 本篇文章是面向的是小白&#xff0c;想要学习深度学习上的应用&#xff0c;本文中目前应用了YOLO v5和CNN来对车牌进行处理&#xff0c;最终形成一个完整的车牌信息记录&#xff0c;…

路飞项目--02

补充&#xff1a;axios封装 # 普通使用&#xff1a;安装 &#xff0c;导入使用 const filmListreactive({result:[]}) axios.get().then() async function load(){let responseawait axios.get()filmList.resultresponse.data.results } # 封装示例&#xff1a;请求发出去之前…

AP5101C 高压线性 LED恒流驱动器 DFN2*2 LED灯汽车雾灯转向灯

产品描述 AP5101C 是一款高压线性 LED 恒流芯片 &#xff0c; 简单 、 内置功率管 &#xff0c; 适用于6- 100V 输入的高精度降压 LED 恒流驱动芯片。电流2.0A。AP5101C 可实现内置MOS 做 2.0A,外置 MOS 可做 3.0A 的。AP5101C 内置温度保护功能 &#xff0c;温度保护点为 130 …

linux编译源码,安装valgrind

目录 1 下载源码 2 在虚拟机上解压 3 进入解压的目录&#xff0c;执行make 4 安装 5 检查安装是否成功 本文参考了内存检查工具valgrind介绍、安装与使用-CSDN博客 1 下载源码 我到Valgrind: Current Releases 下载了valgrind 3.22.0源码 2 在虚拟机上解压 我使用的虚…

Leetcode 用队列实现栈

题目&#xff1a; 请你仅使用两个队列实现一个后入先出&#xff08;LIFO&#xff09;的栈&#xff0c;并支持普通栈的全部四种操作&#xff08;push、top、pop 和 empty&#xff09;。 实现 MyStack 类&#xff1a; void push(int x) 将元素 x 压入栈顶。 int pop() 移除并…

脱离于ASP.NET 和Visual Studio编辑Razor脚本

Razor Pad是一个编辑Razor脚本的工具&#xff0c;脱离于ASP.NET 和Visual Studio。 github地址&#xff1a;GitHub - RazorPad/RazorPad: RazorPad is a quick and simple stand-alone editing environment that allows anyone (even non-developers) to author Razor templat…

智慧工地解决方案及案例:PPT全文26页,附下载

关键词&#xff1a;智慧工地解决方案&#xff0c;智慧工地建设&#xff0c;智慧工地整体架构&#xff0c;数字化工地&#xff0c;智慧工程 一、智慧工地建设对传统建筑业的影响 1、提高了施工效率和质量&#xff1a;智慧工地建设采用了先进的信息技术和管理方法&#xff0c;可…