当前位置: 首页 > news >正文

广州建站网络公司ui培训班多少钱

广州建站网络公司,ui培训班多少钱,贴吧推广400一个月,环球军事最新新闻目录 1. 准备工作1.1 Eclipse1.2 工程编译1.3 烧写固件 2. 创建工程2.1 搭建调试工程2.2 配置Dbug调试信息 3. 调试4. 手动调试过程4. 总结 备注#xff1a; 1#xff0c;假设您已对方寸微电子的T690系列芯片的使用方式都有了一定的了解#xff0c;可以根据此文的配置进行Li… 目录 1. 准备工作1.1 Eclipse1.2 工程编译1.3 烧写固件 2. 创建工程2.1 搭建调试工程2.2 配置Dbug调试信息 3. 调试4. 手动调试过程4. 总结 备注 1假设您已对方寸微电子的T690系列芯片的使用方式都有了一定的了解可以根据此文的配置进行Linux用户态代码的调试 2若您对方寸微电子的T690芯片不了解但想进一步了解它那您可以在gitee上获取相关资料gitee的网址为https://gitee.com/tihchip 3本文中关于gdb、gdbserver的使用方式都是通用的不仅局限于调试基于T690的工程希望该文章能对您起到积极的作用 1. 准备工作 1.1 Eclipse 本文中使用的Eclipse为芯来的 NucleiStudio_IDE_202212关于Eclipse安装方式不在此累述。 下载地址https://www.nucleisys.com/download.php 1.2 工程编译 对于一个全新的测试的话需要编译一个全新的文件系统rootfs在编译文件系统时已经默认编译了 OpenSBI、U-Boot、Kernel、OpenSSL、CCAT-Engine、CCAT等但是为了更好的了解使用这些工程也可以独自编译它们。   下面采用 yocto 的方式编译文件系统等。 编译文件系统rootfs 注在编译文件系统之前必须首先修改U-Boot 及 Kernel 的配置项参考章节 “编译U-Boot” 及 “编译Kernel” 中的说明 roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake tih-full-cli-debug-image -c cleanall roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake tih-full-cli-debug-image roott690mp-evb2-va: mkdir /share/samba/public/shared/jack/rootfs_gmssl roott690mp-evb2-va: cp /localhdd/jack/tmp-glibc/deploy/images/t690mp-evb2-va/tih-full-cli-debug-image-t690mp-evb2-va.tar.gz /share/samba/public/shared/jack/rootfs_gmssl roott690mp-evb2-va: cd /share/samba/public/shared/jack/rootfs_gmssl roott690mp-evb2-va: tar -vxzf tih-full-cli-debug-image-t690mp-evb2-va.tar.gz1tih-full-cli-debug-image :表示编译带有调试信息的文件系统tih-full-cli-image表示编译不带调试信息的文件系统。我们进行gdb调试时需要编译带有调试信息的文件系统 2在 /share/samba/public/shared/jack/ 目录下创建一个名为 rootfs_gmssl 的文件夹需要保证该文件夹时nfs的挂载路径才行并将生成的文件系统复制到此文件夹下解压后如下所示 编译OpenSBI roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake opensbi -c cleanall roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake opensbi roott690mp-evb2-va: cp -rf /localhdd/jack/tmp-glibc/deploy/images/t690mp-evb2-va/fw_jump.bin /share/samba/public/shared/jack/编译U-Boot roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake u-boot -c cleanall roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake u-boot roott690mp-evb2-va: cp /localhdd/jack/tmp-glibc/deploy/images/t690mp-evb2-va/u-boot.bin /share/samba/public/shared/jack/编译Kernel 修改设备树配置文件系统的挂载路径如下 roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake linux-mainline -c cleanall roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake linux-mainline roott690mp-evb2-va: cp /localhdd/jack/tmp-glibc/deploy/images/t690mp-evb2-va/fitImage /share/samba/public/shared/jack/rootfs_gmssl/boot/编译GMSSL 或 OpenSSL 备注若使用yocto编译GMSSL必须采用迂回的路线即将GMSSL的bb文件中的内容全部替换到OpenSSL的bb文件中去通过编译OpenSSL的方式实现对GMSSL的编译。 roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake openssl -c cleanall roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake openssl roott690mp-evb2-va: cp -rf /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/openssl/1.1.1q-r0/image/* /share/samba/public/shared/jack/rootfs_gmssl/ roott690mp-evb2-va: cp -rf /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/openssl/1.1.1q-r0/packages-split/openssl-dbg/* /share/samba/public/shared/jack/rootfs_gmssl/编译CCAT roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake ccat -c cleanall roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake ccat roott690mp-evb2-va: cp -rf /localhdd/jack/tmp-glibc/work/t690mp_evb2_va-tih-linux/ccat/1.0-r0/image/* /share/samba/public/shared/jack/rootfs_gmssl/ roott690mp-evb2-va: cp -rf /localhdd/jack/tmp-glibc/work/t690mp_evb2_va-tih-linux/ccat/1.0-r0/packages-split/ccat-dbg/* /share/samba/public/shared/jack/rootfs_gmssl/编译CCAT-Engine roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake ccat-engine -c cleanall roott690mp-evb2-va: MACHINEt690mp-evb2-va bitbake ccat-engine roott690mp-evb2-va: cp -rf /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/ccat-engine/1.0-r0/image/* /share/samba/public/shared/jack/rootfs_gmssl/ roott690mp-evb2-va: cp -rf /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/ccat-engine/1.0-r0/packages-split/ccat-engine-dbg/* /share/samba/public/shared/jack/rootfs_gmssl/1.3 烧写固件 参考方寸微电子提供的快速启动文档《TIH64V690 SDK Quick Start.pdf》 下载地址https://e.gitee.com/tihchip_priv/repos/tihchip/doc/sources 2. 创建工程 2.1 搭建调试工程 创建并导入待调试的工程的目的是方便跟踪、查看、并修改源码切记这里导入的是源码工作的链接文件而不是源文件 点击File/New/Project 导入工程ccat、ccat_engine、openssl 依次导入CCAT、CCAT_Engine、OpenSSL的源码工程链接。 2.2 配置Dbug调试信息 在“debug工程”右键选择“Debug As \ Debug Configurations”,进入如下配置界面。按照下面图示进行配置 配置可执行程序testapp的路径 /* 当前测试case的可执行程序路径如下 */ /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/ccat-engine/1.0-r0/ccat-engine-1.0/testapp配置GDB及GDB调试信息 备注此处配置的工具链必须与开发板上的工具链保持一致建议直接使用我们导出的工具链 工具链的位置/localhdd/jack/tih_toolchain/sysroots/x86_64-tih_sdk-linux/usr/bin/riscv64-tih-linux/riscv64-tih-linux-gdb ccat.gdbinit记录了GDB的命令启动GDB时会解析该命令该文件的内容如下 /* 设置共享库的搜索路径 */ set solib-absolute-prefix /share/samba/public/shared/jack/rootfs_gmssl//* 设置ccat源码的替换搜索路径 */ set substitute-path /usr/src/debug/ccat/1.0-r0/ccat/ /localhdd/jack/tmp-glibc/work/t690mp_evb2_va-tih-linux/ccat/1.0-r0/ccat//* 设置ccat-engine源码的替换搜索路径 */ set substitute-path /usr/src/debug/ccat-engine/1.0-r0/ccat-engine-1.0/ /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/ccat-engine/1.0-r0/ccat-engine-1.0//* 设置OpenSSL源码的替换搜索路径 */ set substitute-path /usr/src/debug/openssl/1.1.1q-r0/openssl-1.1.1q/ /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/openssl/1.1.1q-r0/git/设置共享库的搜索路径 设置IP及端口号 3. 调试 开发板启动成功之后启动 qat_service 服务命令/etc/init.d/qat_service start roott690mp-evb2-va:~# /etc/init.d/qat_service start usdm_drv: loading out-of-tree module taints kernel. usdm_drv: Loading USDM Module Version 0.7.1 ... usdm_drv: IOCTLs: c0507100, c0507101, 7102, c0047104 tih_ccat_platform tih_ccat_platform.0: c1xxx - adf_probe tih_ccat_platform tih_ccat_platform.0: create asym rings - section:KERNEL - name:Cy0BankNumber - bank[0] tih_ccat_platform tih_ccat_platform.0: create sym rings - section:KERNEL - name:Cy0BankNumber - bank[0] tih_ccat_platform tih_ccat_platform.0: create asym rings - section:KERNEL - name:Cy1BankNumber - bank[1] tih_ccat_platform tih_ccat_platform.0: create sym rings - section:KERNEL - name:Cy1BankNumber - bank[1] Restarting all dQevices.AT: Stopping all acceleration devices.Processing /etc/c1xxx_dev0.conf tih_ccat_platform tih_ccat_platform.0: init device with bundle[0] information tih_ccat_platform tih_ccat_platform.0: init bundle[0] ring - ring number:4 tih_ccat_platform tih_ccat_platform.0: init the bundle[0] with instance:CRYPTO tih_ccat_platform tih_ccat_platform.0: init the bundle[0] with instance:COMP tih_ccat_platform tih_ccat_platform.0: init device with bundle[1] information tih_ccat_platform tih_ccat_platform.0: init bundle[1] ring - ring number:4 tih_ccat_platform tih_ccat_platform.0: init the bundle[1] with instance:CRYPTO tih_ccat_platform tih_ccat_platform.0: init the bundle[1] with instance:COMP tih_ccat_platform tih_ccat_platform.0: Process section GENERAL tih_ccat_platform tih_ccat_platform.0: Process section KERNEL tih_ccat_platform tih_ccat_platform.0: Process section SSL tih_ccat_platform tih_ccat_platform.0: add derived section:SSL_INT_0 to the adf cfg tih_ccat_platform tih_ccat_platform.0: copy section:SSL to the derived section:SSL_INT_0 tih_ccat_platform tih_ccat_platform.0: Set InterruptCoalescingEnabled value with error -14 tih_ccat_platform tih_ccat_platform.0: Set InterruptCoalescingTimerNs value with error -14 tih_ccat_platform tih_ccat_platform.0: Set InterruptCoalescingNumResponses value with error -14 tih_ccat_platform tih_ccat_platform.0: Clean up section GENERAL tih_ccat_platform tih_ccat_platform.0: Clean up section KERNEL tih_ccat_platform tih_ccat_platform.0: Clean up section SSL tih_ccat_platform tih_ccat_platform.0: Clean up section Accelerator0 tih_ccat_platform tih_ccat_platform.0: Starting acceleration device ccat_dev0. tih_ccat_platform tih_ccat_platform.0: bundle(uio)0, hw_bundle_number(bank)0 uio dts irq number matched tih_ccat_platform tih_ccat_platform.0: bundle(uio)1, hw_bundle_number(bank)1 uio dts irq number matched Checking status of all devices. There is 1 QAT acceleration device(s) in the system:ccat_dev0 - type: c1xxx, instance_id: 0, #num_logical_accel:1 #banks_per_accle:2, device sysname: tih_ccat_platform.0, #accel: 11 #engines: 120, state: up查询开发板的IP地址命令ifconfig如下当前开发板的IP地址为192.168.100.126 roott690mp-evb2-va:~# ifconfig eth0: flags4163UP,BROADCAST,RUNNING,MULTICAST mtu 1500 metric 1inet 192.168.100.126 netmask 255.255.255.0 broadcast 192.168.100.255inet6 fe80::2c61:41ff:fe8b:df4e prefixlen 64 scopeid 0x20linkinet6 fdfc:4fec:614e:0:2c61:41ff:fe8b:df4e prefixlen 64 scopeid 0x0globalether 2e:61:41:8b:df:4e txqueuelen 1000 (Ethernet)RX packets 27875 bytes 19035304 (18.1 MiB)RX errors 0 dropped 236 overruns 0 frame 0TX packets 6772 bytes 1078732 (1.0 MiB)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0device interrupt 113 memory 0x5000000-50ffffflo: flags73UP,LOOPBACK,RUNNING mtu 65536 metric 1inet 127.0.0.1 netmask 255.0.0.0inet6 ::1 prefixlen 128 scopeid 0x10hostloop txqueuelen 1000 (Local Loopback)RX packets 0 bytes 0 (0.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 0 bytes 0 (0.0 B)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0在开发板串口终端上运行gdbserver启动gdbserver服务如下所示此时开发板一直侦听端口1234 命令gdbserver 192.168.100.126:1234 testapp -v aes128_ecb 说明   1192.168.100.126 终端的IP地址   21234端口号随意设置只要与gdb端保持一致即可   3testapp待调试的可执行程序   4-v aes128_ecb可执行程序的参数 roott690mp-evb2-va:~# gdbserver 192.168.100.126:1234 testapp -v aes128_ecb Process testapp created; pid 475 Listening on port 1234主机端修改配置信息配置开发板的IP地址如下 主机端启动调试如下图所示 主机端启动成功之后开发板串口的打印信息如下 至此说明整个连接已通可以愉快的调试代码了。 4. 手动调试过程 章节3中介绍了怎么使用Eclipse调试的方式也可以使用纯手动的方式进行调试这里也记录一下这种调试过程假设板子都已经正常运行此处仅描述 gdb 的过程。 在串口终端执行gdbsever命令 gdbserver 192.168.100.49:1234 testapp -engine ccatengine -v sm2 服务器端开启一个新的终端执行命令/localhdd/jack/tih_toolchain/sysroots/x86_64-tih_sdk-linux/usr/bin/riscv64-tih-linux/riscv64-tih-linux-gdb /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/ccat-engine/1.0-r0/ccat-engine-1.0/testapp输入命令target remote 192.168.100.49:1234修改查询共享库的路径set solib-absolute-prefix /share/samba/public/shared/jack/rootfs_gmssl/设置CCAT源码的路径set substitute-path /usr/src/debug/ccat/1.0-r0/ccat/ /localhdd/jack/tmp-glibc/work/t690mp_evb2_va-tih-linux/ccat/1.0-r0/ccat/设置Engine源码的路径set substitute-path /usr/src/debug/ccat-engine/1.0-r0/ccat-engine-1.0/ /home/jack/svn_project/t690/sdk/trunk/linux/pkg/tih/lib/ccat_engine/设置GMSSL源码的路径 set substitute-path /usr/src/debug/openssl/1.1.1q-r0/openssl-1.1.1q/ /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/openssl/1.1.1q-r0/git/设置断点 b main后面就可以使用gdb的命令进行愉快的调试了。整过过程执行代码如下所示 jackfw02:~$ /localhdd/jack/tih_toolchain/sysroots/x86_64-tih_sdk-linux/usr/bin/riscv64-tih-linux/riscv64-tih-linux-gdb /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/ccat-engine/1.0-r0/ccat-engine-1.0/testapp GNU gdb (GDB) 10.2 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as --hostx86_64-tih_sdk-linux --targetriscv64-tih-linux. Type show configuration for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at:http://www.gnu.org/software/gdb/documentation/.For help, type help. Type apropos word to search for commands related to word... Reading symbols from /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/ccat-engine/1.0-r0/ccat-engine-1.0/testapp... (gdb) target remote 192.168.100.49:1234 Remote debugging using 192.168.100.49:1234 Reading /lib/ld-linux-riscv64-lp64d.so.1 from remote target... warning: File transfers from remote targets can be slow. Use set sysroot to access files locally instead. Reading /lib/ld-linux-riscv64-lp64d.so.1 from remote target... Reading symbols from target:/lib/ld-linux-riscv64-lp64d.so.1... Reading /lib/ld-2.31.so from remote target... Reading /lib/.debug/ld-2.31.so from remote target... Reading /lib/.debug/ld-2.31.so from remote target... Reading symbols from target:/lib/.debug/ld-2.31.so... 0x0000001555557020 in _start () from target:/lib/ld-linux-riscv64-lp64d.so.1 (gdb) set solib-absolute-prefix /share/samba/public/shared/jack/rootfs_gmssl/ warning: .dynamic section for /share/samba/public/shared/jack/rootfs_gmssl/lib/ld-linux-riscv64-lp64d.so.1 is not at the expected address (wrong library or version mismatch?) Reading symbols from /share/samba/public/shared/jack/rootfs_gmssl/lib/ld-linux-riscv64-lp64d.so.1... Reading symbols from /share/samba/public/shared/jack/rootfs_gmssl/lib/.debug/ld-2.31.so... Reading symbols from /share/samba/public/shared/jack/rootfs_gmssl/lib/ld-linux-riscv64-lp64d.so.1... Reading symbols from /share/samba/public/shared/jack/rootfs_gmssl/lib/.debug/ld-2.31.so... (gdb) set substitute-path /usr/src/debug/ccat/1.0-r0/ccat/ /localhdd/jack/tmp-glibc/work/t690mp_evb2_va-tih-linux/ccat/1.0-r0/ccat/ (gdb) set substitute-path /usr/src/debug/ccat-engine/1.0-r0/ccat-engine-1.0/ /home/jack/svn_project/t690/sdk/trunk/linux/pkg/tih/lib/ccat_engine/ (gdb) set substitute-path /usr/src/debug/openssl/1.1.1q-r0/openssl-1.1.1q/ /localhdd/jack/tmp-glibc/work/riscv64-tih-linux/openssl/1.1.1q-r0/git/ (gdb) (gdb) (gdb) (gdb) b main Breakpoint 1 at 0x2aaaaafbc0: file test/main.c, line 1557. (gdb) c Continuing.Breakpoint 1, main (argc5, argv0x3ffffffd28) at test/main.c:1557 1557 { (gdb) n 1559 tls_version default_tls_string; (gdb) 1560 digest_kdf default_digest_string; (gdb) 1564 for (i 1; i argc; i) { (gdb) r The remote target does not support run. Try help target or continue. (gdb) c Continuing. [Inferior 1 (process 503) exited normally] (gdb) q jackfw02:~$ 4. 总结 gdb与gdbserver必须使用同一个版本的。在使用Eclipse进行调试时当配置文件中指定了共享库的搜索路径之后在ccat.gdbinit中可以不再指定共享库的搜索路径了。但是若在该文件中指定共享库的搜索路径则启动调试到调试环境就绪所消耗的时间要比在配置选项中指定共享库所消耗的时间少的多。
http://www.lebaoying.cn/news/25995.html

