Looking for a Wixel app template

I’m just getting started with a pair of Wixels – What a great product! Really impressed by the effort that was clearly put into making it a ready-to-use product.

I was wondering if anyone had a standalone template for a Wixel app with a makefile and any other “template” files required. So far, I’ve based my app on one of the examples, but it seems odd that the only way provided by the docs to build an app is to put it in the apps directory and run “make” on the top-level Wixel SDK dir. Is there a reason the docs don’t give an example of just building a single app?

Among other things, the current setup makes it hard to keep Wixel app source files well-organized in a folder with other project files (board CAD files, notes, source for other micros used in the project, etc.).

Before I go and try to make a standalone makefile, has anyone already done this?

Thanks!

Hello, Jordan.

I’m glad that you like the Wixel!

I don’t know of anyone who has made a template for a standalone Wixel application, so you would probably be the first.

The wixel-sdk only takes a matter of seconds to compile and occupies about 31 MB after all the apps, libraries, and documentation have been compiled, so what you could do is keep a separate clone of the wixel-sdk in each of your project folders. The advantage of this system is that you would not have to maintain a Makefile for each app and you automatically have control/oversight over which exact versions of the libraries your app uses.

If you don’t like doing it this way, then that’s OK. To help you create your Makefile, you can run “make example_blink_led VERBOSE=yes” which will show exactly how the wixel-sdk Makefile invokes the compiler and linker and how it creates the wxl file.

I’d be very interested to hear what you end up building with the Wixel!

–David

Thanks. Your suggestion to copy the whole SDK tree is a good one, at least in the interest of getting a project going without getting bogged-down in “meta work” constructing an original build environment.

I do think I’ll still want a standalone build system at some point, but now I don’t have to jump on that right away.

Another question… how standard is the SDCC that’s bundled in the downloaded Wixel “kit”? I know there’s still no Mac port of the programming tool, but can the rest of the development process live on Mac OS if I just install a natively-built copy of SDCC?

Thanks again!

The SDCC that we distribute with the Wixel Development Bundle is just one of the standard releases available from sourceforge (3.0.0). We did not modify SDCC at all.

We have not tried the Wixel SDK on Mac OS, but I would expect it to work as long as you have all the prerequisites:

If you encounter any problems please let me know.

–David

Cool. I couldn’t see any reason it wouldn’t work, so I gave it a shot to see what would happen.

Though I haven’t gotten to a Windows machine yet to try to actually install a Mac-built .wxl file on a Wixel, I can now confirm that building the Wixel libs and apps appears to work quite well on Mac OS X. I simply installed SDCC with Homebrew (“brew install sdcc”), cloned the wixel-sdk Git repository, and ran Make from the top-level wixel-sdk directory. That’s all that was required.

So, the next question is… Since the only thing missing now for complete Mac support is the Wixel Configuration Utility (and/or Wixel command line tool), is a Mac version of that planned? Alternately, is the Linux source code available in case a user is interested in porting it?

I’m glad it was so easy for you to get the Wixel SDK working. We would eventually like to get the Wixel software running on Mac OS X, but we have no plans to release the source code. Have you done USB programming on the Mac before?

–David

Yes. There is a libusb port for the Mac, so if the Linux tools are using libusb to communicate with the bootloader in a “driverless” arrangement, porting should be fairly straight-forward. If it’s necessary to write a driver for the Mac, it would be more time-consuming, but still doable.

Do you have any Mac people at Pololu who could look into how hard it would be to port just the command line tool? Alternately, would you be willing to share the code on an individual basis (not open source) so I or someone else could see about compiling it for Mac? Though I’m sure the GUI tool would be much better for many of your users, the CLI loader tool alone would meet my needs, and probably work for a lot of other Mac people, too.

I’d like to second the development of an OS X port for the configuration tool. The Wixel looks to be very useful for an upcoming project, but I’d have to install a Virtual Machine (Likely Ubuntu on VirtualBox) to use it; Due to the hassle I may just be going the Arduino & XBee/Generic Wireless route.

(I’m actually looking at having the Wixel do everything, so I’d be building a custom app. Perhaps it may even be worth while to build a development tool like Arduino has for writing apps and compiling them/writing to the board. That would really lower the hurdle to entry for these awesome boards, but I do understand it would involve quite a bit of development time.)

I’ll gladly beta-test any OS X software you guys develop. I’m running a MacBook Pro from late 2007 (Core 2 Duo) and have OS X 10.7 (Lion). There’s also an old PowerBook G4 sitting behind me, but I’d need to get a new HDD for it and install Leopard (10.5) first. :slight_smile:

Hi,

I’ve written a very basic wixelcmd that works on the Mac. It currently only supports the write cmd and only one wixel attached to the Mac. The code is not by any means production quality code but it works fine for my purposes. I would be glad to share the code with Pololu if you are interested in using it as a starting point for your port. Alternatively, if you want to provide the code for your wixelcmd, I would be glad to port it for you.

Best part is typing “make load_example_blink_led” on the command line and watching the compile happen and the wixel run the new code.

-Shehryar

Hello, slasi.

Good job! I don’t think I ever published the USB protocol used by the Wixel bootloader so you must have reverse engineered it. I would be interested in seeing your code. In particular, I’m wondering how you get Wixels that are currently running an app into bootloader mode. In Linux, I can just send the right command with libusb but that doesn’t work on Mac OS because the permissions for USB devices work differently. If you have some way of overcoming the permission issues, or for figuring out what COM port the Wixel is attached to, that would be great.

Feel free to post the code here in a .zip file or email it to me at david at pololu.com.

–David

Hi David,

Yeah, I reverse engineered the protocol. It was nice and clean, so it wasn’t too difficult. Getting the wixel into boot loader mode and figuring out the address were a little trickier. The source should make it clear. I’ll email it to you.

-Shehryar