May 21, 2021 at 8:27 ampingSubscriber
I have downloaded and installed ANSYS SCADE Suite Version Student 2021 R1. I created a simple operator called "opr_and_gate" which consists of just two boolean inputs, a boolean output and an AND gate.
I was able to use KCG to generate a number of files in a folder named "KCG". Among these files are "opr_and_gate.c" and "opr_and_gate.h".
I want to imtegrate this C Code generated by KCG into a software application. Therefore, I wrote a bare C program to include "opr_and_gate.h", and saved it in the "KCG" folder. When I tried to compile it, I got the error below:
kcg_types.h:168:10: fatal error: kcg_assign.h: No such file or directory
168 | #include "kcg_assign.h"
Please help me understand what is the purpose of "kcg_assign.h", and in this case, whether it can just be a blank file.
I got the following from the SCADE manual, but still don't understand what it means.
The kcg_assign macro must be provided either through the -user_config option mechanism or through a kcg_assign.h file. The macro is used by the generated C code to perform low-level copy of non-scalar data. It uses the C memcpy library function for simulation purposes and has to be redefined by users according to final target environment.
Thanks.May 25, 2021 at 7:41 amChristianSchraderAnsys EmployeeHi The standard version of kcg_assign.h can be found here in your SCADE install folder (adapted to your version/install path): C:\Program Files\ANSYS Inc\vXYZ\SCADE\SCADE\include\C. The only thing the file does is define the kcg_assign macro to map to memcpy as available in standard C API for Windows.
In order to recognize your code properly, I would recommend the following:
Have KCG folder only contain the generated C code
Have your own code folder side by side to the KCG folder in the project directory.
Make a copy of kcg_assign.h into your source folder
Adapt the include paths of your compiler where necessary
With that setup you should be good to go.
Best regards Christian
Viewing 1 reply thread
Ansys Innovation Space
- You must be logged in to reply to this topic.
Simulation World 2022
Check out more than 70 different sessions now available on demand. Get inspired as you hear from visionary companies, leading researchers and educators from around the globe on a variety of topics from life-saving improvements in healthcare, to bold new realities of space travel. Take a leap of certainty and check out a session today here.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.Trending discussions
- legend min and max
- Ensight hot iron palette from an image
- Crash with Exit code 1073741819
- older version
- Streamlines in EnSight using MRI data
- Import MRI data into Ensight
- What are the OpenGL drivers supported by SCADE Display KCG?
- What are the target language supported by the SCADE code generators?
- FLUENT APPLICATIION ERROR
- save data error
Top Rated Tags
© 2022 Copyright ANSYS, Inc. All rights reserved.Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.