Guidelines for Invoking SDSCC/SDS++

The SDSoC IDE automatically generates makefiles that invoke sds++ for all C++ files and sdscc for all C files, but the only source files that must be compiled with sdscc/sds++ are those containing code that:

  • Define a hardware function
  • Call a hardware function
  • Use sds_lib functions, for example, to allocate or memory map buffers that are sent to hardware functions
  • Files that contain functions in the transitive closure of the downward call graph of the above

All other source files can safely be compiled with the ARM GNU toolchain.

A large software project may include many files and libraries that are unrelated to the hardware accelerator and data motion networks generated by sdscc. If the sdscc compiler issues errors on source files unrelated to the generated hardware system (for example, from an OpenCV library), you can compile these files through GCC instead of sdscc by right-clicking on the file (or folder) Properties > C/C++ Build > Settings and setting the Command to GCC.