I had a chance to run several tests on both the SDK dependencies and EVK/EVKB boards whose results I would like to share. I may make mention of EVKA vs EVKB behavior. For clarity, I am contrasting MIMXRT1050-EVK (EVKA) vs IMXRT1050-EVKB (EVKB).
First I removed all my existing SDKs. I then imported three new SDKs created today based on SDK v2.3.1: MIMXRT1052xxxxx, MK64FN1M0xxx12, MK28FN2M0xxx15. This gives me access to four of the five eval kits I have to play with. I am hoping that having multiple processor SDKs from the same version within MCUXpresso IDE does not cause issues.
I created a new workspace and created two new projects – a C++ static library and a C++ project with the same options I used to create my actual projects that have proprietary code. The dependency tree was defined the same way, but I simplified the source by creating a test.hpp header in the C++ static library. This header defined a test class with a single member variable, a vanilla constructor and destructor and an access method that incremented the private var. The constructor, destructor and access method used the cout streaming directive to echo contents to UART.
I then edited the main function in the C++ project to instantiate an object from this library test class. The C++ test project then entered an infinite loop where it prints out the first ten counts for an ongoing counter, after which it calls the object’s access method in the next ten iterations and then runs silently until something overflows negative at which point the bad test code keeps printing "Initializing <negative number>"
Code for the c++ library test class:
class TestLib {
public:
TestLib() : m_Tracker(0) { cout << "constructor" << "\r" << endl; }
~TestLib() { cout << "destructor" << "\r" << endl; }
void TapTracker(int iter) {
cout << "TapTracker count " << iter << " -- called " << m_Tracker << " times!\r" << endl;
m_Tracker++;
}
private:
int m_Tracker;
};
Code for the C++ project main() function:
int main(void) {
/* Init board hardware. */
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
/* Init FSL debug console. */
BOARD_InitDebugConsole();
TestLib testLib;
/* Force the counter to be placed into memory. */
volatile static int i = 0 ;
/* Enter an infinite loop, just incrementing a counter. */
while(1) {
i++ ;
if (i < 10) {
cout << "Initializing: " << i << "\r" << endl;
}
else if (i < 20) {
testLib.TapTracker(i);
}
}
return 0 ;
}
This code builds without issue and loads on both the EVKA and EVKB, however it only runs on the EVKA. It presents the “stalled” status message on EVKB.
I am attaching two items to this post.
1. step by step instructions on how I created the test project and dependent static library, built and tested on both EVK types
2. an export of the two projects from my test workspace.
I am hoping that this allows you to reproduce the behavior I am seeing. Please let me know if this is not sufficient and I will grab the debug console dumps and include them as well.