FreeMASTER driver component does not contain all required files

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

FreeMASTER driver component does not contain all required files

Jump to solution
1,263 Views
VilemZ
NXP Employee
NXP Employee

Hello,

I have downloaded the latest SDK 2.9.1 for i.MX-RT1060 and used it to create a new application in MCUXpresso IDE. When added the FreeMASTER middleware component into the project, I’m getting a build error.

vilemzavodny-b5_1-1614088698930.png

The build errors are:

vilemzavodny-b5_2-1614088724183.png

What is the correct way to create a brand new project with a FreeMASTER support? The FreeMASTER example applications work fine.

Thanks.

 

0 Kudos
1 Solution
1,258 Views
MichalH
NXP Apps Support
NXP Apps Support

Hi Vilem,

I confirm the problem. The set of files included in the FreeMASTER Middleware component v3.0.2 in MCUXpresso IDE only contains the core driver files, not the platform and low-level driver files. All 2.9.0 and 2.9.1 SDK packages seem to be affected by this issue.

We will fix this issue in the next SDK version for each microcontroller platform. For now, please copy the missing files manually to project directory:

  1. Extract the SDK package ZIP file (e.g. SDK_2.9.1_EVK-MIMXRT1060.zip)
  2. Copy the freemaster_gen32le.h file from middleware\freemaster\src\platforms\gen32le to your project\freemaster directory.
  3. Also copy all needed low-level driver files (freemaster_serial_lpuart.* and similar) from middleware\freemaster\src\drivers\mcuxsdk\serial and ..\can directories to your project\freemaster directory. You can copy all driver files, even if they are not used. Do not create any sub-directories, otherwise you would need to add new include search paths to your project options.

The steps 1..3 are actually a workaround of the middleware component issue. However, it is not all to make the FreeMASTER application running. If working with a clean new application project, you also need to finish the FreeMASTER driver configuration, add communication interface initialization and also add few API calls to your main task in order to enable FreeMASTER communication.

  1. The best way to learn how to configure the FreeMASTER driver is to see the freemaster_cfg.h file in fmstr_uart, fmstr_can and other FreeMASTER examples.
  2. A nice way is also to use the MCUXpresso ConfigTools embedded in the MCUXpresso IDE to generate the FreeMASTER configuration for you - along with pins, clocks and other configuration. See fmstr_any application as an example which is generated by ConfigTools.
  3. In order to use ConfigTools in the MCUXpresso IDE, select menu ConfigTools/Peripherals and add the FreeMASTER configuration page like in the picture below:

    MichalH_0-1614089062571.png


  4. Finish the configuration. Also go to Pins, Clocks and other tools to complete the hardware setup. Again, refer to fmstr_any demo for a complete working example.
  5. Press the Update Code button to generate an updated code.

    MichalH_1-1614089205924.png


  6. The project should now pass compilation without any warnings about incomplete freemaster_cfg.h file.
  7. Make sure your application main function calls the BOARD_ functions to initialize MPU, Pins, Clocks and Peripherals. Remove the DebugConsole as it would clash with the FreeMASTER UART communication unless two different ports are used.
  8. Note that the FMSTR_Init() - FreeMASTER driver initialization is already done in the generated BOARD_InitBootPeripherals code along with communication peripheral module initialization.

    MichalH_2-1614089287867.png

  9. Add the FMSTR_Poll() call into your main loop or application task, to make sure the FreeMASTER will work fine in Polled and Short-interrupt mode. The polling call does not need to be added in the Long-interrupt mode.
  10. Run and test if the application communicates with FreeMASTER 3.1.

 

I hope this helps.

Regards,
Michal

 

View solution in original post

0 Kudos
1 Reply
1,259 Views
MichalH
NXP Apps Support
NXP Apps Support

Hi Vilem,

I confirm the problem. The set of files included in the FreeMASTER Middleware component v3.0.2 in MCUXpresso IDE only contains the core driver files, not the platform and low-level driver files. All 2.9.0 and 2.9.1 SDK packages seem to be affected by this issue.

We will fix this issue in the next SDK version for each microcontroller platform. For now, please copy the missing files manually to project directory:

  1. Extract the SDK package ZIP file (e.g. SDK_2.9.1_EVK-MIMXRT1060.zip)
  2. Copy the freemaster_gen32le.h file from middleware\freemaster\src\platforms\gen32le to your project\freemaster directory.
  3. Also copy all needed low-level driver files (freemaster_serial_lpuart.* and similar) from middleware\freemaster\src\drivers\mcuxsdk\serial and ..\can directories to your project\freemaster directory. You can copy all driver files, even if they are not used. Do not create any sub-directories, otherwise you would need to add new include search paths to your project options.

The steps 1..3 are actually a workaround of the middleware component issue. However, it is not all to make the FreeMASTER application running. If working with a clean new application project, you also need to finish the FreeMASTER driver configuration, add communication interface initialization and also add few API calls to your main task in order to enable FreeMASTER communication.

  1. The best way to learn how to configure the FreeMASTER driver is to see the freemaster_cfg.h file in fmstr_uart, fmstr_can and other FreeMASTER examples.
  2. A nice way is also to use the MCUXpresso ConfigTools embedded in the MCUXpresso IDE to generate the FreeMASTER configuration for you - along with pins, clocks and other configuration. See fmstr_any application as an example which is generated by ConfigTools.
  3. In order to use ConfigTools in the MCUXpresso IDE, select menu ConfigTools/Peripherals and add the FreeMASTER configuration page like in the picture below:

    MichalH_0-1614089062571.png


  4. Finish the configuration. Also go to Pins, Clocks and other tools to complete the hardware setup. Again, refer to fmstr_any demo for a complete working example.
  5. Press the Update Code button to generate an updated code.

    MichalH_1-1614089205924.png


  6. The project should now pass compilation without any warnings about incomplete freemaster_cfg.h file.
  7. Make sure your application main function calls the BOARD_ functions to initialize MPU, Pins, Clocks and Peripherals. Remove the DebugConsole as it would clash with the FreeMASTER UART communication unless two different ports are used.
  8. Note that the FMSTR_Init() - FreeMASTER driver initialization is already done in the generated BOARD_InitBootPeripherals code along with communication peripheral module initialization.

    MichalH_2-1614089287867.png

  9. Add the FMSTR_Poll() call into your main loop or application task, to make sure the FreeMASTER will work fine in Polled and Short-interrupt mode. The polling call does not need to be added in the Long-interrupt mode.
  10. Run and test if the application communicates with FreeMASTER 3.1.

 

I hope this helps.

Regards,
Michal

 

0 Kudos