Atmel ships $3-$4 SoCs. But will they run Linux?
Oct 20, 2004 — by LinuxDevices Staff — from the LinuxDevices Archive — viewsAtmel is officially shipping the first two chips in its very-low-cost line of ARM7-based SoCs. Atmel's 32-bit SAM7S-series SoCs target the 8-bit microcontroller (uC) market, where Atmel says it can offer better real-time performance and “secure operation functions” such as watchdog timers. The question is, though: will they run Linux?
The two shipping SAM7S chips include the AT91SAM7S32 and AT91SAM7S64, with flash densities of 32KB and 64KB, respectively, and just 16KB and 32KB of RAM, respectively. Atmel's product roadmap does include slightly more capacious chips, however:
Part no. | Internal RAM | Internal Flash |
AT91SAM7S32 | 8 KB | 32 KB |
AT91SAM7S64 | 16 KB | 64 KB |
AT91SAM7S128 | 32 KB | 128 KB |
AT91SAM7S256 | 64 KB | 256 KB |
AT91SAM7S512 | 64 KB | 512 KB |
AT91SAM7X128 (adds CAN, 10/100) |
32 KB | 128 KB |
The two shipping chips are priced at $2.90 and $4.05, respectively, in 10K quantities. However, the chips offer small, fixed amounts of ROM and RAM, and lack interfaces for external memory expansion.
Will it run Linux?
LinuxDevices first reported that Atmel was sampling the first of its SAM7S chips two weeks ago. At that time, we asked our readers whether the chips would be able to run an open source operating system. The response was mixed, with the likes of Alan Cox and Erik Andersen weighing in on the pro side, albeit with reservations about the utility of such a port.
Meanwhile, Rick Stevenson, General Manager of the SG Division of CyberGuard, wrote to suggest we ask Greg Ungerer and David McCullough, the “prime movers behind uClinux and maintenance for several years now,” according to Stevenson. Ungerer also did the original uClinux port to the heavily constrained ColdFire chip family from Motorola.
McCullough replied first, as follows:
64K of RAM is never going to be enough to run a linux system, even if you had more than 512MB of flash.
Here are some of the obvious things that you need to fit into your 64K
of RAM:
- The kernel data segment. If you can get this below 64K you are doing well, and don't even think about using the network stack. I have a fairly basic 2.4 Palm kernel and it's data segment is 150K !
- The kernel still treats things as pages, which are 4K, not a very efficient way to manage 64K. You could use smaller pages sizes but a lot of kernel code makes assumptions about page size.
- Each task (or process) takes up a minimum of 4K in the kernel, and on 2.4 and later it is 8K for ARM (you could tune it to be smaller, but at considerable effort).
So enough with the negativity :-) The price is good and other operating systems (such as eCos) are much more suited to these low resourced systems.
Most people choose linux because they want the network stack and access to all the networked applications that go with it. The cost saving is usually in the software development and time to market. To get these though, you have to pay a little more for the HW to get enough RAM and flash to do the job.
Unfortunately none of this chip range appears to support any off chip RAM solutions, which is pretty typical of processors in this space. If it did, you could easily bring it within reach of linux for a very reasonable price. Of course there are other cheap processors that do support linux and external peripherals (like RAM). The H8 and a number of other ARM chips spring to mind.
Ungerer replied a short time later, writing:
I can add a little more…
Take as an example the kernels I build for the GameBoy Advance. I use linux-2.0.39 kernels for one (they are smaller) and even then with the most minimal setup the bss data region (the un-initialized data) of the kernel is 60K in size. So just loading the kernel – not even starting it – we need 60K of RAM. Obviously to get the kernel running it needs more RAM.
Trimming this down to fit and run in 64K of RAM is going to be a tall order. And even if you do you are not going to have much RAM to actually run some applications and do something useful.
On the GameBoy Advance with 256K of RAM it is still a tight fit. That is enough to get me to a shell with a little RAM left over though.
Thus, expert opinion suggests that eCos will likely be the focus for open source users of the new Atmel chips. However, the chips could exert downward pressure on the 32-bit SoC market that will nevertheless take Linux further into the realm of deeply embedded systems.
Do you think uClinux will port successfully to these super-low-cost ARM7 Atmel chips? . . . eCos? Post your thoughts and comments here.
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.