Microcontrollers, USB and Linux

Hi all,

[ re-post from comp.os.linux.embedded ]

Simple question, I hope :-)

What's a good architecture for simple embedded/microcontroller software development (in C) _under Linux_, with respect to the toolchain (C cross-compiler, assembler, linker, etc.); nativly without using things like Wine) ?

Background info:

I would like to develop a _simple_ and low-cost microcontroller hard- and software platform for study/training purposes, for my colleagues (and myself :-) ). The focus is software and the hardware should be as simple/breadboardable as possible, i.e. DIP packages instead of QFP or BGA. Just basic I/O, perhaps add simple SPI/I2C peripherals, etc. at some point. I would also like to include USB in it, which is available on plenty 8-bit controller (and an interesting challenge I've seen).

We currently have an embedded ARM Linux board and it would be nice if we could stick to a single architecture (i.e. ARM) so we can re-use code, tools, hardware and most importantly knowledge (assembly language, architecture, etc.).

I would like to use/program USB directly so no FTDI converter IC's to simulate RS232 ports (What's the point of USB anyway when the first thing you do is simulate RS-232? Just the option of using a USB hub?).

I've looked at _many_ websites (see below) but I haven't been able to find what I'm looking for. Does anybody already have any experience in this area? How active is SDDC for example?

ARM or AVR(32-UC3*) look nice but they all have QFP or similar packages so that's not really an option. The Freescale Blackfin controllers start at BGA packages. Even the Atmel 8051's with USB are large QFP packages. The starter-kits or experiment boards all start at 40+ euros on pre-built rather large boards with extra peripherals which make them unsuitable for real simple experiments or applications (e.g. a simple switch controlled via USB; which is

Reply to
Joost Leeuwesteijn
Loading thread data ...

If the goal is study and or training, I would recommend getting a ready- made evaluation board, for example:

formatting link
formatting link

If, at some point in time, you want to do real production then you'd be better off getting the surface mount packages anyway, and having someone else mount them professionally.

Reply to
Arlet Ottens

There are a few advantages of using something like FTDI's chips. The first one is that it is much easier to get them working than using internal USB peripherals - the hardware works, and the software drivers are available for all sorts of OS's. From the programming viewpoint, both the application on the PC and on the microcontroller, you code for a serial port which is normally very easy. It's particularly easy for people who have been in this business for a while - most experienced embedded developers have already done projects with microcontrollers and PC's communicating over a serial port, so using FTDI's devices is as simple as using an RS-232 driver. The USB serial port can run faster than a standard RS-232 port, of course.

A second advantage is that the FTDI devices work even before the microcontroller is programmed - that way, you can use them for programming the microcontroller over the USB port. I do this for AVR, msp430, and ColdFire devices - an FTDI device means that production programming and field upgrades can be done directly over the USB from any PC.

As for simple micros that can be programmed under Linux - have you checked for AVR (not AVR32) micros in DIP packages? They certainly used to be available in DIP packages, but I haven't checked recently.

Reply to
David Brown

How about a Cypress FX2 series 8051 with USB 2.0 interface?

The device will be a surface mount package, but the pincount is reasonable so you could put it on a dip carrier module. In fact, I think you can already buy them that way, with a USB jack on the module.

Device is supported by SDCC and firmware download over USB is the usual course. Many online example projects use libusb which is cross platform by design.

(One catch: to make a stand alone device you will need to add a serial eeprom/flash to store your firmware)

Reply to

AVR is. gcc is available, isp downloading is available, JTAG is.

Ok, you want AVR. It's simple and easy to learn and to work with, everything is documented, and there is a large community. And all tools are free.

There are several AVR controllers with native USB built-in, but none in DIP (32 or 64 pin QFN/QFP). There is is also a protocol stack available for free that implements mass-storage, HID, CDC, ... However, you can always get conversion boards for breadbording, like this for example:

formatting link

If you need larger numbers (maybe for students etc), you'd better go to a layout service for a custom board, at best with USB, ISP, and JTAG connectors and the 16 MHz crystal. The design would take half a day, and manufacturing these boards in quantities would be cheaper than using these universal adapter boards.

I'm not aware of a real good compiler under Linux, and I'd avoid PIC. It's a brain-dead architecture with limited capabilities (RAM bankswitching, 4k architectural RAM limitation,...)

Mit freundlichen Grüßen

Frank-Christian Krügel

Reply to
Frank-Christian Kruegel

You're not going to find all that in a DIP. If you really want to concentrate on software, just buy an AVR or ARM development board from someplace like

formatting link
If you really want to breadboard stuff yourself, QFP packages aren't hard to work with. You can buy little breadboards to solder them onto:

formatting link

Reply to
Grant Edwards

I'm working on one at the moment, but much simpler than ARM:

formatting link

This is a usb-programmable R8C/20 MCU (all linux tools) with headers for connecting to a proto-board (or plugging in other boards). No USB on the MCU though. The M16C/20 has built-in USB but that's a 100 pin TQFP.


formatting link
is a breadboard friendly R8C/27 adapter. Still no USB on-chip, but both R8C/27 and R8C/20 have I2C and SPI, and all the tools run under Linux.

It's not hard to do. My R8C adapter will work for any 32 bit TQFP as long as you don't solder on all the support parts.

If you're developing a board, though, you really want a hardware person on your team.

Reply to
DJ Delorie

"Joost Leeuwesteijn" schreef in bericht news:4774e43b$0$19519$ snipped-for-privacy@dreader15.news.xs4all.nl...


Breakout boards with ARM processors can be purchased from

formatting link
formatting link
These boards only contain the QFP chip and nothing else.

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.