Cannot build mDot app offline after export from mbed online compiler

Home Forums mDot/xDot Cannot build mDot app offline after export from mbed online compiler

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15177
    Rui Carvalho
    Participant

    Hi!

    I am trying to build an mDot application using offline compilation, but I am having some troubles.

    Operation description:
    -I created an application in the mbed online compiler using the mDot. It compiles perfectly, then download the *.bin file. Then I connected the MTUDK2, with an MTDOT inserted, to the PC using a USB cable. It creates a drive and then I copy the *.bin file into it. It programs perfectly and the MTDOT starts working fine.
    -I exported the full application from the mbed online compiler with target=Multitech mDot, Toolchain=GCC (ARM Embedded) and export all files.
    -Then I extracted the file into a folder and copied the libmDot library into the root folder from file libmDot-1.0.8-1-g7ae9ef7-GCC_ARM.tar3.gz.
    -I typed “make” and had a few errors. Solved by changing the Makefile:
    “LIBRARY_PATHS += -L../
    LIBRARIES += -lmDot
    $(LD) $(LD_FLAGS) -T$(filter %.ld, $^) $(LIBRARY_PATHS) -o $@ $(filter %.o, $^) -Wl,–start-group $(LIBRARIES) -Wl,–end-group $(LD_SYS_LIBS)”
    -Now the make works fine and generates the *.bin inside the .build folder. When I copy that file into the MTUDK2, it doesn’t work, not even light up the LED that I have used as the first instruction inside the main().

    I am using Windows Vista and running cygwin.
    -Make version: GNU Make 4.2.1 (under cygwin).
    -GCC ARM version: gcc version 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147] (GNU Tools for ARM Embedded Processors) (2014q3).

    How can I solve this problem?
    Can you help me with this?
    Thank you!

    #15178
    Jason Reiss
    Keymaster

    Try updating GCC ARM

    I am using:
    gcc-arm-none-eabi-4_9-2015q2

    #15182
    Rui Carvalho
    Participant

    Hi Jason,

    I’ve just tried with that version of gcc (2015q2) with no success. Compiles but after *.bin is transferred to the mDot, nothing happens.

    However, with the most recent gcc (2016q3), there is a linking error:

    main.o: In function 'main':
    main.cpp:(.text.startup.main+0x46): undefined reference to  mDot::getId[abi:cxx11]()'
    collect2.exe: error: ld returned 1 exit status

    I’ve checked the libmDot.a with: “arm-none-eabi-nm -C -g –defined-only libmDot.a” and I got:

    ...
    mDot.o:
    ...
    00000000 T mDot::getId()
    ...

    The source code that calls this function is:
    logInfo("mDot library version: %s", dot->getId().c_str());

    • This reply was modified 7 years, 6 months ago by Rui Carvalho.
    #15195

    Rui,

    Is your off line source at the same versions as what you used for the on line build? Your on line build probably used rtos version 117 and mbed version 121 along with the 1.0.8-1 libmDot version.

    Leon

    #15197
    Rui Carvalho
    Participant

    Hi Leon,

    When I exported the full application from the mbed online compiler, it already came with the libmbed.a as well as all the include files for mbed and mbed-rtos.
    So I suppose I am using the same version as the online compiler, right?

    #15235
    Rui Carvalho
    Participant

    Hello!

    Any help for this issue?
    I’m stuck here and I can’t work offline.

    Thanks.

    #15239
    Jason Reiss
    Keymaster

    For offline application development we suggest using the mbed 5.0 SDK with our updated mdot libraries provided with the following links.

    https://developer.mbed.org/platforms/MTS-mDot-F411/

    https://developer.mbed.org/teams/MultiTech/code/libmDot-mbed5/

    You can use Eclipse offline with mbed-cli by following these instructions.

    https://developer.mbed.org/teams/MultiTech/wiki/Using-Eclipse-and-mbed-5-for-MTS-Devices

    It is also possible to build offline using mbed-cli, the tool which replaces the mbed 2 (mbed classic) offline SDK.

    https://github.com/ARMmbed/mbed-cli#introduction

    • This reply was modified 7 years, 6 months ago by Mike Fiore.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.