📄 sys_conf.h
字号:
/* TCS_MALLOC_USE: When YES, do *not* map malloc/free on *//* rn_getseg/rn_free from region 0, as is standard*//* in pSOS. Instead, use the TCS memory manager *//* instead. *//* The pSOS region manager might be more *//* predictable in its real-time behavior, but this*//* at the cost of larger unit sizes (see *//* KC_RN0USIZE). Also, the pSOS region manager *//* cannot hold more than 32K units, which is 8M *//* with the current KC_RN0USIZE, but *//* proportionally less when the unit size is *//* decreased. *//* If this option is enabled, then define *//* TCS_REGION0_SIZE such that region 0 does not *//* occupy all free memory. *//*---------------------------------------------------------------------*/#define TCS_MALLOC_USE NO/*---------------------------------------------------------------------*//* TCS_REGION0_SIZE: When *not* defined, or when defined to "0", *//* then all free memory (limited to 32K units) *//* is given to region 0. *//* Otherwise, region 0 is created with the *//* specifiedsize, but limited to 32K units; all *//* other memory is available via the TCS memory *//* manager. *//* This option might be used in combination with *//* TCS_MALLOC_USE when the desired KC_RN0USIZE *//* results in a region 0 that is not able to *//* contain all available SDRAM. *//*---------------------------------------------------------------------*/#if 0#define TCS_REGION0_SIZE 0 #endif/*---------------------------------------------------------------------*//* pSOS+m configuration parameters *//*---------------------------------------------------------------------*/#define MC_NGLBOBJ 8 /* size of gbl obj table */#define MC_NAGENT 10 /* number of RPC agents in this node */#define MC_FLAGS 0 /* operating mode flags *//*---------------------------------------------------------------------*//* The following are examples for modifying the following definition *//* *//* Using a pSOSystem routine as a roster change handler *//* #define MC_ROSTER ((void (*)()) SysInitFail) *//* *//* Using a user written routine as a roster change handler *//* extern void MyHandler (void); *//* #define MC_ROSTER ((void (*)()) MyHandler) *//* *//*---------------------------------------------------------------------*/#define MC_ROSTER 0 /* addr of user roster change callout *//*---------------------------------------------------------------------*//* The max length of buffers are defined here. This is a field required*//* by the the configuration table for pSOS+m. *//*---------------------------------------------------------------------*/#define MC_KIMAXBUF 500 /* maximum KI packet buffer length */#define MC_ASYNCERR 0 /* asynchronous calls error callout */#define MC_KIMAXNODES 8 /* max number of nodes supported by KI */#define MC_KINENVELOPES 100 /* number of envelopes per queue in KI *//*---------------------------------------------------------------------*//* pNA+ configuration parameters *//* *//* NOTE: If you get pNA+ errno 5F01 FAT_INSUFFMEM you may need to *//* decrease the number of buffers allocated here for pNA+. *//* In general this error means pNA+ could not allocate enough *//* memory from Region 0 for the number of buffers requested. *//* NOTE: ethernet sockets require 4k buffers, and 0 length ones *//* are required for proper pna functioning. *//*---------------------------------------------------------------------*/#define NC_NNI 5 /* size of pNA NI Table */#define NC_NROUTE 10 /* size of pNA Routing Table */#define NC_NARP 20 /* size of pNA ARP table */#define NC_DEFUID 0 /* Default User ID of a task */#define NC_DEFGID 0 /* Default Group ID of a task */#define NC_HOSTNAME "scg" /* Hostname of the node */#define NC_NHENTRY 8 /* Number of Host table entries */#define NC_NSOCKETS 20 /* Number of sockets in the system */#define NC_NDESCS 20 /* # of socket descriptors/task */#define NC_MBLKS 300 /* # of message blocks in the system */#define NC_BUFS_0 64 /* number of 0 length buffers */#define NC_BUFS_128 32 /* number of 128 byte buffers */#define NC_BUFS_1024 32 /* number of 1k byte buffers */#define NC_BUFS_2048 32 /* number of 2k byte buffers */#define NC_BUFS_4096 32 /* number of 4k byte buffers */#define SE_MAX_PNA_NC_BUFS 5 /* max number of NC_BUFS types */#define NC_DAEMSSTK KC_ROOTSSTK /* pNA daemon supervisor stack size */#define NC_DAEMUSTK KC_ROOTUSTK /* pNA daemon user stack size */#define NC_DAEMMODE KC_ROOTMODE /* pNA daemon initial mode *//***********************************************************************//* *//* L A N C O N F I G U R A T I O N *//* *//* *//***********************************************************************/#define SD_LAN1 NO#define SD_LAN1_IP 0x00000000#define SD_LAN1_SUBNET_MASK 0/*=====================================================================*//* *//* L A N I N T E R F A C E S *//* *//* * BSP_LAN1 - YES if LAN is supported *//* * BSP_LAN1_MTU - Maximum transmission unit (bytes) *//* * BSP_LAN1_HWALEN - Length of hardware address in bytes *//* * BSP_LAN1_FLAGS - Interface flags (per pNA manual) *//* IFF_POLL 0x8000 interface is a polling type *//* IFF_BROADCAST 0x0001 NI supports broadcasts *//* IFF_RAWMEM 0x2000 driver uses "mblk" interface *//* * BSP_LAN1_PKB - Total number of packet buffers *//* *//*=====================================================================*/#define BSP_LAN1 NO#define BSP_LAN1_MTU 1500#define BSP_LAN1_HWALEN 6#define BSP_LAN1_FLAGS 0x2001#define BSP_LAN1_PKB 40/***********************************************************************//* *//* M I S C E L L A N E O U S N E T W O R K I N G *//* P A R A M E T E R S *//* *//***********************************************************************/#define SD_DEF_GTWY_IP 0 /* Default gateway ip address *//***********************************************************************//* *//* I / O D E V I C E S *//* *//* Each device may be included in the system by specifying a major *//* number for it, which determines its slot in the pSOS+ I/O switch *//* table. To leave a device driver out of the system, use NO for *//* the major number. *//* *//* Note the following: *//* * Major device 0 is reserved and cannot be used for any of these *//* devices. Setting a device number to 0 here is the same as NO. *//* * No device number may be higher than SC_DEVMAX (SC_DEVMAX may *//* be increased, if desired) *//* * The lines defining the symbols DEV_SERIAL, DEV_TIMER, etc, *//* should not be changed. These are for use by application *//* programs as the "device number" parameter on de_* calls. *//* *//***********************************************************************/#define SC_DEV_TIMER 1 /* Periodic tick timer */#define DEV_TIMER (SC_DEV_TIMER << 16)#define SC_DEVMAX 4 /* Maximum device number *//***********************************************************************//* *//* O P E R A T I N G S Y S T E M C O M P O N E N T S *//* *//* Setting the definition line to YES will cause that component to *//* be built into the system. NO means the component will NOT be *//* put into the system. It is an error to specify both SC_PSOS *//* and SC_PSOSM as present! *//* *//* The choice between pSOS+ and pSOS+m and the choice for using PNA, *//* ( SC_PSOS, SC_PSOSM and SC_PNA ) are now defined in TCS standard *//* psos makefile. */ /* *//* See for instance $(TCS)/examples/psos/psos_demo1 *//***********************************************************************/#endif /* _SYS_CONF_H */#if defined(__cplusplus)}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -