Electrum FAQ
From Manuals
(→Frequently Asked Questions - Software) |
(→Can I use the Atmel SAM-BA utility to update the NAND filesystem?) |
||
| Line 31: | Line 31: | ||
==Can I use the Atmel SAM-BA utility to update the NAND filesystem?== | ==Can I use the Atmel SAM-BA utility to update the NAND filesystem?== | ||
| - | No. The NAND geometry assumed by SAM-BA is different than the one used by the NAND on the Electrum controllers. You can update the NAND filesystem using U-Boot as explained in the [http://wiki.micromint.com/index.php/Electrum-100_Manual/2#Updating_the_Linux_kernel_and_root_filesystem manual]. Windows and Linux versions of SAM-BA can be used to | + | No. The NAND geometry assumed by SAM-BA is different than the one used by the NAND on the Electrum controllers. You can update the NAND filesystem using U-Boot as explained in the [http://wiki.micromint.com/index.php/Electrum-100_Manual/2#Updating_the_Linux_kernel_and_root_filesystem manual]. Windows and Linux versions of SAM-BA can be used to update the Dataflash. |
==Can I compile applications on the board?== | ==Can I compile applications on the board?== | ||
Revision as of 16:23, 15 December 2010
Contents |
Frequently Asked Questions - Hardware
How much current is required by the Electrum controllers?
On typical operating conditions, the current requirements are as follows. Note that I/O devices may increase total current requirements so the complete system should be considered when sizing power requirements.
- Electrum 100: +5V@300mA
- Electrum 200: +5V@400mA
Are digital inputs compatible with 5V logic?
No. PIOs on AT91SAM9 microcontrollers support 3.3V logic. Level shifters should be used to interface to 5V logic.
How can I change the MAC address of the board?
The Micromint Electrum is assigned a MAC address during production from the Micromint block 00:21:a3:xx:yy:zz. This address is stored on the U-Boot configuration as the 'ethaddr' environment variable. To prevent accidental changes to the MAC address, the bootloader console does not allow changing the MAC address once it is set. If you need to substitute the assigned MAC address you can clear the bootloader environment by executing the commands below from the bootloader console. After rebooting, you will be able to change the 'ethaddr' variable. Note that you will need to apply any other changes you made to the bootloader configuration.
Electrum> mw.b 0x20100000 0 4 Electrum> cp.b 0x20100000 0xD0002100 4 Copy to DataFlash... done Electrum> reset
How can I set the real time clock (RTC)?
From a Linux command line you can use the 'date' command to set the system date and then 'hwclock' to copy the system date to the hardware clock. The RTC battery option is required to keep time after power off.
# date 063011222010 Wed Jun 30 11:22:00 UTC 2010 # hwclock --systohc
To set the timezone use 'tzselect' and edit the UTC value on /etc/default/rcS. To sync time with NTP servers install 'ntpdate' using 'apt'.
Frequently Asked Questions - Software
Can I use 'apt' to install new packages on the NAND filesystem?
'apt' requires umap/mmap to write to the cache. This is not supported by the JFFS2 filesystem in NAND. A common workwaround is to use a 'tmpfs' filesystem in RAM for the 'apt' cache. We provide the 'apt-setup' and 'apt-purge' scripts to simplify this process. Run 'apt-setup' before installing your packages and 'apt-purge' afterwards. You can ignore any 'fopen' warnings from 'apt-get'. If the cache required by your updates exceeds the available RAM you will need to divide the updates in parts and execute 'apt-setup' and 'apt-purge' before/after each part. Note that this workaround is only required when using a JFFS2 filesystem in NAND as your root filesystem. It is not required if you are using a microSD card as your root filesystem.
Can I use the Atmel SAM-BA utility to update the NAND filesystem?
No. The NAND geometry assumed by SAM-BA is different than the one used by the NAND on the Electrum controllers. You can update the NAND filesystem using U-Boot as explained in the manual. Windows and Linux versions of SAM-BA can be used to update the Dataflash.
Can I compile applications on the board?
Certainly. You can use 'apt-get install' to install gcc, gdb and any other packages you need for your projects. That allows you to do all your software development on the board. The board should have Internet access so 'apt' is able to download and install packages from the Debian armel repositories. The command below installs a base development system. You should execute 'apt-setup' and 'apt-purge' before/after installing packages if your root filesystem is in NAND.
# apt-get install --no-install-recommends binutils cpp cpp-4.3 gcc gcc-4.3 gdb libc6-dev
Test the installation by compiling a simple "Hello, world" program.
/* hello.c */
#include <stdio.h>
int main(void)
{
printf("Hello, World!\n");
}
# gcc hello.c -o hello # ./hello Hello, World!
Note that cross-compiling on a multi-core PC with Debian or Ubuntu Linux is significantly faster. The manual explains how to set up an ARM cross-toolchain. If your project build times are significant, that would be a more productive route. To avoid file transfers during development you can share a filesystem between the PC and the board using NFS.
