Menu

RE: [nesct:discussion] RE: [nesct:discussion] RE: [nesct:discussion] Run tinyECC Application : step "Updating Makefile "

Help
2014-07-01
2014-07-07
  • Ömer Sinan Kaya

    Ok, this one is easy to fix. The index function has been renamed. It is now get_index or some sort. Replace index function call in tx1.cc

    I think i answered the same question for another inquiry in the maillist. 

    I don't remember if it is getindex or get_index. You can grep it in omnet++ source directory. 

    -------- Original message --------
    From: Noureddine nourddine@users.sf.net
    Date: 07/01/2014 08:59 (GMT-05:00)
    To: "[nesct:discussion]" 501314@discussion.nesct.p.re.sf.net
    Subject: [nesct:discussion] RE: [nesct:discussion] RE: [nesct:discussion] Run tinyECC Application : step "Updating Makefile "

    I am trying install omnetpp-4.3 on ubuntu 12.04, now omnetpp-4.3 works perfectly.
    But where I try to run TinyECC (step 4: make) I get the following error:
    make
    g++ -c -g -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-stack-protector -DHAVE_SWAPCONTEXT -DHAVE_PCAP -DXMLPARSER=libxml -DWITH_PARSIM -DWITH_NETBUILDER -DWITH_NETBUILDER -DTOSNODES=1000 -DLINUX -DPLATFORM_OMNETPP -DMODULE_STACK_SIZE=4400 -DSTACK_REPORT -DDEFAULT_EEPROM_SIZE=0x100000 -DSTRUCT_PACK=1 -I./include -I./include_tos -I./ -I. -I/home/noureddine/omnetpp/omnetpp-4.3.1/include -o out/gcc-debug//txc1.o txc1.cc
    txc1.cc: In member function ‘virtual void Txc1::initialize()’:
    txc1.cc:46:76: attention : deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
    txc1.cc:49:64: erreur: no matching function for call to ‘index()’
    txc1.cc:49:64: note: candidates are:
    /usr/include/string.h:469:14: note: char index(char, int)
    /usr/include/string.h:469:14: note: candidate expects 2 arguments, 0 provided
    /usr/include/string.h:471:22: note: const char index(const char, int)
    /usr/include/string.h:471:22: note: candidate expects 2 arguments, 0 provided
    txc1.cc: In member function ‘virtual void Txc1::finish()’:
    txc1.cc:59:51: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat]
    txc1.cc:60:69: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:61:69: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:62:70: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:65:56: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat]
    txc1.cc:66:75: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:67:75: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:68:76: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:71:54: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat]
    txc1.cc:72:74: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:73:74: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc:74:75: attention : format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘double’ [-Wformat]
    txc1.cc: In member function ‘void Txc1::HandleMessage(cMessage)’:
    txc1.cc:112:33: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare]
    ./include/external_comm.h: At global scope:
    ./include/external_comm.h:52:19: attention : ‘socketsInitialized’ defined but not used [-Wunused-variable]
    make: *** [out/gcc-debug//txc1.o] Erreur 1

    Can you please help me out.

    [RE: [nesct:discussion] RE: [nesct:discussion] Run tinyECC
    Application : step "Updating Makefile "](https://sourceforge.net/p/nesct/discussion/501314/thread/bec30a6b/?limit=25#fa17)

    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/nesct/discussion/501314/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     
  • Noureddine

    Noureddine - 2014-07-01

    Thank you for all responses.
    I replace index function call in tx1.cc by getIndex(). But I get an other error:
    make
    g++ -Wl,--export-dynamic -Wl,-rpath,/home/noureddine/omnetpp/omnetpp-4.3.1/lib -Wl,-rpath,. -o out/gcc-debug//tictoc out/gcc-debug//Blink.o out/gcc-debug//cback.o out/gcc-debug//csocketrtscheduler.o out/gcc-debug//cTinyOSMain.o out/gcc-debug//debug.o out/gcc-debug//tossim.o out/gcc-debug//txc1.o out/gcc-debug//util.o out/gcc-debug//TinyOSPkt_m.o -Wl,--no-as-needed -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -L"/home/noureddine/omnetpp/omnetpp-4.3.1/lib/gcc" -L"/home/noureddine/omnetpp/omnetpp-4.3.1/lib" -loppmaind -u _tkenv_lib -Wl,--no-as-needed -lopptkenvd -loppenvird -lopplayoutd -u _cmdenv_lib -Wl,--no-as-needed -loppcmdenvd -loppenvird -loppsimd -ldl -lstdc++
    out/gcc-debug//txc1.o: In function Txc1::initialize()': /home/noureddine/src/tictoc/txc1.cc:49: undefined reference tocTinyECC_Main::cTinyECC_Main(cSimpleModule, cTinyOSModule, char, int)'
    /home/noureddine/src/tictoc/txc1.cc:50: undefined reference to cTinyECC_Main::StdControl_init()' /home/noureddine/src/tictoc/txc1.cc:51: undefined reference tocTinyECC_Main::StdControl_start()'
    collect2: ld a retourné 1 code d'état d'exécution
    make:
    ** [out/gcc-debug//tictoc] Erreur 1

     
    • Ömer Sinan Kaya

      It looks like you are missing step #2 or #3 in this link. cTinyECC_Main::StdControl_init() needs to come from an autogenerated source code by nesct conversion step.

      http://nesct.sourceforge.net/tinyecc.html

      2) Nesct takes your nc file and converts that to a c++ file.
      3) makemake.sh generates a makefile that include all the source file in the current directory.
      4) and when you type make, it compiles and links everything.

      To: 501314@discussion.nesct.p.re.sf.net
      From: nourddine@users.sf.net
      Subject: [nesct:discussion] RE: [nesct:discussion] RE: [nesct:discussion] RE: [nesct:discussion] Run tinyECC Application : step "Updating Makefile "
      Date: Tue, 1 Jul 2014 14:04:55 +0000

      Thank you for all responses.

      I replace index function call in tx1.cc by getIndex(). But I get an other error:

      make

      g++ -Wl,--export-dynamic -Wl,-rpath,/home/noureddine/omnetpp/omnetpp-4.3.1/lib -Wl,-rpath,. -o out/gcc-debug//tictoc out/gcc-debug//Blink.o out/gcc-debug//cback.o out/gcc-debug//csocketrtscheduler.o out/gcc-debug//cTinyOSMain.o out/gcc-debug//debug.o out/gcc-debug//tossim.o out/gcc-debug//txc1.o out/gcc-debug//util.o out/gcc-debug//TinyOSPkt_m.o -Wl,--no-as-needed -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -L"/home/noureddine/omnetpp/omnetpp-4.3.1/lib/gcc" -L"/home/noureddine/omnetpp/omnetpp-4.3.1/lib" -loppmaind -u _tkenv_lib -Wl,--no-as-needed -lopptkenvd -loppenvird -lopplayoutd -u _cmdenv_lib -Wl,--no-as-needed -loppcmdenvd -loppenvird -loppsimd -ldl -lstdc++

      out/gcc-debug//txc1.o: In function Txc1::initialize()':
      /home/noureddine/src/tictoc/txc1.cc:49: undefined reference tocTinyECC_Main::cTinyECC_Main(cSimpleModule, cTinyOSModule, char, int)'

      /home/noureddine/src/tictoc/txc1.cc:50: undefined reference to cTinyECC_Main::StdControl_init()'
      /home/noureddine/src/tictoc/txc1.cc:51: undefined reference tocTinyECC_Main::StdControl_start()'

      collect2: ld a retourné 1 code d'état d'exécution

      make: ** [out/gcc-debug//tictoc] Erreur 1

      [RE: [nesct:discussion] RE: [nesct:discussion] RE:

      [nesct:discussion] Run tinyECC Application : step "Updating Makefile "](https://sourceforge.net/p/nesct/discussion/501314/thread/4ada6f28/?limit=25#3f27)

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/nesct/discussion/501314/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Noureddine

    Noureddine - 2014-07-01

    yes, in step 3 "Updating Makefile" it returns an error

    noureddine@noureddine-Compaq-610:~/src/tictoc$ opp_makemake -c config -f
    /home/noureddine/omnetpp/omnetpp-4.3.1/bin/opp_makemake: error: option -c is no longer supported, config file is located using variables (OMNETPP_CONFIGFILE or OMNETPP_ROOT), or by invoking opp_configfilepath

    In spite of I'm trying install Omnetpp4.3

     

    Last edit: Noureddine 2014-07-01
    • Ömer Sinan Kaya

      This is set 3

              Updating Makefile
      
            Type makemake.bat/makemake.sh to create new Makefile for
          Win32/Linux.
      

      This is the contents of makemake.sh in my zip file ( from nesct_examples_omnetpp_4_2_01_03_2013.zip)

      opp_makemake -I./include -I./include_tos -I./ -DWITH_NETBUILDER -DTOSNODES=1000 -DLINUX -DPLATFORM_OMNETPP -DMODULE_STACK_SIZE=4400 -DSTACK_REPORT -DDEFAULT_EEPROM_SIZE=0x100000 -DSTRUCT_PACK=1 -lpthread -f -u CmdEnv

      Are you not calling makemake.sh?

      You seem to be calling "opp_makemake -c config -f" instead. This is not correct.

      Use ./makemake.sh instead.

      To: 501314@discussion.nesct.p.re.sf.net
      From: nourddine@users.sf.net
      Subject: [nesct:discussion] RE: [nesct:discussion] RE: [nesct:discussion] RE: [nesct:discussion] Run tinyECC Application : step "Updating Makefile "
      Date: Tue, 1 Jul 2014 18:42:25 +0000

      yes, in step 3 "Updating Makefile" it returns an error

      noureddine@noureddine-Compaq-610:~/src/tictoc$ opp_makemake -c config -f

      /home/noureddine/omnetpp/omnetpp-4.3.1/bin/opp_makemake: error: option -c is no longer supported, config file is located using variables (OMNETPP_CONFIGFILE or OMNETPP_ROOT), or by invoking opp_configfilepath

      In spite of I'm trying Omnetpp4.3

      [RE: [nesct:discussion] RE: [nesct:discussion] RE:

      [nesct:discussion] Run tinyECC Application : step "Updating Makefile "](https://sourceforge.net/p/nesct/discussion/501314/thread/4ada6f28/?limit=25#28b8)

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/nesct/discussion/501314/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Ömer Sinan Kaya

    posted an updated examples package that works on omnet++ 4.4.1

     
  • Noureddine

    Noureddine - 2014-07-07
    Post awaiting moderation.
  • Noureddine

    Noureddine - 2014-07-07

    I'm using omnet++ 4.3.1 not omnet++ 4.4.1.
    thank you, I run successfully your example TinyECC, but I have not got the same result :

    Total memory consumption of node 0 is : 3208
    Radio Sent: 0
    Radio Sent, min: 0
    Radio Sent, max: 0
    Radio Sent, mean: 0
    Radio Sent, stddev: -nan
    Radio Received: 0
    Radio Receive, min: 0
    Radio Receive, max: 0
    Radio Receive, mean: 0
    Radio Receive, stddev:-nan
    Uart Received: 0
    Uart Receive, min: 0
    Uart Receive, max: 0
    Uart Receive, mean: 0
    Uart Receive, stddev: -nan
    Remaining Battery Level: 2999.999984

    Total memory consumption of node 1 is : 3208
    Radio Sent: 0
    Radio Sent, min: 0
    Radio Sent, max: 0
    Radio Sent, mean: 0
    Radio Sent, stddev: -nan
    Radio Received: 0
    Radio Receive, min: 0
    Radio Receive, max: 0
    Radio Receive, mean: 0
    Radio Receive, stddev:-nan
    Uart Received: 0
    Uart Receive, min: 0
    Uart Receive, max: 0
    Uart Receive, mean: 0
    Uart Receive, stddev: -nan
    Remaining Battery Level: 2999.999992
    can you explain the result please.

     

Log in to post a comment.