Problem Impoting Matlab XML to Design Studio

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem Impoting Matlab XML to Design Studio

2,496 Views
rathi_tg
Contributor III

Hello mariuslucianand

I have been  importing an XML file from Matlab with MBDT version 4.2.0 to S32 Design Studion ARM 2.2.

When I import a file a notepad pops out with an error as follow "1>C:\NXP\S32DS_ARM_v2.2\S32DS\build_tools\gcc_v4.9\gcc-arm-none-eabi-4_9\arm-none-eabi\newlib\lib\thumb\v7e-m\fpv4-sp\hard\libm.a (The system cannot find the path specified)"

I have checked the Directory but was not able find any such path created during the installation of Design Studio.

The project imported is unable to build.

Hope for Help.

Regards 

Gopal Rathi. 

0 Kudos
12 Replies

2,192 Views
nishalemos
Contributor II

Hello @mariuslucianand 

I went through the topic How to use C code in our Tool box

https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

I have Successfully built the code which you have mentioned above and Establish communication using C Code rather than using the Tool box. But, if I import the xml file of the Project to design Studio I encounter various Errors which are unable to include the Files present in bcc.

   

nishalemos_0-1609948977165.png

Built_Error.PNG

 

Secondly, I am trying to use Custom Code in order to transmit string value as a parameter using coder.ref but it pops out with an error.

Is there any possible way to Solve the above mentioned issues.

Regards 

Nisha 

0 Kudos

2,126 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @nishalemos,

You have to import the files from the bcc folder as well in the S32DS project.

Right click on the project name, select Import. Look after General -> File System and select the bcc folder that contains the bcc_*.h/.c files

mariuslucianand_0-1610547445750.png

Hope this helps,

Marius

 

0 Kudos

2,097 Views
nishalemos
Contributor II

Hello @mariuslucianand 

 

Thank you for your help!! The import was successful.

We have various diagnosis functions for MC33771B how can I use those function in MATLAB.

 

Regards

Nisha 

2,090 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @nishalemos ,

I'm glad it works!

Can you be more specific on which "diagnosis functions for MC33771B" are you referring to?

Regards,

Marius

Tags (1)
0 Kudos

2,088 Views
nishalemos
Contributor II

Hello @mariuslucianand 

 

I have refer the data sheet and listed the functions

Sr.NoDescriptions
1ADC1-A and ADC1-B functional verification
2Overvoltage and under voltage functional verification
3CTx open detect and open detect functional verification
4Cell voltage channel functional verification
5Cell terminal leakage diagnostics
6Current measurement diagnostics
7GPIOx port control and diagnostics
8GPIOx OT/UT functional verification
9GPIOx open terminal diagnostics
10Cell balance fault diagnostics

 

Regards

Nisha 

0 Kudos

2,077 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @nishalemos,

To read the fault registers, you can use the "Fault Get Status Block" directly from our toolbox. This will return the 11 registers described below. This block uses the "BCC_Fault_GetStatus" function.

mariuslucianand_0-1610980778747.png

If you are interested in a register value that is not returned by this block, then you can read directly that register by using the "Reg Read Block", feeding it with the address mentioned by the Reference Manual. This block uses the "BCC_Reg_Read" C function to do the job.

mariuslucianand_1-1610981528252.png

Hope this helps,

Marius

 

0 Kudos

2,447 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @rathi_tg ,

Can you send me an archive with the generated code to try importing it in the S32DS?

Regards,

Marius

0 Kudos

2,440 Views
rathi_tg
Contributor III

Hello @mariuslucianand 

 I have attached the basic led program which even fails while  imported to Design Studio.

 

Regards 

Gopal Rathi 

0 Kudos

2,430 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @rathi_tg.,

It looks like we are using different compiler versions and the lib that the S32DS complains about is from the GCC version 6.3 and not 4.9 the one that you have.

Now, the toolbox comes directly with the compiler, so the way in which you select which one to be used is by setting the system path variable that points to the compiler. 

By default, the Model-Based Design Toolbox comes directly with the compiler and adds the path in the Matlab if the variable is not found declared in the Windows path variable. So in order to check which variable you have set, please type the following command in the Matlab environment. mariuslucianand_0-1602245138450.png

My result points to the compiler from the toolbox.

Now, if your result is the following,

C:\NXP\S32DS_ARM_v2.2\S32DS\build_tools\gcc_v4.9\gcc-arm-none-eabi-4_9\

you have two options:

1. Either go to the Windows' System properties,  Environment variables and update the GCC_S32K_TOOL variable  value to the:

C:\NXP\S32DS_ARM_v2.2\S32DS\build_tools\gcc_v6.3\gcc-6.3-arm32-eabi

 

2. Either go to the Windows' System properties,  Environment variables and delete the GCC_S32K_TOOL variable. And Matlab will use the compiler provided with our toolbox which is the same as the one from the S32DS_ARM_v2.2.

In both cases, you have to restart Matlab after changing the already defined GCC_S32K_TOOL variable path. 

Hope this helps,

Marius

2,421 Views
rathi_tg
Contributor III

Hello @mariuslucianand 

I have Followed the above Steps I get build option but it generates few errors.

 

rathi_tg_0-1602258540784.png

What are these specific to and how i could solve them.

Thanks and Regards 

Gopal Rathi

0 Kudos

2,400 Views
rathi_tg
Contributor III

Hello @mariuslucianand 

 

I have installed the ToolBox in an other PC and all seems to work fine.

I guess I have to reinstall Tollbox in the system in which I am facing the   Error.

Thanks for Your Support

Regards 

Gopal Rathi. 

0 Kudos

2,390 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @rathi_tg ,

I am glad it works, even if it is on a different machine

I don't suspect this is necessarily related to the toolbox installation. Have you deleted the system variable? If not, and just updated it to the 6.3 let's delete the path variable and let Matlab to set it's own compiler from the toolbox.

 

Hope this helps,

Marius

0 Kudos