I am following the Hybrid (BLE + Thread) tutorial from the FRDM-KW41Z webpage. I'm using MCUXpresso v10.1.1 and SDK_2.x_FRDM-KW41Z v2.2.0. I have followed the directions for importing an SDK example project (as much as possible, the project import screens look a little different than in the video). The project builds with no issues. I downloaded the application using the Debug link in the Quickstart Panel and when complete I'm at main. However, when I tell the debugger to let the application run I always end up immediately in the hardfault handler.
After some debug stepping I've found that the variable memHeap declared in MemManager.c line 78 was not explicitly word aligned. This is a problem since one of the first uses of this general variable is to allocate space for a linked list and set pointer to each element in the list.
I changed the line from:
uint8_t memHeap[heapSize_c] __attribute__((aligned(4)));
This got the application running as expected. The LEDs flash and the serial port responds to commands. However, the NXP IoT Toolbox application does not seem to be able to find the device. If I scan for Bluetooth devices with just the standard Android Bluetooth menu I see a device named NXP_THR, but if I select I receive a message that says pairing was rejected. I using a Nexus 5x with Android 8.1 and NXP IoT Toolbox v5.0.2.
Any incite as to why this doesn't work would be appreciated