Sunday, April 19, 2009

Build simulator on Windows (Visual Studio)

UFFS (>1.2.0) source code tree structure:
.
|-- doc
`-- src
|-- emu ---> NAND flash simulation, helper codes.
|-- example ---> Example codes
|-- inc
| `-- uffs
|-- uffs ---> UFFS core sources
`-- utils ---> simulator utility


From v1.2.0, UFFS use 'cmake' to generate Makefiles or project files for compile the simulator.

'cmake' can be downloaded from here: http://www.cmake.org/cmake/resources/software.html

When installing 'cmake', choose "Add cmake to System PATH".

Check out UFFS source codes from SF.net:
  svn co https://uffs.svn.sourceforge.net/svnroot/uffs/trunk uffs-trunk


Create a 'build' dir along with uffs-trunk:


Enter 'build' dir, and run "cmake ..\uffs-trunk" to create project files:


(Make sure that your cl.exe is in PATH).

Cmake will generate project files for you:



Now, you can open "uffs.dsw" with Visual Studio:



Set "mkuffs" project as active project, then compile/run it.

1 comment:

  1. No dsw generated for CMake 2.8.5 with Visual C++ Express 2010. Only a Makefile is generated by Cmake. After that, run nmake will build the target succesfully.

    ReplyDelete