Can I build Fortran code for MPC5748G on S32DS?

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

Can I build Fortran code for MPC5748G on S32DS?

1,247 Views
jlee4
Contributor II

Hi,

I'm investigating whether it is possible to build and run a Fortran project code  (BLAS/LAPACK, a famous matrix library) on MPC5748G; though MPC5748G officially supports either C or C++, I thought it is possible as S32DS, an IDE for the microcontroller, contains a Fortran compiler named `powerpc-eabivle-gfortran` but it has failed so far. I am just wondering if:

- I can build a Fortran code on S32S for MPC5748G

- If yes, I can run the resulting executable file on MPC5748G

I'm looking forward to answers or opinions from any pundits who are working on it and/or have relevant experience.

3 Replies

1,234 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

i did quick check - and gfortran from S32DS supports e200z2 and e200z4 architecture: 

jiri_kral_0-1633595483783.png

 

So, at least you can build Fortran source for e200 target. Question is, if BLAS and LAPACK doesn't use some Operatin system routines (not available on bare metal power PC).

gfortran is not integrated into eclipse. You need to build BLAS and LAPACK libraries from commandline. You need to pass correct arguments into existing Makefile (have no idea which ones). As a command line Environment you can use msys32 from S32DS (with default install path located in c:\NXP\S32DS_Power_v2.1\S32DS\build_tools\msys32\ folder) or cygwin.

 

But definitely it will not be an easy task. 

 

Jiri

1,180 Views
jlee4
Contributor II

Hi,

Thanks for your reply. A summary to check I understood correct:

- I can build Fortran code as the gfortran compiler is included in GCC of S32DS (for a PowerPC e200 architecture).

- However, proper commands (i.e., explicitly setting appropriate flags, such as the system root path or specs file location) should be given, but nobody in NXP engineers knows how to do it --- so to speak, this is to be investigated by myself.

Please correct me if I am wrong. Any resources that may help this will also be appreciated.

Thanks.

 

0 Kudos

1,170 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

 

yes, you are right. The gfortran is part of open source GNU tools - it is standard tool. Unfortunately - Fortran language is not supported/implemented in S32 Design studio. You need to figure out how to use it by yourself. 

 

Jiri

0 Kudos