C-ARRAY files versus Library difference in C90FL Software Standard driver (UM_MPC5675K_C90LC_SSD)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

C-ARRAY files versus Library difference in C90FL Software Standard driver (UM_MPC5675K_C90LC_SSD)

跳至解决方案
3,659 次查看
chethanvenkates
Contributor I

Hi,

wanted to understand the difference between C-ARRAY files versus Library in C90FL Software Standard driver.

how C-array Files are related to SSD library?all the demo examples are using C-array files,  by using the function pointers.

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
3,356 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Does it hurry? I can write some simple example next week. I do not have any right now...

Lukas

在原帖中查看解决方案

0 项奖励
回复
7 回复数
3,356 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there's no functional difference between C-ARRAY driver and Library driver. It just depends what style of driver you prefer.

Regards,

Lukas

3,356 次查看
chethanvenkates
Contributor I

Thanks Lukas for the reply .. I am trying to use Library driver alone instead of C-Array , is there any examples to refer on how to Include Library driver .

I Tried to include Library driver ,but ran into issues .

0 项奖励
回复
3,357 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Does it hurry? I can write some simple example next week. I do not have any right now...

Lukas

0 项奖励
回复
3,356 次查看
chethanvenkates
Contributor I

yes  , it will be helpful for me if you can provide me the example by this week... thanks for the help Lukas...

0 项奖励
回复
3,354 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

It is very simple - just add library and "include" folder to your project. Then you can re-use code from demo project that is included in the package.

The only difference is that we do not use pointers to functions (like pFlashInit) - this can be used only for C-array drivers. Instead of this, use FlashInit only.

Lukas

0 项奖励
回复
3,352 次查看
chethanvenkates
Contributor I

Thanks Lukas... I am able to get this working .

I have one more question , Right now  in my project we are using ROM  to run the code( *.text,*.rodata) and Ram for data(*.data,*.bss).

So  am trying to create partition for the API driver in  ROM and then want to copy the  (*.text) of the Flash API driver  from the ROM partition to the RAM location ( using ROM to RAM  copy) and  point  Flash API driver (*.text ) to the Ram the location.

I am trying this through linker file to point  Ram Location post copying  (*.text) of  Flash API driver . but i am not successful on this  method.

Is there any way i can do this through linker file for pointing the RAM location of (*.text)  Flash API driver after copying it from ROM ?  i have attached the Linker file i am trying. Please Help me on this.

0 项奖励
回复
3,352 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Here is the syntax:

my_ram: org = 0x4007B000,   len = 0x00001000

GROUP : {

  .my_seg (VLECODE) : {

    ssd_C90LC_xPC56xx_VLE.a (.text_vle)                              

  }

  } > my_ram

Then it is necessary to enable "Tune Relocations" option in project settings. The problem is that this feature does NOT work in classic CodeWarrior 2.10. This was fixed in (if I can remember) in Eclipse version 10.4 and higher. Latest one is 10.6. In Eclipse version check the Tune Relocations checkbox in the EPPC Target target preferences Properties > C/C++ Build > Settings > Tool Settings > PowerPC CPU panel.

If you use library driver and CW2.10 then there's no workaround for this. You would have to use C-array driver instead of library.

Lukas

0 项奖励
回复