How to configure M2/L2 as 512KB L2 only

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

How to configure M2/L2 as 512KB L2 only

4,740 Views
ITCO
Contributor III

Hi,

 

I'm using the basic CW project, using 1 core and 1 task for MSC8156 DSP.

I would like to use M2/L2 memory as L2 cache (512KB).

I've looked at the help, and documentation ("Staring Environment"), but all the solution didn't work, and obviously, I think I'm doing something wrong.

I've also tried the Cache configurator option, it does changes the Cache registers, but I receive MMU exception.

 

Does anyone know how to do it step by step (including necessary changes in the L3K and C/H source code files?

 

Thanks.

Labels (1)
Tags (1)
0 Kudos
Reply
9 Replies

2,776 Views
CrasyCat
Specialist III

Hello

 

Are you working on a SDOS based application or on a bare board based application (without OS)?

 

CrasyCat

0 Kudos
Reply

2,776 Views
ITCO00
Contributor III

Hello,

 

I'm using SDOS basic project.

0 Kudos
Reply

2,776 Views
J2MEJediMaster
Specialist I

First, go to the Help folder, which for StarCore V 10 is {CodeWarrior Installation}\SC\Help.

 

In this folder is the App Note AN4063, It explains how to do some multicore memory configuration. It describes how to assign certain items to specific parts of the processor's memory. That might help get you started.

 

Also, I think earlier versions of CodeWarrior for StarCore V10 did not allow you to configure M2 completely as L2 cache only. Check the installation notes to see if your version of CodeWarrior has corrected this problem.

 

---Tom

2,776 Views
ITCO00
Contributor III

Hi,

 

I've looked further, and found in the document "StarCore SC3000 Linker User Guide" page 23, a section that explains how to setup the cache.

I've already followed those steps and also used the Cache configuration tool, but still failed.

0 Kudos
Reply

2,776 Views
CrasyCat
Specialist III

Hello

 

If you are using a SDOS based application you cannot use whole M2 memory as L2 cache.

SDOS requires the following section to be allocated in M2 memory:

 

At least sections Sections .att_mmu and .oskernel_local_data_bss and .oskernel_local_data must be allocated in M2 memory.

 

CrasyCat

0 Kudos
Reply

2,776 Views
ITCO00
Contributor III

Hi,

 

OK, it makes sense. Is there an option, to your best knowledge, to define the .att_mmu and os kernel sections in M3 instead of M2, and therefore, map M2/L2 as L2 fully?

0 Kudos
Reply

2,776 Views
CrasyCat
Specialist III

Hello

 

If you are using SDOS no.

 

CrasyCat

0 Kudos
Reply

2,776 Views
ITCO00
Contributor III

Hello,

 

I've read the application note 4063 you've recommended.

It is basically tells you how to configure memories and mapping your code & data to the memory types.

It doesn't tell you how to map all M2/L2 memory as L2 cache.

I also searched the following link: 

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-STARCORE-DSP10&

 but there was no errata, or application note for this issue.

0 Kudos
Reply

2,776 Views
ITCO00
Contributor III

Hello,

 

I'm using CW 10.1.3 version.

I've managed to declare 0x70000 of 0x80000 bytes of L2/M2 as L2. But, this is not solving the problem.

I'll read the AN4063 and let you know.

 

Thanks.

0 Kudos
Reply