Skip to content

ATHandler::cmd_start build error #304

Open
@chrissnow

Description

@chrissnow

We are looking at porting an existing project that uses cellular over to mbed-ce but there seems to be a compile error and I cant figure out why given the types seem to match.

rtos::ThisThread::sleep_until(_last_response_stop + _at_send_delay);

[1/3] Building CXX object mbed-os/connectivity/cellular/CMakeFiles/mbed-cellular.dir/source/framework/device/ATHandler.cpp.obj
FAILED: mbed-os/connectivity/cellular/CMakeFiles/mbed-cellular.dir/source/framework/device/ATHandler.cpp.obj
"C:\Program Files\ccache-4.10.1-windows-x86_64\ccache.exe" C:\PROGRA~2\ARMGNU~1\125863~1.3RE\bin\AR10B2~1.EXE @mbed-os\connectivity\cellular\CMakeFiles\mbed-cellular.dir\source\framework\device\ATHandler.cpp.obj.rsp -MD -MT mbed-os/connectivity/cellular/CMakeFiles/mbed-cellular.dir/source/framework/device/ATHandler.cpp.obj -MF mbed-os\connectivity\cellular\CMakeFiles\mbed-cellular.dir\source\framework\device\ATHandler.cpp.obj.d -o mbed-os/connectivity/cellular/CMakeFiles/mbed-cellular.dir/source/framework/device/ATHandler.cpp.obj -c RETRACTEDcell_test/mbed-os/connectivity/cellular/source/framework/device/ATHandler.cpp
RETRACTED\cell_test/mbed-os/connectivity/cellular/source/framework/device/ATHandler.cpp: In member function 'void mbed::ATHandler::cmd_start(const char*)':
RETRACTED\cell_test/mbed-os/connectivity/cellular/source/framework/device/ATHandler.cpp:1193:38: error: no matching function for call to 'sleep_until(std::__duration_common_type<std::common_type<long long int, short unsigned int>, std::ratio<1, 1000>, std::ratio<1, 1000>, void>::type)'
 1193 |         rtos::ThisThread::sleep_until(_last_response_stop.time_since_epoch() + _at_send_delay);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from RETRACTEDcell_test/mbed-os/connectivity/cellular/source/framework/device/ATHandler.cpp:26:
RETRACTED\cell_test\mbed-os\rtos\include\rtos\thisthread.h:238:6: note: candidate: 'void rtos::ThisThread::sleep_until(uint64_t)'
  238 | void sleep_until(uint64_t millisec);
      |      ^~~~~~~~~~~
RETRACTED\cell_test\mbed-os\rtos\include\rtos\thisthread.h:238:27: note:   no known conversion for argument 1 from 'std::__duration_common_type<std::common_type<long long int, short unsigned int>, std::ratio<1, 1000>, std::ratio<1, 1000>, void>::type' {aka 'std::chrono::duration<long long int, std::ratio<1, 1000> >'} to 'uint64_t' {aka 'long long unsigned int'}
  238 | void sleep_until(uint64_t millisec);
      |                  ~~~~~~~~~^~~~~~~~
RETRACTED\cell_test\mbed-os\rtos\include\rtos\thisthread.h:248:6: note: candidate: 'void rtos::ThisThread::sleep_until(rtos::Kernel::Clock::time_point)'
  248 | void sleep_until(Kernel::Clock::time_point abs_time);
      |      ^~~~~~~~~~~
RETRACTED\cell_test\mbed-os\rtos\include\rtos\thisthread.h:248:44: note:   no known conversion for argument 1 from 'std::__duration_common_type<std::common_type<long long int, short unsigned int>, std::ratio<1, 1000>, std::ratio<1, 1000>, void>::type' {aka 'std::chrono::duration<long long int, std::ratio<1, 1000> >'} to 'rtos::Kernel::Clock::time_point' {aka 'std::chrono::time_point<mbed::internal::OsClock, std::chrono::duration<long long int, std::ratio<1, 1000> > >'}
  248 | void sleep_until(Kernel::Clock::time_point abs_time);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
ninja: build stopped: subcommand failed.

The project was originally based on
https://github.com/ARMmbed/mbed-os-example-cellular

Anything that makes use of the ATHandler Class is likely to fail to build.

Likely unrelated but we are using a NUCLEO_WB55RG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions