This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3359: RTOS PRU compilation warning

Part Number: AM3359


Hi,

The "[W0004] Open block(s) at EOF" warning still occurs in the icss_emac firmware build process in Processor SDK 4.3, any option in the latest PRU compiler release or update to the attached firmware open https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/81/src.7zsource code to fix the warning? The full log is as followings:

C:\ti\pdk_am335x_1_0_10\packages\ti\drv\icss_emac>gmake >icss_emac_warning.txt

"/ti/pdk_am335x_1_0_10/packages/ti/drv/icss_emac/firmware/icss_dualemac/src/micr

o_scheduler.asm", WARNING! at EOF: [W0004] Open block(s) at EOF

"/ti/pdk_am335x_1_0_10/packages/ti/drv/icss_emac/firmware/icss_dualemac/src/emac

_MII_Rcv.asm", WARNING! at EOF: [W0004] Open block(s) at EOF

"/ti/pdk_am335x_1_0_10/packages/ti/drv/icss_emac/firmware/icss_dualemac/src/emac

_MII_Xmt.asm", WARNING! at EOF: [W0004] Open block(s) at EOF

"/ti/pdk_am335x_1_0_10/packages/ti/drv/icss_emac/firmware/icss_dualemac/src/emac

_statistics.asm", WARNING! at EOF: [W0004] Open block(s) at EOF

Thanks,

Garrett

  • Unfortunately, I cannot build the source code in the attached .7z file.  This ...

    Garrett Ding said:
    C:\ti\pdk_am335x_1_0_10\packages\ti\drv\icss_emac>gmake >icss_emac_warning.txt

    ... implies the presence of a makefile.  But I don't see one.

    Rather than send in a makefile, I'd appreciate if you would show exactly how the compiler invoked to build one of the problem assembly files.

    Thanks and regards,

    -George

  • George,

    Thanks for looking into this. Here is build process for the emac_MII_Xmt.asm:

    # Compiling am335x:pru_1:icss_switch: /ti/PD2F83~1/packages/ti/drv/icss_emac/firmware/icss_dualemac/src/emac_MII_Xmt.asm

    C:/ti/ti-cgt-pru_2.2.1/bin/clpru -DMAKEFILE_BUILD -v3 -g --endian=little -DICSS_
    REV1 --diag_wrap=off --diag_warning=225 --display_error_number --hardware_mac=on
    --preproc_with_compile -eo.opru -DPRU1 -Dpru1 -DICSS_SWITCH_BUILD -DPRU -DTWO
    _PORT_CFG -DSOC_AM335x -IC:/ti/ccsv6/ccs_base/pru/include -IC:/ti/ti-cgt-pru_
    2.2.1/include -Isrc/ -I/ti/PD2F83~1/packages/ti/drv/icss_emac/firmware/icss_dual
    emac/src -fr=/ti/PD2F83~1/packages/ti/binary/icss_switch/obj/am335x/a8host/REV1/
    pru_1 -fs=/ti/PD2F83~1/packages/ti/binary/icss_switch/obj/am335x/a8host/REV1/pru
    _1 --preproc_dependency="emac_MII_Xmt.d" /ti/PD2F83~1/packages/ti/drv/icss_emac/
    firmware/icss_dualemac/src/emac_MII_Xmt.asm
    "/ti/pdk_am335x_1_0_10/packages/ti/drv/icss_emac/firmware/icss_dualemac/src/emac
    _MII_Xmt.asm", WARNING! at EOF: [W0004] Open block(s) at EOF
    No Assembly Errors, 1 Assembly Warning

    Regards, Garrett

  • One of your include paths is ...

    -I/ti/PD2F83~1/packages/ti/drv/icss_emac/firmware/icss_dualemac/src

    I don't recognize it.  I tried building without it.  As expected, it failed.  This is probably a path into a software package I don't have.  Please send me a link to it, and indicate what version to use.

    Thanks and regards,

    -George

  • George,

    The short directory name is pdk_am335x_1_0_10 which is from Processor SDK RTOS for AM335x - 

    The PDK driver build instruction is available here -

    Essentially, you need to run pdksetupenv.bat in pdk_[soc]_[version]\packages\, then go to the driver directory packages/ti/drv/icss_emac and run 'gmake clean' and 'gmake'

    Thanks,

    Garrett

  • Thanks for the information.  I can reproduce the diagnostic about open blocks.  I found the problem.  The lines around the first .if statement are these ...

        .if !$defined("__mii_xmt_p")	
    __mii_xmt_p	.set	1 
        
    ;;///////////////////////////////////////////////////////
    ; Includes Section
    ;;///////////////////////////////////////////////////////
        .include "icss_intc_regs.h"

    That .if has no matching .endif.  Thus the diagnostic.

    Thanks and regards,

    -George

  • George,

    The matching .endif is at the end of the file emac_MII_Xmt.asm. There are 75 .if and .endif in the file.

    If adding one more .endif, I got the error:

    "src/emac_MII_Xmt.asm", ERROR!   at line 929: [E0006] No matching .if specified

                   .endif

    1 Assembly Error, No Assembly Warnings

    Errors in Source - Assembler Aborted

    Can you please continue to look into the issue?

    Thanks, Garrett

  • Then we are not looking at the same file.  I get it from the src.7z archive you attached to the first post.  Here is what I see ...

    $ grep '\.if' emac_MII_Xmt.asm  | wc -l
    76
    $ grep '\.endif' emac_MII_Xmt.asm  | wc -l
    75
    

    Thanks and regards,

    -George

  • George,

    I think the .if in the comment below is counted by the grep.

    ' ;Check whether we have transmitted all the bytes ..if not than call Tx Task again for this packet'

    Regards,

    Garrett

  • Garrett Ding said:
    I think the .if in the comment below is counted by the grep.

    You are correct.  Sorry about that.

    This appears to be a problem in the assembler.  I filed CODEGEN-5028 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • Thanks for filing the CODEGEN-5028, George. We will follow it there...