I am using the last mbed supported version wich is mbed-5.8.6.
I imported HSP_RPC_GUI program. When I compile It throws an error related with BLE ble declaration, here you can see:
mbed compile -t GCC_ARM [mbed] Working path "/home/arturo/HSP_RPC_GUI" (program) Building project HSP_RPC_GUI (MAX32620HSP, GCC_ARM) Scan: . Scan: env Scan: mbed Scan: FEATURE_BLE Compile [100.0%]: main.cpp [Warning] toolchain.h@23,2: #warning toolchain.h has been replaced by mbed_toolchain.h, please update to mbed_toolchain.h [since mbed-os-5.3] [-Wcpp] [Warning] USBSerial.h@59,203: 'mbed::FunctionPointerArg1<R, void>::FunctionPointerArg1(R (*)()) [with R = void]' is deprecated: FunctionPointer has been replaced by Callback<void()> [since mbed-os-5.1] [-Wdeprecated-declarations] [Warning] USBSerial.h@134,27: 'void mbed::Callback<R()>::attach(R (*)()) [with R = void]' is deprecated: Replaced by simple assignment 'Callback cb = func [since mbed-os-5.4] [-Wdeprecated-declarations] [Warning] BLE.h@1049,39: 'virtual ble_error_t Gap::disconnect(Gap::DisconnectionReason_t)' is deprecated: Use disconnect(Handle_t, DisconnectionReason_t) instead. [-Wdeprecated-declarations] [Error] main.cpp@113,12: 'BLE ble' redeclared as different kind of entity [Error] main.cpp@116,19: expected primary-expression before ')' token [Error] main.cpp@173,27: expected primary-expression before ')' token [Error] main.cpp@270,10: expected primary-expression before '.' token [ERROR] In file included from ./USBDevice/USBDevice/USBHAL.h:24, from ./USBDevice/USBDevice/USBDevice.h:24, from ./USBDevice/USBSerial/USBCDC.h:27, from ./USBDevice/USBSerial/USBSerial.h:22, from ./HSP/main.cpp:38: ./mbed-os/platform/toolchain.h:23:2: warning: #warning toolchain.h has been replaced by mbed_toolchain.h, please update to mbed_toolchain.h [since mbed-os-5.3] [-Wcpp] 23 | #warning toolchain.h has been replaced by mbed_toolchain.h, please update to mbed_toolchain.h [since mbed-os-5.3] | ^~~~~~~ In file included from ./HSP/main.cpp:38: ./USBDevice/USBSerial/USBSerial.h: In constructor 'USBSerial::USBSerial(uint16_t, uint16_t, uint16_t, bool)': ./USBDevice/USBSerial/USBSerial.h:59:203: warning: 'mbed::FunctionPointerArg1<R, void>::FunctionPointerArg1(R (*)()) [with R = void]' is deprecated: FunctionPointer has been replaced by Callback<void()> [since mbed-os-5.1] [-Wdeprecated-declarations] 59 | USBSerial(uint16_t vendor_id = 0x1f00, uint16_t product_id = 0x2012, uint16_t product_release = 0x0001, bool connect_blocking = true): USBCDC(vendor_id, product_id, product_release, connect_blocking){ | ^ In file included from ./mbed-os/drivers/SPI.h:32, from ./mbed-os/mbed.h:81, from ./HSP/main.cpp:33: ./mbed-os/platform/FunctionPointer.h:70:5: note: declared here 70 | FunctionPointerArg1(R (*function)() = 0) | ^~~~~~~~~~~~~~~~~~~ In file included from ./HSP/main.cpp:38: ./USBDevice/USBSerial/USBSerial.h: In member function 'void USBSerial::attach(void (*)())': ./USBDevice/USBSerial/USBSerial.h:134:27: warning: 'void mbed::Callback<R()>::attach(R (*)()) [with R = void]' is deprecated: Replaced by simple assignment 'Callback cb = func [since mbed-os-5.4] [-Wdeprecated-declarations] 134 | rx.attach(fptr); | ^ In file included from ./mbed-os/rtos/Thread.h:29, from ./mbed-os/rtos/rtos.h:30, from ./mbed-os/mbed.h:37, from ./HSP/main.cpp:33: ./mbed-os/platform/Callback.h:273:10: note: declared here 273 | void attach(R (*func)()) { | ^~~~~~ In file included from ./HSP/System/Peripherals.h:46, from ./HSP/main.cpp:41: ./mbed-os/features/FEATURE_BLE/ble/BLE.h: In member function 'ble_error_t BLE::disconnect(Gap::DisconnectionReason_t)': ./mbed-os/features/FEATURE_BLE/ble/BLE.h:1049:39: warning: 'virtual ble_error_t Gap::disconnect(Gap::DisconnectionReason_t)' is deprecated: Use disconnect(Handle_t, DisconnectionReason_t) instead. [-Wdeprecated-declarations] 1049 | return gap().disconnect(reason); | ^ In file included from ./mbed-os/features/FEATURE_BLE/ble/BLE.h:21, from ./HSP/System/Peripherals.h:46, from ./HSP/main.cpp:41: ./mbed-os/features/FEATURE_BLE/ble/Gap.h:1052:25: note: declared here 1052 | virtual ble_error_t disconnect(DisconnectionReason_t reason) { | ^~~~~~~~~~ ./HSP/main.cpp: At global scope: ./HSP/main.cpp:113:12: error: 'BLE ble' redeclared as different kind of entity 113 | static BLE ble; | ^~~ In file included from ./mbed-os/features/FEATURE_BLE/ble/BLETypes.h:23, from ./mbed-os/features/FEATURE_BLE/ble/Gap.h:20, from ./mbed-os/features/FEATURE_BLE/ble/BLE.h:21, from ./HSP/System/Peripherals.h:46, from ./HSP/main.cpp:41: ./mbed-os/features/FEATURE_BLE/ble/SafeEnum.h:23:11: note: previous declaration 'namespace ble { }' 23 | namespace ble { | ^~~ ./HSP/main.cpp:116:19: error: expected primary-expression before ')' token 116 | HspBLE hspBLE(&ble); | ^ ./HSP/main.cpp: In function 'int main()': ./HSP/main.cpp:173:27: error: expected primary-expression before ')' token 173 | Peripherals::setBLE(&ble); | ^ ./HSP/main.cpp:270:10: error: expected primary-expression before '.' token 270 | ble.waitForEvent(); | ^ [mbed] ERROR: "/usr/bin/python3" returned error. Code: 1 Path: "/home/arturo/HSP_RPC_GUI" Command: "/usr/bin/python3 -u /home/arturo/HSP_RPC_GUI/mbed-os/tools/make.py -t GCC_ARM -m MAX32620HSP --source . --build ./BUILD/MAX32620HSP/GCC_ARM" Tip: You could retry the last command with "-v" flag for verbose output ---
I tried to change the BLE variable name and the program compile with success but the board is not recognized by Maxim Health sensor platform.
Can somebody help me with this?