Device porting issues

Updated at:

This topic explains the causes of issues that you may encounter when porting IoT SDK V2.0 to the Qualcomm MDM9206 platform.

Compilation issues

  • ArmCC does not support mixing variable declarations with statements in C. All declarations must appear at the beginning of a block before any other statements.
  • ArmCC does not support using braces {} to initialize an anonymous struct instance as a right operand.
  • GCC and its variants treat enumeration types as int. However, ArmCC performs strict compile-time checks and often treats them as unsigned int.
  • ArmCC does not support variable assignments within the conditional expressions of if, while, or for statements.
  • ArmCC reports errors for return statements in unreachable branches. This causes the compilation to fail.
  • ArmCC does not support functions that return an enumeration type. The return value is treated as an `int` or another data type that `gcc` considers equivalent.
  • Standard library header files differ between compilers. Definitions such as size_t and typeof are available in GCC but not in ArmCC.
  • ArmCC does not support GNU-style extension functions, such as vasnprintf and asprintf.
  • ArmCC does not support GNU-style extension data structures, such as anonymous structs and anonymous member assignments.

Runtime issues

  • When you use the standard library function tolower(), you must include the ctype.h header file. Otherwise, the program hangs.
  • The Qualcomm serial print function cannot print zero-length strings using the %s format specifier.
  • The HTTP Client code in files such as src/utils/misc/utils_httpc.c uses the C standard library function sscanf(). The program hangs when this code is executed because of an issue in the Qualcomm C library.