Finally, I caught the tail of the leader. Due to the different architectures of DSP and ARM, the byte of DSP is 16 bits, which leads to different alignment situations related to structures and the results of sizeof().
In addition, he firmly opposes standard library functions like memset() and memcpy(), insisting on manually looping for batch operations. This causes problems when porting the software to ARM chip platforms to reduce costs. This issue does not even occur with the AC6 compiler (Os), but it manifests when optimizing with GCC.
If one honestly uses standard library combinations like sizeof() and memset(), such problems would not arise, as they all reference bytes as the unit. The requirements in projects that make slaves of the company are still useless, but I have used my own open-source library very cautiously, which actually enhances the compatibility of the software library.
This article is synchronized and updated to xLog by Mix Space. The original link is https://www.yono233.cn/notes/26