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.

CCS/AWR1642BOOST: CCS/AWR1642

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642

Tool/software: Code Composer Studio

Hi all,

I am trying to add qspiflash capabilities (read/write) to my project (mss).

I follow the directives found in SWRA583.pdf application note.

I redefined pins for AWR1642 as needed.

At the beginning of the "main.c", I placed the following lines:

#include <ti/drivers/qspi/qspi.h>
#include <ti/drivers/qspiflash/qspiflash.h>

Following I modified Properties -> Arm -> Linker ->File Search Path

In: Include library file....

C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash\lib\libqspiflash_xwr16xx.aer4f
C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspi\lib\libqspi_xwr16xx.aer4f

In: add <dir> ...

${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/utils/qspi/lib
${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/utils/qspiflash/lib

The projects is succesfully built

But when I run it, it fails executing:

qspiflashHandle = QSPIFlash_open(qspiHandle, &errCode);

I get the error message:

xdc.runtime.Main: "src/qspiflash_device_spansion.c", line 87: assertion failure
xdc.runtime.Error.raise: terminating execution

It is Ok, because my flash chip is a Macronix and all the definitions for it are in "qspiflash_device_macronix.c"

My question is:

Where I need to change to address the correct file "qspiflash_device_macronix.c"?

"libqspiflash_xwr16xx.aer4f" seems to contain all the flash manufacturers information...

Thanks,

Claudio

  • Take a look at qspiflashlib.mak.  It is currently set for Spansion flashes.  You will need to change the following lines to use the Macronix .c file:


    ###################################################################################
    # Driver Flash device file
    # - SPANSION
    ###################################################################################
    QSPIFLASH_DRV_SOURCES += qspiflash_device_spansion.c

    # Following flash device is for reference purpose, not tested.
    # QSPIFLASH_DRV_SOURCES += qspiflash_device_micron.c
    # QSPIFLASH_DRV_SOURCES += qspiflash_device_macronix.c
    ###################################################################################

    Comment out the spansion line, enable the macronix line, and rebuild the driver.  Instructions for driver building are in the SDK's user guide in the /docs folder.  Once you've rebuilt the driver, then rebuild your program.  Note: you will not be able to rebuild for EVM programs without restoring the driver for spansion.  You might want to save the current library files if you will need both frequently.

    -dave

  • Hi

    Are you building with a makefile or CCS?

    THank you
    CEsar
  • Hi Cesar,

    I am building with CCS

    Claudio

  • I will try this...
    Thank you
    Claudio
  • Hi Dave & Cesar,

    I modified my 'qspiflashlib.mak' file as advised above by Dave

    Following the "mmWave_SDK_user_guide.pdf" document:
    I created the debug_gmake.bat file:
    ____________________________________________________________
    REM Device I am using:
    Set MMWAVE_SDK_DEVICE=awr16xx

    REM set the directory where the driver lib I want to change is placed:
    cd C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash

    REM Where 'gmake.exe' is placed in my 'srrdemo' project:
    C:\ti\xdctools_3_50_04_43_core/gmake clean
    C:\ti\xdctools_3_50_04_43_core/gmake all

    REM Stop here to see the results...
    pause
    ____________________________________________________________

    I run it and it fails to do what I expected (updating the 'libqspiflash_xwr16xx.aer4f' file.
    Results follow:

    _______________________________________________________________________________________________________________________
    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>set GMAKE_PATH=C:/ti/ccs900/xdctools_3_55_00_11_core

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>Set MMWAVE_SDK_DEVICE=awr16xx

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>cd C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>REM C:/ti/ccs900/xdctools_3_55_00_11_core/gmake clean

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>REM C:/ti/ccs900/xdctools_3_55_00_11_core/gmake all

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>C:\ti\xdctools_3_50_04_43_core/gmake clean
    'Cleaning the QSPIFLASH Driver Library Objects'
    process_begin: CreateProcess(NULL, /bin/rm -Rf obj_xwr16xx/qspiflash.oer4f obj_xwr16xx/qspiflash_device_macronix.oer4f obj_xwr16xx/qspiflash_xwr16xx.oer4f lib/libqspiflash_xwr16xx.aer4f, ...) failed.
    make (e=2): The system cannot find the file specified.
    gmake: *** [qspiflashDrvClean] Error 2

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>C:\ti\xdctools_3_50_04_43_core/gmake all
    process_begin: CreateProcess(NULL, /bin/mkdir -p obj_xwr16xx, ...) failed.
    make (e=2): The system cannot find the file specified.
    gmake: *** [buildDirectories] Error 2

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\drivers\qspiflash>pause
    Press any key to continue . . .
    _______________________________________________________________________________________________________________________

    Thank you,
    Claudio
  • Please try running scripts/window/setenv.bat (making sure that MMWAVE_SDK_DEVICE=awr16xx).  Then run gmake drv from the same command window.  I think you are missing some of the environment variables that setenv.bat creates.

    -dave

  • Hi Dave,

    It works that way...!!!

    Thank you,

    Claudio