Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing goodfet.bsl DEBUG flag changes program behaviour #21

Open
webhat opened this issue Jan 20, 2016 · 2 comments
Open

Changing goodfet.bsl DEBUG flag changes program behaviour #21

webhat opened this issue Jan 20, 2016 · 2 comments

Comments

@webhat
Copy link

webhat commented Jan 20, 2016

I just noticed as I was debugging the issues I was having that enabling the DEBUG flag in goodfet.bsl makes it fail in something else than I was debugging.

My command line is: board=facedancer21 goodfet.bsl --speed=38400 -p goodfet.hex
I'm on OSX 10.9.5 with Python 2.7.11 and pyserial-3.0.1

When unsetting the baudrate my issue disappeared, so I'm assuming it's caused by pyserial, although I haven't investigated it further.

Without DEBUG:

MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 2.13 (Device ID: f26f)
Changing baudrate to 38400 ...
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Invoking BSL...
Transmit default password ...
Traceback (most recent call last):
  File "/usr/local/bin/goodfet.bsl", line 1987, in <module>
    main(0);
  File "/usr/local/bin/goodfet.bsl", line 1905, in main
    speed=speed,
  File "/usr/local/bin/goodfet.bsl", line 1166, in actionStartBSL
    self.txPasswd(self.passwd)                  #transmit password
  File "/usr/local/bin/goodfet.bsl", line 1136, in txPasswd
    wait=wait)           #if wait is 1, try to sync forever
  File "/usr/local/bin/goodfet.bsl", line 801, in bslTxRx
    rxFrame = self.comTxRx(cmd, dataOut, len(dataOut))  #Send frame
  File "/usr/local/bin/goodfet.bsl", line 480, in comTxRx
    rxHeader, rxNum = self.comRxHeader()        #receive header
  File "/usr/local/bin/goodfet.bsl", line 386, in comRxHeader
    if not hdr: raise BSLException("Timeout")
__main__.BSLException: Timeout

With DEBUG:

Debug level set to 1
Python version: 2.7.11 (default, Dec  5 2015, 23:51:51) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
using serial port '/dev/tty.usbserial-A104O89Z'
Actions ...
Invoking BSL...
Transmit default password ...
Autodetect successful: f26f -> F2x family
Current bootstrap loader version: 2.13 (Device ID: f26f)
Current bootstrap loader version: 0x0213
Changing baudrate to 38400 ...
Traceback (most recent call last):
  File "/usr/local/bin/goodfet.bsl", line 1976, in <module>
    main(1)
  File "/usr/local/bin/goodfet.bsl", line 1905, in main
    speed=speed,
  File "/usr/local/bin/goodfet.bsl", line 1256, in actionStartBSL
    self.actionChangeBaudrate(speed)            #change baudrate
  File "/usr/local/bin/goodfet.bsl", line 1392, in actionChangeBaudrate
    self.serialport.setBaudrate(baudrate)
AttributeError: 'Serial' object has no attribute 'setBaudrate'
@rmspeers
Copy link
Collaborator

rmspeers commented Jul 4, 2016

I am seeing a similar issue, in a situation where I need to set the baudrate.
This does not happen for me on Ubuntu 12.04.5 LTS, but does on Ubuntu 16 and OSX.

@Manouchehri
Copy link
Contributor

Same BSLException issue here on Ubuntu 17.10.

Your workaround of just board=facedancer21 goodfet.bsl -p goodfet.hex worked though. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants