Hello @robert_metzerot ,
Nice to see you in our community!
For sure you can generate only the code you are interested in and include the algorithm in your S32DS project. As far as I've read in your post, you are using older versions for S32DS and AMMCLIB but let me show you the steps and we can solve this problem later.
I've identified a couple of bullets that I want to explain below.
It seems, that the MBDT is only for generation of complete code for MPC5777C and running direct from simulink on a certain board.
This toolbox provides blocks that can generate C code which configures the microcontrollers' peripherals. Our purpose indeed is to make the engineers' life easier by providing blocks capable of generating C code on top of the SDKs for hardware. This helps the engineers to focus more on the algorithm side and not on the microcontroller peripherals. We insert code only for peripherals access, all the algorithm C code is generated by the MathWorks' Embedded Coder. We try to target controllers and not evaluation boards.
Now i need only the control-algorithm in form of few c.-/h.-files, which get compiled in S32DS together with the rest of code.
Even if our toolbox comes together with the GCC compiler, offering the full solution for the generated code to be automatically compiled and deployed on the target, you can only generate the C code and use it in your project.
For calculation of FOC in MPC5777C i want to use the AMMCLIB (V1.1.15). For developing the control-algorithm i want to use Simulink (R2018b). Simulation the blocks of AMMCLIB in simulink works fine. But code generation of this blocks ends with ".tlc-file not found".
The MBDT for MPC57XX supports code generation for a couple of MCU families controllers. The error you are facing is because the toolbox must identify the target part for which the code is generated, to display the right options, and include the right files. This can be specified by inserting in your model the Config Information. This will change the System target file, (the one that the error refers to) with a proprietary one, but based on the Simulink's ert.tlc.
Can you describe me the correct way and toolchain to generate only one c./h.-files with simulink and ammclib-functions-blocks, which i can include into me existing S32-project?
I don't know if this is the right step by step guide, but let me show you a way of getting the generated code and what you should consider using in the S32DS for Power Architecture.
Let's use an example that already comes with our toolbox. I will choose the ammclib_mlib_add_mpc5777c.mdl file from our toolbox. You can see that the model already contains our config block, which has the MPC5777C controller selected. We will consider the yellow block as your desired algorithm that needs to be generated.

We only want to generate the code, and not compile and deploy the code to the target, so for that, you have to go to Model settings -> Code generation -> and check the Generate code only.

Now go to Embedded coder and generate the code. In R2020a there is a special button called "Generate code" under the Embedded Coder category. But in R2018b, you have to press the Build button; it will only generate the code.
Let me explain the generated code structure:
The main algorithm will be generated in a file called <model name>.c file. This contains three main functions:
ammclib_mlib_add_mpc5777c_initialize - all the core initialization code, not useful for you, because you already have this code in your S32DS project
ammclib_mlib_add_mpc5777c_step - as seen in the image below, this is the function that contains the desired algorithm.
ammclib_mlib_add_mpc5777c_terminate -empty
Obviously, to make this code more usable in your project, you have to tweak the inputs and outputs as shown below. The example I chooseuses data store memory blocks and you have to replace them with desired in and out signals.

All the code that you need to import in your S32DS project, exists in the <model_name>.c file (you will see there some AMMCLIB wrappers that also have to be copied in your S32DS project).
Once you have copied all the c code in your project alongside the AMMCLIB header files (you can take them directly from the Simulink generated code directory), the last remaining step is to link in the S32DS project the MPC577xC_AMMCLIB.a library (of course, from the Simulink folder generated code directory).
Hope this helps,
Marius