User`s manual

UC-7112-LX Plus Software User’s Manual Programmer’s Guide
6-2
Flash Memory Map
Partition sizes are hard coded into the kernel binary. To change the partition sizes, you will need to
rebuild the kernel. The flash memory map is shown in the following table.
Address Size Contents
0x00000000 – 0x0003FFFF 256 KB Boot Loader—Read ONLY
0x00040000 – 0x001FFFFF 1.8 MB Kernel object code—Read ONLY
0x00200000 – 0x009FFFFF 8 MB Root file system (JFFS2) —Read ONLY
0x00A00000 – 0x00FFFFFF 6 MB User directory (JFFS2) —Read/Write
NOTE To improve system performance, we strongly recommend that you install your application
programs on the on-board flash. However, since the on-board flash has a fixed amount of free
memory space, you must not over-write it, and instead use an external storage card, such as an
SD or CF card, for the data log.
Device API
The UC-7112-LX Plus supports control devices with the ioctl system API. You will need to
include <moxadevice.h>
, and use the following ioctl function.
int ioctl(int d, int request,…);
Input: int d - open device node return file handle
int request – argument in or out
Use the desktop Linux’s man page for detailed documentation:
#man ioctl
RTC (Real Time Clock)
The device node is located at /dev/rtc. The UC-7112-LX Plus supports Linux standard simple
RTC control. You must
include <linux/rtc.h>.
1. Function: RTC_RD_TIME
int ioctl(fd, RTC_RD_TIME, struct rtc_time *time);
Description: read time information from RTC. It will return the value on argument 3.
2. Function: RTC_SET_TIME
int ioctl(fd, RTC_SET_TIME, struct rtc_time *time);
Description: set RTC time. Argument 3 will be passed to RTC.
Buzzer
The device node is located at /dev/console. The UC-7112-LX Plus supports Linux standard
buzzer control, with The UC-7112-LX Plus’s buzzer running at a fixed frequency of 100 Hz. You
must
include <sys/kd.h>.
Function: KDMKTONE
ioctl(fd, KDMKTONE, unsigned int arg);
Description: The buzzer’s behavior is determined by the argument arg. The “high word” part
of arg gives the length of time the buzzer will sound, and the “low word” part gives the
frequency.