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.

Replacing the bcache.h code of BIOS 5 with cache.h code(for C64x+ CPU) of SYSBIOS.

Other Parts Discussed in Thread: SYSBIOS

Hi, everyone

In my code there are some lines which initialize the cache module of the C64x+ CPU okay.

Original code is something like this.

#include "bcache.h"

.

.

.

.

.

.

.

.

.



#define EXT_MEM_BASE (0x80000000)

#define EXT_MEM_SIZE (0x10000000)

.

.

.

.

/* Cache Settings */

XDAS_Void TestApp_EnableCache(void)

{

    BCACHE_Size size;


    size.l1psize  = BCACHE_L1_32K; /* L1P cache size */

    size.l1dsize  = BCACHE_L1_16K; /* L1D cache size */

    size.l2size   = BCACHE_L2_64K; /* L2  cache size */


    /* Set L1P, L1D and L2 cache sizes */

    BCACHE_setSize(&size);


    /* Cache Enable External Memory Space */

    /* BaseAddr, length, MAR enable/disable */

    /* Cache 0x80000000 --- 0x8FFFFFFF   */

    BCACHE_setMar((Ptr *)EXT_MEM_BASE, EXT_MEM_SIZE, BCACHE_MAR_ENABLE);

    BCACHE_wbInvAll(); /* No need to call BCACHE_wait() */

} /* TestApp_EnableCache */

 

As this was written for BIOS 5 platform so it is not compatible with the SYSBIOS that is true , but now i am modifying every associated files of my project for SYSBIOS platform.After coming up to here i am little bit lost with the replacing this one i tried something, but wouldn't work it out. 

i tried something like this straight a way,

#include <ti/sysbios/family/c64p/Cache.h>.

.

.

.

#define EXT_MEM_BASE (0x80000000)

#define EXT_MEM_SIZE (0x10000000)

.

.

.

/* Cache Settings */

XDAS_Void TestApp_EnableCache(void)


typedef struct Cache_Size

{

    Cache_L1Size_32K;

    // L1 Program cache size

    Cache_L1Size_16K;

    // L1 Data data size

    Cache_L2Size_64K;

    // L2 cache size

} Cache_Size size;


    /* Set L1P, L1D and L2 cache sizes */

    Cache_setSize(Cache_Size *size);


    /* Cache Enable External Memory Space */

    /* BaseAddr, length, MAR enable/disable */

    /* Cache 0x80000000 --- 0x8FFFFFFF   */

    Cache_setMar((Ptr *)EXT_MEM_BASE, EXT_MEM_SIZE,Cache_Mar_ENABLE);

    Cache_wbInvAll(); /* No need to call Cache_wait() */

} /* TestApp_EnableCache */

 

Errors i am getting for this are as follows,

 

Description Resource Path Location Type

 constant "ti_sysbios_family_c64p_Cache_Mar_ENABLE" is not a type name TestAppDecoder.c /MP3 DEMO line 378 C/C++ Problem

 expected a "{" TestAppDecoder.c /MP3 DEMO line 362 C/C++ Problem

 expected a declaration TestAppDecoder.c /MP3 DEMO line 380 C/C++ Problem

 expected a type specifier TestAppDecoder.c /MP3 DEMO line 378 C/C++ Problem

 expected an identifier TestAppDecoder.c /MP3 DEMO line 364 C/C++ Problem

 expected an identifier TestAppDecoder.c /MP3 DEMO line 366 C/C++ Problem

 expected an identifier TestAppDecoder.c /MP3 DEMO line 368 C/C++ Problem

 extra text after expected end of number TestAppDecoder.c /MP3 DEMO line 364 C/C++ Problem

 extra text after expected end of number TestAppDecoder.c /MP3 DEMO line 366 C/C++ Problem

 extra text after expected end of number TestAppDecoder.c /MP3 DEMO line 368 C/C++ Problem

declaration is incompatible with "void ti_sysbios_family_c64p_Cache_setMar__E(xdc_Ptr, xdc_SizeT, ti_sysbios_family_c64p_Cache_Mar)" (declared at line 506 of "D:/Texas Instruments/ccsv5/bios_6_31_04_27/packages/ti/sysbios/family/c64p/Cache.h") .xdchelp /MP3 DEMO 378 C/C++ Problem

declaration is incompatible with "void ti_sysbios_family_c64p_Cache_setSize__E(ti_sysbios_family_c64p_Cache_Size *)" (declared at line 482 of "D:/Texas Instruments/ccsv5/bios_6_31_04_27/packages/ti/sysbios/family/c64p/Cache.h") .xdchelp /MP3 DEMO 373 C/C++ Problem

declaration is incompatible with "void ti_sysbios_family_c64p_Cache_wbInvAll__E(void)" (declared at line 530 of "D:/Texas Instruments/ccsv5/bios_6_31_04_27/packages/ti/sysbios/family/c64p/Cache.h") .xdchelp /MP3 DEMO 379 C/C++ Problem

I had feeling that data are right but the way i am declaring seems awful, is it?

Note: Did i need to replace "Cache" with the "ti_sysbios_family_c64p_Cache" wherever it is used?

Is there something wrong with the Structure i am using or a kind of thing.

Please guide me on this if any body had tried a shot on this.

Regards,

Nitin Mewada