Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 10 months ago.
"mbed compile" doesn't compile
Anyone having issues compiling with the mbed-cli? I'm using an MTS_MDOT_F411RE mcu that builds online and runs as expected. Using the mbed-cli, the code fails to compile. Why would there be any difference?
c:\ICE\ICE>mbed config list
[mbed] Global config:
GCC_ARM_PATH=C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3\bin
ARM_PATH=C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3\bin
[mbed] Local config (c:\ICE\ICE): No local configuration is set
c:\ICE\ICE>mbed compile -t GCC_ARM -m MTS_MDOT_F411RE Building project ICE (MTS_MDOT_F411RE, GCC_ARM) Scan: . Scan: mbed Scan: env Compile: BLEDataHandler.cpp [Warning] cmsis_os.h@60,1: "MBED_CMSIS_RTOS_CM" redefined [Warning] cmsis_os.h@62,1: "CMSIS_RTOS" redefined [Warning] BLEDataHandler.cpp@69,13: comparison is always false due to limited range of data type [-Wtype-limits] [Error] BLEDataHandler.cpp@120,58: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive] [ERROR] In file included from ./mbed-rtos/rtos/Thread.h:26:0, from ./mbed-rtos/rtos/rtos.h:25, from ./inc/global.h:11, from .\src\BLEDataHandler\BLEDataHandler.cpp:7: ./mbed-rtos/rtx/TARGET_CORTEX_M/cmsis_os.h:60:0: warning: "MBED_CMSIS_RTOS_CM" redefined
- define MBED_CMSIS_RTOS_CM ^ <command-line>:0:0: note: this is the location of the previous definition In file included from ./mbed-rtos/rtos/Thread.h:26:0, from ./mbed-rtos/rtos/rtos.h:25, from ./inc/global.h:11, from .\src\BLEDataHandler\BLEDataHandler.cpp:7: ./mbed-rtos/rtx/TARGET_CORTEX_M/cmsis_os.h:62:0: warning: "CMSIS_RTOS" redefined
- define CMSIS_RTOS ^ <command-line>:0:0: note: this is the location of the previous definition .\src\BLEDataHandler\BLEDataHandler.cpp: In function 'void BleRxDataCallback(uint8_t*, uint8_t)': .\src\BLEDataHandler\BLEDataHandler.cpp:69:13: warning: comparison is always false due to limited range of data type [-Wtype-limits] if( len >= BLE_RECEIVE_BUFFER_SIZE ) { ^ .\src\BLEDataHandler\BLEDataHandler.cpp: In function 'void BLEDataHandler(const void*)': .\src\BLEDataHandler\BLEDataHandler.cpp:120:58: error: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive] event_status = BLE.ConfigureBLEDevice(BLE_DEVICE_NAME); ^ In file included from .\src\BLEDataHandler\BLEDataHandler.cpp:15:0: ./BLE/inc/ble_main.h:27:17: note: initializing argument 1 of 'uint8_t BLE_FILE::ConfigureBLEDevice(const uint8_t*)' uint8_t ConfigureBLEDevice(const uint8_t * device_name); ^
[mbed] ERROR: "python" returned error code 1.
[mbed] ERROR: Command "python -u c:\ICE\ICE\.temp\tools\make.py -t GCC_ARM -m MTS_MDOT_F411RE source . build .\BUILD\MTS_MDOT_F411RE\GCC_ARM" in "c:\ICE\ICE"
-