bluez调试笔记

2023-11-13

蓝牙系列:

bluez调试笔记_weixin_41069709的博客-CSDN博客_bluezbluez移植https://blog.csdn.net/weixin_41069709/article/details/125168114?spm=1001.2014.3001.5502

bluetoothd源码剖析(一)启动流程_weixin_41069709的博客-CSDN博客bluetoothd启动流程详解https://blog.csdn.net/weixin_41069709/article/details/125404935?spm=1001.2014.3001.5502

一.移植

1.下载bluez源码包

源码下载路径

2.下载相关依赖库(这个就不贴路径了):

依赖库 版本
libical 1.0
readline 6.3
libffi 3.2.1
libpcre
ncurses 6.3(5.9版本可能会因为工具链太新导致编译失败)
glib 2.50.3
expat       2.4.8
dbus 1.12.10

3.依赖库编译

#libical
path=`pwd`
./bootstrap
./configure --host=arm-linux --prefix=$path/../install CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++
make
make install
#readline

#configure文件中修改如下
#  <   if test "$cross_compiling" = yes; then :                                                                                                                                                 
#  >   if test "$cross_compiling" = no; then :

path=`pwd`
./configure --host=arm-linux --prefix=$path/../install --with-shared CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ CPPFLAGS="-P"
make
make install
#libpcre
path=`pwd`
./configure --host=arm-linux --prefix=$path/../install --bindir=$path/../install/usr/bin  --enable-unicode-properties --enable-utf CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++
make
make install
#libffi
path=`pwd`
./configure --prefix=$path/../install/ --host=arm-linux CC=arm-linux-gnueabihf-gcc
make
make install
#ncurses
path=`pwd`
./configure --host=arm-linux --prefix=$path/../install --bindir=$path/../install/usr/bin --with-shared --disable-db-install --disable-stripping --enable-pc-files --with-pkg-config-libdir=$path/../install/lib/pkgconfig CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ CPPFLAGS="-P"
make
make install
#glib
path=`pwd`
./configure --prefix=$path/../install --enable-libmount=no --host=arm-linux --bindir=$path/../install/usr/bin PKG_CONFIG_PATH=$path/../install/lib/pkgconfig \
    PCRE_CFLAGS="-I $path/../install/include/" PCRE_LIBS="-lpcre -lpcrecpp -L$path/../install/lib" ZLIB_CFLAGS="-I $path/../install/include/" ZLIB_LIBS="-lz -L$path/../install/lib" \ 
    LIBFFI_CFLAGS="-I $path/../install/lib/libffi-3.2.1/include/" LIBFFI_LIBS="-lffi -L$path/../install/lib/" \ 
    glib_cv_stack_grows=no glib_cv_uscore=yes ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++
make
make install
#dbus
path=`pwd`
./configure --prefix="" --host=arm-linux --datadir="/etc" --libexecdir="/usr" --runstatedir="/var/run" --bindir="/usr/bin" --with-dbus-user="dbus" \
    EXPANDED_LOCALSTATEDIR="/var" PKG_CONFIG="$path/../install/lib/pkgconfig" CC=arm-linux-gnueabihf-gcc EXPAT_CFLAGS="-I$path/../install/include" \ 
    EXPAT_LIBS="-L$path/../install/lib/ -lexpat"
make DESTDIR="$path/../install"
make install DESTDIR="$path/../install"
#bluez

path=`pwd`
./configure --prefix="" --host=arm-linux --bindir="/usr/bin" --sbindir="/usr/sbin" \
    --disable-udev --with-dbusconfdir="/etc" --with-dbussystembusdir=/usr/share/dbus-1/system-services --with-dbussessionbusdir=/usr/share/dbus-1/services \
    --disable-systemd --enable-shared=yes --enable-library --enable-static=no --enable-test --enable-testing --enable-deprecated \
    --enable-experimental --disable-cups --disable-client --libexecdir="/usr/bin"  \
    CC=arm-linux-gnueabihf-gcc GLIB_CFLAGS="-I$path/../include/glib-2.0  -I$path/../install/include/glib-2.0 -I$path/../install/lib/glib-2.0/include/" \
    GLIB_LIBS="-L$path/../install/lib -lreadline -lglib-2.0" \
    DBUS_CFLAGS="-I$path/../install/include -I$path/../install/include/dbus-1.0 -I$path/../install/lib/dbus-1.0/include" \
    DBUS_LIBS="-L$path/../install/lib -lreadline -lglib-2.0 -ldbus-1" ICAL_CFLAGS="-I$path/../install/include" ICAL_LIBS="-I$path/../install/lib -lical -licalvcal"
