yinxx

  • 2024-08-14
  • 回复了主题帖: >>征集 | 使用 MCU,哪些问题最令你头大?

    1、比如说,有些基本模块的功能演示不能够保持一致性,也就是说在stm32f103系列芯片上能够实现的功能,不能简单直接的移植到stm32h533这样的情形。 2、手册里面的文字描述似乎给人一种静悄悄的感觉,既不能在出现问题的时候及时的咨询回应,只能通过不断的思考和质疑,参考其他案例,或者sdk中携带的例子进行初步的实现,对于一下功能比较复杂的方式,就不能快速的定位问题和实现 3、既然已经有芯片手册,为什么不配套出一下对应的芯片手册解读和对应功能的实现方面的视频 4、或者建立一个反馈机制,能够及时解决一下看不明白,或者实现逻辑方面的问题

  • 2024-07-29
  • 加入了学习《Verilog RTL编程实践》,观看 Verilog RTL编程实践 1

  • 2024-07-27
  • 回复了主题帖: 【NUCLEO H533RE】AES软硬件算法对比测试

    收藏、点赞!向作者的钻研精神致敬!!!

  • 2024-01-18
  • 发表了主题帖: 不完善的密码锁只好实现矩阵键盘

     作品名称:不完善的密码锁只好实现矩阵键盘 作者:yinxx # Include the library files import RPi.GPIO as GPIO from time import sleep # Enter column pins C1 = 5 C2 = 6 C3 = 13 C4 = 19 # Enter row pins R1 = 12 R2 = 16 R3 = 20 R4 = 21 keypadPressed = -1 # Enter your PIN secretCode = "1111" input = "" # Setup GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) # Set column pins as output pins GPIO.setup(C1, GPIO.OUT) GPIO.setup(C2, GPIO.OUT) GPIO.setup(C3, GPIO.OUT) GPIO.setup(C4, GPIO.OUT) # Set row pins as input pins GPIO.setup(R1, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(R2, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(R3, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(R4, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # This callback registers the key that was pressed # if no other key is currently pressed def keypadCallback(channel): global keypadPressed if keypadPressed == -1: keypadPressed = channel # Detect the rising edges GPIO.add_event_detect(R1, GPIO.RISING, callback=keypadCallback) GPIO.add_event_detect(R2, GPIO.RISING, callback=keypadCallback) GPIO.add_event_detect(R3, GPIO.RISING, callback=keypadCallback) GPIO.add_event_detect(R4, GPIO.RISING, callback=keypadCallback) # Sets all rows to a specific state. def setAllRows(state): GPIO.output(C1, state) GPIO.output(C2, state) GPIO.output(C3, state) GPIO.output(C4, state) # Check or clear PIN def commands(): global input pressed = False GPIO.output(C1, GPIO.HIGH) # Clear PIN if (GPIO.input(R1) == 1): print("Input reset!"); sleep(1) pressed = True GPIO.output(C1, GPIO.HIGH) # Check PIN if (not pressed and GPIO.input(R2) == 1): if input == secretCode: print("Code correct!") else: print("Incorrect code!") pressed = True GPIO.output(C1, GPIO.LOW) if pressed: input = "" return pressed # reads the columns and appends the value, that corresponds # to the button, to a variable def read(column, characters): global input GPIO.output(column, GPIO.HIGH) if(GPIO.input(R1) == 1): input = input + characters[0] print(input) if(GPIO.input(R2) == 1): input = input + characters[1] print(input) if(GPIO.input(R3) == 1): input = input + characters[2] print(input) if(GPIO.input(R4) == 1): input = input + characters[3] print(input) GPIO.output(column, GPIO.LOW) try: while True: input = input("Enter your PIN: ") # If a button was previously pressed, # check, whether the user has released it yet if keypadPressed != -1: setAllRows(GPIO.HIGH) if GPIO.input(keypadPressed) == 0: keypadPressed = -1 else: sleep(0.1) # Otherwise, just read the input else: if not commands(): read(C1, ["D","C","B","A"]) read(C2, ["#","9","6","3"]) read(C3, ["0","8","5","2"]) read(C4, ["*","7","4","1"]) sleep(0.1) else: sleep(0.1) except KeyboardInterrupt: print("Stopped!")       首先我的想法是充分发挥手中的可以直接上手,最简单的方式使用的,最小方案吧。于是我决定还是弄个矩阵键盘的python程序控制看看。   按照这个接线方式进行连线,我不上图了,因为有参考视频。我最后的实现就是这个视频的样子。   [localvideo]285d674ba92a9461cbef8e76befedf2f[/localvideo]  

  • 2024-01-11
  • 发表了主题帖: 【DigiKey创意大赛】密码锁+矩阵键盘的读取python实现

    首先我的想法是充分发挥手中的可以直接上手,最简单的方式使用的,最小方案吧。于是我决定还是弄个矩阵键盘的python程序控制看看。 # Include the library files import RPi.GPIO as GPIO from time import sleep # Enter column pins C1 = 5 C2 = 6 C3 = 13 C4 = 19 # Enter row pins R1 = 12 R2 = 16 R3 = 20 R4 = 21 keypadPressed = -1 # Enter your PIN secretCode = "1111" input = "" # Setup GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) # Set column pins as output pins GPIO.setup(C1, GPIO.OUT) GPIO.setup(C2, GPIO.OUT) GPIO.setup(C3, GPIO.OUT) GPIO.setup(C4, GPIO.OUT) # Set row pins as input pins GPIO.setup(R1, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(R2, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(R3, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.setup(R4, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # This callback registers the key that was pressed # if no other key is currently pressed def keypadCallback(channel): global keypadPressed if keypadPressed == -1: keypadPressed = channel # Detect the rising edges GPIO.add_event_detect(R1, GPIO.RISING, callback=keypadCallback) GPIO.add_event_detect(R2, GPIO.RISING, callback=keypadCallback) GPIO.add_event_detect(R3, GPIO.RISING, callback=keypadCallback) GPIO.add_event_detect(R4, GPIO.RISING, callback=keypadCallback) # Sets all rows to a specific state. def setAllRows(state): GPIO.output(C1, state) GPIO.output(C2, state) GPIO.output(C3, state) GPIO.output(C4, state) # Check or clear PIN def commands(): global input pressed = False GPIO.output(C1, GPIO.HIGH) # Clear PIN if (GPIO.input(R1) == 1): print("Input reset!"); sleep(1) pressed = True GPIO.output(C1, GPIO.HIGH) # Check PIN if (not pressed and GPIO.input(R2) == 1): if input == secretCode: print("Code correct!") else: print("Incorrect code!") pressed = True GPIO.output(C1, GPIO.LOW) if pressed: input = "" return pressed # reads the columns and appends the value, that corresponds # to the button, to a variable def read(column, characters): global input GPIO.output(column, GPIO.HIGH) if(GPIO.input(R1) == 1): input = input + characters[0] print(input) if(GPIO.input(R2) == 1): input = input + characters[1] print(input) if(GPIO.input(R3) == 1): input = input + characters[2] print(input) if(GPIO.input(R4) == 1): input = input + characters[3] print(input) GPIO.output(column, GPIO.LOW) try: while True: input = input("Enter your PIN: ") # If a button was previously pressed, # check, whether the user has released it yet if keypadPressed != -1: setAllRows(GPIO.HIGH) if GPIO.input(keypadPressed) == 0: keypadPressed = -1 else: sleep(0.1) # Otherwise, just read the input else: if not commands(): read(C1, ["D","C","B","A"]) read(C2, ["#","9","6","3"]) read(C3, ["0","8","5","2"]) read(C4, ["*","7","4","1"]) sleep(0.1) else: sleep(0.1) except KeyboardInterrupt: print("Stopped!")    [localvideo]87d60915408e4fd858557be09a3f6afb[/localvideo] 这个是参考视频

  • 2024-01-02
  • 发表了主题帖: 【DigiKey创意大赛】作品名称+还是先尝试一下基础的实现

    处于最初对这个密码锁项目的不了解,以为简单看一看视频就可以完成整个项目 但是在实践过程中遇到的第一个问题就是 1、继电器是一个独立原件,不是模块,不能方便的直接与树莓派进行连接 2、然后就是驱动电磁阀的问题,据了解也不能直接与树莓派连接,说是有反电动势,会烧毁器件 真的很痛苦,难道人就是被痛苦驱动者的吗? 我只好先抽时间弄一个blink的小实践 上视频 [localvideo]a7cd8ce315ef4ab80f6b59b5a2ed62e6[/localvideo] 后面如果有时间的话,在实现一个矩阵按键的小实践。 目前看来,程序方面都有很多参考的,网上也是一大堆,而对于我来说,困境竟然是硬件的资源不足,导致有些事情不能顺利进行。 希望大赛课题组能够体会我的困境 我也希望能够尽快突破  

  • 2023-12-22
  • 发表了主题帖: 【DigiKey“智造万物,快乐不停”创意大赛】电磁阀和继电器物理连线的确定

    拿到物料之后,有那么一段时间开始熟悉怎么进行连线。后来也跟着b站上面的视频学习了相关的章节。但是发现里面用到的都是模块化的器件,而我在本次 活动中采用的都是独立的元器件,难不成还要自己画个pcb板子,才可以正常使用那个继电器来控制电磁阀吗? 我正在郁闷中。 后来在网上开始了解能不能直接的进行物理电气的连接,就是直接用杜邦线连接继电器先。 这个原理图跟我的手里面的原件结构比较相似,但是我最终希望实现的结构是这个样子的: 当然这个是过于完美的一张连接图示,因为我的原件只能够做最基本的连接处理。 但是目前就是卡在这里了。 我不清楚怎么进行物理连接,我正在熟悉这个过程,但是对于代码方面的话,目前的问题应该不是很大。 比如说我最后要实现继电器控制电磁阀通过gpio口 控制电磁阀的代码 ## 代码 ```python import RPi.GPIO as GPIO import time # 设置GPIO引脚模式为BCM GPIO.setmode(GPIO.BCM) # 定义电磁阀引脚 solenoid_pin = 17 # 设置电磁阀引脚为输出模式 GPIO.setup(solenoid_pin, GPIO.OUT) # 主循环 while True: # 打开电磁阀 GPIO.output(solenoid_pin, GPIO.HIGH) time.sleep(1) # 保持电磁阀打开1秒 # 关闭电磁阀 GPIO.output(solenoid_pin, GPIO.LOW) time.sleep(1) # 保持电磁阀关闭1秒 ``` ## 说明 * 在此代码中,我们将电磁阀引脚设置为17,但您可以根据您的实际情况进行修改。 * 在主循环中,我们将电磁阀打开1秒,然后关闭1秒,您可以根据您的需要调整时间。 * 当您运行此代码时,电磁阀将不断打开和关闭,您可以通过观察来验证其工作是否正常。 * 当您需要停止运行此代码时,请按Ctrl+C组合键以退出程序并释放GPIO引脚 import RPi.GPIO as GPIO import time # Set the GPIO mode GPIO.setmode(GPIO.BCM) # Set the relay pin as output relay_pin = 4 # Change this to the pin you have connected the relay to GPIO.setup(relay_pin, GPIO.OUT) # Main loop while True: GPIO.output(relay_pin, GPIO.HIGH) # Turn on the solenoid valve time.sleep(1) # Wait for 1 second GPIO.output(relay_pin, GPIO.LOW) # Turn off the solenoid valve time.sleep(1) # Wait for 1 second 上面是独立的2段可以用来进行参考的代码 希望主办方不要着急,我也是尽力抽时间就开始熟悉,毕竟没人问,效率比较低。看来我要到群里面多说说话。

  • 2023-11-28
  • 发表了主题帖: 【玄铁杯第三届RISC-V应用创新大赛】总结

    本帖最后由 yinxx 于 2023-11-28 12:24 编辑   基于licheepi4A ,riscv架构的stable diffusion的移植   作者:yinxx 项目背景(100-200字) 出于对riscv芯片架构的兴趣,最初打算通过移植stable diffusion,来学习一下相关的技术细节。一方面因为stable diffusion是一个人工智能相关的开源项目,其次在移植的过程中可能会涉及到一些问题,这样就可以在一边解决问题一边学习技术的方式来丰富自己的经验。于是打算先按照最初申请的方案开始进行移植的过程。逐步熟悉riscv的指令集架构,逐步熟悉相关包在licheepi4A中的build过程,逐步解决问题,希望能够一切顺利。     作品简介(100-200字) stable diffusion是一个开源模型,并遵行相关开源协议。虽然在x86和mac,以及arm上已经进行了适配,但是在riscv64上面相关的工作才刚刚开始,伴随这次平头哥举办的活动,很荣幸也很幸运能够参与进来,体会一下licheepi4A的相关性能,虽然通读stable diffusion的源代码意义不是很大,但是在移植过程中会遇到很多问题,希望在这个过程中能够积累经验并分享经验,最终提升自己的实力       系统框图(图文结合)     各部分功能说明(图文结合):具体可以参看论坛上帖子的链接 视频演示(视频简介+链接)  [localvideo]db646065881b2fd8fc1b249bb3fe9efa[/localvideo]   发布的博文(附上标题和平头哥发布链接) https://bbs.eeworld.com.cn/thread-1258651-1-1.html https://bbs.eeworld.com.cn/thread-1258641-1-1.html https://bbs.eeworld.com.cn/thread-1260132-1-1.html https://bbs.eeworld.com.cn/thread-1261334-1-1.html https://bbs.eeworld.com.cn/thread-1263165-1-1.html       项目总结(对作品完成度、技术探索、创新点等方面进行总结)

  • 2023-11-15
  • 加入了学习《村田 RFID:基于RFID技术医疗物资只能管理应用方案》,观看 基于RFID技术医疗物资只能管理应用方案

  • 2023-11-14
  • 发表了主题帖: 【DigiKey“智造万物,快乐不停”创意大赛】烧录镜像,vnc登陆,还没开始驱动gpio

    关注引脚分配的情况,参考https://pinout.xyz/ 在烧录镜像的方面,最好是参考 古月居的一篇博客,里面提到在镜像烧录的时候,最好用树莓派官方提供的工具,还有官方提供的镜像。 https://www.guyuehome.com/43433   1、如何连接vnc Re: Issues setting up realVNC as complete beginner Quote Mon Oct 16, 2023 7:57 pm Thanks for the reply! I've just used the OS recommended by the installer, which says it's a port of Debian Bookworm, I'm uncertain about Bookworm or Wayland, but I'll make that my next point of research! I've just finished trying again from scratch, and documented my actions step-by-step to hopefully better document and describe what I've tried, to see if that helps. I believe in the process I tried both of your recommendations! What I've attempted so far: 1. Erased 64 GB microSD card with Raspberry Pi Imager 2. Wrote Raspberry Pi OS (32-bit) to the microSD with Raspberry Pi Imager 3. Put microSD into RPi and powered on. 4. Connected to RPi from a Mac using Code: Select all $ ssh <user>@<hostname>.local 5. Encountered the following error:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the <redacted> key sent by the remote host is <redacted>. Please contact your system administrator. Add correct host key in /Users/<user>/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/<user>/.ssh/known_hosts:3 Host key for <hostname>.local has changed and you have requested strict checking. Host key verification failed. 6. Resolved this error by: 1. Identifying the IP address with ping <hostname>.local 2. Running the command Code: Select all $ ssh-keygen -R <IP address> 3. Ran Code: Select all $ ssh <user>@<hostname>.local again which enabled connection after confirming with “yes” and entering my password 7. To enable realVNC on command line I: 1. Opened raspi-config with Code: Select all $ sudo raspi-config 2. Navigated to Interface Options -> VNC 3. Selected “YES” when asked “Would you like the VNC Server to be enabled?” 4. Navigated to Display Options -> VNC Resolution and selected 1920x1080 5. Navigated to System Options -> Boot/Auto Login and selected Desktop GUI, requiring user to login 6. Exited raspi-config and said yes to rebooting. 8. Once rebooted, connected again over ssh, then on a Mac I opened VNC viewer and entered the RPi’s IP address 9. I then again received the error “Unable to connect to VNC Server using your chosen security setting. Either upgrade VNC Server to a more recent version from RealVNC, or select a weaker level of encryption.” 10. I then logged in as root using Code: Select all $ sudo su to see if root permissions would help alleviate the problem. 1. Opened raspi-config with Code: Select all sudo raspi-config 2. Navigated to Interface Options -> VNC 3. Selected “YES” when asked “Would you like the VNC Server to be enabled?” 4. Upon selecting “YES” I got the message “The VNC Server is enabled” but it had overlayed this error on top “<ERROR: ../src/main.c: 386: Failed to connect to WAYLAND_DISPLAY="wayland-1" │ └─────────────────ERROR: ../src/main.c: 387: Ensure wayland is running with that display name ERROR: ../src/main.c: 1391: Failed to initialise wayland” 5. Not knowing what this error meant, I proceeded as before: 6. Navigated to Display Options -> VNC Resolution and selected 1920x1080 7. Navigated to System Options -> Boot/Auto Login and selected Desktop GUI, requiring user to login 8. Exited raspi-config and said yes to rebooting. 11. The same error as before then persisted when again attempting to connect with realVNC. 12. I then updated the RPi in case it was an issue with it being an old release by: 1. Running Code: Select all $ sudo apt update && sudo apt upgrade 2. Rebooting 3. Connecting again via ssh and opening raspi-config 4. Updated raspi-config via Option 8, Update 5. Rebooted 13. I then attempted to connect using VNC Viewer on a Mac again, and encountered the same aforementioned error. 14. I’ve since also run Code: Select all $ sudo apt-get update && sudo apt-get upgrade as well as Code: Select all $ sudo apt full-upgrade , none of these resulted in any change to the error either. Looking back, the error I received the second time I tried enabling the VNC in raspi-config mentions Wayland, so I'll look into teaching myself about that as a matter of urgency. Thanks again for any help! User avatarrpiMike Posts: 2674 Joined: Fri Aug 10, 2012 12:38 pm Location: Cumbria, UK Re: Issues setting up realVNC as complete beginner Quote Mon Oct 16, 2023 8:25 pm RealVNC does not yet work on Bookworm as specified in the Bookworm news.       2、如何安装wiringpi 使用sudo apt-get install wiringpi 指令安装wiringpi包时,出现下面的提示: Reading package lists... Done Building dependency tree... Done Reading state information... Done Package wiringpi is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'wiringpi' has no installation candidate 解决方案: Gordon在该链接中写道树莓派Raspberry pi 4B版本中需要用到新的2.52的wiringpi包,安装方式为 cd /tmp wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb https://github.com/WiringPi/WiringPi The question shows different architectures armhf vs. arm64 for the packages. dpkg: dependency problems prevent configuration of wiringpi:armhf:  wiringpi:armhf depends on libc6.           ^^^^^ Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name                  Version                   Architecture Description +++-=====================-=========================-============-==============> ii  libc6:arm64           2.31-13+rpt2+rpi1+deb11u2 arm64        GNU C Library:>           ^^^^^ Apparently you try to install a 32-bit package on a 64-bit system. In Seamus' answer there is some useful information which might get overlooked in the longer text telling opinion and explanation about the wiringpi project. The wiringpi project has a GitHub site from which they distribute a .deb file that can be downloaded and installed - the links are at the bottom of the page. There are 2 .deb files - one for 32-bit RPi OS & one for 64-bit OS. On the Releases page of this GitHub project you can see two versions of the package: wiringpi-2.61-1-arm64.deb wiringpi-2.61-1-armhf.deb Try to purge the armhf version and install the arm64 version.   3、led代码blink.c的编译 GCC编译bink.c生成bink程序的代码如下: #include <wiringPi.h> int main(void) {     wiringPiSetup();     pinMode(0, OUTPUT);     while(1)     {         digitalWrite(0, HIGH);         delay(500);         digitalWrite(0, LOW);         delay(500);     }     return 0; } gcc -Wall -o blink blink.c -lwiringPi sudo ./blink gcc -o blink blink.c -lwiringPi http://wiringpi.com/wiringpi-updated-to-2-52-for-the-raspberry-pi-4b/ 4、远程登陆到树莓派,在终端中输入「gpio readall」,可获取到引脚对应关系, wiringPi库内置了一个gpio函数,该函数可以直接从终端访问GPIO,而无需编写任何代码。在终端中输入「gpio -h」可获取到gpio函数的应用说明: 5、大量实例参考: https://github.com/timwaizenegger/raspberrypi-examples.git        

  • 回复了主题帖: 【玄铁杯第三届RISC-V应用创新大赛】sd 安装成功,目前只剩下最后一步或两步

    https://wiki.sipeed.com/hardware/zh/lichee/th1520/lpi4a/8_application.html#Stable-Diffusion

  • 回复了主题帖: 【玄铁杯第三届RISC-V应用创新大赛】sd 安装成功,目前只剩下最后一步或两步

    参考的链接在这里:https://www.yuque.com/za4k4z/yp3bry/tx9hcuw35s9x24po

  • 发表了主题帖: 【玄铁杯第三届RISC-V应用创新大赛】sd 安装成功,目前只剩下最后一步或两步

    之前的一些操作,把系统给搞复杂了,本打算通过移植sd来学习一下,关于移植的方方面面,但是经过咨询和相关大佬的帮助,发现并没有经过汇编这些过程就直接build后,sd安装成功了,对应的bin文件也出来了。 参考的过程如图所示: 但是首先是重新烧录镜像,由于我的系统是比较老旧的,所以安装起来还是担心失败,没想到最后还是比较顺利的完成了镜像的烧录。   首先这些都有在虚拟环境下安装和运行: 使用如下命令,安装 venv 包,用于创建python虚拟环境 apt install python3.11-venv 以在 root 目录中创建 python虚拟环境为例,创建并激活命令如下: cd /root python3 -m venv ort source /root/ort/bin/activate  Stable Diffusion# 项目地址 本示例通过这个项目在 LPi4A 上运行 Stable Diffusion。 首先,我们需要构建 XNNPACK: git clone https://github.com/google/XNNPACK.git cd XNNPACK git checkout 3f56c91b492c93676a9b5ca4dd51f528b704c309 mkdir build cd build cmake -DXNNPACK_BUILD_TESTS=OFF -DXNNPACK_BUILD_BENCHMARKS=OFF .. cmake --build . --config Release   接下来,构建 Stable Diffusion example: git clone https://github.com/vitoplantamura/OnnxStream.git cd OnnxStream cd src mkdir build cd build cmake -DXNNPACK_DIR=<此处替换为clone的XNNPACK存放路径> .. cmake --build . --config Release Copy 现在我们得到了可运行的 Stable Diffusion example 文件 sd ,使用如下参数运行: ./sd --models-path . --rpi Copy 其中,--models-path 是从该项目 Release 页面中下载的模型文件,可以放到 sd 文件的所在目录下。 运行时的配置如下: ----------------[start]------------------ positive_prompt: a photo of an astronaut riding a horse on mars negative_prompt: ugly, blurry output_png_path: ./result.png steps: 10 Copy 得到的结果为result.png文件,上述 prompt 得到的图片如下:   目前来说,有点喜悦就是最后的sd出来了,但是还有最后一步这个模型文件,还没有想到要用那个,怎么用的问题?我也再抽时间搜索一下,问问大佬,看看youtube等。

  • 回复了主题帖: 报名有礼 | 施耐德电气邀请您线上云逛EP23上海国际电力电工展

    已经参与

  • 回复了主题帖: 【赢京东卡】场景寻宝,与英飞凌一起开启未来之家探索!

    已经参与

  • 回复了主题帖: 【DigiKey“智造万物,快乐不停”创意大赛】开箱

    但是在烧录镜像的时候,找不到开发板的ip,ssh不能登陆,vnc也不能用,现在不知道问题在哪里,是不是i要换个系统镜像试一试?  

  • 2023-11-03
  • 回复了主题帖: 【玄铁杯第三届RISC-V应用创新大赛】怎么才能使torch正常运作呢?

    是的

  • 2023-10-30
  • 发表了主题帖: 【玄铁杯第三届RISC-V应用创新大赛】怎么才能使torch正常运作呢?

    上次做到网络修复后,继续在python下尝试运行import torch但是依然报错了,后来找了很多网上的资料,发现还是不能很好的解决问题。 这里就不贴图片了。后来打算从源码开始进行构建,于是从github中clone了对应的blis源文件,但是在构建过程中出现了一些小问题,不过也是我第一次遇到的问题。 因为缺少的是libblis.so.3 而直接用源码build出来的是libblis.so.4版本,一时间不知如何是好? 想过通过软连接的方式让系统能够识别,但是查资料说这样做,不能正确的链接,于是放弃了。 随后通过 git checkout 0.8.1进行分支的切换,按道理这个是提供libblis.so.3的? 但是build的过程中,竟然不能自动生成config.mk文件,导致不能后续执行configutre 以及 make命令? 于是打算从源码看看0.9.0与0.8.1之间有什么区别,特别是那个config文件,通过比较发现,0.9.0中确实添加了一些新的函数,但是最初想,难道把这些函数复制到0.8.0里面就可以了吗? 好在在差资料的过程中,说有一个so_version这个文件,里面的数字决定生成什么版本的libblis.so,果然通过修改这个文件,最终正确生成了libblis.so.3 并且 export LD_LIBRARY_PATH=/usr/local/lib/libblis.so.3:$LD_LIBRARY_PATH Update the ld.so.conf file: You can add a directory of shared libraries to the ld.so.conf file to allow all environments to access them. For example, to add a directory to the ld.so.conf file in Ubuntu, you can create a new file in /etc/ld.so.conf.d/ called .conf and add a line per directory of shared libraries (*.so files). Then, reload the list of system-wide library paths using the following command: sudo ldconfig 以为这样就可以正确运行了,那是大错特错了! ./configure --prefix=/mnt/libblis --enable-cblas --enable-threading=openmp 后面但我导入torch的时候 依然提示错误,希望通过这个命令查看依赖情况:python -m torch.utils.collect_env 然并无乱用 libtorch_cpu.so: undefined symbol: cblas_cdotc_sub 于是安装相关的库 sudo apt-get install libopenblas-dev find / -name libblas.so /usr/lib/riscv64-linux-gnu/blis-openmp/libblas.so /usr/lib/riscv64-linux-gnu/openblas-pthread/libblas.so /usr/lib/riscv64-linux-gnu/libblas.so (env) root@lpi4a:/mnt/numactl# find / -name libopenblas.so /usr/lib/riscv64-linux-gnu/libopenblas.so /usr/lib/riscv64-linux-gnu/openblas-pthread/libopenblas.so 那么这个符号是在ibblas.so中,还是在libopenblas.so中?如何查询呢? 要确定符号cblas_cdotc_sub在libblas.so还是libopenblas.so中,您可以使用以下命令: nm -D /path/to/libblas.so | grep cblas_cdotc_sub 或者 nm -D /path/to/libopenblas.so | grep cblas_cdotc_sub 请将/path/to/libblas.so或/path/to/libopenblas.so替换为blas库的实际路径。 命令nm -D用于列出共享库中的符号。grep cblas_cdotc_sub用于过滤包含cblas_cdotc_sub的行。 如果上述命令的输出中包含cblas_cdotc_sub符号,则表示该符号在对应的blas库中定义。否则,这意味着该符号可能不存在于该库中。 但是我执行这些命令后,发现依然没有解决这个问题,所以我目前卡住了,有大佬说让我从源码构建torch,或者重新安装一下torch,大家说说我该怎么做呢?  

  • 发表了日志: 【玄铁杯第三届RISC-V应用创新大赛】怎么才能使torch正常运作呢?

  • 2023-10-28
  • 发表了主题帖: 【DigiKey“智造万物,快乐不停”创意大赛】开箱

    本帖最后由 yinxx 于 2023-10-28 16:15 编辑 下单的时候,也就是最初的目标是想 实现一个电子锁,最初的构想是通过GPIO口输出电压,控制继电器,然后让继电器来控制电磁锁。这个说起来提供简单的,但是毕竟自己没有太多成功的经验,所以希望自己能够顺利完成任务,不过首先要发一个开箱贴,然后兑现。 差点忘记还有一个按键

最近访客

< 1/2 >

统计信息

已有39人来访过

  • 芯积分:85
  • 好友:--
  • 主题:19
  • 回复:25

留言

你需要登录后才可以留言 登录 | 注册


现在还没有留言