Forum Discussion
Altera_Forum
Honored Contributor
7 years agoCan confirm the behavior. Compiles correctly with 16.0 but fails with 18.0.
That file does not come with the design example, it is copied into the directory by Eclipse from embedded/ip/hps/altera_hps/hwlib/src/hwmgr/soc_cv_av/alt_bridge_manager.c. The crux of the issue is that, between 16.0 and 18.0, someone changed that file and replaced three calls to memcpy with calls to a C11 function memcpy_s (which does the same thing as memcpy, except it also checks for destination buffer length). However, the cross-compiler that comes with 18.0 (Sourcery CodeBench 6.2.0) does not have an implementation of memcpy_s. To build it with 18.0, you either need to replace memcpy_s with memcpy directly in the original inside the EDS tree (don't forget to remove the extra argument), or edit the makefile. To HWLIBS_SRC, addmemcpy_s.c mem_primitives_lib.c safe_mem_constraint.c ignore_handler_s.c
To CFLAGS, add -I$(HWLIBS_ROOT)/src/safeclib -I$(HWLIBS_ROOT)/include/safeclib
To ALL_HWLIBS_SRC, add $(wildcard $(HWLIBS_ROOT)/src/safeclib/*.c)