mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-04 04:38:15 +00:00
A few fixes for clean apps/examples/mtdrwb build
This commit is contained in:
parent
d8f8151a4f
commit
74972dfa59
2 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue