Ignore:
Timestamp:
Feb 1, 2019, 9:57:09 PM (5 years ago)
Author:
coas-nagasima
Message:

TINETとSocket APIなどを更新

Location:
asp3_tinet_ecnl_rx/trunk/asp3_dcre
Files:
6 added
50 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/.cproject

    r345 r364  
    2222                        <storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
    2323                                <option id="toolchain.id" value="RENESAS_GCC_RX"/>
    24                                 <option id="toolchain.version" value="4.8.4.201703"/>
     24                                <option id="toolchain.version" value="4.8.4.201803"/>
    2525                        </storageModule>
    2626                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
     
    3737                                                        <option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize.240222967" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize" useByScannerDiscovery="false" value="100" valueType="string"/>
    3838                                                        <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.renesas.cdt.managedbuild.gcc.core.targetPlatform.635282713" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
    39                                                         <builder buildPath="${workspace_loc:/asp3_dcre}/Debug" id="com.renesas.cdt.managedbuild.gcc.core.builder.1294414176" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="false" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
     39                                                        <builder buildPath="${workspace_loc:/asp3_dcre}/Debug" id="com.renesas.cdt.managedbuild.gcc.core.builder.1294414176" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
    4040                                                        <tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen.946367481" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen">
    4141                                                                <option id="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary.1170480133" name="Select Library" superClass="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.librarygenerator.settings.selectLibrary.newLib" valueType="enumerated"/>
     
    6565                                        </folderInfo>
    6666                                        <sourceEntries>
    67                                                 <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
     67                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
    6868                                        </sourceEntries>
    6969                                </configuration>
     
    7777                                                <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/asp3_dcre"/>
    7878                                                <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/asp3_dcre/Debug"/>
     79                                                <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/asp3_dcre/DebugCitrus"/>
    7980                                                <entry flags="RESOLVED" kind="libraryFile" name="asp3_dcre" srcPrefixMapping="" srcRootPath=""/>
    8081                                        </externalSetting>
     
    9192                        <storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
    9293                                <option id="toolchain.id" value="RENESAS_GCC_RX"/>
    93                                 <option id="toolchain.version" value="4.8.4.201703"/>
     94                                <option id="toolchain.version" value="4.8.4.201803"/>
    9495                        </storageModule>
    9596                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
     
    106107                                                        <option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize.1083888317" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize" useByScannerDiscovery="false" value="100" valueType="string"/>
    107108                                                        <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.renesas.cdt.managedbuild.gcc.core.targetPlatform.570033485" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
    108                                                         <builder buildPath="${workspace_loc:/asp3_dcre}/DebugCitrus" id="com.renesas.cdt.managedbuild.gcc.core.builder.1961458105" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="false" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
     109                                                        <builder buildPath="${workspace_loc:/asp3_dcre}/DebugCitrus" id="com.renesas.cdt.managedbuild.gcc.core.builder.1961458105" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
    109110                                                        <tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen.1465675052" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen">
    110111                                                                <option id="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary.1037533987" name="Select Library" superClass="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.librarygenerator.settings.selectLibrary.newLib" valueType="enumerated"/>
     
    134135                                        </folderInfo>
    135136                                        <sourceEntries>
    136                                                 <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
     137                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
    137138                                        </sourceEntries>
    138139                                </configuration>
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/Debug/Makefile

    r342 r364  
    5656SRCLANG = c
    5757ifeq ($(SRCLANG),c)
    58         LIBS = -lmusl
     58        LIBS = $(SRCDIR)/../musl-1.1.18/Debug/libmusl.a
    5959endif
    6060ifeq ($(SRCLANG),c++)
    6161        USE_CXX = true
    62         CXXLIBS = -lstdc++ -lmusl
     62        CXXLIBS = -lstdc++ $(SRCDIR)/../musl-1.1.18/Debug/libmusl.a
    6363        CXXRTS = cxxrt.o newlibrt.o
    6464endif
     
    150150endif
    151151
     152TINETDIR =
     153
    152154#
    153155#  共通コンパイルオプションの定義
     
    165167CDEFS := $(CDEFS)
    166168INCLUDES := -I. -I$(SRCDIR)/include $(INCLUDES) -I$(SRCDIR)
    167 LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref -L$(SRCDIR)/../musl-1.1.18/Debug
     169LDFLAGS := $(LDFLAGS) -L.
    168170LIBS := $(LIBS) $(CXXLIBS)
    169171CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
     
    186188endif
    187189APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
    188 APPL_CFLAGS := $(APPL_CFLAGS)
     190APPL_CFLAGS := $(APPL_CFLAGS) -nostdinc
    189191ifdef APPLDIRS
    190192        INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIRS),-I$(dir))
    191193endif
    192194
    193 TINETDIR =
    194195ifdef TINETDIR
    195196        #
     
    242243all: tecs | $(DEPDIR)
    243244#       @$(MAKE) check
    244         @$(MAKE) check $(OBJNAME).bin
     245#       @$(MAKE) check $(OBJNAME).bin
    245246#       @$(MAKE) check $(OBJNAME).srec
     247        @$(MAKE) check $(OBJNAME).mot
    246248else
    247249#all: check
    248 all: check $(OBJNAME).bin
     250#all: check $(OBJNAME).bin
    249251#all: check $(OBJNAME).srec
     252all: check $(OBJNAME).mot
    250253endif
    251254
     
    329332vpath %.cfg $(APPL_DIRS)
    330333vpath %.cdl $(APPL_DIRS)
     334vpath %.bin $(APPL_DIRS)
    331335
    332336#
     
    335339KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
    336340SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS) $(HIDDEN_OBJS)
    337 APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
     341APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS) $(APPL_BINOBJS)
    338342ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
    339343                                                                                        $(END_OBJS) $(HIDDEN_OBJS)
     
    410414
    411415#
     416#  並列makeのための依存関係の定義
     417#
     418$(APPL_OBJS) $(SYSSVC_OBJS): | kernel_cfg.timestamp
     419$(APPL_ASMOBJS) $(SYSSVC_ASMOBJS) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
     420                                                                                                                | offset.timestamp
     421
     422#
    412423#  特別な依存関係の定義
    413424#
     
    418429#
    419430$(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
    420         $(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
     431        $(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) -Wl,-Map=$(OBJNAME).map,--cref \
    421432                        $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
    422                         $(ALL_LIBS) $(END_OBJS)
     433                        -Wl,--start-group $(ALL_LIBS) -Wl,--end-group $(END_OBJS)
    423434
    424435#
     
    447458$(OBJNAME).srec: $(OBJFILE)
    448459        $(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
     460
     461$(OBJNAME).mot: $(OBJFILE)
     462        $(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).mot
    449463
    450464#
     
    591605        $(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
    592606
     607$(APPL_BINOBJS): %.o: %.bin
     608        $(OBJCOPY) -B rx -I binary -O elf32-rx-le --rename-section .data=.rodata $< $*.o
     609
    593610#
    594611#  デフォルトコンパイルルールを上書き
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/DebugCitrus/Makefile

    r342 r364  
    5656SRCLANG = c
    5757ifeq ($(SRCLANG),c)
    58         LIBS = -lmusl
     58        LIBS = $(SRCDIR)/../musl-1.1.18/Debug/libmusl.a
    5959endif
    6060ifeq ($(SRCLANG),c++)
    6161        USE_CXX = true
    62         CXXLIBS = -lstdc++ -lmusl
     62        CXXLIBS = -lstdc++ $(SRCDIR)/../musl-1.1.18/Debug/libmusl.a
    6363        CXXRTS = cxxrt.o newlibrt.o
    6464endif
     
    150150endif
    151151
     152TINETDIR =
     153
    152154#
    153155#  共通コンパイルオプションの定義
     
    165167CDEFS := $(CDEFS)
    166168INCLUDES := -I. -I$(SRCDIR)/include $(INCLUDES) -I$(SRCDIR)
    167 LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref -L$(SRCDIR)/../musl-1.1.18/Debug
     169LDFLAGS := $(LDFLAGS) -L.
    168170LIBS := $(LIBS) $(CXXLIBS)
    169171CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
     
    186188endif
    187189APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
    188 APPL_CFLAGS := $(APPL_CFLAGS)
     190APPL_CFLAGS := $(APPL_CFLAGS) -nostdinc
    189191ifdef APPLDIRS
    190192        INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIRS),-I$(dir))
    191193endif
    192194
    193 TINETDIR =
    194195ifdef TINETDIR
    195196        #
     
    242243all: tecs | $(DEPDIR)
    243244#       @$(MAKE) check
    244         @$(MAKE) check $(OBJNAME).bin
     245#       @$(MAKE) check $(OBJNAME).bin
    245246#       @$(MAKE) check $(OBJNAME).srec
     247        @$(MAKE) check $(OBJNAME).mot
    246248else
    247249#all: check
    248 all: check $(OBJNAME).bin
     250#all: check $(OBJNAME).bin
    249251#all: check $(OBJNAME).srec
     252all: check $(OBJNAME).mot
    250253endif
    251254
     
    329332vpath %.cfg $(APPL_DIRS)
    330333vpath %.cdl $(APPL_DIRS)
     334vpath %.bin $(APPL_DIRS)
    331335
    332336#
     
    335339KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
    336340SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS) $(HIDDEN_OBJS)
    337 APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
     341APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS) $(APPL_BINOBJS)
    338342ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
    339343                                                                                        $(END_OBJS) $(HIDDEN_OBJS)
     
    410414
    411415#
     416#  並列makeのための依存関係の定義
     417#
     418$(APPL_OBJS) $(SYSSVC_OBJS): | kernel_cfg.timestamp
     419$(APPL_ASMOBJS) $(SYSSVC_ASMOBJS) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
     420                                                                                                                | offset.timestamp
     421
     422#
    412423#  特別な依存関係の定義
    413424#
     
    418429#
    419430$(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
    420         $(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
     431        $(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) -Wl,-Map=$(OBJNAME).map,--cref \
    421432                        $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
    422                         $(ALL_LIBS) $(END_OBJS)
     433                        -Wl,--start-group $(ALL_LIBS) -Wl,--end-group $(END_OBJS)
    423434
    424435#
     
    447458$(OBJNAME).srec: $(OBJFILE)
    448459        $(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
     460
     461$(OBJNAME).mot: $(OBJFILE)
     462        $(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).mot
    449463
    450464#
     
    591605        $(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
    592606
     607$(APPL_BINOBJS): %.o: %.bin
     608        $(OBJCOPY) -B rx -I binary -O elf32-rx-le --rename-section .data=.rodata $< $*.o
     609
    593610#
    594611#  デフォルトコンパイルルールを上書き
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/arch/rx630_gcc/prc_kernel_impl.c

    r359 r364  
    237237#endif /* OMIT_DEFAULT_EXC_HANDLER */
    238238
    239 void _start_c(char **args);
     239void _start_c(char * const*args);
    240240
    241241void
     
    243243{
    244244        const char *const args[] = {
    245                 1,
     245                (char *)1,
    246246                "asp3",
    247247                0,
     
    268268
    269269__attribute__((weak))
    270 void SYS_set_tid_address()
    271 {
    272         return 0;//-ENOSYS;
    273 }
    274 
    275 __attribute__((weak))
    276 void SYS_mmap2()
     270long SYS_set_tid_address()
     271{
     272        return 0;//-ENOSYS;
     273}
     274
     275__attribute__((weak))
     276long SYS_gettid()
     277{
     278        return 0;//-ENOSYS;
     279}
     280
     281__attribute__((weak))
     282long SYS_rt_sigprocmask()
     283{
     284        return 0;//-ENOSYS;
     285}
     286
     287__attribute__((weak))
     288long SYS_mmap2()
     289{
     290        return 0;//-ENOSYS;
     291}
     292
     293__attribute__((weak))
     294long SYS_tkill()
    277295{
    278296        return 0;//-ENOSYS;
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/arch/rx630_gcc/prc_rename.def

    r337 r364  
    1818exception
    1919
    20 # rx610_kernel_impl.c
     20# rx630_kernel_impl.c
    2121ipr_reg_addr
    2222ier_reg_addr
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/arch/rx630_gcc/prc_support.S

    r337 r364  
    410410dispatcher_idle_loop:
    411411        setpsw  i                                                       ; 全割込み許可
     412        wait
    412413        clrpsw  i                                                       ; 全割込み禁止
    413414
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/arch/rx630_gcc/rx630.h

    r337 r364  
    12121212#define ICU_IPR254_ADDR                 ( ( volatile uint8_t __evenaccess * )0x000873FE )
    12131213#define ICU_IPR255_ADDR                 ( ( volatile uint8_t __evenaccess * )0x000873FF )
    1214 #define ICU_IPR_BIT                             ( 7U << 0U )
    1215 
     1214#define ICU_IPR_OFFSET                  ( 0U )
     1215#define ICU_IPR_MASK                    ( 0xFU << ICU_IPR_OFFSET )
    12161216
    12171217/*
     
    13231323#define SCI6_SCMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A0C6 )
    13241324#define SCI6_SEMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A0C7 )
     1325#define SCI7_SMR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A0E0 )
     1326#define SCI7_BRR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A0E1 )
     1327#define SCI7_SCR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A0E2 )
     1328#define SCI7_TDR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A0E3 )
     1329#define SCI7_SSR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A0E4 )
     1330#define SCI7_RDR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A0E5 )
     1331#define SCI7_SCMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A0E6 )
     1332#define SCI7_SEMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A0E7 )
     1333#define SCI8_SMR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A100 )
     1334#define SCI8_BRR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A101 )
     1335#define SCI8_SCR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A102 )
     1336#define SCI8_TDR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A103 )
     1337#define SCI8_SSR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A104 )
     1338#define SCI8_RDR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A105 )
     1339#define SCI8_SCMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A106 )
     1340#define SCI8_SEMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A107 )
     1341#define SCI9_SMR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A120 )
     1342#define SCI9_BRR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A121 )
     1343#define SCI9_SCR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A122 )
     1344#define SCI9_TDR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A123 )
     1345#define SCI9_SSR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A124 )
     1346#define SCI9_RDR_ADDR                   ( ( volatile uint8_t __evenaccess * )0x0008A125 )
     1347#define SCI9_SCMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A126 )
     1348#define SCI9_SEMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A127 )
     1349#define SCI10_SMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A140 )
     1350#define SCI10_BRR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A141 )
     1351#define SCI10_SCR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A142 )
     1352#define SCI10_TDR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A143 )
     1353#define SCI10_SSR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A144 )
     1354#define SCI10_RDR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A145 )
     1355#define SCI10_SCMR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008A146 )
     1356#define SCI10_SEMR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008A147 )
     1357#define SCI11_SMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A160 )
     1358#define SCI11_BRR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A161 )
     1359#define SCI11_SCR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A162 )
     1360#define SCI11_TDR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A163 )
     1361#define SCI11_SSR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A164 )
     1362#define SCI11_RDR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A165 )
     1363#define SCI11_SCMR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008A166 )
     1364#define SCI11_SEMR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008A167 )
     1365#define SCI12_SMR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A300 )
     1366#define SCI12_BRR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A301 )
     1367#define SCI12_SCR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A302 )
     1368#define SCI12_TDR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A303 )
     1369#define SCI12_SSR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A304 )
     1370#define SCI12_RDR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x0008A305 )
     1371#define SCI12_SCMR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008A306 )
     1372#define SCI12_SEMR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008A307 )
    13251373#define SCI_SMR_CKS_BIT                 ( 3U << 0U )
    13261374#define SCI_SMR_STOP_BIT                ( 1U << 3U )
     
    15151563#define PORTG_ODR1_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008C0A1 )
    15161564#define PORTJ_ODR1_ADDR                 ( ( volatile uint8_t __evenaccess * )0x0008C0A5 )
     1565#define PORT_ODR_Pm0_OFFSET             ( 0U )
     1566#define PORT_ODR_Pm0_MASK               ( 0x3U << PORT_ODR_Pm0_OFFSET )
     1567#define PORT_ODR_Pm1_OFFSET             ( 2U )
     1568#define PORT_ODR_Pm1_MASK               ( 0x3U << PORT_ODR_Pm1_OFFSET )
     1569#define PORT_ODR_Pm2_OFFSET             ( 4U )
     1570#define PORT_ODR_Pm2_MASK               ( 0x3U << PORT_ODR_Pm2_OFFSET )
     1571#define PORT_ODR_Pm3_OFFSET             ( 6U )
     1572#define PORT_ODR_Pm3_MASK               ( 0x3U << PORT_ODR_Pm3_OFFSET )
     1573#define PORT_ODR_Pm4_OFFSET             ( 0U )
     1574#define PORT_ODR_Pm4_MASK               ( 0x3U << PORT_ODR_Pm4_OFFSET )
     1575#define PORT_ODR_Pm5_OFFSET             ( 2U )
     1576#define PORT_ODR_Pm5_MASK               ( 0x3U << PORT_ODR_Pm5_OFFSET )
     1577#define PORT_ODR_Pm6_OFFSET             ( 4U )
     1578#define PORT_ODR_Pm6_MASK               ( 0x3U << PORT_ODR_Pm6_OFFSET )
     1579#define PORT_ODR_Pm7_OFFSET             ( 6U )
     1580#define PORT_ODR_Pm7_MASK               ( 0x3U << PORT_ODR_Pm7_OFFSET )
     1581#define PORT_ODR_CMOS                   ( 0U )
     1582#define PORT_ODR_NCH_OPEN_DRAIN ( 1U )
     1583#define PORT_ODR_PCH_OPEN_DRAIN ( 2U )
    15171584
    15181585/*
     
    17281795#define TPU10_TMDR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x000881C1 )
    17291796#define TPU11_TMDR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x000881D1 )
     1797#define TPU_TMDR_MD_OFFSET              ( 0U )
     1798#define TPU_TMDR_MD_MASK                ( 0xFU << TPU_TMDR_MD_OFFSET )
     1799#define TPU_TMDR_BFA_BIT                ( 0x10 )
     1800#define TPU_TMDR_BFB_BIT                ( 0x20 )
     1801#define TPU_TMDR_ICSELB_BIT             ( 0x40 )
     1802#define TPU_TMDR_ICSELD_BIT             ( 0x80 )
    17301803
    17311804#define TPU0_TIOR_ADDR                  ( ( volatile uint8_t __evenaccess * )0x000881C0 )
     
    17461819#define TPU10_TIOR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x000881C2 )
    17471820#define TPU11_TIOR_ADDR                 ( ( volatile uint8_t __evenaccess * )0x000881D2 )
    1748 #define TPU_TIORL_IOA_OFFSET    ( 0U )
    1749 #define TPU_TIORL_IOA_MASK              ( 0xFU << TPU_TIORL_IOA_OFFSET )
    1750 #define TPU_TIORL_IOB_OFFSET    ( 4U )
    1751 #define TPU_TIORL_IOB_MASK              ( 0xFU << TPU_TIORL_IOB_OFFSET )
     1821#define TPU_TIOR_IOA_OFFSET     ( 0U )
     1822#define TPU_TIOR_IOA_MASK               ( 0xFU << TPU_TIOR_IOA_OFFSET )
     1823#define TPU_TIOR_IOB_OFFSET     ( 4U )
     1824#define TPU_TIOR_IOB_MASK               ( 0xFU << TPU_TIOR_IOB_OFFSET )
     1825#define TPU_TIORH_IOA_OFFSET    ( 0U )
     1826#define TPU_TIORH_IOA_MASK              ( 0xFU << TPU_TIORH_IOA_OFFSET )
     1827#define TPU_TIORH_IOB_OFFSET    ( 4U )
     1828#define TPU_TIORH_IOB_MASK              ( 0xFU << TPU_TIORH_IOB_OFFSET )
    17521829#define TPU_TIORL_IOC_OFFSET    ( 0U )
    17531830#define TPU_TIORL_IOC_MASK              ( 0xFU << TPU_TIORL_IOC_OFFSET )
     
    18061883#define TPU_TSYR_SYNC5_BIT              ( 0x01U << 5U )
    18071884
     1885#define TPU0_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088114 )
     1886#define TPU1_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088124 )
     1887#define TPU2_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088134 )
     1888#define TPU3_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088144 )
     1889#define TPU4_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088154 )
     1890#define TPU5_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088164 )
     1891#define TPU6_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088184 )
     1892#define TPU7_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x00088194 )
     1893#define TPU8_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x000881A4 )
     1894#define TPU9_TIER_ADDR                  ( ( volatile uint8_t __evenaccess *)0x000881B4 )
     1895#define TPU10_TIER_ADDR                 ( ( volatile uint8_t __evenaccess *)0x000881C4 )
     1896#define TPU11_TIER_ADDR                 ( ( volatile uint8_t __evenaccess *)0x000881D4 )
     1897
     1898#define TPU0_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088116 )
     1899#define TPU1_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088126 )
     1900#define TPU2_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088136 )
     1901#define TPU3_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088146 )
     1902#define TPU4_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088156 )
     1903#define TPU5_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088166 )
     1904#define TPU6_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088186 )
     1905#define TPU7_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x00088196 )
     1906#define TPU8_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x000881A6 )
     1907#define TPU9_TCNT_ADDR                  ( ( volatile uint16_t __evenaccess *)0x000881B6 )
     1908#define TPU10_TCNT_ADDR                 ( ( volatile uint16_t __evenaccess *)0x000881C6 )
     1909#define TPU11_TCNT_ADDR                 ( ( volatile uint16_t __evenaccess *)0x000881D6 )
     1910
    18081911/*
    18091912 * RSPI
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/arch/rx630_gcc/scif.h

    r337 r364  
    5959#define SCI5_BASE       ((uint32_t)(SCI5_SMR_ADDR))
    6060#define SCI6_BASE       ((uint32_t)(SCI6_SMR_ADDR))
     61#define SCI7_BASE       ((uint32_t)(SCI7_SMR_ADDR))
     62#define SCI8_BASE       ((uint32_t)(SCI8_SMR_ADDR))
     63#define SCI9_BASE       ((uint32_t)(SCI9_SMR_ADDR))
     64#define SCI10_BASE      ((uint32_t)(SCI10_SMR_ADDR))
     65#define SCI11_BASE      ((uint32_t)(SCI11_SMR_ADDR))
     66/* SCI12は下記のSCI_NUMが使用できない */
    6167
    6268/* モジュールストップコントロールレジスタB bit */
    63 #define SCI_NUM(base)   ((base - SCI0_BASE) / 0x20)
     69#define SCI_NUM(base)   (((intptr_t)base - SCI0_BASE) / 0x20)
    6470#define SCI_MSTPCRB_BIT(base)   (1 << (31 - SCI_NUM(base)))
    6571
     
    7076#define CLK_F64 UINT_C(0x03)
    7177
    72 /* シリアルモードレジスタ(SMR) */
     78/* シリアルモードレジスタ(SMR */
    7379#define CKS                     UINT_C(0x03)
     80#define MP                      UINT_C(0x04)
    7481#define STOP            UINT_C(0x08)
    7582#define PM                      UINT_C(0x10)
     
    8087#define ASYNC_8BIT      UINT_C(0x40)
    8188
    82 /* シリアルコントロールレジスタ(SCR) */
     89/* シリアルコントロールレジスタ(SCR */
    8390#define CKE                     UINT_C(0x03)
    8491#define TEIE            UINT_C(0x04)
     
    94101#define ORER            UINT_C(0x20)
    95102
    96 /* シリアル拡張モードレジスタ(SEMR) */
     103/* スマートカードモードレジスタ(SCMR) */
     104#define SMIF            UINT_C(0x01)
     105#define SINV            UINT_C(0x04)
     106#define SDIR            UINT_C(0x08)
     107#define BCP2            UINT_C(0x80)
     108
     109/* シリアル拡張モードレジスタ(SEMR) */
    97110#define ACS0            UINT_C(0x01)
    98111#define ABCS            UINT_C(0x10)
     112#define NFEN            UINT_C(0x20)
     113
     114/* I2C モードレジスタ1(SIMR1) */
     115#define IICM            UINT_C(0x01)
     116
     117/* I2C モードレジスタ2(SIMR2) */
     118#define IICINTM         UINT_C(0x01)
     119#define IICCSC          UINT_C(0x02)
     120#define IICACKT         UINT_C(0x20)
     121
     122/* I2C モードレジスタ3(SIMR2) */
     123#define IICSTAREQ       UINT_C(0x01)
     124#define IICRSTAREQ      UINT_C(0x02)
     125#define IICSTPREQ       UINT_C(0x04)
     126#define IICSTIF         UINT_C(0x08)
     127
     128/* I2C ステータスレジスタ(SISR) */
     129#define IICACKR         UINT_C(0x01)
     130
     131/* SPI モードレジスタ(SPMR) */
     132#define SSE                     UINT_C(0x01)
     133#define CTSE            UINT_C(0x02)
     134#define MSS                     UINT_C(0x04)
     135#define CKPOL           UINT_C(0x40)
     136#define CKPH            UINT_C(0x80)
    99137
    100138#define SCI_SCR_FLG_ENABLE      (RE | TE)
     
    104142 *  SCIレジスタの番地の定義
    105143 */
    106 #define SCI_SMR(base)           ((uint8_t *)(base + 0x00U))
    107 #define SCI_BRR(base)           ((uint8_t *)(base + 0x01U))
    108 #define SCI_SCR(base)           ((uint8_t *)(base + 0x02U))
    109 #define SCI_TDR(base)           ((uint8_t *)(base + 0x03U))
    110 #define SCI_SSR(base)           ((uint8_t *)(base + 0x04U))
    111 #define SCI_RDR(base)           ((uint8_t *)(base + 0x05U))
    112 #define SCI_SCMR(base)          ((uint8_t *)(base + 0x06U))
    113 #define SCI_SEMR(base)          ((uint8_t *)(base + 0x07U))
    114 #define SCI_SNFR(base)          ((uint8_t *)(base + 0x08U))
     144#define SCI_SMR(base)           ((uint8_t *)((intptr_t)base + 0x00U))
     145#define SCI_BRR(base)           ((uint8_t *)((intptr_t)base + 0x01U))
     146#define SCI_SCR(base)           ((uint8_t *)((intptr_t)base + 0x02U))
     147#define SCI_TDR(base)           ((uint8_t *)((intptr_t)base + 0x03U))
     148#define SCI_SSR(base)           ((uint8_t *)((intptr_t)base + 0x04U))
     149#define SCI_RDR(base)           ((uint8_t *)((intptr_t)base + 0x05U))
     150#define SCI_SCMR(base)          ((uint8_t *)((intptr_t)base + 0x06U))
     151#define SCI_SEMR(base)          ((uint8_t *)((intptr_t)base + 0x07U))
     152#define SCI_SNFR(base)          ((uint8_t *)((intptr_t)base + 0x08U))
     153#define SCI_SIMR1(base)         ((uint8_t *)((intptr_t)base + 0x09U))
     154#define SCI_SIMR2(base)         ((uint8_t *)((intptr_t)base + 0x0AU))
     155#define SCI_SIMR3(base)         ((uint8_t *)((intptr_t)base + 0x0BU))
     156#define SCI_SISR(base)          ((uint8_t *)((intptr_t)base + 0x0CU))
     157#define SCI_SPMR(base)          ((uint8_t *)((intptr_t)base + 0x0DU))
    115158
    116159#ifndef TOPPERS_MACRO_ONLY
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/sample/Makefile

    r342 r364  
    403403
    404404#
     405#  並列makeのための依存関係の定義
     406#
     407$(APPL_OBJS) $(SYSSVC_OBJS): | kernel_cfg.timestamp
     408$(APPL_ASMOBJS) $(SYSSVC_ASMOBJS) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
     409                                                                                                                | offset.timestamp
     410
     411#
    405412#  特別な依存関係の定義
    406413#
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/syssvc/serial.h

    r359 r364  
    7979extern ER               serial_opn_por(ID portid) throw();
    8080extern ER               serial_cls_por(ID portid) throw();
    81 extern ER_UINT  serial_rea_dat(ID portid, char *buf, uint_t len) throw();
     81extern ER_UINT  serial_trea_dat(ID portid, char *buf, uint_t len, TMO tmout) throw();
    8282extern ER_UINT  serial_wri_dat(ID portid, const char *buf, uint_t len) throw();
    8383extern ER               serial_ctl_por(ID portid, uint_t ioctl) throw();
    8484extern ER               serial_ref_por(ID portid, T_SERIAL_RPOR *pk_rpor) throw();
     85
     86Inline ER_UINT  serial_rea_dat(ID portid, char *buf, uint_t len)
     87{
     88        return serial_trea_dat(portid, buf, len, TMO_FEVR);
     89}
    8590
    8691/*
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/syssvc/tSerialAdapter.c

    r337 r364  
    8383 */
    8484ER_UINT
    85 serial_rea_dat(ID portid, char *buf, uint_t len)
     85serial_trea_dat(ID portid, char *buf, uint_t len, TMO tmout)
    8686{
    8787        if (sns_dpn()) {                                /* コンテキストのチェック */
     
    9292        }
    9393
    94         return(cSerialPort_read(portid - 1, buf, len));
     94        return(cSerialPort_read(portid - 1, buf, len, tmout));
    9595}
    9696
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/syssvc/tSerialPort.cdl

    r337 r364  
    5757        ER              open(void);
    5858        ER              close(void);
    59         ER_UINT read([out,size_is(length)] char *buffer, [in] uint_t length);
     59        ER_UINT read([out,size_is(length)] char *buffer, [in] uint_t length, [in] TMO tmout);
    6060        ER_UINT write([in,size_is(length)] const char *buffer, [in] uint_t length);
    6161        ER              control([in] uint_t ioControl);
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/syssvc/tSerialPortMain.c

    r359 r364  
    397397 */
    398398ER_UINT
    399 eSerialPort_read(CELLIDX idx, char *buffer, uint_t length)
     399eSerialPort_read(CELLIDX idx, char *buffer, uint_t length, TMO tmout)
    400400{
    401401        CELLCB  *p_cellcb;
     
    423423        while (reacnt < length) {
    424424                if (buffer_empty) {
    425                         SVC(rercd = cReceiveSemaphore_wait(),
    426                                                                                 gen_ercd_wait(rercd, p_cellcb));
     425                        rercd = cReceiveSemaphore_waitTimeout(tmout);
     426                        if (rercd == E_TMOUT)
     427                                return E_TMOUT;
     428                        if (rercd < 0) {
     429                                gen_ercd_wait(rercd, p_cellcb);
     430                                ercd = rercd;
     431                                goto error_exit;
     432                        }
    427433                }
    428434                SVC(rercd = serialPort_readChar(p_cellcb, &c), rercd);
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_citrus_gcc/gr_citrus.ld

    r337 r364  
    1111                KEEP(*(.fvectors))
    1212        } > ROM
    13         .text 0xFFF00000 : AT (0xFFF00000)
     13        .text 0xFFE00000 : AT (0xFFE00000)
    1414        {
    1515                *(.text)
     
    5656                *(C_2)
    5757                *(C)
     58                _mrb_preset_const_start = .;
     59                *(.mrb_preset_const)
     60                _mrb_preset_const_end = .;
    5861                _erodata = .;
    5962        } > ROM
     
    111114                . = ALIGN(2);
    112115                *(D_2)
     116                _mrb_preset_data_start = .;
     117                *(.mrb_preset_data)
     118                _mrb_preset_data_end = .;
    113119                _edata = .;
    114120        } > RAM
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_citrus_gcc/target_kernel_impl.c

    r337 r364  
    6868
    6969        /* IOポート初期化 */
    70         /* P25を出力ポートにする */
    71         sil_wrb_mem(PORT2_PDR_ADDR,
    72                 sil_reb_mem(PORT2_PDR_ADDR) | PORT_PDR_B5_BIT);
    7370        /* PA0, PA1, PA2, PA6を出力ポートにする */
    7471        sil_wrb_mem(PORTA_PDR_ADDR,
     
    8178         *  シリアルポートの設定
    8279         */
    83         serial_opn_por(1);
    8480
    8581        /* ポートP20をTxD0, ポートP21をRxD0に */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_citrus_gcc/target_kernel_impl.h

    r337 r364  
    107107 */
    108108#ifdef TOPPERS_ENABLE_TRACE
    109 #define LOG_DSP_ENTER   ( 1 )
    110 #define LOG_DSP_LEAVE   ( 1 )
    111 #define LOG_INH_ENTER   ( 1 )
    112 #define LOG_INH_LEAVE   ( 1 )
    113 #define LOG_EXC_ENTER   ( 1 )
    114 #define LOG_EXC_LEAVE   ( 1 )
     109#define LOG_DSP_ENTER(dspno)
     110#define LOG_DSP_LEAVE(dspno)
     111#define LOG_INH_ENTER(inhno)
     112#define LOG_INH_LEAVE(inhno)
     113#define LOG_EXC_ENTER(excno)
     114#define LOG_EXC_LEAVE(excno)
    115115#else
    116 #define LOG_DSP_ENTER   ( 0 )
    117 #define LOG_DSP_LEAVE   ( 0 )
    118 #define LOG_INH_ENTER   ( 0 )
    119 #define LOG_INH_LEAVE   ( 0 )
    120 #define LOG_EXC_ENTER   ( 0 )
    121 #define LOG_EXC_LEAVE   ( 0 )
     116#undef LOG_DSP_ENTER
     117#undef LOG_DSP_LEAVE
     118#undef LOG_INH_ENTER
     119#undef LOG_INH_LEAVE
     120#undef LOG_EXC_ENTER
     121#undef LOG_EXC_LEAVE
    122122#endif
    123123
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_citrus_gcc/target_sym.def

    r337 r364  
    1 LOG_DSP_ENTER
    2 LOG_DSP_LEAVE
    3 LOG_INH_ENTER
    4 LOG_INH_LEAVE
    5 LOG_EXC_ENTER
    6 LOG_EXC_LEAVE
    71SIL_DLY_TIM1
    82SIL_DLY_TIM2
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_citrus_gcc/target_timer.c

    r337 r364  
    398398         */
    399399        if (probe_int(INTNO_TIMER1)) {
    400                 if(local_cnt < 0x8000)
     400                if (local_cnt < 0x8000)
    401401                        local_eut += 1;
    402402        }
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/gr_sakura.ld

    r337 r364  
    5656                *(C_2)
    5757                *(C)
     58                _mrb_preset_const_start = .;
     59                *(.mrb_preset_const)
     60                _mrb_preset_const_end = .;
    5861                _erodata = .;
    5962        } > ROM
     
    111114                . = ALIGN(2);
    112115                *(D_2)
     116                _mrb_preset_data_start = .;
     117                *(.mrb_preset_data)
     118                _mrb_preset_data_end = .;
    113119                _edata = .;
    114120        } > RAM
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/target_kernel_impl.c

    r337 r364  
    8181         *  シリアルポートの設定
    8282         */
    83         serial_opn_por(1);
    8483
    8584        /* ポートP20をTxD0, ポートP21をRxD0に */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/target_kernel_impl.h

    r337 r364  
    107107 */
    108108#ifdef TOPPERS_ENABLE_TRACE
    109 #define LOG_DSP_ENTER   ( 1 )
    110 #define LOG_DSP_LEAVE   ( 1 )
    111 #define LOG_INH_ENTER   ( 1 )
    112 #define LOG_INH_LEAVE   ( 1 )
    113 #define LOG_EXC_ENTER   ( 1 )
    114 #define LOG_EXC_LEAVE   ( 1 )
     109#define LOG_DSP_ENTER(dspno)
     110#define LOG_DSP_LEAVE(dspno)
     111#define LOG_INH_ENTER(inhno)
     112#define LOG_INH_LEAVE(inhno)
     113#define LOG_EXC_ENTER(excno)
     114#define LOG_EXC_LEAVE(excno)
    115115#else
    116 #define LOG_DSP_ENTER   ( 0 )
    117 #define LOG_DSP_LEAVE   ( 0 )
    118 #define LOG_INH_ENTER   ( 0 )
    119 #define LOG_INH_LEAVE   ( 0 )
    120 #define LOG_EXC_ENTER   ( 0 )
    121 #define LOG_EXC_LEAVE   ( 0 )
     116#undef LOG_DSP_ENTER
     117#undef LOG_DSP_LEAVE
     118#undef LOG_INH_ENTER
     119#undef LOG_INH_LEAVE
     120#undef LOG_EXC_ENTER
     121#undef LOG_EXC_LEAVE
    122122#endif
    123123
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/target_sym.def

    r337 r364  
    1 LOG_DSP_ENTER
    2 LOG_DSP_LEAVE
    3 LOG_INH_ENTER
    4 LOG_INH_LEAVE
    5 LOG_EXC_ENTER
    6 LOG_EXC_LEAVE
    71SIL_DLY_TIM1
    82SIL_DLY_TIM2
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/target_timer.c

    r337 r364  
    398398         */
    399399        if (probe_int(INTNO_TIMER1)) {
    400                 if(local_cnt < 0x8000)
     400                if (local_cnt < 0x8000)
    401401                        local_eut += 1;
    402402        }
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/Makefile.tinet

    r337 r364  
    9393               in_subr.o route_cfg.o
    9494TINET_CFG_COBJS := $(TINET_CFG_COBJS) tinet_cfg.o
     95TINET_CFG2_OUT_SRCS := $(TINET_CFG2_OUT_SRCS) tinet_cfg.h tinet_cfg.c
    9596
    9697#  IPv6
     
    328329
    329330        CFG_COBJS := $(CFG_COBJS) $(TINET_CFG_COBJS)
     331        CFG2_OUT_SRCS := $(CFG2_OUT_SRCS) $(TINET_CFG2_OUT_SRCS)
    330332
    331333        CLEAN_FILES := $(CLEAN_FILES) $(TINET_CFG_OUT) $(MAKE_TINET_LIB)
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/ethernet.h

    r359 r364  
    9898#endif  /* of #ifndef IF_ETHER_NIC_HDR_ALIGN */
    9999
    100 #if defined(__RX) || defined(_MSC_VER)
    101100#if defined(__RX)
    102101#pragma pack
    103 #else
     102#elif defined(_MSC_VER)
    104103#pragma pack(push, 1)
    105104#endif
     105
     106#if defined(__RX) || defined(_MSC_VER)
     107
    106108typedef struct t_ether_header {
    107109
     
    116118        uint16_t        type;
    117119        } T_ETHER_HDR;
    118 #if defined(__RX)
    119 #pragma packoption
    120 #else
    121 #pragma pack(pop)
    122 #endif
    123120
    124121#elif defined(TOPPERS_S810_CLG3_85)     /* of #if defined(__RX) */
     
    166163        uint8_t         lladdr[ETHER_ADDR_LEN];
    167164        } __attribute__((packed, aligned(2))) T_ETHER_ADDR;
     165
     166#if defined(__RX)
     167#pragma packoption
     168#elif defined(_MSC_VER)
     169#pragma pack(pop)
     170#endif
    168171
    169172/*
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/net_asp.cfg

    r337 r364  
    4141
    4242INCLUDE("net/net.cfg");
     43
     44#ifndef NOUSE_MPF_NET_BUF
    4345
    4446/*
     
    169171                });
    170172#endif  /* of #if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0 */
     173
     174#endif
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/net_buf.c

    r337 r364  
    6868#include <netinet/tcp_var.h>
    6969
     70#ifndef NOUSE_MPF_NET_BUF
     71
    7072/*
    7173 *  関数
     
    226228#endif  /* of #if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0 */
    227229
    228 #if defined(_IP4_CFG)
     230#if defined(_IP6_CFG)
     231
     232#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
     233        {
     234                MPF_NET_BUF_CSEG,
     235                IF_HDR_SIZE + IP_HDR_SIZE + TCP_HDR_SIZE,
     236
     237#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
     238
     239                NUM_MPF_NET_BUF_CSEG,
     240
     241#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
     242
     243                },
     244#endif  /* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
     245
     246#endif  /* of #if defined(_IP6_CFG) */
    229247
    230248#if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0
     
    242260#endif  /* of #if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0 */
    243261
    244 #endif  /* of #if defined(_IP4_CFG) */
     262#if defined(_IP4_CFG) && !defined(_IP6_CFG)
    245263
    246264#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
     
    257275                },
    258276#endif  /* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
     277
     278#endif  /* of #if defined(_IP4_CFG) && !defined(_IP6_CFG) */
    259279
    260280        };
     
    307327
    308328        while (1) {
    309                 if ((error = tget_mpf((ID)net_buf_table[ix].index, (void*)buf, ix == 0 ? tmout : TMO_POL)) == E_OK) {
     329                if ((error = tget_mpf((ID)net_buf_table[ix].index, (void **)buf, ix == 0 ? tmout : TMO_POL)) == E_OK) {
    310330                        (*buf)->idix  = (uint8_t)ix;
    311331                        (*buf)->len   = (uint16_t)minlen;
     
    318338                        return error;
    319339                        }
    320                 else if (ix == 0 || net_buf_table[ix].size > maxlen)
     340                ix --;
     341                if (ix < 0 || net_buf_table[ix].size > maxlen)
    321342                        break;
    322                 ix --;
    323343                }
    324344
     
    349369
    350370        while (1) {
    351                 if ((error = tget_mpf((ID)net_buf_table[ix].index, (void*)buf,
     371                if ((error = tget_mpf((ID)net_buf_table[ix].index, (void **)buf,
    352372                                      ix == sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY) - 1 ? tmout : TMO_POL)) == E_OK) {
    353373                        (*buf)->idix  = (uint8_t)ix;
    354374                        (*buf)->len   = net_buf_table[ix].size;
    355375                        (*buf)->flags = 0;
     376#ifdef IF_ETHER_MULTI_NIC
     377                        (*buf)->conn_pos = 0;
     378#endif
    356379
    357380#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
     
    450473                /* 固定メモリプールに返す。*/
    451474
    452 #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
    453                 net_buf_table[buf->idix].busies --;
     475                int idix = buf->idix;
     476#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
     477                net_buf_table[idix].busies --;
    454478#endif
    455                 if ((error = rel_mpf((ID)net_buf_table[buf->idix].index, buf)) != E_OK) {
    456                         syslog(LOG_WARNING, "[NET BUF] %s, ID=%d.", itron_strerror(error), buf->idix);
     479                if ((error = rel_mpf((ID)net_buf_table[idix].index, buf)) != E_OK) {
     480                        syslog(LOG_WARNING, "[NET BUF] %s, ID=%d.", itron_strerror(error), idix);
    457481                        }
    458482                }
     
    505529        return (uint_t)net_buf_table[0].size;
    506530        }
     531
     532#else
     533#include <stdlib.h>
     534
     535/*
     536 *  tget_net_buf_ex -- ネットワークバッファを獲得する(拡張機能)。
     537 */
     538
     539ER
     540tget_net_buf_ex (T_NET_BUF **buf, uint_t minlen, uint_t maxlen, ATR nbatr, TMO tmout)
     541{
     542        uint_t len = (minlen > maxlen) ? minlen : maxlen;
     543        *buf = (T_NET_BUF *)malloc(sizeof(T_NET_BUF) - sizeof(((T_NET_BUF *)0)->buf) + len);
     544        if (*buf == NULL)
     545                return E_NOMEM;
     546
     547        (*buf)->idix = 0;
     548        (*buf)->len = (uint16_t)len;
     549        (*buf)->flags = 0;
     550
     551        return E_OK;
     552        }
     553
     554/*
     555 *  tget_net_buf -- ネットワークバッファを獲得する(互換)。
     556 */
     557
     558ER
     559tget_net_buf (T_NET_BUF **buf, uint_t len, TMO tmout)
     560{
     561        return tget_net_buf_ex(buf, len, len, NBA_SEARCH_ASCENT, tmout);
     562        }
     563
     564
     565/*
     566 * rel_net_buf -- ネットワークバッファを返却する。
     567 */
     568
     569ER
     570rel_net_buf (T_NET_BUF *buf)
     571{
     572        free(buf);
     573
     574        return E_OK;
     575        }
     576
     577
     578/*
     579 * net_buf_max_siz -- ネットワークバッファの最大サイズを返す。
     580 */
     581
     582uint_t
     583net_buf_max_siz (void)
     584{
     585        return (uint_t)IF_PDU_SIZE;
     586        }
     587
     588#endif
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/net_rename.h

    r337 r364  
    7171#define tget_net_buf_ex         _tinet_tget_net_buf_ex
    7272#define tget_net_buf            _tinet_tget_net_buf
    73 #define rel_net_buf             _tinet_rel_net_buf
    74 #define rus_net_buf             _tinet_rus_net_buf
    75 #define net_buf_siz             _tinet_net_buf_siz
     73#define rel_net_buf                     _tinet_rel_net_buf
     74#define rus_net_buf                     _tinet_rus_net_buf
     75#define net_buf_siz                     _tinet_net_buf_siz
    7676#define net_buf_max_siz         _tinet_net_buf_max_siz
    7777#define nbuf_get_tbl            _tinet_nbuf_get_tbl
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/Makefile.netapp

    r337 r364  
    183183                NETAPP_COBJS := $(NETAPP_COBJS) udp6_echo_cli.o
    184184                NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp6_echo_cli.cfg
    185        
     185
    186186                ifeq ($(SUPPORT_INET4),true)
    187187                        ifeq ($(USE_UDP4_ECHO_CLI),true)
     
    191191                        endif
    192192                endif
    193         else
     193                else
    194194                ifeq ($(SUPPORT_INET4),true)
    195195                        SUPPORT_UDP = true
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/dbg_cons.c

    r337 r364  
    666666                    "IX Expire State      MAC Address       IP Address\n");
    667667
    668         /* expire の単位は [ms]。*/
     668        /* expire の単位は [us]。*/
    669669        get_tim(&now);
    670670        cache = nd6_get_cache();
     
    705705                    "IX Expire MAC Address       IP Address\n");
    706706
    707         /* expire の単位は [ms]。*/
     707        /* expire の単位は [us]。*/
    708708        cache = arp_get_cache();
    709709        for (ix = 0; ix < NUM_ARP_ENTRY; ix ++) {
     
    753753        WAI_NET_CONS_PRINTF();
    754754        get_tim(&now);
    755         cons_printf(portid, "ネットワーク統計情報\t経過時間[ms]\t%lu\t", now);
     755        cons_printf(portid, "ネットワーク統計情報\t経過時間[us]\t%lu\t", now);
    756756        if (now > (1000 * 3600 * 24))
    757757                cons_printf(portid, "%3lu日 %2lu時間 %2lu分 %2lu秒\n",
     
    938938                }
    939939
    940         cons_printf(portid, "\nネットワーク統計情報\t経過時間[ms]\t%lu\t", now);
     940        cons_printf(portid, "\nネットワーク統計情報\t経過時間[us]\t%lu\t", now);
    941941        if (now > (1000 * 3600 * 24))
    942942                cons_printf(portid, "%3lu日 %2lu時間 %2lu分 %2lu秒\n",
     
    10651065        WAI_NET_CONS_PRINTF();
    10661066        get_tim(&now);
    1067         cons_printf(portid, "ネットワークバッファ情報\t経過時間[ms]\t%u\n", now);
     1067        cons_printf(portid, "ネットワークバッファ情報\t経過時間[us]\t%u\n", now);
    10681068
    10691069#if NET_COUNT_ENABLE
     
    15771577        cons_printf(portid, " IP Address\n");
    15781578
    1579         /* expire の単位は [ms]。*/
     1579        /* expire の単位は [us]。*/
    15801580        get_tim(&now);
    15811581        dr = nd6_get_drl(&count);
     
    22982298
    22992299        cons_printf(portid, "ND:\n");
    2300         cons_printf(portid, "  TMO_ND6_RTR_SOL_DELAY:    %5d[ms]\n", TMO_ND6_RTR_SOL_DELAY);
    2301         cons_printf(portid, "  TMO_ND6_RTR_SOL_INTERVAL: %5d[ms]\n", TMO_ND6_RTR_SOL_INTERVAL);
     2300        cons_printf(portid, "  TMO_ND6_RTR_SOL_DELAY:    %5d[us]\n", TMO_ND6_RTR_SOL_DELAY);
     2301        cons_printf(portid, "  TMO_ND6_RTR_SOL_INTERVAL: %5d[us]\n", TMO_ND6_RTR_SOL_INTERVAL);
    23022302        cons_printf(portid, "  NUM_IP6_DAD_COUNT:        %5d\n",     NUM_IP6_DAD_COUNT);
    23032303        cons_printf(portid, "  NUM_ND6_CACHE_ENTRY:      %5d\n",     NUM_ND6_CACHE_ENTRY);
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/dhcp4_cli.c

    r340 r364  
    20312031
    20322032                        /* 休止する。*/
    2033                         if (error == E_OK)
    2034                                 syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2033                        if (error == E_OK) {
     2034                                if (ct->fsm != DHCP4_FSM_SLEEP)
     2035                                        syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2036                        }
    20352037                        else {
    20362038                                syslog(LOG_NOTICE, "[DHCP4C] server not available, go to sleep, error: %s.", itron_strerror(error));
     
    21582160
    21592161                        /* 休止する。*/
    2160                         if (ct->error == E_OK)
    2161                                 syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2162                        if (ct->error == E_OK) {
     2163                                if (ct->fsm != DHCP4_FSM_SLEEP)
     2164                                        syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2165                        }
    21622166                        else {
    21632167                                syslog(LOG_NOTICE, "[DHCP4C] server not available, go to sleep, error: %s.", itron_strerror(ct->error));
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/wwws.c

    r337 r364  
    708708        len += put_str(cepid, srbuf, response);
    709709        get_tim(&finish);
    710         syslog(LOG_NOTICE, "[WWWn:%02u SND] send: index.html, len: %4u, time: %lu [ms]",
     710        syslog(LOG_NOTICE, "[WWWn:%02u SND] send: index.html, len: %4u, time: %lu [us]",
    711711                           cepid, len, (finish - start) * 1000 / SYSTIM_HZ);
    712712        return E_OK;
     
    16091609
    16101610        get_tim(&finish);
    1611         syslog(LOG_NOTICE, "[WWWn:%02u SND]send: stat.html,  len: %4u, time: %lu [ms]",
     1611        syslog(LOG_NOTICE, "[WWWn:%02u SND]send: stat.html,  len: %4u, time: %lu [us]",
    16121612                           cepid, len, (finish - start) * 1000 / SYSTIM_HZ);
    16131613        return E_OK;
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netdev/if_btusb/if_btusb.c

    r337 r364  
    150150
    151151T_IF_SOFTC if_softc = {
    152         {0,},                                           /* ネットワークインタフェースのアドレス   */
     152        {{0,}},                                         /* ネットワークインタフェースのアドレス   */
    153153        0,                                                      /* 送信タイムアウト                     */
    154154        &btusb_softc,                           /* ディバイス依存のソフトウェア情報     */
     
    691691}
    692692
    693 static int usb_acl_out_active = 0;
    694 static int usb_command_active = 0;
    695 
    696 static int usb_can_send_packet_now(uint8_t packet_type)
    697 {
    698         switch (packet_type) {
    699         case HCI_COMMAND_DATA_PACKET:
    700                 return !usb_command_active;
    701         case HCI_ACL_DATA_PACKET:
    702                 return !usb_acl_out_active;
    703         default:
    704                 return 0;
    705         }
    706 }
    707 
    708693// single instance
    709694static const hci_transport_t hci_transport_usb =
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/icmp6.h

    r337 r364  
    291291typedef struct t_router_advert_hdr {
    292292        T_ICMP6_HDR     hdr;
    293         uint32_t        reachable;              /* [ms] 到達可能時間  */
    294         uint32_t        retransmit;             /* [ms] 近隣要請送信間隔        */
     293        uint32_t        reachable;              /* [us] 到達可能時間  */
     294        uint32_t        retransmit;             /* [us] 近隣要請送信間隔        */
    295295        /* この後にオプションが続く */
    296296        } __attribute__((packed, aligned(2))) T_ROUTER_ADVERT_HDR;
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/in4_subr.c

    r337 r364  
    287287
    288288        /* IP ヘッダを設定する。*/
    289         if ((error = in4_set_header(*nbuf, len, dstaddr, srcaddr, proto, ttl)) != E_OK)
     289        if ((error = in4_set_header(*nbuf, len, dstaddr, srcaddr, proto, ttl)) != E_OK) {
     290                syscall(rel_net_buf(*nbuf));
     291                *nbuf = NULL;
    290292                return error;
     293                }
    291294
    292295        /* 4 オクテット境界までパディングで埋める。*/
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/in_itron.h

    r337 r364  
    6262#define TFN_TCP_ALL             (0)
    6363
    64 #define TEV_TCP_RCV_OOB         (-0x201)
     64#define TEV_TCP_RCV_OOB         (0x201)
    6565
    6666/* UDP 関係 */
     
    7575#define TFN_UDP_ALL             (0)
    7676
    77 #define TEV_UDP_RCV_DAT         (-0x221)
     77#define TEV_UDP_RCV_DAT         (0x221)
    7878
    7979/* 一般 */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/tcp_input.c

    r337 r364  
    13641364        NTOHS(tcph->dport);
    13651365
     1366        /* SDU 長 より 緊急ポインタが大きい場合 */
     1367        if (tcph->urp > tcph->sum)
     1368                goto drop;
     1369
    13661370find_cep:
    13671371
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/tcp_output.c

    r337 r364  
    369369                tcph->flags |= TCP_FLG_URG;
    370370                }
    371         else
     371        else {
     372                tcph->urp = 0;
    372373                cep->snd_up  = cep->snd_una;
     374                }
    373375
    374376#endif  /* of #ifdef TCP_CFG_EXTENTIONS */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/tcp_usrreq.c

    r337 r364  
    897897
    898898        /* tcp_rcv_buf の割当て長をリセットする。*/
    899         cep->rcv_buf_len = 0;
     899        cep->rcv_buf_len -= len;
    900900
    901901        /* 通信端点のロックを解除する。*/
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udp_var.h

    r337 r364  
    101101typedef ER      (*t_udp_callback)(ID cepid, FN fncd, void *p_parblk);
    102102
     103typedef struct t_udp_rcv_dat_para {
     104        uint_t          len;
     105        T_NET_BUF       *input;
     106        uint_t          off;
     107        union {
     108                T_IPV4EP rep4;
     109                T_IPV6EP rep6;
     110        };
     111        } T_UDP_RCV_DAT_PARA;
     112
    103113/*
    104114 *  UDP 通信端点
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udpn_input.c

    r337 r364  
    7575{
    7676        T_UDP_HDR       *udph;
    77         uint_t          len;
     77        T_UDP_RCV_DAT_PARA para;
    7878
    7979        udph = (T_UDP_HDR *)(input->buf + off);
    80         len  = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE);
     80        para.len  = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE);
    8181
    8282        if (cep->rcv_tskid != TA_NULL) {        /* 非ノンブロッキングコールでペンディング中 */
     
    9898                /* データをバッファに移す。*/
    9999                memcpy(cep->rcv_data, GET_UDP_SDU(input, off),
    100                        (size_t)(len < cep->rcv_len ? len : cep->rcv_len));
     100                       (size_t)(para.len < cep->rcv_len ? para.len : cep->rcv_len));
    101101                syscall(rel_net_buf(input));
    102102
     
    104104
    105105#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
    106                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t)len);
     106                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t)para.len);
    107107#else
    108                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&len);
     108                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&para.len);
    109109#endif
    110110                else
     
    121121
    122122#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
    123                 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t)len);
     123                (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t)para.len);
    124124#else
    125                 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)&len);
     125                para.input = input;
     126                para.off = off;
     127#if API_PROTO == API_PROTO_IPV4
     128                para.rep4.portno = ntohs(udph->sport);
     129                IN_COPY_TO_HOST(&para.rep4.ipaddr, input);
     130#else
     131                para.rep6.portno = ntohs(udph->sport);
     132                IN_COPY_TO_HOST(&para.rep6.ipaddr, input);
     133#endif
     134                (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)&para.len);
    126135#endif
    127136                /*
     
    129138                 *  データを読み出さなかったことになるので、捨てる。
    130139                 */
    131                 if (cep->cb_netbuf != NULL)
    132                         syscall(rel_net_buf(cep->cb_netbuf));
     140                if (cep->cb_netbuf != NULL) {
     141                        if ((input->flags & NB_FLG_NOREL_IFOUT) == 0)
     142                                syscall(rel_net_buf(cep->cb_netbuf));
     143                        cep->cb_netbuf = NULL;
     144                        }
    133145                }
    134146        else {
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udpn_usrreq.c

    r337 r364  
    411411                return E_NOEXS;
    412412#if defined(SUPPORT_INET6)
    413 #endif
    414 #if defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
     413#elif defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
    415414        switch (optname) {
    416415        case IP_MULTICAST_LOOP:
     
    488487                return E_NOEXS;
    489488#if defined(SUPPORT_INET6)
    490 #endif
    491 #if defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
     489#elif defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
    492490        switch (optname) {
    493491        case IP_MULTICAST_LOOP:
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udpn_usrreq_nblk.c

    r337 r364  
    122122
    123123#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
    124                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)error);
     124                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_CAN_CEP, (void*)error);
    125125#else
    126                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&error);
     126                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_CAN_CEP, (void*)&error);
    127127#endif
    128128                else
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/in6_subr.c

    r337 r364  
    369369
    370370        /* IPv6 ヘッダを設定する。*/
    371         if ((error = in6_set_header(*nbuf, len, dstaddr, srcaddr, next, hlim)) != E_OK)
     371        if ((error = in6_set_header(*nbuf, len, dstaddr, srcaddr, next, hlim)) != E_OK) {
     372                syscall(rel_net_buf(*nbuf));
     373                *nbuf = NULL;
    372374                return error;
     375                }
    373376
    374377        /* 4 オクテット境界までパディングで埋める。*/
     
    662665 *  in6_rtredirect -- ルーティング表にエントリを登録する。
    663666 *
    664  *    注意: 引数 tmo の単位は [ms]。
     667 *    注意: 引数 tmo の単位は [us]。
    665668 */
    666669
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/in6_var.h

    r337 r364  
    184184         * vltime と pltime は、追加/変更してからの相対時間
    185185         */
    186         uint32_t        vltime;         /* 有効時間 [ms]                    */
    187         uint32_t        pltime;         /* 推奨有効時間 [ms]          */
     186        uint32_t        vltime;         /* 有効時間 [us]                    */
     187        uint32_t        pltime;         /* 推奨有効時間 [us]          */
    188188        } __attribute__((packed, aligned(2)))T_IN6_ADDR_LIFETIME;
    189189
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/nd6.c

    r337 r364  
    353353                        if (nd6_cache[mix].hold != NULL) {
    354354                                syscall(rel_net_buf(nd6_cache[mix].hold));
     355                                nd6_cache[mix].hold = NULL;
    355356                                }
    356357                        fix = mix;
     
    562563                        if (ln->hold != NULL) {
    563564                                syscall(rel_net_buf(ln->hold));
     565                                ln->hold = NULL;
    564566                                }
    565567
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/nd6.h

    r337 r364  
    8181        T_NET_BUF       *hold;
    8282        TMO             tmout;
    83         SYSTIM          expire;         /* [ms] 有効時間が切れる時刻      */
     83        SYSTIM          expire;         /* [us] 有効時間が切れる時刻      */
    8484        T_IF_ADDR       ifaddr;
    8585        uint8_t         state;
     
    183183typedef struct t_def_router {
    184184        T_IN6_ADDR      addr;
    185         SYSTIM          expire;         /* [ms] 有効時間が切れる時刻      */
    186         uint32_t        lifetime;       /* [ms] 有効時間                    */
     185        SYSTIM          expire;         /* [us] 有効時間が切れる時刻      */
     186        uint32_t        lifetime;       /* [us] 有効時間                    */
    187187        uint16_t        plistmap;       /* プレフィックスマップ           */
    188188        uint8_t         flags;          /* ルータ通知のフラグ            */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/nd6_rtr.c

    r337 r364  
    999999                return;
    10001000
    1001         /* ルータ要請ヘッダを設定する。*/
    1002         rsh = GET_ROUTER_SOLICIT_HDR(output, IF_IP6_ROUTER_SOLICIT_HDR_OFFSET);
    1003         rsh->hdr.type       = ND_ROUTER_SOLICIT;
    1004         rsh->hdr.code       = 0;
    1005         rsh->nd_rs_reserved = 0;
     1001        /* ルータ要請ヘッダを設定する。*/
     1002        rsh = GET_ROUTER_SOLICIT_HDR(output, IF_IP6_ROUTER_SOLICIT_HDR_OFFSET);
     1003        rsh->hdr.type       = ND_ROUTER_SOLICIT;
     1004        rsh->hdr.code       = 0;
     1005        rsh->nd_rs_reserved = 0;
    10061006
    10071007        /* チェックサムを計算する。*/
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/tcpip_sym.def

    r337 r364  
    1515TMO_UDP_OUTPUT
    1616TMO_ICMP_OUTPUT
     17TMO_IGMP_OUTPUT
    1718TMO_ND6_NS_OUTPUT
    1819TMO_ND6_NA_OUTPUT
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/tinet_asp.cfg

    r337 r364  
    7373INCLUDE("netinet/if_ether.cfg");
    7474INCLUDE("netinet/ip.cfg");
     75INCLUDE("netinet/ip_igmp.cfg");
    7576INCLUDE("netinet/tcp.cfg");
    7677INCLUDE("netinet/udp.cfg");
Note: See TracChangeset for help on using the changeset viewer.