07-02-2019 10:51 AM - edited 07-02-2019 10:53 AM
I have a large C application that I'm running on Linux on a ZCU104 board. When compiled with Xilinx SDK, I get an .elf file which runs without issue on the board. However, when the exact same code is compiled using SDSoC, I get an .elf file which throws a segmentation fault on a memcpy() function. It looks like an issue with heap allocation. In SDSoc, I've tried both a prebuilt ZCU104 platform as well as a custom platform using boot and image files created by Petalinux and the issue persists. When I was following the documentation to create the custom platform, I didn't notice anything about customizing stack and heap sizes. Is this something that can be done using the Petalinux tools?
I'm using the 2018.3 version of all tools.
07-04-2019 11:52 PM
Are you allocating the memory using sds_alloc()
If yes, then memcpy can not be used for memory allocated using sds_alloc.
Please let me know your goal then I can suggest how it is implemented in SDSoC
07-05-2019 06:26 AM
I'm not using any SDSoC specific pragmas or function calls. I have a pure C application which runs fine when compiled with SDK but thows a segmentation fault when the exact same code is compiled with SDSoC. For SDSoC, I've tried both an application project targeting the prebuilt ZCU104 platform as well as a custom platform with manually generated BOOT.BIN and image.ub files (similar to the ones used to run the SDK version of the .elf) and the result is the same.
07-07-2019 09:04 PM
Is it possible to share your project?