make DESTDIR="$path/../install"
make install DESTDIR="$path/../install"

注意,dbus和bluez中最好设置prefix为空,具体的install路径设置在make和make install时加上。否则应用会在开发板上运行时从指定的prefix中找相关文件,导致查找失败而无法启动

二.配置

1.交叉编译后的库放到开发板/lib/目录下,应用程序放到/usr/bin目录下

2.dbus与bluez会有一些配置文件,默认放到/etc/dbus-1/中,bluez中会有一个main.conf文件可以自动考虑放到哪个目录

#ls /etc/dbus-1
session.conf  session.d/    system.conf   system.d/
#ls /etc/dbus-1/system.d/
bluetooth.conf

三.运行

1. dbus-daemon --system

2. bluetoothd -n --compat -f main.conf &

四.测试

1. dbus测试

参考链接:

linux 进程间通信 dbus-glib【实例】详解二(上) 消息和消息总线(附代码)_Dontla的博客-CSDN博客_dbus实例讲解https://dontla.blog.csdn.net/article/details/122579082

1)  检测dbus基本接口

dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.Introspectable.Introspect
method return sender=org.freedesktop.DBus -> dest=:1.2 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <interface name="org.freedesktop.DBus">
    <method name="Hello">
      <arg direction="out" type="s"/>
    </method>
    <method name="RequestName">
      <arg direction="in" type="s"/>
      <arg direction="in" type="u"/>
      <arg direction="out" type="u"/>
    </method>
    <method name="ReleaseName">
      <arg direction="in" type="s"/>
      <arg direction="out" type="u"/>
    </method>
    <method name="StartServiceByName">
      <arg direction="in" type="s"/>
      <arg direction="in" type="u"/>
      <arg direction="out" type="u"/>
    </method>
    <method name="UpdateActivationEnvironment">
      <arg direction="in" type="a{ss}"/>
    </method>
    <method name="NameHasOwner">
      <arg direction="in" type="s"/>
      <arg direction="out" type="b"/>
    </method>
    <method name="ListNames">
      <arg direction="out" type="as"/>
    </method>
    <method name="ListActivatableNames">
      <arg direction="out" type="as"/>
    </method>
    <method name="AddMatch">
      <arg direction="in" type="s"/>
    </method>
    <method name="RemoveMatch">
      <arg direction="in" type="s"/>
    </method>
    <method name="GetNameOwner">
      <arg direction="in" type="s"/>
      <arg direction="out" type="s"/>
    </method>
    <method name="ListQueuedOwners">
      <arg direction="in" type="s"/>
      <arg direction="out" type="as"/>
    </method>
    <method name="GetConnectionUnixUser">
      <arg direction="in" type="s"/>
      <arg direction="out" type="u"/>
    </method>
    <method name="GetConnectionUnixProcessID">
      <arg direction="in" type="s"/>
      <arg direction="out" type="u"/>
    </method>
    <method name="GetAdtAuditSessionData">
      <arg direction="in" type="s"/>
      <arg direction="out" type="ay"/>
    </method>
    <method name="GetConnectionSELinuxSecurityContext">
      <arg direction="in" type="s"/>
      <arg direction="out" type="ay"/>
    </method>
    <method name="ReloadConfig">
    </method>
    <method name="GetId">
      <arg direction="out" type="s"/>
    </method>
    <method name="GetConnectionCredentials">
      <arg direction="in" type="s"/>
      <arg direction="out" type="a{sv}"/>
    </method>
    <property name="Features" type="as" access="read">
      <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
    </property>
    <property name="Interfaces" type="as" access="read">
      <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
    </property>
    <signal name="NameOwnerChanged">
      <arg type="s"/>
      <arg type="s"/>
      <arg type="s"/>
    </signal>
    <signal name="NameLost">
      <arg type="s"/>
    </signal>
    <signal name="NameAcquired">
      <arg type="s"/>
    </signal>
  </interface>
  <interface name="org.freedesktop.DBus.Introspectable">
    <method name="Introspect">
      <arg direction="out" type="s"/>
    </method>
  </interface>
  <interface name="org.freedesktop.DBus.Peer">
    <method name="GetMachineId">
      <arg direction="out" type="s"/>
    </method>
    <method name="Ping">
    </method>
  </interface>
  <node name="org/freedesktop/DBus"/>
