HotFix_1: Missing lsp.h file
Problem: Model compilation terminates with the following error:
SWLIBS_Defines.h:132:17: fatal error: lsp.h: No such file or directory
#include <lsp.h>
Root Cause: S32DS for PA version 1.1 Build id: 170203 does not contain the file in the compiler toolchain
Workaround: Save the file attached lsp.h in
{S32DS for PA installation folder}S32_Power_v1.1\S32DS\e200_ewl2\EWL_C\include\pa\ folder
Original Attachment has been moved to: lsp.h.zip
hello,
I am receiving this error while running PIL mode
could you please tell me solution and how to rectify this issue
Hello 飞 崔,
For Rev 3.0.0, in order to copy the required files you need to follow the response for this thread https://community.nxp.com/message/1145779?commentID=1145779#comment-1145779 (you need to rename the mbd_mpc574x_user_copy_required_files.m and and add there the sources). The mbd_mpc_copy is p-coded and added into path, so you don't need to search it.
Unfortunately you can not avoid using the main() code generated process. You can add code instead, in the Initialization function generated which is called before the step functions. You can use the suggestion from this thread Including custom code to call in the initialize function the code you add from the S32DS.
Hope this helps,
Marius
thanks a lot, Marius.
most of our code are handwirted including the main(), so i would like to find a way to compile the S32DS project through matlab environment. Maybe I had to manually configure and call S32DS compiler in matlab, to achieve expected result.
Do you have any instructions or guide documents about how to configure or call S32DS compiler in matlab?
Hello 飞 崔,
The toolbox uses the same compiler as in S32DS, only the makefile is different and it is regenerated each time the codegen button is pressed. I can not guide you through that, since the mbdt main() project is using the PIT peripheral to trigger the step function, initializes clocks and so on. But what you can do is to use the custom code and copy the code from the S32DS project into Initialize function.
Hope this helps,
Marius
OK,I wil give it a try,thanks.
dumitru-daniel.popa jimtrudeau
We face a challenge :
Our project is partly design by simulink, the hardware drive codes and main function is handwirted in S32DS. We got the project code (partly generate by simulink, partly handwrite) compiled in S32DS successfully. but to simplify the compile process, we need to compile the project by matlab rather than S32DS.
My question is: Can i compile one S32DS project by the MBD tools?
expect for your reply.
Hello 飞 崔,
Assuming that you are using the Toolbox for MPC Rev 2.0.0, it you want to still make changes in simulink, you can make your model to automatically import the c sources developed in S32DS by using the mbd_pnt_user_copy_required_files.m script which you can be found under src\mbdtbx_pnt\mbdtbx_pnt\mscripts\utils path. This will copy the files from DS under the generated code and will add your files in makefile.
Hope this helps,
Marius
Thanks for your reply, i use Rev 3.0.0. i find a similar file mbd_mpc574x_user_copy_required_files.m, maybe i can use this file to copy .c&.h files. But i cannot find the mbd_mpc_copy() function used in the .m script, in which I want to find how to copy *.c and *.h under the generated code by one command.
If i use the 'MBD_MPC574x_Config_Information ' bolck in simulink library, it auto generate a main(). While the 'main() ' was handwrited, so i think it won't got the right compile result. So can i avoid the main code generated process?If so, how to configure it ?
hello,can this MBD toolbox work in matlab 2018b?
Hello 1490491886@qq.com,
If you are interested in using the Model Based Design Toolbox for MPC57xx Boards in Matlab 2018b you can download and install our newly released https://community.nxp.com/docs/DOC-342724 .
Best Regards,
Marius
Hello Daniel, When I was trying to generate code with matlab2017a, a message box came out. As no Evaluation Board was connected, then I press OK, another message box came out as below.
Do you know how to solve this problem? Thanks in advance.
Hey, 琛 踪
I am not NXP engineer but a developper working with MPC5744P as you.
I have encountered the same question as yours before. The first messagebox came out because you click the checkbox as below.
Actually, if you click the checkbox, the Simulink will start the Rappid Bootloader and enable the download process. If you unclick, the Simulink will just generate code, not downlaod.
When the messagebox came out ,the Simulink has been in the process of downloading. If the EVB is connected to the USB port, you can restart the EVB and then bootloader works.
The second messagebox came out because your EVB is not connected to the USB! The bootloader scan the USB port and found no serialport is connected, then the error messagebox came out.
Maybe we can have a communication about the MCU.
HotFix_9: Fix "Undefined function 'slsfnagctlr'..." when trying to generate code on R2016b/R2017a
Problem: If you try to generate code for any model on R2016b/R2017a, you will receive this error: "Undefined function 'slsfnagctlr' for input arguments of type 'char'."
Root Cause: Matlab API change.
Workaround: Download slsfnagctlr.p in the following folder
{Toolbox install dir}\mbdtbx_pnt\mbdtbx_pnt\mscripts
HotFix_8: CAN Bus 1 And CAN Receive Data Trigger block
NXP Tracking number: ???
Problem:
Root Cause:
Workaround: Update the files attached in the following folders: (Files are based on the HotFix_7)
{Toolbox install dir}\mbdtbx_pnt\src\mbdtbx_pnt\src\c_library folder flexcan_pnt_library.c file
{Toolbox install dir}\mbdtbx_pnt\mbdtbx_pnt\blocks\can folder can_pnt_receive_data_trigger.tlc file
Thank you Adrien for helping with this.
mariuslucianandrei, can you please add the Jira number and integrate this fix in our database.
Hello,@dumitru-daniel.popa
I found a problem using MBD Toolbox along with S-Function Builder. I could run or bulid the model which contained the block created by S-function builder without the block from MBD Toolbox. But if I put the the block created by S-function builder and the block from MBD Toolbox together and build the model again, there would be an error like the picture below. 'crctry_wrapper.c' was created by S-function builder.
I tried again using Legacy Code Tool to build a same block. I could also run or build the model which contained the block created by S-function builder without the block from MBD Toolbox. But there was a similar problem when I built the model containing the block created by S-function builder and the blocks from MBD Toolbox. 'CRC.c' was the c code used by Legacy Code Tool.
Is there any way to solve the problem?
HotFix_7: CAN Recevier issue
NXP Tracking number: AST-908
Problem: CAN Receiver issue, it works only when one block is used. When is used another block, many of the can messages will be ignored.
Root Cause: Coding logic error.
Workaround: Update the files attached in the following folders:
{Toolbox install dir}\mbdtbx_pnt\src\mbdtbx_pnt\src\c_library folder flexcan_pnt_library.c file
{Toolbox install dir}\mbdtbx_pnt\mbdtbx_pnt\blocks\can folder can_pnt_receive_data_trigger.tlc file
Customer Report: CAN Recevier issue
Special thanks to 剑明肖for testing and fix confirmation.
Hello,
I found an other problem on this "flexcan_pnt_library.c". The CAN Bus 1 was not working on my board due to a wrong imsr declaration in the library :
Was :
/*FlexCAN_1 : mscr |mscr_value | imsr | imscr_value*/
static can_pinMux pinMux_1_TxD[] = { { 14, 0x32810001, 0, 0 } };
static can_pinMux pinMux_1_RxD[] = { { 15, 0x30080000, 32, 0x00000001 },
{ 17, 0x30080000, 32, 0x00000002 } };
Sould be :
/*FlexCAN_1 : mscr |mscr_value | imsr | imscr_value*/
static can_pinMux pinMux_1_TxD[] = { { 14, 0x32810001, 0, 0 } };
static can_pinMux pinMux_1_RxD[] = { { 15, 0x30080000, 33, 0x00000001 },
{ 17, 0x30080000, 33, 0x00000002 } };
If you can confirm it :smileywink:
HotFix_6: DMA config block - address and channel issue
NXP Tracking number: AST-830
Problem: DMA config block - address input not working for all hex numbers and some DMA channels are not usable.
Root Cause: Coding logic error.
Workaround: Update the files attached in the following folders:
{Toolbox install dir}\mbdtbx_pnt\mbdtbx_pnt\mbdtargetmainlibpnt.tlc
{Toolbox install dir}\mbdtbx_pnt\mbdtbx_pnt\mbd_pnt_ec_toolbox.slx
{Toolbox install dir}\mbdtbx_pnt\mbdtbx_pnt\mscripts\dma\mbd_pnt_dma_config_ch_num.p