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

boards/mulle: mulle boards' serial port is derived from its serial nr #4435

Merged
merged 1 commit into from
Apr 20, 2016

Conversation

thomaseichinger
Copy link
Member

No description provided.

@thomaseichinger thomaseichinger added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system labels Dec 8, 2015
@thomaseichinger thomaseichinger added this to the Release 2016.03 milestone Dec 8, 2015
@jnohlgard
Copy link
Member

I had no idea that OSX assigned its USB device node names like that. I will take a look at it when I get home from my travels. From a quick glance I guess that the USB device name should be derived from PROGRAMMER_SERIAL, not MULLE_SERIAL.

@OlegHahm
Copy link
Member

@gebart, ping!

@@ -82,7 +82,11 @@ ifeq ($(PORT),)
PORT := $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh)
endif
else ifeq ($(OS),Darwin)
PORT := $(shell ls -1 /dev/tty.usbserial* | head -n 1)
ifneq ($(MULLE_SERIAL),)
PORT := /dev/tty.usbserial-$(MULLE_SERIAL)B
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PROGRAMMER_SERIAL

@jnohlgard
Copy link
Member

Update to PROGRAMMER_SERIAL instead of MULLE_SERIAL to match the Linux side of things.

@jnohlgard
Copy link
Member

(MULLE_SERIAL is the Mulle board itself, the programmer board has its own serial number encoded in the USB descriptor)

@cgundogan
Copy link
Member

@thomaseichinger ping!

@cgundogan
Copy link
Member

needs a rebase

@jnohlgard
Copy link
Member

I'll try to steal my wife's MacBook sometime next week to test this PR.
On Mar 23, 2016 11:17 PM, "Cenk Gündoğan" notifications@github.com wrote:

needs a rebase


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#4435 (comment)

@haukepetersen
Copy link
Contributor

@thomaseichinger: seems like there are un-addressed comments above? (s/MULLE_SERIAL/PROGRAMMER_SERIAL/)

@thomaseichinger
Copy link
Member Author

Addressed @gebart's comment and rebased. I don't have any mulles with me so I couldn't test this change. @gebart did you get to "borrow" your wife's computer? 😄

@jnohlgard
Copy link
Member

@thomaseichinger I have not yet had a chance to install the FTDI drivers and test with a real Mulle on her Mac.

@emmanuelsearch
Copy link
Member

Tried to flash on OS X. Here's the error I get.

Error: flash bank name 'k60.flash' already exists
Info : add flash_bank kinetis k60.flash2
Error: libusb_claim_interface() failed with LIBUSB_ERROR_ACCESS
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Mulle Programmer v0.70' and serial '*'

@emmanuelsearch
Copy link
Member

emmanuelsearch commented Apr 19, 2016

@gebart I also heard throughout the grape vine that one must set a specific environment variable to flash the Mulle, like make flash BOARD=mulle MULLE_SERIAL=338 Is this correct?

(In which case please document in the RIOT wiki)

@jnohlgard
Copy link
Member

Tried to flash on OS X. Here's the error I get.

Error: flash bank name 'k60.flash' already exists
Info : add flash_bank kinetis k60.flash2
Error: libusb_claim_interface() failed with LIBUSB_ERROR_ACCESS
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Mulle Programmer v0.70' and serial '*'

Your user account doesn't have usb permissions. Try sudo or add your user to the necessary group to use libusb.

@jnohlgard
Copy link
Member

@gebart I also heard throughout the grape vine that one must set a specific environment variable to flash the Mulle, like make flash BOARD=mulle MULLE_SERIAL=338 Is this correct?

(In which case please document in the RIOT wiki)

You only need to set PROGRAMMER_SERIAL=xyz if you want to work with more than one programmer connected at the same time.
I'll document it anyway.

@emmanuelsearch
Copy link
Member

@gebart I'm able to flash other boards via USB with my user account (without being root), so it must be board-specific, right?

@emmanuelsearch
Copy link
Member

@gebart even when I sudo, I get the same error:

Error: flash bank name 'k60.flash' already exists
Info : add flash_bank kinetis k60.flash2
Error: libusb_claim_interface() failed with LIBUSB_ERROR_ACCESS
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Mulle Programmer v0.70' and serial '*'

@emmanuelsearch
Copy link
Member

and here's what I have in my access rights:
ls -l ./tty.usbserial-338A crw-rw-rw- 1 root wheel 18, 32 19 avr 10:13 ./tty.usbserial-338A

@cgundogan
Copy link
Member

@kYc0o can you also test with your MAC?

@kYc0o
Copy link
Contributor

kYc0o commented Apr 20, 2016

Yes I can!

@haukepetersen
Copy link
Contributor

nice, I put a mulle board on your desk :-)

@kYc0o
Copy link
Contributor

kYc0o commented Apr 20, 2016

The error seems to be that in OSX El Capitan we need to force the install of the FTDI drivers in order to have access to the serial ports. However, openOCD seems to bypass the drivers so it needs to be unloaded. Anyways, I'm having the following errors:

### Flashing Target ###
/Users/facosta/git/RIOT-OS/RIOT/examples/default/bin/mulle/default.hex is not locked.
Open On-Chip Debugger 0.10.0-dev-gdfc6658 (2016-02-18-22:16)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : add flash_bank kinetis k60.flash
adapter speed: 1000 kHz
srst_only separate srst_nogate srst_push_pull connect_deassert_srst
cortex_m reset_config sysresetreq
Error: flash bank name 'k60.flash' already exists
Info : add flash_bank kinetis k60.flash2
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: k60.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Could not initialize the debug port
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* k60.cpu            cortex_m   little k60.cpu            unknown
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: k60.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Invalid ACK (0) in DAP response
Error: Could not initialize the debug port
Error: Target not examined yet
in procedure 'reset' 
in procedure 'ocd_bouncer'

I'll investigate to find out what's happening.

@kYc0o
Copy link
Contributor

kYc0o commented Apr 20, 2016

Fixed, mulle board was docked wrongly. ACK and let's wait for Murdock.

@kYc0o kYc0o added Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 20, 2016
@kYc0o
Copy link
Contributor

kYc0o commented Apr 20, 2016

Murdock is happy -> GO!

@kYc0o kYc0o merged commit ac724f0 into RIOT-OS:master Apr 20, 2016
@cgundogan cgundogan removed the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants