How to build genavb-sdk-endpoint_avb-freertos_rt1052-3_3_5 for IMXRT-1050-EVKB AVB

cancel
Showing results for 
Search instead for 
Did you mean: 

How to build genavb-sdk-endpoint_avb-freertos_rt1052-3_3_5 for IMXRT-1050-EVKB AVB

1,788 Views
usala
Contributor II

I want to be able to build genavb-sdk-endpoint_avb-freertos_rt1052-3_3_5 for IMXRT-1050-EVKB AVB demo using MCUXpresso for Windows?  I tried 'Import Project from file system' but there is no startup code to run from or debug.  How can I make genavb-sdk-endpoint_avb-freertos_rt1052-3_3_5 for IMXRT-1050-EVKB AVB a running and debug application?

Best regards,

Ulises

Tags (1)
0 Kudos
42 Replies

1,217 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

This package should also contain documentation including a User Guide to setup the available examples. However, there is not an example project that you can import in MXUXpresso right out of the box, you need to perform some steps as mentioned in the User Guide.

Depending on the package, it might support the MCXpresso Linux distribution only, so please review these details in the included documentation.

My apologies for the inconvenience.

Regards,
Gustavo

0 Kudos

1,197 Views
usala
Contributor II

Hi Gustavo,

When I follow the steps pn the manual at section 8. GenAVB/TSN example applications setup and then try to build the application with the command $ ./build_release_motor.sh  I get an error about not finding the tool set.  I installed the toolset from the download folder.  See attached capture.

Best regards,

Ulises

0 Kudos

1,188 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

From the error, it seems that CMake cannot find the ARM toolchain. Please make sure that you have installed the GNU ARM Embedded Toolchain on your Linux Host.

The User’s Guide or MCUXpresso SDK Release Notes list the latest supported version, in this case it should be 9-2019-q4-major for the i.XMRT1050.

You may find a pre-build, GNU based, ARM toolchain for the Cortex-M on the following link on the Download section. In there scroll and look for the 9-2019-q4-major and look for the Linux x86_64 Tarball.

https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-...

The user guide shares the command to extract the tarball in the user home directory, which is where the Makefiles on the examples will be looking for the toolchain.

I hope that this information helps!

Regards,
Gustavo

0 Kudos

1,186 Views
usala
Contributor II

Gustavo,

Thanks for you response.  I installed the tool set and now I am getting a different issue.  ***Please set ARMGCC_DIR in environment variables***.   I apologize because I am not a Linux developer.  See attachment for details of the new error.

Best regards,

Ulises

0 Kudos

1,176 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

There is no need to apologize, that’s what these communities are for, and posts can help other users who may have the same questions.

From the error message the toolchain directory variable (ARMGCC_DIR) is not set, which is why Cmake does not know where to look for the toolchain. Use the following command to set this variable before running the build script.

$ export ARMGCC_DIR=~/gcc-arm-none-eabi-9-2019-q4-major

(This will only work if you have installed that precise toolchain in the home directory, it using a different toolchain or if it's located in a different directory, you would need to edit this command)

I hope that this information helps!

Regards,
Gustavo

0 Kudos

1,154 Views
usala
Contributor II

Hi Gustavo,

$ export ARMGCC_DIR=~/gcc-arm-none-eabi-9-2019-q4-major worked but now I am getting a different error (See attached error capture). "No targets specified and no makefile found".

Best regards,

Ulises

0 Kudos

1,147 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

Have you followed all the steps listed in the User Guide including verifying symbolic links? It seems that CMake cannot find the sources in the CmakeLists.txt file.

Please verify these steps. The symbolic links are created in the top directory, that is also important. The User Guide should have the step by step commands to change to top directory, verify the symbolic links, change to armgcc directory and to build.

I hope that this information helps!

Regards,
Gustavo

0 Kudos

1,145 Views
usala
Contributor II

Hi Gustavo,

I followed the steps as described in the manual and the error seems to be with a particular folder that doesn't exits in my setup.  Folder home/ulises/genavb-apps-freertos-3_3_5/boards/evkbimxrt1050/mcu-sdk/boards/evkbimxrt1050/xip/  containing file evkbimxrt1050_flexspi_nor_config.c.  (See attached capture file).

Best regards,

Ulises

0 Kudos

1,134 Views
usala
Contributor II

Hi Gustavo,

Thank you for your response.  The only SDK available for IMXRT1050 is SDK v2.10.0 I guess that 2.8.2 is no longer available.  Is it okay to use v2.10.0 or does it have to be 2.8.2?

You are absolutely right the manual refers only to the 1170 SDK and not the 1050 SDK.  What I did is follow the manual and substituted 1170 with 1050.

The manual has:

The link to MCUXpresso SDK is created in the per board top directories:
$ cd ~/genavb-apps-freertos-3_3_5/boards/evkmimxrt1170
$ ln -s ~/SDK_2.9.0_MIMXRT1170-EVK_rfp mcu-sdk
The link to GENAVB/TSN SDK is created in the top directory:
$ cd ~/genavb-apps-freertos-3_3_5/
$ ln -s ~/genavb-sdk-endpoint_tsn-freertos_rt1176-3_3_5 gen_avb

I substituted 1170 with 1050.

For clarification on you last message you have 

$ cd ~/genavb-apps-freertos-3_3_5/boards/evkmimxrt1150

Do you mean $ cd ~/genavb-apps-freertos-3_3_5/boards/evkmimxrt1050?

Best regards,

Ulises

0 Kudos

1,122 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

You are correct, my apologies. I meant to replace the i.MXRT1170 with i.MXRT1050, which is the board that you are using.

As for the SDK version. I would recommend using the exact version referred to in the documentation to avoid problems in the long run (as some files may change from one version to another). The manual does refer to different SDK versions depending on the board.

You may download previous SDK releases. The interface is not very explicit on this but you can use the arrow at the right side of the Build MCUXpresso SDK to change the SDK version.

MCUXpresso_Buil_Older.jpg

 

I hope that this information helps!

Regards,
Gustavo

0 Kudos

1,118 Views
usala
Contributor II

Hi Gustavo,

I was able to build by doing 2 things. 1) Use SDK_2.9.0_EVKB-IMXRT1050 as you suggested and

2) Physically copying the contents of SDK_2.9.0_EVKB-IMXRT1050 into /boards\evkbimxrt1050/mcu-sdk.

In other words, the link "$ ls boards/evkbimxrt1050/mcu-sdk ~/SDK_2.9.0_EVKB-IMXRT1050" didn't work.

I tried 

"$ ls boards/evkbimxrt1050/mcu-sdk ~/SDK_2.9.0_EVKB-IMXRT1050_rfp" this on as in the manual and "$ ls boards/evkbimxrt1050/mcu-sdk ~/SDK_2.9.0_EVKB-IMXRT1050" and this one because that is the real name of the SDK.  Neither worked. So I just copied the files over th the path the CmakeList file is using which is mcu-sdk.

I do get 2 errors after the build "Explicit-function-declaration".  No big deal but want everyone else to be aware of it.  See attached capture log.

Thank you Gustavo for all your help.

Best regards,

Ulises 

0 Kudos

1,113 Views
usala
Contributor II

Hi Gustavo,

I applied the patch as described in the manual and still get build errors.  Most of them I was able to work my way around it but the last one is a link error. 'undefined reference tp 'VPRINT'. in sdk_printf.c.  I was wondering if there is a newer patch that handles all of these errors.

 

Best regards,

Ulises

0 Kudos

1,109 Views
usala
Contributor II

Hi Gustavo,

I was able to resolve the linker issue with VPRINTF by replacing it with lower case vprintf in sdk_printf.c.

However after successfully building the application and uploading it to the 2 EVK boards all I get on the screens of both boards is a register dump print.  See attachment capture.

 

Best regards,

Ulises

0 Kudos

1,098 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

I’m glad to hear that you were able to resolve these issues.

Just as a side note, copying the contents of the SDK is an adequate solution. However, if you want to create a symbolic link you would need to use the “ln” command. The “ls” command helps you to list files as well as verify these symbolic links. This is not evident from the documentation, my apologies.

When booting the board, are you able to write on the console? If so, you would need to make some changes that should be listed on the documentation to prepare the configuration for the listener and the talker boards. Are you unable to change these properties?

Regards,
Gustavo

0 Kudos

1,015 Views
usala
Contributor II

Hi Gustavo,

I get a "Hard Fault" when running the build code after resolving various build issues.  See attached capture.

Am I the first to ever use this AVB demo on the IMX RT1050?

Best regards,

Ulises.

0 Kudos

944 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

I’m sorry to hear that you are having problems running the GenAVB Endpoint application. I do not have the hardware to replicate this issue and there are many variables.

Allow me to see if there is anything else that we can do to help trough this channel.

Regards,
Gustavo

0 Kudos

933 Views
usala
Contributor II

Hi Gustavo,

Thanks for looking into it.   If there anyone out there within the NXP community that has been able to get the AVB endpoint application to build and run successfully please contact me.

Best regards,

Ulises

0 Kudos

853 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

I apologize for the problems you have encountered.

After some feedback from our experts, they mentioned that the last configuration shows a MAC address of the listener that would not be a “legal” MAC address. It is a multicast MAC address, which may be matching the talker stream destination MAC address, but this is not how the Audio Video Transport Protocol works.

The endpoint needs a regular unicast MAC address for its network interface. The stream destination MAC address is independent of that and determined by AVDECC + SRP automatically.

Board configurations:

on listener board: avdecc/talker_id should have a talker's board entity_id

it is: 0x00049f00fe710000

is should be: 0x00049ffebabe0000

(registers dump on HardFault shows r0 =  0xbabe0000)

fgptp/gmCapable should be 1 only on talker's board.

 

These would be configuration issues, which would not generate a hard fault but which should be noted.

Besides this configuration issue, there could be many variables that could cause a hard fault, so it’s not as easy to isolate, but chances are it’s a problem with the build.

You mentioned some errors in the build process like the VPRINT issue you encountered. If the patch is applied correctly it should not show any errors when building. One possible cause could be that the SDK version is not the same as specified in the NXP GenAVB/TSN MCUXpresso User's guide. Please check your GenAVB SDK documentation but it should be REL_2.9.0_REL13_RFP_RC3_2

It could be that the difference from the SDK is causing the errors. You should not need to manually change the code to allow it to build.

 

Lastly, it wouldn’t hurt to check that the hardware rework is correct, and that reversing the initial changes you made didn’t damaged the board. You mentioned you took out some of the resistors listed for the i.MXRT1170, but some would need to be solder back in, like R234 for example, which is the pull-up resistor for the I2C line which configures the audio codec.

 

My apologies for the complexity of the process but if I may, I would recommend to double check the rework to the board and to clean up and repeat the setup process. It should be much easier now that you are more familiar with the SDK and its documentation, and it would be easier to start from a clean state than working your way back from this hard fault scenario.

Regards,
Gustavo

 

0 Kudos

811 Views
usala
Contributor II

Gustavo,

Great news!  The Talker/Listener demo is now working after making your recommendations and using the pre-built binary image you provided with the kit.   Building the image by us is still not possible.  I am still experiencing build errors which I uploaded screen capture earlier.

I'll be out of the office from tomorrow 9/3 and returning on Tuesday 9/7.

Best regards,

Ulises

0 Kudos

805 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Ulises,

I’m glad to hear that you could run the endpoint demo! In that case we can rule out at this point an issue with the hardware rework.

As for the SDK, the 2.9.0 with release date 2021-01-15 would be correct.

In theory no error should be found after applying the patch and provided that all required libraries are available. Since it seems that some are not being found, I would like to make sure that you chose the required middleware and libraries when building the SDK.

The required middleware is listed in the User Guide and for the i.MXRT1050 these would be: littlefs, lwIP and FreeRTOS.

(However, I usually just use “Select All”  as I think it’s always better to pack the SDK with all libraries just to be safe in case you ultimately use some of these libraries.)

MCUXPresso_SDK_GenAVB.jpg

 

Thank you for letting us know you won’t be able to update the thread the following days. Once you are back do check your SDK libraries, hopefully that would fix the problem, otherwise please let us know at your earliest convenience.

Regards,
Gustavo

0 Kudos