-
Notifications
You must be signed in to change notification settings - Fork 3
CW Troubleshooting Guide
The following changes are requires for a error free build when using the Hall Switch library. Other errors might appear as different SDK components and sources are included. These are only the oned experienced during the integration of the Hall Switch library.
The WICED Studio (version 6.4.0) toolchain support C and C++ language. The Hall Switch library is written in C++.
Nevertheless, some of the guards braces to include C in C++ such
#ifdef _cplusplus
extern "C" {
#endif
are not closed, leading to compilation error.
As a quick a workaround, in the main progam entry point after the application_start( ){} block add an additional "}" closing brace.
In the provided app example hall_switch.cpp file:
...
void application_start( )
{
wiced_result_t result;
/* Initialize the device */
result = wiced_init();
if (result != WICED_SUCCESS)
{
return;
}
... //Main application
}
//} /**< Uncomment for WICED missing _cplusplus guards workaround */
Even confusing and not elegant it will do the work.
The proper long term solution is to fix those files with unclosed blocks. The following files (in version 6.4.0) have been found with this issue:
- apps/snip/bluetooth/simple_ble_peripheral/ble_event_map.h
- apps/snip/bluetooth/simple_ble_peripheral/simple_ble_peri.h
- WICED/platform/ARM_CR4/platform_checkpoint.h
- WICED/platform/security/BESL/mbedtls_open/include/mbedtls/md5_alt.h
Add the following to the bottom of the file:
#ifdef __cplusplus
} /* extern "C" */
#endif
When including the MQTT module additional compilation errors appear. The keyword new
is reserved in C++.
In the file libraries/protocols/MQTT/mqtt_linked_list.h substitute it for a non-reseved one, as i.e. newe
.
Also NULL
needs to be rewritten as (void *) 0
. Check the modifications here:
2. Library Details
Library Architecture
Hall Switch API
Hall Speed API
PAL Interface
Source Tree Structure
Preprocessor Configuration
Porting Guide
Doxygen Docs
4. Software Frameworks
Arduino
- Getting Started
- Lib Installation
- Ino Examples
- Arduino API
- PlatformIO
Cypress WICED
- Getting Started
- Lib Installation
- WICED API
- Troubleshooting Guide
Raspberry Pi
- Getting Started
- Lib Installation
- Examples
- API usage