Page 1 of 1

G30TH dfu mode and rshell

Posted: Tue Aug 02, 2016 3:10 pm
by jgriessen
I have been able to use dfu mode, but not get a REPL.

Code: Select all

sudo make BOARD=G30TH PYTHON=python3 deploy
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Writing build-G30TH/firmware.dfu to the board
File: build-G30TH/firmware.dfu
    b'DfuSe' v1, image size: 271941, targets: 1
    b'Target' 0, alt setting: 0, name: "ST...", size: 271656, elements: 2
      0, address: 0x08000000, size: 10028
      1, address: 0x08020000, size: 261612
    usb: 0483:df11, device: 0x0000, dfu: 0x011a, b'UFD', 16, 0x0aa6b624
Writing memory...
0x08000000   10028 [=========================] 100% 
0x08020000  261612 [=========================] 100% 
Exiting DFU...

john@ecolab3 [stmhal]rshell --buffer-size=32 -p /dev/ttyACM0 connect serial
Connecting to /dev/ttyACM0 ...
failed to access /dev/ttyACM0
john@ecolab3 [stmhal]sudo rshell --buffer-size=32 -p /dev/ttyACM0 connect serial
Connecting to /dev/ttyACM0 ...
Missing serial port
Ideas what is needed? Some kind of reset power sequence? Probably not. This G30TH already had unprotect done.
After the above flashing, it gives a USB storage device function OK. My laptop recognizes that after each reset and
shows the files:

Code: Select all

ls /media/john/PYBFLASH/
boot.py  main.py  pybcdc.inf  README.txt
Does missing refer to what is compiled into the firmware? (Looking at requirements like python3 serial library)

I get same symptom with a pyboard. Problem is related to laptop or rshell, not G30TH.

Re: G30TH dfu mode and rshell

Posted: Tue Aug 02, 2016 7:17 pm
by dhylands
Check to see if it comes up under a different number.

Code: Select all

ls -l /dev/ttyACM*
Check dmesg to see if there is some other problem with usb-serial not being recognized. I normally add udev rules like these:
https://github.com/micropython/micropyt ... ux-via-dfu

then you shouldn't need to use sudo for programming or repl.

Re: G30TH dfu mode and rshell

Posted: Fri Aug 05, 2016 12:48 am
by jgriessen
It was mostly a 20 second delay due to modemmanager app installed on my debian jessie system that fooled me.
After removing that, I get expected results with rshell.