</node>
"

2) 查询当前dbus注册对象

dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames
method return sender=org.freedesktop.DBus -> dest=:1.3 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.3"
      string "org.bluez"
      string ":1.1"
   ]

3) 查询bluez接口(bluetoothd启动后)

dbus-send --system --type=method_call --print-reply --dest=org.bluez / org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.1 -> dest=:1.4 reply_serial=2
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/>
</method></interface><interface name="org.freedesktop.DBus.ObjectManager"><method name="GetManagedObjects"><arg name="objects" type="a{oa{sa{sv}}}" direction="out"/>
</method><signal name="InterfacesAdded"><arg name="object" type="o"/>
<arg name="interfaces" type="a{sa{sv}}"/>
</signal>
<signal name="InterfacesRemoved"><arg name="object" type="o"/>
<arg name="interfaces" type="as"/>
</signal>
</interface><node name="org"/></node>"

dbus-send --system --type=method_call --print-reply --dest=org.bluez /org org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.1 -> dest=:1.5 reply_serial=2
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="bluez"/>
</node>
"

dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.6 -> dest=:1.17 reply_serial=2
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/>
</method></interface><interface name="org.bluez.AgentManager1"><method name="RegisterAgent"><arg name="agent" type="o" direction="in"/>
<arg name="capability" type="s" direction="in"/>
</method><method name="UnregisterAgent"><arg name="agent" type="o" direction="in"/>
</method><method name="RequestDefaultAgent"><arg name="agent" type="o" direction="in"/>
</method></interface><interface name="org.bluez.ProfileManager1"><method name="RegisterProfile"><arg name="profile" type="o" direction="in"/>
<arg name="UUID" type="s" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
</method><method name="UnregisterProfile"><arg name="profile" type="o" direction="in"/>
</method></interface><node name="hci0"/></node>"

dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.6 -> dest=:1.22 reply_serial=2
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/>
</method></interface><interface name="org.bluez.Adapter1"><method name="StartDiscovery"></method><method name="SetDiscoveryFilter"><arg name="properties" type="a{sv}" direction="in"/>
</method><method name="StopDiscovery"></method><method name="RemoveDevice"><arg name="device" type="o" direction="in"/>
</method><method name="GetDiscoveryFilters"><arg name="filters" type="as" direction="out"/>
</method><property name="Address" type="s" access="read"></property><property name="AddressType" type="s" access="read"></property><property name="Name" type="s" access="read"></property><property name="Alias" type="s" access="readwrite"></property><property name="Class" type="u" access="read"></property><property name="Powered" type="b" access="readwrite"></property><property name="Discoverable" type="b" access="readwrite"></property><property name="DiscoverableTimeout" type="u" access="readwrite"></property><property name="Pairable" type="b" access="readwrite"></property><property name="PairableTimeout" type="u" access="readwrite"></property><property name="Discovering" type="b" access="read"></property><property name="UUIDs" type="as" access="read"></property><property name="Modalias" type="s" access="read"></property></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"/>
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method><method name="Set"><arg name="interface" type="s" direction="in"/>
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method><method name="GetAll"><arg name="interface" type="s" direction="in"/>
<arg name="properties" type="a{sv}" direction="out"/>
</method><signal name="PropertiesChanged"><arg name="interface" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface><interface name="org.bluez.GattManager1"><method name="RegisterApplication"><arg name="application" type="o" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
</method><method name="UnregisterApplication"><arg name="application" type="o" direction="in"/>
</method></interface><interface name="org.bluez.Media1"><method name="RegisterEndpoint"><arg name="endpoint" type="o" direction="in"/>
<arg name="properties" type="a{sv}" direction="in"/>
</method><method name="UnregisterEndpoint"><arg name="endpoint" type="o" direction="in"/>
</method><method name="RegisterPlayer"><arg name="player" type="o" direction="in"/>
<arg name="properties" type="a{sv}" direction="in"/>
</method><method name="UnregisterPlayer"><arg name="player" type="o" direction="in"/>
</method></interface><interface name="org.bluez.NetworkServer1"><method name="Register"><arg name="uuid" type="s" direction="in"/>
<arg name="bridge" type="s" direction="in"/>
</method><method name="Unregister"><arg name="uuid" type="s" direction="in"/>
</method></interface><interface name="org.bluez.LEAdvertisingManager1"><method name="RegisterAdvertisement"><arg name="advertisement" type="o" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
</method><method name="UnregisterAdvertisement"><arg name="service" type="o" direction="in"/>
</method><property name="ActiveInstances" type="y" access="read"></property><property name="SupportedInstances" type="y" access="read"></property><property name="SupportedIncludes" type="as" access="read"></property></interface></node>"