相关文章:

  • php 建设网站制作亿网互联
  • 企业网站的特点是什么建设网站需要哪些元素
  • 网站建设服务器域名适合大型网站的流量套餐
  • 公司做个网站活动策划流程及细节
  • 百拓公司做网站怎么样上海建材网站
  • 厦门旋挖建筑公司网站做化学科普网站的目的
  • 群晖可以做网站服务器南京seo招聘
  • 网站制作模板教案自己建个购物网站
  • 怎么做网站文章伪原创2023全民核酸又开始了
  • 网站云优化营销推广策略
  • wordpress企业建站wordpress网站logo没显示
  • 网站的虚拟主机到期创建网站花钱吗
  • 惠州住房和城乡建设部网站郑州淘宝网站建设
  • 盐城整站优化网页的制作软件
  • 福州网站建设推广建站公司还有前途吗
  • 做音箱木工网站游戏 网站模板
  • 化妆品企业网站建设的缺点营销网站规划的要点包括( )
  • 合肥在线网站免费云服务器官网
  • asp科技公司网站源码化工网站关键词优化
  • 企业的网站建设策划书大型游戏网页游戏大全
  • 网络公司 网站设计wordpress 代码生成器
  • 企业优化网站中国大基建最新消息
  • 揭阳网站制作计划扬州商城网站制作
  • 如何建设互联网政务门户网站广东省东莞市建设培训中心网站
  • 免费企业网站建设站牛网
  • 美丽乡村 村级网站建设网站建设及网络维护合同
  • 海外搜索引擎网站建设免费无代码开发平台本地部署
  • 企石网站建设公司专做it招聘的网站
  • 国内好的设计网站怎么破解网站后台密码
  • 旅游网站开发参考文献企腾做的网站怎么样