nuttx-apps: Illegal calls to romdisk_register()
Several examples (and other things under apps/) make illegal calls to romdisk_register(). This both violates the portable POSIX OS interface and makes these applications un-usable in PROTECTED and KERNEL build modes.
Non-compliant examples include:
examples/bastest, examples/elf, examples/module,
examples/nxflat, examples/posix_spawn, examples/romfs,
examples/sotest, examples/thttpd, examples/unionfs
These examples are simple demos and, hence, you could argue that it is not so bad that they violate the interface for the purpose of demonstration (although they do set a bad example because of this).
These examples should, of course, use boardctl(BOARDIOC_ROMDISK) to create the ROM disk instead of calling romdisk_register() directly.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 24 (24 by maintainers)
Commits related to this issue
- Summary Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) Impact None Testing Tested on local simulator — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Summary Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) Impact None Testing Tested on local simulator — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- examples/romfs/romfs_main.c: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK). Issue #246. — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- examples/sotest/sotest_main.c: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK). Issue #246. — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- examples/unionfs/unionfs_main.c: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK). Issue #246. — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- examples/elf/elf_main.c: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK). Issue #246. — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- examples/posix_spawn/spawn_main.c: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK). Issue #246. — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) C file changes: examples/bastest/bastest_main.c examples/elf/elf_main.c examples/module/module_main.c examples/p... — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) C file changes: examples/bastest/bastest_main.c examples/elf/elf_main.c examples/module/module_main.c examples/p... — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) C file changes: examples/bastest/bastest_main.c examples/elf/elf_main.c examples/module/module_main.c examples/p... — committed to apache/nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246:Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) file: examples/nxflat/nxflat_main.c — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246:Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) file: examples/thttpd/thttpd_main.c — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246:Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) files changed: examples/nxflat/nxflat_main.c examples/thttpd/thttpd_main.c — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246:Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) files changed: examples/nxflat/nxflat_main.c examples/thttpd/thttpd_main.c examples/thttpd: Fix error: unused... — committed to tanushreebaindur/incubator-nuttx-apps by tanushreebaindur 3 years ago
- Apps Issue #246:Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) files changed: examples/nxflat/nxflat_main.c examples/thttpd/thttpd_main.c examples/thttpd: Fix error: unused... — committed to apache/nuttx-apps by tanushreebaindur 3 years ago
Hi @a-lunev ,
The error is because CONFIG_MMCSD and CONFIG_MMCSD_SPI are not defined. mmcsd_spislotinitialize() is enabled when CONFIG_MMCSD and CONFIG_MMCSD_SPI are defined
I do not have the board and I’m currently using the simulator to make the configuration change.
Can you please make the following change to the configuration and let me know if it works? If it does work, can you then submit a PR for the corrected eagle100:nxflat defconfig
To enable CONFIG_MMCSD: make menuconfig --> Device Drivers --> MMC/SD Driver Support To enable CONFIG_MMCSD_SPI: make menuconfig --> Device Drivers --> SPI Driver Support
This is the resulting defconfig after enabling CONFIG_MMCSD and CONFIG_MMCSD_SPI:
This file is autogenerated: PLEASE DO NOT EDIT IT.
You can use “make menuconfig” to make any modifications to the installed .config file.
You can then do “make savedefconfig” to generate a new defconfig file that includes your
modifications.
CONFIG_ARCH=“arm” CONFIG_ARCH_BOARD=“eagle100” CONFIG_ARCH_BOARD_EAGLE100=y CONFIG_ARCH_CHIP=“tiva” CONFIG_ARCH_CHIP_LM3S6918=y CONFIG_ARCH_CHIP_LM3S=y CONFIG_ARCH_CHIP_LM=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_CONSOLE_SYSLOG=y CONFIG_DISABLE_ENVIRON=y CONFIG_EXAMPLES_NXFLAT=y CONFIG_FS_ROMFS=y CONFIG_LIB_BOARDCTL=y CONFIG_MAX_TASKS=16 CONFIG_MMCSD=y CONFIG_NXFLAT=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=65536 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 CONFIG_SDCLONE_DISABLE=y CONFIG_SPI=y CONFIG_START_DAY=6 CONFIG_START_MONTH=5 CONFIG_START_YEAR=2009 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_TASK_NAME_SIZE=0 CONFIG_TIVA_GPIOA_IRQS=y CONFIG_TIVA_GPIOB_IRQS=y CONFIG_TIVA_GPIOC_IRQS=y CONFIG_TIVA_GPIOD_IRQS=y CONFIG_TIVA_GPIOE_IRQS=y CONFIG_TIVA_GPIOF_IRQS=y CONFIG_TIVA_GPIOG_IRQS=y CONFIG_TIVA_SSI0=y CONFIG_TIVA_UART0=y CONFIG_UART0_SERIAL_CONSOLE=y CONFIG_USERMAIN_STACKSIZE=4096 CONFIG_USER_ENTRYPOINT=“nxflat_main”