I thought I'd give the very new, fresh out of the oven, MBDT for KVx 1.0.0 a go and so I installed it and I loaded a basic model, frdmkv31f_gpio_polling.mdl. I configured the model for my environment, i.e. OpenSDA drive, port, et al. The build encounters a hiccup here:
### Evaluating PostCodeGenCommand specified in the model
Failure in mbd_kvx_generate_configuration_code(0) : MEX code generation: Failed to generate configuration files for mex "C:\Users\Dilettante\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_KVx\KVx_Examples\KV3x\gpio\gpio_polling\frdmkv31f_gpio_pollingConfig.mex"
which in turn throws a warning in the compile stage:
C:/Users/Dilettante/AppData/Roaming/MATHWO~1/MATLAB~1/TOOLBO~1/NXP_MB~1/KVX_EX~1/KV3x/gpio/GPIO_P~1/frdmkv31f_gpio_polling_ert_rtw/ert_main.c:50:3: warning: implicit declaration of function 'BOARD_BootClockRUN'; did you mean 'BOARD_BootClockHSRUN'? [-Wimplicit-function-declaration]
50 | BOARD_BootClockRUN();
| ^~~~~~~~~~~~~~~~~~
| BOARD_BootClockHSRUN
not finding the declaration of the function in the ConfigTool-generated code, I assume. The function is not declared, nor defined anywhere in the project folder, although it is mentioned in the MEX file. Of course, the linker trips over when it cannot resolve the reference:
c:/users/Dilettante/appdata/roaming/mathworks/matlab add-ons/toolboxes/nxp_mbdtoolbox_kvx/tools/buildtools/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ert_main.o: in function `main':
C:/Users/Dilettante/AppData/Roaming/MATHWO~1/MATLAB~1/TOOLBO~1/NXP_MB~1/KVX_EX~1/KV3x/gpio/GPIO_P~1/frdmkv31f_gpio_polling_ert_rtw/ert_main.c:50: undefined reference to `BOARD_BootClockRUN'
collect2.exe: error: ld returned 1 exit status
Now it all seems to start with the call to mbd_kvx_generate_configuration_code, which is a p-file, so can't see within. Given that it is a brand new installation, and all else seems in order, any suggestions?