4) dbus调试bluez

4.1)获取蓝牙状态

dbus-send --system --print-reply --type=method_call --dest=org.bluez / org.freedesktop.DBus.ObjectManager.GetManagedObjects
method return sender=:1.99 -> dest=:1.125 reply_serial=2
   array [
      dict entry(
         object path "/org/bluez"
         array [
            dict entry(
               string "org.freedesktop.DBus.Introspectable"
               array [
               ]
            )
            dict entry(
               string "org.bluez.AgentManager1"
               array [
               ]
            )
            dict entry(
               string "org.bluez.ProfileManager1"
               array [
               ]
            )
         ]
      )
      dict entry(
         object path "/org/bluez/hci0"
         array [
            dict entry(
               string "org.freedesktop.DBus.Introspectable"
               array [
               ]
            )
            dict entry(
               string "org.bluez.Adapter1"
               array [
                  dict entry(
                     string "Address"
                     variant                         string "CC:4B:73:F8:5B:15"
                  )
                  dict entry(
                     string "AddressType"
                     variant                         string "public"
                  )
                  dict entry(
                     string "Name"
                     variant                         string "%h-%d"
                  )
                  dict entry(
                     string "Alias"
                     variant                         string "ILSA_GW_106011111111111111"
                  )
                  dict entry(
                     string "Class"
                     variant                         uint32 0
                  )
                  dict entry(
                     string "Powered"
                     variant                         boolean false
                  )
                  dict entry(
                     string "Discoverable"
                     variant                         boolean false
                  )
                  dict entry(
                     string "DiscoverableTimeout"
                     variant                         uint32 0
                  )
                  dict entry(
                     string "Pairable"
                     variant                         boolean false
                  )
                  dict entry(
                     string "PairableTimeout"
                     variant                         uint32 0
                  )
                  dict entry(
                     string "Discovering"
                     variant                         boolean false
                  )
                  dict entry(
                     string "UUIDs"
                     variant                         array [
                           string "00001800-0000-1000-8000-00805f9b34fb"
                           string "00001801-0000-1000-8000-00805f9b34fb"
                           string "0000110e-0000-1000-8000-00805f9b34fb"
                           string "00001200-0000-1000-8000-00805f9b34fb"
                           string "0000110c-0000-1000-8000-00805f9b34fb"
                           string "000000ee-0000-1000-8000-00805f9b34fb"
                        ]
                  )
                  dict entry(
                     string "Modalias"
                     variant                         string "usb:v1D6Bp0246d0530"
                  )
               ]
            )
            dict entry(
               string "org.freedesktop.DBus.Properties"
               array [
               ]
            )
            dict entry(
               string "org.bluez.GattManager1"
               array [
               ]
            )
            dict entry(
               string "org.bluez.Media1"
               array [
               ]
            )
            dict entry(
               string "org.bluez.NetworkServer1"
               array [
               ]
            )
            dict entry(
               string "org.bluez.LEAdvertisingManager1"
               array [
                  dict entry(
                     string "ActiveInstances"
                     variant                         byte 0
                  )
                  dict entry(
                     string "SupportedInstances"
                     variant                         byte 1
                  )
                  dict entry(
                     string "SupportedIncludes"
                     variant                         array [
                           string "local-name"
                        ]
                  )
               ]
            )
         ]
      )
   ]

4.2) 启动蓝牙

dbus-send --system --print-reply --type=method_call --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:true
method return sender=:1.99 -> dest=:1.126 reply_serial=2
interface org.bluez.Adapter1, name Powered[CHG] Controller CC:4B:73:F8:5B:15 Powered: yes

