How to use LIBMEM?
I am using CrossWorks to write some code for external NAND Flash on the demo board AT91SAM7SE-EK. There are documents and sample code from Atmel. However, it seems crossworks has a common memory library LIBMEM for a wide range of memory types. So, I tried to use LIBMEM library first. When I include <libmem.h> in the code, and use sample code in manual, libmem_register_cfi_driver(), libmem_unlock(), and so on functions from libmem are undefined functions when building the project.
Then, I tried to add libmem_XXX.a from the lib folder of crossworks, but I don't if this step is correct and which file I should load.
-
To link the LIBMEM library into your application, add $(StudioDir)/lib/libmem$(LibExt)$(LIB) to the Linker Options > Additional Input Files project property.
At link time the macros will be expanded so the appropriate version of the library will be linked on based on the options you have set in your executable project.
Best regards,
Jon
Please sign in to leave a comment.
Comments
2 comments