Hi @CauTran ,
I've looked into your .mex file and I've noticed multiple missing settings that explains the problem with the generating code.
First, the Hardware Interrupt blocks is telling that there is no interrupt enabled in the .mex file for the ADC peripheral. It also telling that the user should use the Configure button to open the .mex file in MCUXpresso Configuration Tool and enable the ADC interrupts.

If you check the Interrupt request in Configuration Tool (ctrl+S to save the change) and then Update in the Interrupt Handler block you'll see the name of the ADC interrupt handler:

Same applies for the Start/Stop Hardware Interrupt block:

Because in the .mex file, Interrupt request is set to Not initialized:

Then you need to add the Start/Stop Hardware Interrupt block to insert the code that enables the ADC0_IRQn interrupt. (EnableIRQ call). The alternative of this block is to choose the Enabled in Initialization, that will insert the peripherals.c, in ADC0_init the EnableIRQ call and so you'll not need to use the ISR start stop block.

You've noticed that the Configuration Tool is showing an warning on Interrupt Request - the warning is saying:

The next step, is to configure and ADC channel in the .mex file:

Use the + button to add an ADC channel, select the channel number on which the conversion will happen, enable the interrupt on the channel and also initialize the channel. For channel number, the selection, the tool provides a drop-down with the pins that were set in the pins view for the ADC0 peripheral:

I recommend to take a look at the ADC examples in the toolbox - we have examples on configuring and using the ADC on polling mode - twrkv58f_adc_polling.mdl-, so no interrupts are being configured, and also on interrupts - twrkv58f_adc_interrupt.mdl-, that's the use case described above.
As for the FTM configuration, if no channels are being set then the FTM will act as a simple timer. To use it for input capture/dual edge capture, pwm generation you must add and configure the FTM channels:

In order to use the FTM update duty cycle block, you must configure at least one FTM channel for PWM generation. Also for FTM you can take a look at the examples from the toolbox.
In our ADC examples, the conversion is triggered by software. For hardware trigger, the Use Hardware Trigger must be enabled in the .mex file:

And you must configure at lease one of the trigger pins in the Pins view:

I've looked into the manual for KV5x and it mentions that the ADC can be triggered by the PDB:

And the FTM can trigger the PDB:

Can you please give more details on the application that you want to build? with more information I can try to create a .mex file that will map your application needs.
Best regards,
Alexandra