Adding app to reproduce error.
This commit is contained in:
parent
0090cef718
commit
5dbc2a9eb6
45
.gitignore
vendored
45
.gitignore
vendored
@ -1,45 +0,0 @@
|
||||
*.a
|
||||
*.adb
|
||||
*.asm
|
||||
*.dSYM
|
||||
*.exe
|
||||
*.gcno
|
||||
*.gcda
|
||||
*.hobj
|
||||
*.i
|
||||
*.inf
|
||||
*.lib
|
||||
*.lst
|
||||
*.o
|
||||
*.wo
|
||||
*.obj
|
||||
*.rel
|
||||
*.src
|
||||
*.swp
|
||||
*.sym
|
||||
*.su
|
||||
*~
|
||||
.built
|
||||
.context
|
||||
.depend
|
||||
.kconfig
|
||||
*.lock
|
||||
/bin
|
||||
/boot_romfsimg.h
|
||||
/external
|
||||
/Kconfig
|
||||
/romfs.img
|
||||
/staging
|
||||
/symtab_apps.c
|
||||
/wasm
|
||||
cscope.out
|
||||
Make.dep
|
||||
.context
|
||||
# nuttx/$(TOPDIR)/Makefile.[unix|win]::$(DIRLINKS_EXTERNAL_DIRS)
|
||||
.dirlinks
|
||||
.vscode
|
||||
.DS_Store
|
||||
build
|
||||
.ccls-cache
|
||||
compile_commands.json
|
||||
.aider*
|
50
interpreters/hello/CustomHello.c
Normal file
50
interpreters/hello/CustomHello.c
Normal file
@ -0,0 +1,50 @@
|
||||
#include <stdio.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "js-root.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/boardctl.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/drivers/ramdisk.h>
|
||||
|
||||
#define CONFIG_JS_RAMFS 1
|
||||
#define STR_RAMDEVNO(m) #m
|
||||
#define MKMOUNT_DEVNAME(m) "/dev/ram" STR_RAMDEVNO(m)
|
||||
#define MOUNT_DEVNAME MKMOUNT_DEVNAME(CONFIG_JS_RAMFS)
|
||||
#ifndef CONFIG_EXAMPLES_ROMFS_SECTORSIZE
|
||||
# define CONFIG_EXAMPLES_ROMFS_SECTORSIZE 64
|
||||
#endif
|
||||
#define NSECTORS(b) (((b)+CONFIG_EXAMPLES_ROMFS_SECTORSIZE-1)/CONFIG_EXAMPLES_ROMFS_SECTORSIZE)
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
struct boardioc_romdisk_s desc;
|
||||
|
||||
/* Create a RAM disk for the test */
|
||||
|
||||
desc.minor = CONFIG_JS_RAMFS; /* Minor device number of the ROM disk. */
|
||||
desc.nsectors = NSECTORS(js_img_len); /* The number of sectors in the ROM disk */
|
||||
desc.sectsize = CONFIG_EXAMPLES_ROMFS_SECTORSIZE; /* The size of one sector in bytes */
|
||||
desc.image = (FAR uint8_t *)js_img; /* File system image */
|
||||
|
||||
boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc);
|
||||
mkdir("/js", 0755);
|
||||
printf("%d\n", mount(MOUNT_DEVNAME, "/js", "romfs",
|
||||
MS_RDONLY, NULL));
|
||||
return 0;
|
||||
}
|
30
interpreters/hello/Kconfig
Normal file
30
interpreters/hello/Kconfig
Normal file
@ -0,0 +1,30 @@
|
||||
#
|
||||
#For a description of the syntax of this configuration file,
|
||||
#see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
config CUSTOM_APPS_CUSTOM_HELLO
|
||||
tristate "Custom Hello App"
|
||||
default n
|
||||
depends on FS_ROMFS && BUILD_FLAT
|
||||
---help---
|
||||
Enable the Custom Hello App
|
||||
|
||||
if CUSTOM_APPS_CUSTOM_HELLO
|
||||
|
||||
config CUSTOM_APPS_CUSTOM_HELLO_PROGNAME
|
||||
string "Program name"
|
||||
default "custom_hello"
|
||||
---help---
|
||||
This is the name of the program that will be used when the NSH ELF
|
||||
program is installed.
|
||||
|
||||
config CUSTOM_APPS_CUSTOM_HELLO_PRIORITY
|
||||
int "Custom Hello task priority"
|
||||
default 100
|
||||
|
||||
config CUSTOM_APPS_CUSTOM_HELLO_STACKSIZE
|
||||
int "Custom Hello stack size"
|
||||
default DEFAULT_TASK_STACKSIZE
|
||||
|
||||
endif
|
3
interpreters/hello/Make.defs
Normal file
3
interpreters/hello/Make.defs
Normal file
@ -0,0 +1,3 @@
|
||||
ifneq ($(CONFIG_LIB_SQLITE),)
|
||||
CONFIGURED_APPS += $(APPDIR)/interpreters/hello/
|
||||
endif
|
14
interpreters/hello/Makefile
Normal file
14
interpreters/hello/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
include $(APPDIR)/Make.defs
|
||||
|
||||
# Custom Hello built-in application info
|
||||
|
||||
PROGNAME = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO_PROGNAME)
|
||||
PRIORITY = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO_STACKSIZE)
|
||||
MODULE = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO)
|
||||
|
||||
# Custom Hello
|
||||
|
||||
MAINSRC = CustomHello.c
|
||||
|
||||
include $(APPDIR)/Application.mk
|
1114
interpreters/hello/js-root.h
Normal file
1114
interpreters/hello/js-root.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user