SPIFI ROM API without In-Build Liabrary

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

SPIFI ROM API without In-Build Liabrary

634 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stanley76726 on Fri Nov 02 02:31:42 MST 2012
Hi, all!

Now I'm trying to use the SPIFI ROM API with Keil MCB4300 (NXP 4357).

I have downloaded the 'SPIFI_Test' sample code from http://www.lpcware.com/content/nxpfile/lpc4350apdlzip, and it works fine.

However, it must use the 'spifi_drv_M4.lib' whose size is 38KB and turn on the 'USE_SPIFI_LIB' compiler option. The library is too big for me.

Here comes a revised version of spifi_rom_api.h:

#define  SPIFI_ROM_PTR    (0x10400118)
#define define_spifi_romPtr(name) const SPIFI_RTNS *name=*((SPIFI_RTNS **)SPIFI_ROM_PTR)
#endif /* OMIT_ROM_TABLE */

#ifdef USE_SPIFI_LIB
extern SPIFI_RTNS spifi_table;
#endif/* USE_SPIFI_LIB */

I turned off the 'USE_SPIFI_LIB' option without using 'spifi_table' which seems to be defined in 'spifi_drv_M4.lib', and directly assigned the

address of the SPIFI ROM dispatch table (SPIFI_ROM_PTR), but it never returned while calling 'spifi_init()' function.

Can I turn off the 'USE_SPIFI_LIB' option so that I can reduce the whole code size? Thank you!
Labels (1)
0 Kudos
2 Replies

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stanley76726 on Wed Nov 07 05:26:01 MST 2012
Thanks for your kindly supply! :)

Another question is that any possible to release the official source code of spifi driver?

We have found that it ever existed in the lpc43xx git server, and was removed at the end of last year however.

Thanks again!

Cheers,
Stanley
0 Kudos

466 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Mon Nov 05 11:09:44 MST 2012
Hello,

in the current devices of LPC43xx the ROM library for SPIFI is not functional.
Therefore you need to link it from external into your application program.
38kbyte is of course the file size on the PC file system, the amount of code linked into your application program is of course less than that (look into the map file after compilation).

Best regards,
NXP Tech Support Team
0 Kudos