Hi constantinrazvan.chivu,
after this fix I've been able to build all (or most of) the models from Examples directory.
Including '_gdlib' and '_gflib' and '_gmclib' examples!
Thanks for Your help.
I've seen strange behavior with the model 'kv4xf_sim_pil_target'. During the first try to build I've got errors.
Below is the output from last stage of the build process:
==== Creating kv4xf_sim_pil_target.elf from obj files ====
"C:\Users\Maciek\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-arm-none-eabi-4_9/bin/arm-none-eabi-gcc" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Xlinker --gc-sections -Xlinker --defsym=__ram_vector_table__=1 -TMKV4xF.ld startup_MKV46F15.o fsl_clock_manager.o fsl_ftm_common.o fsl_ftm_driver.o fsl_ftm_hal.o fsl_interrupt_manager.o fsl_mcg_hal.o fsl_sim_clock_module_names_MKV46F15.o fsl_sim_hal.o fsl_uart_common.o fsl_uart_driver.o fsl_uart_hal.o kv4xf_sim_pil_target.o main_init.o mcd_main.o rtiostream_utils.o startup.o system_MKV46F15.o uart_init.o -specs=nosys.specs --sysroot=C:\Users\Maciek\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-arm-none-eabi-4_9/arm-none-eabi/newlib -lm "CM4_MMCLIB_GCC.a" -Wl,-Map,kv4xf_sim_pil_target.map -o kv4xf_sim_pil_target.elf
c:/users/maciek/documents/matlab/add-ons/toolboxes/nxp_mbdtoolbox_s32k1xx/code/tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file MKV4xF.ld: No such file or directory
collect2.exe: error: ld returned 1 exit status
gmake: *** [kv4xf_sim_pil_target.elf] Error 1
### Build procedure for model: 'kv4xf_sim_pil_target' aborted due to an error.
Error make_rtw: exception id RTW:buildProcess:fatalBuildError message Error(s) encountered while building "kv4xf_sim_pil_target"
I'm building models without any physical hardware board attached - I'm waiting for HVP-MC3PH with KV3 and KV4 control cards to be delivered soon. So I've unchecked box: 'Enable PIL Mode Download' - and then the model has built successfully! After that I've checked this box back again - and this time the model has built without errors!
I've checked also that similar example model for kv3: 'kv3xf_sim_pil_target' shows the same behavior. At first it throws errors:
==== Creating kv3xf_sim_pil_target.elf from obj files ====
"C:\Users\Maciek\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-arm-none-eabi-4_9/bin/arm-none-eabi-gcc" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Xlinker --gc-sections -Xlinker --defsym=__ram_vector_table__=1 -TMKV3xF.ld startup_MK22F51212.o fsl_clock_manager.o fsl_debug_uart.o fsl_ftm_driver.o fsl_ftm_hal.o fsl_ftm_shared_irqs.o fsl_interrupt_manager.o fsl_mcg_hal.o fsl_os_abstraction_bm.o fsl_pit_driver.o fsl_pit_hal.o fsl_pit_irq.o fsl_sim_clock_module_names_K22F51212.o fsl_sim_hal.o fsl_uart_driver.o fsl_uart_hal_common_configurations.o fsl_uart_hal_fifo_configurations.o fsl_uart_hal_interrupts_and_dma.o fsl_uart_hal_status_flags.o fsl_uart_hal_transfer_functions.o kv3xf_sim_pil_target.o main_init.o mcd_main.o rtiostream_utils.o startup.o sw_timer.o system_MK22F51212.o uart_init.o -specs=nosys.specs --sysroot=C:\Users\Maciek\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-arm-none-eabi-4_9/arm-none-eabi/newlib -lm "CM4_MMCLIB_GCC.a" -Wl,-Map,kv3xf_sim_pil_target.map -o kv3xf_sim_pil_target.elf
c:/users/maciek/documents/matlab/add-ons/toolboxes/nxp_mbdtoolbox_s32k1xx/code/tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file MKV3xF.ld: No such file or directory
collect2.exe: error: ld returned 1 exit status
gmake: *** [kv3xf_sim_pil_target.elf] Error 1
### Build procedure for model: 'kv3xf_sim_pil_target' aborted due to an error.
Error make_rtw: exception id RTW:buildProcess:fatalBuildError message Error(s) encountered while building "kv3xf_sim_pil_target"
but after unchecking box / building successfully / checking box again -> it builds without errors...
Is it expected behavior ? Or is it signalling future problems with PIL mode ?
Maciek