jturnsek opened a new pull request, #1658:
URL: https://github.com/apache/nuttx-apps/pull/1658

   ## Summary
   
   LuaJIT is Lua interpreter and Just-In-Time compiler. Originally it is not 
supporting Thumb instruction set (which all Cortex M processors are using), 
thus this PR is introducing ARMv7-M instruction set for LuaJIT. Because LuaJIT 
relies heavily on double precision floating point numbers, DFP unit is 
required. It has also Soft FPU configuration, but it was not tested on Cortex M 
devices.
   Original LuaJIT uses MMU for machine code and Lua object memory allocation, 
but with NuttX configuration I have introduced two MM heap regions: one in ITCM 
for hotloop traces allocation, and one in RAM for Lua object allocation. All 
allocations are done with fixed size chunks, because LuaJIT is using its own 
heap allocation algorithm. MCode allocations are 8KB and object allocations are 
32KB long. DTCM is used for standard data and heap.
   
   ## Impact
   
   ## Testing
   
   LuaJIT was tested on imxrt1064-evk board with the following configuration:
   
   CONFIG_ARCH="arm"
   CONFIG_ARCH_BOARD="imxrt1064-evk"
   CONFIG_ARCH_BOARD_IMXRT1064_EVK=y
   CONFIG_ARCH_CHIP="imxrt"
   CONFIG_ARCH_CHIP_IMXRT=y
   CONFIG_ARCH_CHIP_MIMXRT1064DVL6A=y
   CONFIG_ARCH_FLOAT_H=y
   CONFIG_ARCH_STACKDUMP=y
   CONFIG_ARMV7M_BASEPRI_WAR=y
   CONFIG_ARMV7M_DCACHE=y
   CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
   CONFIG_ARMV7M_DTCM=y
   CONFIG_ARMV7M_ICACHE=y
   CONFIG_ARMV7M_ITCM=y
   CONFIG_ARMV7M_USEBASEPRI=y
   CONFIG_BOARD_LOOPSPERMSEC=104926
   CONFIG_BUILTIN=y
   CONFIG_DEBUG_SYMBOLS=y
   CONFIG_DEV_GPIO=y
   CONFIG_DEV_GPIO_NSIGNALS=20
   CONFIG_FS_LITTLEFS=y
   CONFIG_FS_PROCFS=y
   CONFIG_IDLETHREAD_STACKSIZE=2048
   CONFIG_IMXRT_DTCM=256
   CONFIG_IMXRT_FLEXSPI1=y
   CONFIG_IMXRT_LPUART1=y
   CONFIG_INIT_ENTRYPOINT="nsh_main"
   CONFIG_INIT_STACKSIZE=4096
   CONFIG_INTELHEX_BINARY=y
   CONFIG_INTERPRETERS_LUAJIT=y
   CONFIG_LIBC_DLFCN=y
   CONFIG_LIBC_EXECFUNCS=y
   CONFIG_LIBC_LOCALE=y
   CONFIG_LPUART1_BAUD=9600
   CONFIG_LPUART1_SERIAL_CONSOLE=y
   CONFIG_MTD=y
   CONFIG_NSH_ARCHINIT=y
   CONFIG_NSH_BUILTIN_APPS=y
   CONFIG_NSH_DISABLE_IFUPDOWN=y
   CONFIG_NSH_FILEIOSIZE=512
   CONFIG_NSH_LINELEN=64
   CONFIG_NSH_READLINE=y
   CONFIG_NSH_VARS=y
   CONFIG_PIPES=y
   CONFIG_PRIORITY_INHERITANCE=y
   CONFIG_RAM_SIZE=262144
   CONFIG_RAM_START=0x20000000
   CONFIG_READLINE_CMD_HISTORY=y
   CONFIG_READLINE_TABCOMPLETION=y
   CONFIG_SERIAL_TERMIOS=y
   CONFIG_SIG_DEFAULT=y
   CONFIG_SIG_SIGALRM_ACTION=y
   CONFIG_SIG_SIGPIPE_ACTION=y
   CONFIG_SIG_SIGPROF_ACTION=y
   CONFIG_SIG_SIGUSR1_ACTION=y
   CONFIG_SIG_SIGUSR2_ACTION=y
   CONFIG_START_DAY=14
   CONFIG_START_MONTH=3
   CONFIG_SYSTEM_NSH=y
   CONFIG_SYSTEM_POPEN=y
   CONFIG_SYSTEM_SYSTEM=y
   CONFIG_SYSTEM_VI=y
   CONFIG_TTY_SIGINT=y
   CONFIG_TTY_SIGTSTP=y
   
   WARNING: Original linker script flash.ld was changed to use dtcm, instead of 
sram. Following memory allocation was used: 128KB ITCM, 256KB DTCM, 640KB OCRAM.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to