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

master branch currently broken with bitbang adapter? #9

Open
floe opened this issue Mar 17, 2016 · 2 comments · May be fixed by #10
Open

master branch currently broken with bitbang adapter? #9

floe opened this issue Mar 17, 2016 · 2 comments · May be fixed by #10

Comments

@floe
Copy link
Contributor

floe commented Mar 17, 2016

When I want to run current master branch with my nrf51 & BusPirate, I get the following error:

$ ruby -I. nrf51.rb name=buspirate:dev=/dev/ttyUSB0
/home/floe/src/programmer.git/adiv5-swd.rb:36:in `reset': undefined method `flush!' for #<BitbangSwd:0x000000023d2eb0> (NoMethodError)
    from /home/floe/src/programmer.git/adiv5-swd.rb:30:in `switch_to_swd'
    from /home/floe/src/programmer.git/adiv5-swd.rb:21:in `initialize'
    from /home/floe/src/programmer.git/backend-driver.rb:17:in `new'
    from /home/floe/src/programmer.git/backend-driver.rb:17:in `create'
    from /home/floe/src/programmer.git/backend-driver.rb:43:in `from_string_set'
    from /home/floe/src/programmer.git/backend-driver.rb:47:in `from_string'
    from nrf51.rb:170:in `<main>'

I can work around that by adding an empty flush! method in swd-bitbang.rb, but then I immediately run into the next error:

$ ruby -I. nrf51.rb name=buspirate:dev=/dev/ttyUSB0
nrf51.rb:8:in `detect': undefined method `IDR' for nil:NilClass (NoMethodError)
    from /home/floe/src/programmer.git/armv7.rb:22:in `initialize'
    from nrf51.rb:12:in `initialize'
    from nrf51.rb:171:in `new'
    from nrf51.rb:171:in `<main>'

And I'm not familiar enough with the code to tell why that happens... (even though it seems to be just like the solution in stm32.rb).

@floe
Copy link
Contributor Author

floe commented Mar 17, 2016

BTW, git bisect points to this commit as being responsible: 9cf676c

@floe floe linked a pull request Mar 17, 2016 that will close this issue
@clouetb
Copy link

clouetb commented Jul 12, 2016

Hi,

got the same error here. For the records, I fixed it by defining a method calling the @lower class or whatever it is :
def flush!
@lower.flush!
end

Hope this helps.

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

Successfully merging a pull request may close this issue.

2 participants