I am very new to this platform and IDE. I would like to use the BLEHeartRateMon on my MAX32630FTHR MCU and tried adding the BLE_API library onto Mbed Studio. However when I tried compiling I get all sorts of errors below. Am I missing any additional libraries or using an imcompatible version? I am using version mbed-os 5.14.2. Appreciate any help!
[ERROR] .\source\main.cpp:19:10: fatal error: ‘ble/BLE.h’ file not found
For some reason I thought you were using the latest MAX32680 microcontroller rather than the MAX32630.
It is worth searching through the forum as there is plenty (the good, bad & ugly) about the MAX32630FTHR.
If that link is TL;DR, then basically the BLE module on max32630fthr micro is a peripheral device and thus requires TI specific CC256x HCI commands to get it to work with the micro. There is no longer an API within Mbed OS 6 to bridge this with the cordio stack.
The answer is revealed in the PinNames.h file found in the MbedOS targets folder for the Maxim MAX32639FTHR board.
There are two #defines for CONSOLE_TX & CONSOLE_RX
These point to UART0.
So, you would either need to redirect these to UART2 via mbed_app.json file, for example, or you could create a new BufferedSerial object for uart2, which then no longer needs those platform.stdio… defines/overrides in the mbed_app.json file.
I have change the tx and rx to uart0, but there is still nothing to see in the uart terminal. And other question is I want add some breakpoint in the program during debug mode, but I cannot find where to place the breakpoint.
Then I tried to add in a config statement within mbed_app.json for “stdio_uart_tx” and “stdio_uart_rx” as targets.json informs us that:
"help": "default TX STDIO pins is defined in PinNames.h file, but it can be overridden"
"help": "default RX STDIO pins is defined in PinNames.h file, but it can be overridden"