Giter Site home page Giter Site logo

Errors about maixduino HOT 4 CLOSED

sipeed avatar sipeed commented on June 11, 2024
Errors

from maixduino.

Comments (4)

bitsk avatar bitsk commented on June 11, 2024

@GitJer
Hello, thank you for your feedback on this project.

  • We replaced the previous version of Windows with the python version of kflash in the latest version. In order to ensure that we received the update, we replaced the version number of the tool. The linux version has not changed substantially, so you can delete it now.
  • The warning during compilation is generated during the compilation of kendryte-standalone-sdk. This problem will be solved with the upgrade of sdk in the future.
  • Have you set the correct baud rate in the Arduino serial monitor? Can you provide some more details for our analysis?

from maixduino.

GitJer avatar GitJer commented on June 11, 2024

The baud rate is set correctly. Changing it does not make it work.

If I upload the sketch and then open the serial monitor it shows nothing. If I then close the serial monitor and open it again it shows about 10 to 20 lines of the output but does not continue. If I close and open it again, it shows newer output but again only some lines without continuing.

I added a Serial.flush() after the printing statements in loop(). This did not help.

It seems like the arduino serial monitor and cutecom are able to read a buffer with output, but not read directly from the device.

Then I tried to use minicom and I noticed something odd:
At first minicom did not show any serial output. With minicom still running, I started the script in my original post. That script crashed with:

raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

but immediately the minicom terminal started showing the serial output, and kept on going! It seems like my script changed some settings that allowed minicom to read data from the device.

I tried the same with the other terminal programs:
If I open the arduino serial monitor and then start the script, the script returns the error:

could not open port '/dev/ttyACM0': [Errno 16] could not open port /dev/ttyACM0: [Errno 16] Device or resource busy: '/dev/ttyACM0'

And nothing further happened.

If I open cutecom and then start the script, cutecom stops and closes the device and my script starts producing output.

Hopefully this gives you a hint of what might be wrong.

Thanks in advance!

from maixduino.

Neutree avatar Neutree commented on June 11, 2024

I tried on a new one ubuntu18, no error occurred!

If can not find lib.so like libisl.so.19, you can add the toolchain path to LD path in ~/.bashrc or !/.zshrc

toolchain_path=/home/j/.arduino15/packages/Maixduino/tools/riscv64-unknown-elf-gcc/8.2.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$toolchain_path

These way may resolve your serial problem

  • And add user to dialout group:
sudo usermod -a -G dialout $(whoami)

then need to logout or reboot!

  • try maix bit board or dock board

  • try to burn open-ec firmware for Maix Go board

  • do not use USB HUB, plug into USB on PC directly

  • or try again on another PC

from maixduino.

GitJer avatar GitJer commented on June 11, 2024

I installed the latest Arduino IDE, added the toolchain path to .bashrc, and did the usermod command. It now compiled and uploaded without a problem (except for the compile warnings). Thanks!

Unfortunately, the serial is still not working. I did observe something strange. I did some further testing, now also using minicom. When I start minicom (with all correct settings) it does not show the serial output. If I leave minicom open, and in another terminal I issued the following statements, I get interesting results:

python3 -m serial.tools.miniterm --dtr 0 --rts 0 /dev/ttyACM0 9600

Python gives an error, and minicom starts showing output. But for

python3 -m serial.tools.miniterm --dtr 0 --rts 1 /dev/ttyACM0 9600

or

python3 -m serial.tools.miniterm --dtr 1 --rts 0 /dev/ttyACM0 9600

or

python3 -m serial.tools.miniterm --dtr 1 --rts 1 /dev/ttyACM0 9600

python does not stop but gives no output and minicom also does not start showing output.

So dtr and rts need to be 0. Serial.tools.miniterm probably first sets the dtr and rts and then finds out the serial port is already in use and stops with an error. Thanks to setting dtr and rts to 0, minicom can finally read the serial port.
I am not sure what, but there seems to something wrong with my installation.

I haven't yet burned open-ec. Maybe I will give that a try.

from maixduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.