Moxa Technologies UC-7110 Network Card User Manual


 
C
C
Appendix CFAQ for UC-7110
FAQ 1 Why can I only use vfork( ),and am unable to use fork( )?
Answer 1 uClinux only supports vfork( ). It does not support fork( ). Note that when using
vfork( ), the parent process will hang until the son process calls an exec group API,
or exits.
FAQ 2 When using a pthread group API, why can’t I use SIGUSR1 and SIGUSR2?
Answer 2 Since a pthread group API uses SIGUSR1 and SIGUSR2 to do a pthread control
suspend, restart exit function, we cannot use the SIGUSR1 and SIGUSR2 signals.
You will get the same result if you link the pthread. This means that you cannot use
-1pthred to add an option to the linker.
FAQ 3 What is the correct format for linking to an AP?
Answer 3 arm-elf-gcc –W1, -elf2flt
(In this example, the AP converts elf format to flat format.)
FAQ 4 What stack size can I use when creating a user application?
Answer 4 First note that UC-7110 is not an MMU processor. The OS is uClinux, so you must
transfer your application from ELF to FLAT format. The transfer utility (on the PC)
assigns a stack size of 0x1000 by default. If your application needs a bigger stack
size, you must use an option that specifies stack size when transferring the
application from ELF to FLAT format. The following LDFLAGS shows how to
write the stack size option:
LDFLAGS = -g,-Wl,-T,/usr/local/arm-elf/lib/elf2flt.ld
-elf2flt= "-s 32768"
You can combine this with a compress option. E.g.:
LDFLAGS = -g,-Wl,-T,/usr/local/arm-elf/lib/elf2flt.ld
-elf2flt= "-z –r -s 32768"
Refer to the next FAQ for compress options.
Keep in mind that the stack size must be indicated in decimal format. You cannot
use hex format (i.e., numbers that begin with “0x”). The following LDFLAGS
command will fail:
LDFLAGS = -g,-Wl,-T,/usr/local/arm-elf/lib/elf2flt.ld
-elf2flt= "-s 0x2000"
Use the ‘flthdr’ utility (on a PC) to check the current stack size.