I have a fairly large RT1176 (cortex M7, M4) application where I need to make some major changes so I thought it would be good to update the IDE and SDK first. My application is a mix of C and C++ and uses Free RTOS. I updated from MCUXpresso v11.7.1 to v11.10.0 and SDK from 2.13 to 2.16.
After the update, I found that a few interrupt service routines were intermittently failing. After some troubleshooting, found by looking at the assembler output that the __DSB() (required by ARM errata 838869) at the end of the ISR was generating no code. After I replaced the __DSB() lines with __ASM volatile ("dsb 0xF":::"memory") the problems were solved.
While looking at the many changes in the SDK files between 2.13 and 2.16, I found that fsl_os_abstraction.h added the following at line# 448.
#ifndef __DSB
#define __DSB()
#endif
I think these lines define __DSB as nothing if it wasn't defined.
Since __DSB() is an inline static function in cmsis_gcc.h, I don't understand why it was not seen as "defined". And, I don't understand why fsl_os_abstraction.h would define it is as "nothing" if it wasn't defined.
I found that I could comment out the above mentioned lines in fsl_os_abstraction.h and then __DSB() started generating the "DSB SY" mnemonics as it should in the assembly output.
My questions are: Have I done something wrong to cause this? Or, is this an SDK bug? If it is a bug, is there a list of known bugs somewhere?
Thank you.