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

TINETとSocket APIなどを更新

Location:
asp3_tinet_ecnl_arm/trunk/bnep_bridge
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/bnep_bridge/.cproject

    r352 r364  
    2222                        <storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
    2323                                <option id="toolchain.id" value="gcc-arm-embedded"/>
    24                                 <option id="toolchain.version" value="5.4.1.20160919"/>
     24                                <option id="toolchain.version" value="6.3.1.20170620"/>
    2525                        </storageModule>
    2626                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
     
    5959                                                        <option id="com.renesas.cdt.managedbuild.gcc.rz.option.warnStack.606825282" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.managedbuild.gcc.rz.option.warnStack" useByScannerDiscovery="false" value="100" valueType="string"/>
    6060                                                        <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1276126881" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
    61                                                         <builder buildPath="${workspace_loc:/bnep_bridge}/Debug" id="com.renesas.cdt.managedbuild.gcc.rz.builder.691118394" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="false" superClass="com.renesas.cdt.managedbuild.gcc.rz.builder"/>
     61                                                        <builder buildPath="${workspace_loc:/bnep_bridge}/Debug" id="com.renesas.cdt.managedbuild.gcc.rz.builder.691118394" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gcc.rz.builder"/>
    6262                                                        <tool id="com.renesas.cdt.managedbuild.gcc.rz.tool.assembler.1838763743" name="Cross ARM GNU Assembler" superClass="com.renesas.cdt.managedbuild.gcc.rz.tool.assembler">
    6363                                                                <option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1323004654" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" useByScannerDiscovery="false" value="true" valueType="boolean"/>
     
    127127                        <storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
    128128                                <option id="toolchain.id" value="gcc-arm-embedded"/>
    129                                 <option id="toolchain.version" value="5.4.1.20160919"/>
     129                                <option id="toolchain.version" value="6.3.1.20170620"/>
    130130                        </storageModule>
    131131                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
  • asp3_tinet_ecnl_arm/trunk/bnep_bridge/Debug/Makefile

    r352 r364  
    153153endif
    154154
     155TINETDIR =
     156
    155157#
    156158#  mbedサービスの定義
     
    180182        -I$(SRCDIR)/../usbhost/src \
    181183        $(INCLUDES)
    182 LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref -L.
     184LDFLAGS := $(LDFLAGS) -L.
    183185LIBS := $(LIBS) $(CXXLIBS)
    184186CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
    185187
    186 APPLDIRS := $(APPLDIRS) ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src
    187 APPL_COBJS := $(APPL_COBJS) ntshell_main.o fdtable.o io_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    188 
    189188#
    190189#  アプリケーションプログラムに関する定義
    191190#
    192191APPLNAME = bnep_bridge
    193 APPLDIRS := $(APPLDIRS) ../src
     192APPLDIRS = ../src ../../ntshell/tlsf ../../ntshell/fatfs ../../ntshell/ntshell ../../ntshell/ntshell/core ../../ntshell/ntshell/util ../../ntshell/src $(SRCDIR)/$(TINETDIR)/netapp
    194193APPL_CFG = main.cfg
    195194APPL_CDL = main.cdl
     195
     196APPL_COBJS := $(APPL_COBJS) ntshell_main.o fdtable.o io_stub.o ffarch.o diskio.o ff.o sdfs.o ccsbcs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o tlsf.o
    196197
    197198APPL_DIRS := $(APPLDIRS) $(SRCDIR)/library
     
    210211endif
    211212
    212 TINETDIR =
    213213ifdef TINETDIR
    214214        #
     
    216216        #
    217217        NO_USE_TINET_LIBRARY = true
    218        
     218
    219219        #  ネットワークインタフェースの選択、何れか一つ選択する。
    220220        NET_IF = ether
    221        
     221
    222222        #  イーサネット・ディバイスドライバの選択
    223223        NET_DEV = if_mbed
     
    430430
    431431#
     432#  並列makeのための依存関係の定義
     433#
     434$(APPL_OBJS) $(filter-out $(CFG_DMY), $(SYSSVC_OBJS)): | kernel_cfg.timestamp
     435$(APPL_ASMOBJS) $(filter-out $(CFG_DMY), $(SYSSVC_ASMOBJS)) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
     436                                                                                                                | offset.timestamp
     437
     438#
    432439#  特別な依存関係の定義
    433440#
     
    438445#
    439446$(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
    440         $(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
     447        $(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) -Wl,-Map=$(OBJNAME).map,--cref \
    441448                        $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
    442449                        -Wl,--start-group $(ALL_LIBS) -Wl,--end-group $(END_OBJS)
  • asp3_tinet_ecnl_arm/trunk/bnep_bridge/src/main.c

    r359 r364  
    118118static void main_timeout();
    119119
     120extern int ntshell_exit;
     121
    120122int uart_read(char *buf, int cnt, void *extobj)
    121123{
    122         return serial_rea_dat(SIO_PORTID, (char *)buf, cnt);
     124        struct main_t *obj = (struct main_t *)extobj;
     125        int result;
     126        ER ret;
     127        int timer;
     128
     129        obj->prev = obj->now;
     130
     131        /* タイマー取得 */
     132        timer = main_get_timer();
     133
     134        /* 待ち */
     135        ret = serial_trea_dat(SIO_PORTID, buf, cnt, timer);
     136        if ((ret < 0) && (ret != E_OK) && (ret != E_TMOUT)) {
     137                syslog(LOG_NOTICE, "tslp_tsk ret: %s %d", itron_strerror(ret), timer);
     138                ntshell_exit = 1;
     139                return -1;
     140        }
     141        result = (int)ret;
     142
     143        ret = get_tim(&obj->now);
     144        if (ret != E_OK) {
     145                syslog(LOG_NOTICE, "get_tim ret: %s", itron_strerror(ret));
     146                ntshell_exit = 1;
     147                return -1;
     148        }
     149
     150                        /* 時間経過 */
     151        int elapse = obj->now - obj->prev;
     152        main_progress(elapse);
     153
     154        /* タイムアウト処理 */
     155        main_timeout();
     156
     157        return result;
    123158}
    124159
     
    126161{
    127162        return serial_wri_dat(SIO_PORTID, buf, cnt);
    128 }
    129 
    130 unsigned char ntstdio_xi(struct ntstdio_t *handle)
    131 {
    132         char buf[1];
    133         if(serial_rea_dat(SIO_PORTID, buf, 1) != 1)
    134                 return -EIO;
    135         return buf[0];
    136 }
    137 
    138 void ntstdio_xo(struct ntstdio_t *handle, unsigned char c)
    139 {
    140         char buf[1];
    141         buf[0] = c;
    142         serial_wri_dat(SIO_PORTID, buf, 1);
    143163}
    144164
     
    155175        main_initialize();
    156176
    157         ntshell_init(&ntshell, uart_read, uart_write, cmd_execute, NULL);
     177        ntshell_init(&ntshell, uart_read, uart_write, cmd_execute, &main_obj);
    158178        ntshell_set_prompt(&ntshell, "NTShell>");
    159179        ntshell_execute(&ntshell);
     
    173193        ER ret;
    174194
    175         ntshell_task_init();
     195#ifdef TOPPERS_OMIT_TECS
     196        serial_opn_por(SIO_PORTID);
     197#endif
     198        serial_ctl_por(SIO_PORTID, IOCTL_FCSND | IOCTL_FCRCV);
     199
     200        ntshell_task_init(uart_read, uart_write, &main_obj);
    176201
    177202        main_obj.timer = TMO_FEVR;
Note: See TracChangeset for help on using the changeset viewer.