Difference between revisions of "Debugging softMC Firmware Linux"
(→Application autostart) |
(→COM1 of MC is reserved to Linux shell) |
||
Line 4: | Line 4: | ||
= Controller file system and useful commands = | = Controller file system and useful commands = | ||
− | == COM1 of MC is reserved to Linux shell | + | == Access to Linux shell == |
− | + | COM1 of MC is reserved to Linux shell. Shell is used for editing of FWCONFIG, IO.DAT or solving of following problems:<br /> | |
+ | *MC does not boot<br /> | ||
+ | *MC does not get IP address<br /> | ||
+ | *File system is overflowed with log files or core dumps that need to be deleted manually<br /> | ||
+ | *Autostart (CONFIG.PRG or AUTOEXEC.PRG) makes MC irresponsible | ||
− | + | ||
+ | '''''Important''''': COM1 shall not be used by applications | ||
The shell has in- and output by default on COM1. | The shell has in- and output by default on COM1. | ||
− | There is automatic login, user name mc and password mc. | + | There is automatic login, user name ''mc'' and password ''mc''. |
There is possibility to login with ssh or telnet to user "mc", password "mc" | There is possibility to login with ssh or telnet to user "mc", password "mc" | ||
Revision as of 10:34, 10 October 2013
There are some situations where a Controller is no longer accessible with terminal of aico.control studio or aico.develop. Mostly the controller has encountered a serious problem and some task(s) are suspended or the network stack of the operating system is corrupted. For the core-development it is necessary to collect data when such a situation occurs to collect data and analyze the root-cause to be able to fix/correct it.
Contents
Controller file system and useful commands
Access to Linux shell
COM1 of MC is reserved to Linux shell. Shell is used for editing of FWCONFIG, IO.DAT or solving of following problems:
- MC does not boot
- MC does not get IP address
- File system is overflowed with log files or core dumps that need to be deleted manually
- Autostart (CONFIG.PRG or AUTOEXEC.PRG) makes MC irresponsible
Important: COM1 shall not be used by applications
The shell has in- and output by default on COM1. There is automatic login, user name mc and password mc. There is possibility to login with ssh or telnet to user "mc", password "mc"
Location of files at MC file system
- File locations
FWCONFIG
/FFS0/
Programs and Libraries:
/FFS0/SSMC
Log files
Useful commands
- /sbin/ifconfig - gives IP information
- vi - text editor
- cp - copy files
- rm - delete files
- ls - list directory
- threads - lists linux threads
Application autostart
Unlike SERCOS version EtherCAT and CANOpen motion controllers do not have local I/O or dedicated DIP-switch for automatics start of application. DIP-Switch is emulated. Firmware reads a "value" of DIP-Switch from file /FFS0/SSMC/IO.DAT DIP=0x0 INP=0x00 Bit #6 of "DIP-Switch" is responsible for autostart of application. IO.DAT is created automatically if it does not exist, values are zeros.
- IO.DAT can be edited either via MC user interface or directly from Linux shell:
vi /FFS0/SSMC/IO.DAT
- Simplest way to disable autostart would be deletion of IO.DAT
rm /FFS0/SSMC/IO.DAT
== FWCONFIG ==
FWCONFIG contains firmware initialization options
- Syntax:
option value[{byte|kbyte|mbyte}]
- Supported options
libstacksize - library stack size
taskstacksize - default task stack size
sysdatarecfilename - system data recorder file name
sysdatareclen - system data recorder length (number of records)
ipaddressmask - sets ip address and mask for motion controller.
sleep - delay in mSecs
stringpreload - initial size of BASIC strings. Default is "0" - strings are created empty.
stringblockpreload - initial size of string descriptors. Default is 300,000. Reduce this value if application has less than 300,000 string variables.
translatormempartsize - initial size for translator memory partition
passbuffersize - ????
Examples:
ipaddressmask 192.168.20.20:255.255.0.0
sleep 20
libstacksize 20kbyte