A few fixes for clean apps/examples/mtdrwb build

This commit is contained in:
Gregory Nutt 2014-09-25 10:41:47 -06:00
parent d8f8151a4f
commit 74972dfa59
2 changed files with 10 additions and 0 deletions

View File

@ -130,6 +130,10 @@ ifeq ($(CONFIG_EXAMPLES_MTDPART),y)
CONFIGURED_APPS += examples/mtdpart
endif
ifeq ($(CONFIG_EXAMPLES_MTDRWB),y)
CONFIGURED_APPS += examples/mtdrwb
endif
ifeq ($(CONFIG_EXAMPLES_NETPKT),y)
CONFIGURED_APPS += examples/netpkt
endif

View File

@ -240,6 +240,12 @@ int mtdrwb_main(int argc, char *argv[])
message(" erasesize: %lu\n", (unsigned long)geo.erasesize);
message(" neraseblocks: %lu\n", (unsigned long)geo.neraseblocks);
blkpererase = geo.erasesize / geo.blocksize;
message(" blkpererase: %u\n", blkpererase);
nblocks = geo.neraseblocks * blkpererase;
message(" nblocks: %lu\n", (unsigned long)nblocks);
/* Allocate a buffer */
buffer = (FAR uint32_t *)malloc(geo.blocksize);