4.3)获取MAC地址

dbus-send --system --print-reply --type=method_call --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Properties.Get string:org.bluez.Adapter1 string:Address
method return sender=:1.99 -> dest=:1.127 reply_serial=2
   variant       string "CC:4B:73:F8:5B:15"

4.4)设置蓝牙名

dbus-send --system --print-reply --type=method_call --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Alias variant:string:tttttee
eeesssstttt
method return sender=:1.99 -> dest=:1.128 reply_serial=2
interface org.bluez.Adapter1, name Alias[CHG] Controller CC:4B:73:F8:5B:15 Alias: ttttteeeeesssstttt

4.5)开始扫描

dbus-send --system --print-reply --type=method_call --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter1.StartDiscovery
method return sender=:1.147 -> dest=:1.154 reply_serial=2

5.补充

dbus提供的借口很不全面,尤其是没有切换蓝牙工作模式(BLE与BREDR切换),所以很多时候还是需要使用mgmt_send命令进行开发

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

bluez调试笔记 的相关文章

  • armv8 NEON if 条件

    我想了解armv8 NEON内联汇编代码中的if条件 在armv7中 这可以通过检查溢出位来实现 如下所示 VMRS r4 FPSCR BIC r4 r4 1 lt lt 27 VMSR FPSCR r4 vtst 16 d30 d30 d
  • 理解这部分手臂的汇编代码

    syntax unified thumb cpu cortex m4 arch armv7e m fpu fpv4 sp d16 Changes from unprivileged to privileged mode thumb func
  • 使用 GCC 编译器为代码的特定部分保留寄存器

    是否可以为 C 代码的特定部分保留寄存器 ffixed reg 选项或声明全局寄存器变量不是我正在寻找的答案 我想保留特定范围 比如说特定函数 的寄存器值 使用局部寄存器变量是不可能的 因为它不能保证在整个范围内保留寄存器的值 我正在寻找类
  • 适用于arm(cortex-m3)的位置独立可执行文件(-pie)

    我正在使用codesourcery g lite 基于gcc4 7 2版本 为stm32 Cortex m3 编程 我希望动态加载可执行文件 我知道我有两个选择 1 可重定位的elf 需要一个elf解析器 2 具有全局偏移寄存器的位置无关代
  • 使用 gnueabihf 为 ARMv6 构建

    我尝试为 ARMv6 构建应用程序 但失败了 我猜问题是工具链支持硬浮点 但 ARMv6 不支持 好吧 首先我设置 march armv6 编译失败 opt gcc linaro arm linux gnueabihf 4 8 2014 0
  • RAM 存储二进制数和汇编语言的冒泡排序

    我必须使用 ARM v7 执行一个例程 在 RAM 内存中存储 10 个二进制数 然后使用冒泡排序对这些数字从高到低进行排序 我应该如何开始 func bubbleSortAscendingU32 ldr r3 r0 4 mov r1 9
  • ARM Cortex A8 PMNC 读取在启用后也给出 0.. 有什么想法/建议吗?

    MODULE LICENSE GPL MODULE DESCRIPTION user mode access to performance registers int init arm init void unsigned int valu
  • C 嵌入式应用程序中 time() 函数的问题

    我在用time 在 ARM 微控制器上 处理器一到达此函数就会重新启动 奇怪的是 当我处于调试模式时 代码运行得很好 但一旦我想将其应用到独立模式 我就会遇到重置 我是否忽略了什么 这个功能有替代品吗 代码部分是这样的 include
  • 读取和打印手臂组件中的字符串

    我正在使用 ARMSim 刚刚开始学习汇编 所以如果我看起来一无所知 请原谅我 但我正在尝试从输入文件中读取字符串 然后将其打印到输出屏幕 到目前为止我有 equ SWI Open 0x66 open a file equ SWI Clos
  • Linux malloc() 在 ARM 和 x86 上的行为是否不同?

    这个网站上有很多关于内存分配的问题 但是我 找不到专门解决我的问题的人 这 问题 https stackoverflow com questions 19148296 linux memory overcommit details似乎最接近
  • ARM + gcc:不要使用一大块 .rodata 部分

    我想使用 gcc 编译一个程序 并针对 ARM 处理器进行链接时间优化 当我在没有 LTO 的情况下编译时 系统会被编译 当我启用 LTO 时 使用 flto 我收到以下汇编错误 错误 无效的文字常量 池需要更近 环顾网络 我发现这与我系统
  • 分析 Cortex-M7 (stm32f7) 上的 memcpy 性能

    简洁版本 从 GNU ARM 工具链中提取的 memcpy 的性能指标在 ARM Cortex M7 上对于不同的副本大小似乎差异很大 即使复制数据的代码始终保持不变 这可能是什么原因造成的 长版 我是使用 GNU Arm 工具链 11 2
  • 使用 Android NDK 使用 -fsigned-char 进行构建安全吗?

    为了与其他平台保持一致 我需要使用signed char在我正在处理的一些本机代码中 但默认情况下在Android NDK上char类型是unsigned 我尝试明确使用signed char类型 但它生成太多警告differ in sig
  • ARM 系统调用的接口是什么?它在 Linux 内核中的何处定义?

    我读过有关 Linux 中的系统调用的内容 并且到处都给出了有关 x86 架构的描述 0x80中断和SYSENTER 但我无法追踪 ARM 架构中系统调用的文件和进程 任何人都可以帮忙吗 我知道的几个相关文件是 arch arm kerne
  • AOSP 的“午餐”组合是什么意思?我需要选择什么?

    我是 Android 设备 ROM 开发的新手 无论如何 我现在正在为具有 64 位处理器的中国设备构建 AOSP 我按照 source android com 上的菜单进行操作 当我运行 午餐 命令时 终端显示 午餐菜单 选择一个组合 我
  • 如何模拟ARM处理器运行环境并加载Linux内核模块?

    我尝试加载我的vmlinux into gdb并使用 ARM 内核模拟器 但我不明白为什么我会得到Undefined target command sim 这是外壳输出 arm eabi gdb vmlinux GNU gdb GDB 7
  • ARM Chromebook 上的 Android 开发环境?

    我尝试了多次安装和使用安卓工作室 https developer android com studio index html on an ARM Chromebook C100P https archlinuxarm org platfor
  • iPhone 3GS 上的 ARM 与 Thumb 性能比较,非浮点代码

    我想知道是否有人有关于 iPhone 3GS 上 ARM 与 Thumb 代码性能的硬性数据 特别是对于非浮点 VFP 或 NEON 代码 我知道 Thumb 模式下的浮点性能问题 更大的 ARM 指令的额外代码大小是否会在某个时刻成为性能
  • GCC C++ (ARM) 和指向结构体字段的 const 指针

    假设有一个简单的测试代码 typedef struct int first int second int third type t define ADDRESS 0x12345678 define REGISTER type t ADDRE
  • 架构armv7的重复符号

    尝试在我现有的应用程序中使用 Layar SDK 时出现以下错误 我该如何解决这个问题 Ld Users pnawale Library Developer Xcode DerivedData hub afxxzaqisdfliwbzxbi

