sparc adaptive patch
This commit is contained in:
parent
5c5f1dec08
commit
95542f193b
@ -39,6 +39,24 @@
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getsp
|
||||
****************************************************************************/
|
||||
|
||||
static inline uint32_t up_getsp(void)
|
||||
{
|
||||
uint32_t retval;
|
||||
|
||||
do
|
||||
{
|
||||
retval = 0;
|
||||
__asm__ volatile("mov %%sp, %0" : "=r" (retval) : "0" (retval));
|
||||
}
|
||||
while (0);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
@ -70,6 +70,8 @@
|
||||
jmp %l4+%lo(_handler); \
|
||||
sll %l3, 1, %l4 ! l4 = WIM << 1
|
||||
|
||||
#define BM3803_STACK_TOP _end+CONFIG_IDLETHREAD_STACKSIZE
|
||||
|
||||
.text
|
||||
.global _trap_table, _hardreset
|
||||
.global __start
|
||||
@ -328,9 +330,9 @@ __start:
|
||||
nop
|
||||
|
||||
! initial the stack point
|
||||
sethi %hi(__stack), %g1
|
||||
or %g1, %lo(__stack), %g1
|
||||
subcc %g1, 16, %g1
|
||||
sethi %hi(BM3803_STACK_TOP), %g1
|
||||
or %g1, %lo(BM3803_STACK_TOP), %g1
|
||||
subcc %g1, CPU_MINIMUM_STACK_FRAME_SIZE, %g1
|
||||
mov %g1, %sp
|
||||
nop
|
||||
|
||||
@ -617,7 +619,7 @@ _fpdata:
|
||||
|
||||
.align 8
|
||||
g_idle_topstack:
|
||||
.long _end + CONFIG_IDLETHREAD_STACKSIZE
|
||||
.long BM3803_STACK_TOP
|
||||
.size g_idle_topstack, .-g_idle_topstack
|
||||
.end
|
||||
|
||||
|
@ -70,6 +70,8 @@
|
||||
jmp %l4+%lo(_handler); \
|
||||
sll %l3, 1, %l4 ! l4 = WIM << 1
|
||||
|
||||
#define BM3823_STACK_TOP _end+CONFIG_IDLETHREAD_STACKSIZE
|
||||
|
||||
.text
|
||||
.global _trap_table, _hardreset
|
||||
.global __start
|
||||
@ -329,9 +331,9 @@ __start:
|
||||
nop
|
||||
|
||||
! initial the stack point
|
||||
sethi %hi(__stack), %g1
|
||||
or %g1, %lo(__stack), %g1
|
||||
subcc %g1, 16, %g1
|
||||
sethi %hi(BM3823_STACK_TOP), %g1
|
||||
or %g1, %lo(BM3823_STACK_TOP), %g1
|
||||
subcc %g1, CPU_MINIMUM_STACK_FRAME_SIZE, %g1
|
||||
mov %g1, %sp
|
||||
nop
|
||||
|
||||
@ -618,7 +620,7 @@ _fpdata:
|
||||
|
||||
.align 8
|
||||
g_idle_topstack:
|
||||
.long _end + CONFIG_IDLETHREAD_STACKSIZE
|
||||
.long BM3823_STACK_TOP
|
||||
.size g_idle_topstack, .-g_idle_topstack
|
||||
.end
|
||||
|
||||
|
@ -39,17 +39,31 @@
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Macros
|
||||
****************************************************************************/
|
||||
|
||||
/* 32bit alignment macros */
|
||||
|
||||
#define INT32_ALIGN_MASK (3)
|
||||
#define INT32_ALIGN_DOWN(a) ((a) & ~INT32_ALIGN_MASK)
|
||||
#define INT32_ALIGN_UP(a) (((a) + INT32_ALIGN_MASK) & ~INT32_ALIGN_MASK)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static size_t do_stackcheck(uintptr_t alloc, size_t size, bool int_stack);
|
||||
static size_t do_stackcheck(FAR void *stackbase, size_t nbytes);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: do_stackcheck
|
||||
*
|
||||
* Description:
|
||||
* Determine (approximately) how much stack has been used be searching the
|
||||
* Determine (approximately) how much stack has been used by searching the
|
||||
* stack memory for a high water mark. That is, the deepest level of the
|
||||
* stack that clobbered some recognizable marker in the stack memory.
|
||||
*
|
||||
@ -62,42 +76,26 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size, bool int_stack);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static size_t do_stackcheck(uintptr_t alloc, size_t size, bool int_stack)
|
||||
static size_t do_stackcheck(FAR void *stackbase, size_t nbytes)
|
||||
{
|
||||
FAR uintptr_t start;
|
||||
FAR uintptr_t end;
|
||||
uintptr_t start;
|
||||
uintptr_t end;
|
||||
FAR uint32_t *ptr;
|
||||
size_t mark;
|
||||
|
||||
if (size == 0)
|
||||
if (nbytes == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get aligned addresses of the top and bottom of the stack */
|
||||
/* Take extra care that we do not check outside the stack boundaries */
|
||||
|
||||
#ifdef CONFIG_TLS
|
||||
if (!int_stack)
|
||||
{
|
||||
/* Skip over the TLS data structure at the bottom of the stack */
|
||||
|
||||
DEBUGASSERT((alloc & TLS_STACK_MASK) == 0);
|
||||
start = alloc + sizeof(struct tls_info_s);
|
||||
}
|
||||
else
|
||||
{
|
||||
start = alloc & ~3;
|
||||
}
|
||||
#else
|
||||
UNUSED(int_stack);
|
||||
start = alloc & ~3;
|
||||
#endif
|
||||
|
||||
end = (alloc + size + 3) & ~3;
|
||||
start = INT32_ALIGN_UP((uintptr_t)stackbase);
|
||||
end = INT32_ALIGN_DOWN((uintptr_t)stackbase + nbytes);
|
||||
|
||||
/* Get the adjusted size based on the top and bottom of the stack */
|
||||
|
||||
size = end - start;
|
||||
nbytes = end - start;
|
||||
|
||||
/* The ARM uses a push-down stack: the stack grows toward lower addresses
|
||||
* in memory. We need to start at the lowest address in the stack memory
|
||||
@ -105,7 +103,7 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size, bool int_stack)
|
||||
* that does not have the magic value is the high water mark.
|
||||
*/
|
||||
|
||||
for (ptr = (FAR uint32_t *)start, mark = (size >> 2);
|
||||
for (ptr = (FAR uint32_t *)start, mark = (nbytes >> 2);
|
||||
*ptr == STACK_COLOR && mark > 0;
|
||||
ptr++, mark--);
|
||||
|
||||
@ -157,6 +155,40 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size, bool int_stack)
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_stack_color
|
||||
*
|
||||
* Description:
|
||||
* Write a well know value into the stack
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_stack_color(FAR void *stackbase, size_t nbytes)
|
||||
{
|
||||
uintptr_t start;
|
||||
uintptr_t end;
|
||||
size_t nwords;
|
||||
FAR uint32_t *ptr;
|
||||
|
||||
/* Take extra care that we do not write outside the stack boundaries */
|
||||
|
||||
start = INT32_ALIGN_UP((uintptr_t)stackbase);
|
||||
end = nbytes ? INT32_ALIGN_DOWN((uintptr_t)stackbase + nbytes) :
|
||||
up_getsp(); /* 0: colorize the running stack */
|
||||
|
||||
/* Get the adjusted size based on the top and bottom of the stack */
|
||||
|
||||
nwords = (end - start) >> 2;
|
||||
ptr = (FAR uint32_t *)start;
|
||||
|
||||
/* Set the entire stack to the coloration value */
|
||||
|
||||
while (nwords-- > 0)
|
||||
{
|
||||
*ptr++ = STACK_COLOR;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_check_stack and friends
|
||||
*
|
||||
@ -175,13 +207,12 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size, bool int_stack)
|
||||
|
||||
size_t up_check_tcbstack(FAR struct tcb_s *tcb)
|
||||
{
|
||||
return do_stackcheck((uintptr_t)tcb->stack_alloc_ptr, tcb->adj_stack_size,
|
||||
false);
|
||||
return do_stackcheck(tcb->stack_base_ptr, tcb->adj_stack_size);
|
||||
}
|
||||
|
||||
ssize_t up_check_tcbstack_remain(FAR struct tcb_s *tcb)
|
||||
{
|
||||
return (ssize_t)tcb->adj_stack_size - (ssize_t)up_check_tcbstack(tcb);
|
||||
return tcb->adj_stack_size - up_check_tcbstack(tcb);
|
||||
}
|
||||
|
||||
size_t up_check_stack(void)
|
||||
@ -198,8 +229,7 @@ ssize_t up_check_stack_remain(void)
|
||||
size_t up_check_intstack(void)
|
||||
{
|
||||
return do_stackcheck((uintptr_t)&g_intstackalloc,
|
||||
(CONFIG_ARCH_INTERRUPTSTACK & ~3),
|
||||
true);
|
||||
(CONFIG_ARCH_INTERRUPTSTACK & ~3));
|
||||
}
|
||||
|
||||
size_t up_check_intstack_remain(void)
|
||||
|
@ -156,22 +156,13 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
size_t top_of_stack;
|
||||
size_t size_of_stack;
|
||||
|
||||
/* Yes.. If stack debug is enabled, then fill the stack with a
|
||||
* recognizable value that we can use later to test for high
|
||||
* water marks.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
||||
#endif
|
||||
|
||||
/* sparc uses a push-down stack: the stack grows toward lower
|
||||
* addresses in memory. The stack pointer register points to the
|
||||
* lowest, valid working address (the "top" of the stack). Items on
|
||||
* the stack are referenced as positive word offsets from sp.
|
||||
*/
|
||||
|
||||
top_of_stack = (uint32_t)tcb->stack_alloc_ptr + stack_size - 4;
|
||||
top_of_stack = (uint32_t)tcb->stack_alloc_ptr + stack_size;
|
||||
|
||||
/* The sparc stack must be aligned at word (8 byte) boundaries; for
|
||||
* floating point use, the stack must be aligned to 8-byte addresses.
|
||||
@ -187,12 +178,21 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
* The size need not be aligned.
|
||||
*/
|
||||
|
||||
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;
|
||||
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr;
|
||||
|
||||
/* Save the adjusted stack values in the struct tcb_s */
|
||||
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = size_of_stack;
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
/* If stack debug is enabled, then fill the stack with a
|
||||
* recognizable value that we can use later to test for high
|
||||
* water marks.
|
||||
*/
|
||||
|
||||
up_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size);
|
||||
#endif /* CONFIG_STACK_COLORATION */
|
||||
tcb->flags |= TCB_FLAG_FREE_STACK;
|
||||
|
||||
board_autoled_on(LED_STACKCREATED);
|
||||
|
@ -156,13 +156,6 @@ void up_initialize(void)
|
||||
|
||||
up_irqinitialize();
|
||||
|
||||
/* Initialize the system timer interrupt */
|
||||
|
||||
#if !defined(CONFIG_SUPPRESS_INTERRUPTS) && \
|
||||
!defined(CONFIG_SUPPRESS_TIMER_INTS)
|
||||
up_timer_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA
|
||||
/* Initialize the DMA subsystem if the weak function up_dma_initialize has
|
||||
* been brought into the build
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <nuttx/arch.h>
|
||||
# include <sys/types.h>
|
||||
# include <stdint.h>
|
||||
# include <stdbool.h>
|
||||
#endif
|
||||
@ -248,5 +250,10 @@ void up_usbuninitialize(void);
|
||||
# define up_usbuninitialize()
|
||||
#endif
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
void up_stack_color(FAR void *stackbase, size_t nbytes);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_SPARC_SRC_COMMON_UP_INTERNAL_H */
|
||||
|
@ -79,36 +79,29 @@ void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype)
|
||||
{
|
||||
/* Is there a stack allocated? */
|
||||
|
||||
if (dtcb->stack_alloc_ptr)
|
||||
if (dtcb->stack_alloc_ptr && (dtcb->flags & TCB_FLAG_FREE_STACK))
|
||||
{
|
||||
#if defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
|
||||
#ifdef CONFIG_MM_KERNEL_HEAP
|
||||
/* Use the kernel allocator if this is a kernel thread */
|
||||
|
||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
if (kmm_heapmember(dtcb->stack_alloc_ptr))
|
||||
{
|
||||
kmm_free(dtcb->stack_alloc_ptr);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Use the user-space allocator if this is a task or pthread */
|
||||
|
||||
if (umm_heapmember(dtcb->stack_alloc_ptr))
|
||||
{
|
||||
kmm_free(dtcb->stack_alloc_ptr);
|
||||
kumm_free(dtcb->stack_alloc_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mark the stack freed */
|
||||
|
||||
dtcb->flags &= ~TCB_FLAG_FREE_STACK;
|
||||
dtcb->stack_alloc_ptr = NULL;
|
||||
}
|
||||
|
||||
/* The size of the allocated stack is now zero */
|
||||
|
||||
dtcb->stack_base_ptr = NULL;
|
||||
dtcb->adj_stack_size = 0;
|
||||
}
|
||||
|
||||
|
@ -108,14 +108,6 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
|
||||
|
||||
tcb->stack_alloc_ptr = stack;
|
||||
|
||||
/* If stack debug is enabled, then fill the stack with a recognizable value
|
||||
* that we can use later to test for high water marks.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
||||
#endif
|
||||
|
||||
/* sparc uses a push-down stack: the stack grows toward loweraddresses in
|
||||
* memory. The stack pointer register, points to the lowest, valid work
|
||||
* address (the "top" of the stack). Items on the stack are referenced
|
||||
@ -137,5 +129,14 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = size_of_stack;
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
/* If stack debug is enabled, then fill the stack with a
|
||||
* recognizable value that we can use later to test for high
|
||||
* water marks.
|
||||
*/
|
||||
|
||||
up_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size);
|
||||
#endif /* CONFIG_STACK_COLORATION */
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -43,26 +43,6 @@
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_getsp
|
||||
****************************************************************************/
|
||||
|
||||
/* I don't know if the builtin to get SP is enabled */
|
||||
|
||||
static inline uint32_t up_getsp(void)
|
||||
{
|
||||
uint32_t retval;
|
||||
|
||||
do
|
||||
{
|
||||
retval = 0;
|
||||
__asm__ volatile("mov %%sp, %0" : "=r" (retval) : "0" (retval));
|
||||
}
|
||||
while (0);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_stackdump
|
||||
****************************************************************************/
|
||||
|
@ -67,6 +67,25 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
struct xcptcontext *xcp = &tcb->xcp;
|
||||
uint32_t regval;
|
||||
|
||||
/* Initialize the idle thread stack */
|
||||
|
||||
if (tcb->pid == 0)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
/* If stack debug is enabled, then fill the stack with a
|
||||
* recognizable value that we can use later to test for high
|
||||
* water marks.
|
||||
*/
|
||||
|
||||
up_stack_color(tcb->stack_alloc_ptr, 0);
|
||||
#endif /* CONFIG_STACK_COLORATION */
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
memset(xcp, 0, sizeof(struct xcptcontext));
|
||||
|
@ -7,18 +7,12 @@
|
||||
#
|
||||
# CONFIG_ARCH_LEDS is not set
|
||||
# CONFIG_ARCH_RAMFUNCS is not set
|
||||
# CONFIG_DISABLE_ENVIRON is not set
|
||||
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||
# CONFIG_FS_LARGEFILE is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_CMDPARMS is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_DD is not set
|
||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||
# CONFIG_NSH_DISABLE_GET is not set
|
||||
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_MKRD is not set
|
||||
# CONFIG_NSH_DISABLE_PRINTF is not set
|
||||
# CONFIG_NSH_DISABLE_PS is not set
|
||||
# CONFIG_NSH_DISABLE_TIME is not set
|
||||
CONFIG_ARCH="sparc"
|
||||
CONFIG_ARCH_BOARD="xx3803"
|
||||
CONFIG_ARCH_BOARD_XX3803=y
|
||||
@ -46,7 +40,9 @@ CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEBUG_WARN=y
|
||||
CONFIG_DEFAULT_SMALL=y
|
||||
CONFIG_DEFAULT_TASK_STACKSIZE=4096
|
||||
CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_ELF=y
|
||||
CONFIG_ELF_ALIGN_LOG2=3
|
||||
CONFIG_ELF_BUFFERINCR=64
|
||||
@ -55,44 +51,86 @@ CONFIG_ELF_STACKSIZE=8192
|
||||
CONFIG_ENDIAN_BIG=y
|
||||
CONFIG_EXAMPLES_ELF=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_HELLO_STACKSIZE=4096
|
||||
CONFIG_EXAMPLES_NULL=y
|
||||
CONFIG_EXECFUNCS_HAVE_SYMTAB=y
|
||||
CONFIG_EXECFUNCS_SYSTEM_SYMTAB=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=2048
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=4096
|
||||
CONFIG_INIT_STACKSIZE=8192
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LIBM=y
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_DISABLEBG=y
|
||||
CONFIG_NSH_DISABLESCRIPT=y
|
||||
CONFIG_NSH_DISABLE_CAT=y
|
||||
CONFIG_NSH_DISABLE_CMP=y
|
||||
CONFIG_NSH_DISABLE_CP=y
|
||||
CONFIG_NSH_DISABLE_DF=y
|
||||
CONFIG_NSH_DISABLE_ECHO=y
|
||||
CONFIG_NSH_DISABLE_ENV=y
|
||||
CONFIG_NSH_DISABLE_EXPORT=y
|
||||
CONFIG_NSH_DISABLE_FREE=y
|
||||
CONFIG_NSH_DISABLE_IFCONFIG=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_DISABLE_KILL=y
|
||||
CONFIG_NSH_DISABLE_LOSETUP=y
|
||||
CONFIG_NSH_DISABLE_MKDIR=y
|
||||
CONFIG_NSH_DISABLE_MOUNT=y
|
||||
CONFIG_NSH_DISABLE_MV=y
|
||||
CONFIG_NSH_DISABLE_PSSTACKUSAGE=y
|
||||
CONFIG_NSH_DISABLE_PUT=y
|
||||
CONFIG_NSH_DISABLE_PWD=y
|
||||
CONFIG_NSH_DISABLE_REBOOT=y
|
||||
CONFIG_NSH_DISABLE_RM=y
|
||||
CONFIG_NSH_DISABLE_RMDIR=y
|
||||
CONFIG_NSH_DISABLE_SEMICOLON=y
|
||||
CONFIG_NSH_DISABLE_SET=y
|
||||
CONFIG_NSH_DISABLE_SOURCE=y
|
||||
CONFIG_NSH_DISABLE_TELNETD=y
|
||||
CONFIG_NSH_DISABLE_TEST=y
|
||||
CONFIG_NSH_DISABLE_TRUNCATE=y
|
||||
CONFIG_NSH_DISABLE_UMOUNT=y
|
||||
CONFIG_NSH_DISABLE_UNAME=y
|
||||
CONFIG_NSH_DISABLE_UNSET=y
|
||||
CONFIG_NSH_DISABLE_USLEEP=y
|
||||
CONFIG_NSH_DISABLE_WGET=y
|
||||
CONFIG_NSH_DISABLE_XD=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_FILE_APPS=y
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=32768
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=4096
|
||||
CONFIG_PTHREAD_MUTEX_UNSAFE=y
|
||||
CONFIG_PTHREAD_STACK_MIN=2048
|
||||
CONFIG_RAM_SIZE=1048576
|
||||
CONFIG_RAM_START=0x40000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=10
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=4096
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_LPWORKPRIORITY=120
|
||||
CONFIG_SCHED_LPWORKSTACKSIZE=4096
|
||||
CONFIG_SCHED_TICKLESS=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_SIG_PREALLOC_IRQ_ACTIONS=4
|
||||
CONFIG_SPECIFIC_DRIVERS=y
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=16
|
||||
CONFIG_START_MONTH=6
|
||||
CONFIG_START_YEAR=2011
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NSH_STACKSIZE=4096
|
||||
CONFIG_SYSTEM_STACKMONITOR=y
|
||||
CONFIG_SYSTEM_STACKMONITOR_INTERVAL=1
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=32768
|
||||
CONFIG_UART3_SERIAL_CONSOLE=y
|
||||
CONFIG_USEC_PER_TICK=1
|
||||
CONFIG_XX3803_WDG=y
|
||||
CONFIG_XX3803_WDG_THREAD=y
|
||||
CONFIG_XX3803_WDG_THREAD_STACKSIZE=4096
|
||||
|
@ -69,10 +69,10 @@ ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHDEFINES =
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
# ELF module definitions
|
||||
|
@ -23,7 +23,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
|
||||
@ -142,5 +142,16 @@ int board_app_initialize(uintptr_t arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, BM3803_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to mount procfs at %s: %d\n",
|
||||
BM3803_PROCFS_MOUNTPOINT, ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -66,10 +66,10 @@ ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHDEFINES =
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
ASMEXT = .S
|
||||
|
Loading…
Reference in New Issue
Block a user