10 years, 10 months ago.

flashing a test to LPC11U24 via osx

Hi, Thanks for releasing the sdk along with the detailed instructions: I downloaded gcc-arm-4.7 (with nano) and was able to succesfully build and make but could not flash to the mbed:

$python2.6 mbed/workspace_tools/make.py -m LPC11U24 -t GCC_ARM -d /dev/disk1 -s /dev/tty.usbmodem622 -p 0


Compile: main.cpp Compile: test_env.cpp Link: basic Elf2Bin: basic Lpc Patch: basic.bin Image: /Users/ashah/code/mbed/mbedLib/build/test/LPC11U24/GCC_ARM/MBED_A1/basic.bin [ERROR] [Errno 16] Resource busy: '/dev/disk1'

Does anyone know the remedy? Are the -d or -s args correct?

Thanks, akhil

Question relating to:

3 Answers

10 years, 10 months ago.

The "make" script is simply trying to copy a file to the disk. In your specific example, this is the code being executed:

> python
>>> from shutil import copy
>>> copy("/Users/ashah/code/mbed/mbedLib/build/test/LPC11U24/GCC_ARM/MBED_A1/basic.bin", "/dev/disk1")

We have not tested it on osx.

Could you confirm us that the above code in a Python shell is failing in the same way?

Could you try copying the same file from a normal shell with "cp"?

> cp /Users/ashah/code/mbed/mbedLib/build/test/LPC11U24/GCC_ARM/MBED_A1/basic.bin /dev/disk1

Does it fail?

Cheers, Emilio

a s
10 years, 10 months ago.

Emilio, I was trying to copy to the wrong location. The above make cmd (or manually via terminal) will work with "-d /Volumes/MBED."

OSX mounts drives in /Volumes, the name of which can be infered from "diskutil list" in a terminal (see more here:http://superuser.com/questions/304267/how-to-cd-into-a-thumb-drive-from-terminal-mac-osx)

Cheers, Akhil

9 years, 12 months ago.


a bit late for the original poster but maybe helpful for others: I wrote a small script that automatically gets the latest 'bin' file from a folder and flashes it to the first mounted LPC controller that is started in USB boot loader mode.

You can find it here: https://github.com/hollie/lpc_usb_flasher

It is verified to work fine on OS X, with some minor modifications it should run on Linux too.

Regards, Lieven.