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
Do you have an mbed_app.json file for your project? This is required. Here is a standard one found on the armmbed github repository. Note that it does not include your board.
So you could try adding your board. You may also need to make further mods to your target configuration to get it to work.
I think the reason may be due to the mbed-os don’t support BLE feature. I can compile the source code in the online complier. I find that the online complier include BLE feature in the mbed-os.
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.
OK, so it looks UART0 connects the max32630fthr with the PAN1326B BLE module, so it cannot be used.
That leaves UART2 as the only option via the standard pins.
I also see that the DAPLink connection has USBRX and USBTX broken out, which is also generally used to handle printf.
In that case if you have your max3265pico debugger connected you should see the serial printf outputs.
I dusted off all the cobwebs from my max32630fthr board and tested this using the blinky-baremetal example on mbed studio and I received the serial output directly in the console. So it works.
I (at least) get same error if you try to program MAX32630FTHR with any mbed OS version newer than 6.9.0.
There is something really wrong with UART 2 bus on this board. I cannot get my very simple ESP8266 based WiFi module to work on this board using mbed examples.
I really hope the problems with this board gets solved (though highly unlikely). Such an intresting peace of heardware, yet so troubled here on Mbed.
Why does it feel like Maxim Integrated has abandoned their product on Mbed?
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:
"stdio_uart_tx": {
"help": "default TX STDIO pins is defined in PinNames.h file, but it can be overridden"
},
"stdio_uart_rx": {
"help": "default RX STDIO pins is defined in PinNames.h file, but it can be overridden"
},