1 year, 2 months ago.

Dragonfly-Examples not compiling

I imported Example from

https://os.mbed.com/teams/MultiTech/code/Dragonfly-Examples/ .

I added mbed-os target required for DISCO_L475VG_IOT01A. I am getting compilation Error:

mbed compile -t GCC_ARM -m DISCO_L475VG_IOT01A
/home/test/.local/lib/python2.7/site-packages/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
[Error] @,: Compiler version mismatch: Have 4.9.3; expected version >= 6.0.0 and < 7.0.0
Building project Dragonfly-Examples (DISCO_L475VG_IOT01A, GCC_ARM)
Scan: Dragonfly-Examples
Scan: env
Compile [ 24.7%]: lwip_dns.c
Compile [ 24.8%]: lwip_init.c
Compile [ 25.0%]: lwip_inet_chksum.c
Compile [ 25.1%]: lwip_ip.c
Compile [ 25.2%]: lwip_mem.c
Compile [ 25.4%]: lwip_memp.c
Compile [ 25.5%]: lwip_raw.c
Compile [ 25.7%]: lwip_netif.c
Compile [ 25.8%]: lwip_stats.c
Compile [ 26.0%]: MTSCellularInterface.cpp
[Warning] MbedCRC.h@34,32: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
[Error] MTSCellularInterface.h@12,1: expected class-name before '{' token
[ERROR] In file included from ./mbed-os/mbed.h:75:0,
                 from ./MTSCellularInterface/MTSCellularInterface.h:8,
                 from ./MTSCellularInterface/MTSCellularInterface.cpp:5:
./mbed-os/drivers/MbedCRC.h:34:32: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wshift-count-negative"
                                ^
In file included from ./MTSCellularInterface/MTSCellularInterface.cpp:5:0:
./MTSCellularInterface/MTSCellularInterface.h:12:1: error: expected class-name before '{' token
 {
 ^

[mbed] ERROR: "/usr/bin/python" returned error code 1.
[mbed] ERROR: Command "/usr/bin/python -u /home/test/debug/dfly/Dragonfly-Examples/mbed-os/tools/make.py -t GCC_ARM -m DISCO_L475VG_IOT01A --source . --build ./BUILD/DISCO_L475VG_IOT01A/GCC_ARM" in "/home/test/debug/dfly/Dragonfly-Examples"
---

can someone help me please.

At first glance, I would say that the version of the GCC compiler is very old and probably doesn't support the #pragmas being used in the example. I will look into it a little deeper, but is it possible to update your compiler to something between 6.0.0 and 7.0.0?

Thanks, Earl, team Mbed

posted by Earl Manning 27 Aug 2018

I tried new compiler still problem

posted by raghavan p 28 Aug 2018

hi I found the fix for this, Problem was, I was compiling with latest mbed-os, which does not has file CellularInterface.h(which is deprecated in current versions). I added this file in the path mbed-os/features/netsocket manually. and also included required .h files of the class.It solved the problem. NOTE: for current mbed-os version Dragon-fly example does not work, leads to compilation error.

posted by raghavan p 31 Aug 2018
Comment on this question

1 Answer

1 year, 2 months ago.

The MTSCellularInterface is compatible with Dragonfly. The target name for dragonfly is "MTS_DRAGONFLY_F411RE". Did you try to compile with that target?

I am trying to port app to DISCO_L475VG_IOT01A board for a different cellular module. like SIM808.So i can not use target name as MTS_DRAGONFLY_F411RE

posted by raghavan p 28 Aug 2018

hi I found the fix for this, Problem was, I was compiling with latest mbed-os, which does not has file CellularInterface.h(which is deprecated in current versions). I added this file in the path mbed-os/features/netsocket manually. and also included required .h files of the class.It solved the problem. NOTE: for current mbed-os version Dragon-fly example does not work, leads to compilation error.

posted by raghavan p 31 Aug 2018

You need to log in to post a question