随机推荐

  • 4行代码计算9999的阶乘

    转载自 http blog csdn net liangbch article details 3230428 本文来源于csdn2001年的一个帖子 题目是有谁可以用四行代码求出1000000的阶乘 见 http topic csdn n
  • MySQL数据库增删改查及安全值守操作

    我在本篇文章中整理了一些MySQL数据库 表 字段的增删改查和安全值守操作的常用语句 以便同学们保存和快捷查询 详细如下 1 用户的查看 创建 删除 以username为Superman password为123123为例 用户的创建cre
  • python模拟登录京东网页

    目标网站 京东网首页登录 目标网址 https www jd com 任务要求 1 导入selenium库 并使用该库驱动Chrom浏览器 完成请求 2 驱动浏览器对象 找到登录按钮 点击 3 在新页面中选择账号登录 4 找到用户名和密码输
  • Ubuntu 安装 Mysql【详细步骤】

    文章目录 主要内容 安装并设置 mysql 安装 mysql 设置 mysql 首次登录数据库 配置远程访问 修改配置文件 mysql 授予权限 重启 mysql 测试远程访问 建立访问连接 workbench 访问 workbench 增
  • [Springboot+Logback]已定义日志路径但仍生成了LOG_PATH_IS_UNDEFIEND文件夹之解决办法

    目录 1 问题描述 2 分析过程 3 解决办法 4 其他 1 问题描述 自己写练习项目的时候 在application yml中定义了logging file path logging file path logs 也在logback sp
  • 松下GF9使用心得

    文章目录 规格参数 关键特征 USB接口充电功能 旋转显示屏 WiFi直连 4K拍摄和后对焦模式 快速指南 机身按键及功能 拍摄模式 屏显信息 拍摄时 回放时 菜单列表 拍摄菜单 动态影像菜单 自定义菜单 设置菜单 回放菜单 核心功能 拍摄
  • Python之struct简介

    一 struct简介 看到struct这么英文单词 大家应该并不陌生 因为c c 中就有struct 在那里struct叫做结构体 在Python中也使用struct 这充分说明了这个struct应该和c c 中的struct有很深的渊源
  • 保姆级教学——集群环境搭建及创建集群

    保姆级教学 集群环境搭建及创建集群 新建虚拟机 一些默认 加载镜像开启虚拟机 在安装位置选择自己目录 然后建立分区 首先添加 挂载点 类型标准分区 文件系统ext4 加载分区 期望给2G 类型标准分区 swap默认 然后剩下47G给 就可以
  • 发布本地Docker镜像到阿里云的Docker Hub

    发布本地Docker镜像到阿里云的Docker Hub 在使用Docker时 有时需要制作自己的Docker镜像 这些镜像可以保存到不同的Docker Hub中 包括Docker官方的和国内的一些Hub 比如阿里云 同时 也可以使用阿里云的
  • 排列组合相关公式讲解(Anm,Cnm等)

    两个性质 1 C n m C n n m 2 C n m C n 1 m C n 1 m 1 编程时可用此递推
  • Python最强学习知识点:面相对象基础语法

    面相对象基础语法 目标 dir 内置函数 定义简单的类 只包含方法 方法中的 self 参数 初始化方法 内置方法和属性 01 dir 内置函数 知道 在 Python 中 对象几乎是无所不在的 我们之前学习的 变量 数据 函数 都是对象
  • 单周期RISC-V架构CPU的设计---设计篇

    目录 一 模块设计 1 pc reg v 1 1 功能说明 1 2 整体框图 1 3 接口列表 1 4 内部信号说明 1 5 关键电路 2 id v 2 1 功能说明 2 2 整体框图 2 3 接口列表 2 4 内部信号说明 2 5 关键电
  • Vim语法检查插件cppSyntaxCheck

    下载cppSyntaxCheck master https github com sjp 1024 Classroom notes blob master cppSyntaxCheck master zip 将解压文件中的cppSyntax
  • 40+野路子学习软件编程记录

    1 软件几乎零基础 机械专业 手机行业项目管理工作 2 疫情期间 闲来无事 突发兴趣 3 有点开窍入门 4 树莓派Linux学习入手 openwrt homeassiant airplay和媒体局域网服务等 5 学习Python读ds18b
  • postgresql导出表结构

    pg dump命令可以导出数据库中的表结构 s 选项用来只导出表结构 而不会导出表中的数据 t 选项用来指定要导出的数据库表 pg dump s t tlb exampledb gt tmp tlb exampledb是数据库 tlb是ex
  • MySQL对大小写敏感吗

    见字如面 见标题知内容 你有遇到过因为MYSQL对大小写敏感而被坑的体验吗 之前看过阿里巴巴Java开发手册 在MySql建表规约里有看到 强制 表名 字段名必须使用小写字母或数字 禁止出现数字开头 禁止两个下划线中间只 出现数字 数据库字
  • Python代码:根据txt文件批量提取图片

    个人微信公众号 AI研习图书馆 欢迎关注 深度学习知识及资源分享 学习交流 共同进步 1 介绍 Python代码 根据txt文件批量提取图片并保存至另一文件夹 用于深度学习 图片数据预处理 2 Python代码 实现方案一 import s
  • vue点击按钮跳转新页面

    const str location href split 0 window open str router的name
  • java自动登录 selenium 自动登录并获取cookie

    选择操作网页 我用的edge 谷歌我的版本太高没有对应的驱动 下载Edge的驱动程序 直接解压就好里面只有一个 exe文件 https developer microsoft com en us microsoft edge tools w
  • bluez调试笔记

    蓝牙系列 bluez调试笔记 weixin 41069709的博客 CSDN博客 bluezbluez移植https blog csdn net weixin 41069709 article details 125168114 spm 1