Moxa ioPAC 8020-9-RJ45-C-T [10/66] Developer s guide for moxa rtu controllers programmer s guide

Moxa ioPAC 8020-9-RJ45-C-T [10/66] Developer s guide for moxa rtu controllers programmer s guide
Developer's Guide for Moxa RTU Controllers Programmer's Guide
2-2
Flash Memory
Partition sizes are hard coded into the kernel binary. The flash memory map is shown in the following table.
Total Size Contents Location Access
System Space 20 MB Boot Loader 0x80000000 to
0x80080000
Read Only
Linux Kernel 0x80080000 to
0x80400000
Root File System (JFFS2) 0x80400000 to
0x81400000
User Space 12 MB User directory (JFFS2) 0x81400000 to
0x82000000
Read/Write
If the user file system is incorrect, the kernel will change the root file system to the kernel and use the default
Moxa file system. To finish the boot process, run the init program.
NOTE
1. The user file system is a complete file system. Users can create and delete directories and
files (including
source code and executable files) as needed.
2. Users can create the user file system on the host PC or the target platform and copy it to the ioLogik
W5348-C series or the ioPAC 8020-C series.
3. Continuously writing data to the flash is not recommended, since doing so will decrease the flash’s life.
C Library
The ioLogik W5348-C series and ioPAC 8020-C series both support control devices with Moxa APIs. Users will
need to include libmoxa_pgm.h to use the following Moxa APIs.
I/O API
The device node is located at /dev/mxio. Users must include libmoxa_pgm.h. Return values of I/O API
functions are shown below; they can also be found in libmoxa_pgm.h. In addition, note that /dev/mxio
cannot be opened again while it is in use.
#define IO_SUCCESS 0
#define IO_ERR_DEVICE 0x0001
#define IO_ERR_CMD 0x0002
#define IO_ERR_TYPE 0x0003
#define IO_ERR_ITEM 0x0004
#define IO_ERR_COPY 0x0005
#define IO_ERR_SLOT 0x0006
#define IO_ERR_ARGUMENT 0x0007
#define IO_ERR_RW 0x0008
#define IO_ERR_ACTION 0x0009
#define IO_ERR_8000_AI_0_10V 0x1000
#define IO_ERR_8000_AI_4_20mA 0x1001
Note: “-1” indicates an illegal action.

Содержание

Скачать