mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
configs/pjrc-8051: Configuration converted to use the kconfig-frontends tools
This commit is contained in:
@@ -2,3 +2,47 @@
|
|||||||
# For a description of the syntax of this configuration file,
|
# For a description of the syntax of this configuration file,
|
||||||
# see misc/tools/kconfig-language.txt.
|
# see misc/tools/kconfig-language.txt.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if ARCH_8051
|
||||||
|
comment "ARM Options"
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "8051 Chip Selection"
|
||||||
|
default ARCH_CHIP_8052
|
||||||
|
|
||||||
|
config ARCH_CHIP_8051
|
||||||
|
bool "8051"
|
||||||
|
|
||||||
|
config ARCH_CHIP_8052
|
||||||
|
bool "8052"
|
||||||
|
|
||||||
|
endchoice # 8051 Chip Selection
|
||||||
|
|
||||||
|
comment "Bring-up Debug Options"
|
||||||
|
|
||||||
|
config ARCH_8051_BRINGUP
|
||||||
|
bool "Bring-up debug"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Enable bring-up debug instrumentation
|
||||||
|
|
||||||
|
config ARCH_8051_NOSYSTIMER
|
||||||
|
bool "No system timer"
|
||||||
|
---help---
|
||||||
|
By default, Timer0 will be used as the system timer. Use of the
|
||||||
|
system timer can be suppressed with the setting. This is useful
|
||||||
|
during bring-up.
|
||||||
|
|
||||||
|
config ARCH_8051_BRINGUP
|
||||||
|
bool "Bring-up debug"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Enable bring-up debug instrumentation
|
||||||
|
|
||||||
|
config ARCH_8051_SUPRESS_INTERRUPTS
|
||||||
|
bool "Suppress interrupts"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
It is useful during low-level bring-up to suppress all interrupts.
|
||||||
|
|
||||||
|
endif # ARCH_8051
|
||||||
|
|||||||
@@ -64,7 +64,8 @@
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define EXTERN extern "C"
|
#define EXTERN extern "C"
|
||||||
extern "C" {
|
extern "C"
|
||||||
|
{
|
||||||
#else
|
#else
|
||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
@@ -74,7 +75,7 @@ extern "C" {
|
|||||||
* code to dump the stack pointer at critical locations.
|
* code to dump the stack pointer at critical locations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXTERN void up_showsp(uint8_t ch) __naked;
|
void up_showsp(uint8_t ch) __naked;
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* up_assert.c
|
* arch/8051/src/up_debug.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
static void up_putspace(void) __naked
|
static void up_putspace(void) __naked
|
||||||
{
|
{
|
||||||
_asm
|
_asm
|
||||||
@@ -103,7 +103,7 @@ static void _up_dump8(__code char *ptr, uint8_t b)
|
|||||||
* Name: up_puthex, up_puthex16, up_putnl, up_puts
|
* Name: up_puthex, up_puthex16, up_putnl, up_puts
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
void up_puthex(uint8_t hex) __naked
|
void up_puthex(uint8_t hex) __naked
|
||||||
{
|
{
|
||||||
hex; /* To avoid unreferenced argument warning */
|
hex; /* To avoid unreferenced argument warning */
|
||||||
@@ -141,7 +141,7 @@ void up_puts(__code char *ptr)
|
|||||||
* Name: up_dumpstack
|
* Name: up_dumpstack
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
void up_dumpstack(void)
|
void up_dumpstack(void)
|
||||||
{
|
{
|
||||||
NEAR uint8_t *start = (NEAR uint8_t *)(STACK_BASE & 0xf0);
|
NEAR uint8_t *start = (NEAR uint8_t *)(STACK_BASE & 0xf0);
|
||||||
@@ -177,7 +177,7 @@ void up_dumpstack(void)
|
|||||||
* Name: up_dumpframe
|
* Name: up_dumpframe
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
void up_dumpframe(FAR struct xcptcontext *context)
|
void up_dumpframe(FAR struct xcptcontext *context)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_FRAME_DUMP_SHORT
|
#ifdef CONFIG_FRAME_DUMP_SHORT
|
||||||
@@ -238,7 +238,7 @@ void up_dumpframe(FAR struct xcptcontext *context)
|
|||||||
* code to dump the stack pointer at critical locations.
|
* code to dump the stack pointer at critical locations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_PJRC
|
#ifdef CONFIG_ARCH_8051_BRINGUP
|
||||||
void up_showsp(uint8_t ch) __naked
|
void up_showsp(uint8_t ch) __naked
|
||||||
{
|
{
|
||||||
ch;
|
ch;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************
|
/************************************************************
|
||||||
* up_head.S
|
* arch/8051/src/up_head.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
.area REG_BANK_0 (REL,OVR,DATA)
|
.area REG_BANK_0 (REL,OVR,DATA)
|
||||||
.ds 8
|
.ds 8
|
||||||
|
|
||||||
#ifndef CONFIG_8052_TIMER2
|
#ifndef CONFIG_ARCH_8051_NOSYSTIMER
|
||||||
.area XSEG
|
.area XSEG
|
||||||
_g_timer0tick:
|
_g_timer0tick:
|
||||||
.ds 1
|
.ds 1
|
||||||
@@ -99,7 +99,7 @@ _g_timer0tick:
|
|||||||
|
|
||||||
.org PM2_VECTOR_TIMER0
|
.org PM2_VECTOR_TIMER0
|
||||||
push acc
|
push acc
|
||||||
#ifdef CONFIG_8052_TIMER2
|
#ifdef CONFIG_ARCH_8051_NOSYSTIMER
|
||||||
mov a, #TIMER0_IRQ
|
mov a, #TIMER0_IRQ
|
||||||
ljmp _up_interrupt
|
ljmp _up_interrupt
|
||||||
#else
|
#else
|
||||||
@@ -162,7 +162,7 @@ start:
|
|||||||
*
|
*
|
||||||
************************************************************/
|
************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_8052_TIMER2
|
#ifndef CONFIG_ARCH_8051_NOSYSTIMER
|
||||||
_up_timer0:
|
_up_timer0:
|
||||||
ar2 = 0x02
|
ar2 = 0x02
|
||||||
ar3 = 0x03
|
ar3 = 0x03
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* up_idle.c
|
* arch/8051/src/up_idle.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
* Private Data
|
* Private Data
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
static uint8_t g_ledtoggle = 0;
|
static uint8_t g_ledtoggle = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ static uint8_t g_ledtoggle = 0;
|
|||||||
|
|
||||||
void up_idle(void)
|
void up_idle(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
g_ledtoggle++;
|
g_ledtoggle++;
|
||||||
if (g_ledtoggle == 0x80)
|
if (g_ledtoggle == 0x80)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* up_initialize.c
|
* arch/8051/src/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2011, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -135,7 +135,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system timer interrupt */
|
/* Initialize the system timer interrupt */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_ARCH_8051_SUPRESS_INTERRUPTS
|
||||||
up_timerinit();
|
up_timerinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+26
-25
@@ -1,7 +1,7 @@
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* up_internal.h
|
* arch/8051/src/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2011, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef __ARCH_UP_INTERNAL_H
|
#ifndef __ARCH_8051_SRC_UP_INTERNAL_H
|
||||||
#define __ARCH_UP_INTERNAL_H
|
#define __ARCH_8051_SRC_UP_INTERNAL_H
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -108,29 +108,30 @@ extern const uint8_t g_ntobit[8];
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
#if CONFIG_MM_REGIONS > 1
|
||||||
extern void up_addregion(void);
|
void up_addregion(void);
|
||||||
#endif
|
#endif
|
||||||
extern void up_delay(uint8_t milliseconds) __naked;
|
void up_delay(uint8_t milliseconds) __naked;
|
||||||
extern void up_irqinitialize(void);
|
void up_irqinitialize(void);
|
||||||
extern void up_restorecontext(FAR struct xcptcontext *context) _naked;
|
void up_restorecontext(FAR struct xcptcontext *context) _naked;
|
||||||
extern void up_restoreregisters(FAR uint8_t *regs) _naked;
|
void up_restoreregisters(FAR uint8_t *regs) _naked;
|
||||||
extern uint8_t up_savecontext(FAR struct xcptcontext *context) __naked;
|
uint8_t up_savecontext(FAR struct xcptcontext *context) __naked;
|
||||||
extern void up_saveregisters(FAR uint8_t *regs) _naked;
|
void up_saveregisters(FAR uint8_t *regs) _naked;
|
||||||
extern void up_saveirqcontext(FAR struct xcptcontext *context);
|
void up_saveirqcontext(FAR struct xcptcontext *context);
|
||||||
extern void up_timerinit(void);
|
void up_timerinit(void);
|
||||||
|
|
||||||
/* Defined in up_debug.c */
|
/* Defined in up_debug.c */
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
extern void up_puthex(uint8_t hex) __naked;
|
void up_puthex(uint8_t hex) __naked;
|
||||||
extern void up_puthex16(int hex) __naked;
|
void up_puthex16(int hex) __naked;
|
||||||
extern void up_putnl(void) __naked;
|
void up_putnl(void) __naked;
|
||||||
extern void up_puts(__code char *ptr);
|
void up_puts(__code char *ptr);
|
||||||
|
void up_showsp(uint8_t ch) __naked;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_BRINGUP)
|
#if defined(CONFIG_FRAME_DUMP) && defined(CONFIG_ARCH_8051_BRINGUP)
|
||||||
extern void up_dumpstack(void);
|
void up_dumpstack(void);
|
||||||
extern void up_dumpframe(FAR struct xcptcontext *context);
|
void up_dumpframe(FAR struct xcptcontext *context);
|
||||||
#else
|
#else
|
||||||
# define up_dumpstack()
|
# define up_dumpstack()
|
||||||
# define up_dumpframe(x)
|
# define up_dumpframe(x)
|
||||||
@@ -139,9 +140,9 @@ extern void up_dumpframe(FAR struct xcptcontext *context);
|
|||||||
/* Defined in board/up_leds.c */
|
/* Defined in board/up_leds.c */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
extern void board_led_initialize(void);
|
void board_led_initialize(void);
|
||||||
extern void board_led_on(uint8_t led);
|
void board_led_on(uint8_t led);
|
||||||
extern void board_led_off(uint8_t led);
|
void board_led_off(uint8_t led);
|
||||||
#else
|
#else
|
||||||
# define board_led_initialize()
|
# define board_led_initialize()
|
||||||
# define board_led_on(led)
|
# define board_led_on(led)
|
||||||
@@ -149,4 +150,4 @@ extern void board_led_off(uint8_t led);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY */
|
#endif /* __ASSEMBLY */
|
||||||
#endif /* __ARCH_UP_INTERNAL_H */
|
#endif /* __ARCH_8051_SRC_UP_INTERNAL_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* up_irq.c
|
* arch/8051/src/up_irq.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -78,7 +78,7 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
IP = 0;
|
IP = 0;
|
||||||
|
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_ARCH_8051_SUPRESS_INTERRUPTS
|
||||||
/* Disable all interrupts */
|
/* Disable all interrupts */
|
||||||
|
|
||||||
IE = 0;
|
IE = 0;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* up_irqtest.c
|
* arch/8051/src/up_irqtest.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2011, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -160,13 +160,12 @@ void os_start(void)
|
|||||||
|
|
||||||
IE = 0;
|
IE = 0;
|
||||||
|
|
||||||
/* Then verify all of the interrupt */
|
/* Then verify all of the interrupts */
|
||||||
|
|
||||||
g_irqtest = false;
|
g_irqtest = false;
|
||||||
|
|
||||||
up_extint0();
|
up_extint0();
|
||||||
up_timer0();
|
#ifdef CONFIG_ARCH_8051_NOSYSTIMER
|
||||||
#ifndef CONFIG_8052_TIMER2
|
|
||||||
up_timer0();
|
up_timer0();
|
||||||
#endif
|
#endif
|
||||||
up_extint1();
|
up_extint1();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* up_timerisr.c
|
* arch/8051/src/up_timerisr.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -92,7 +92,7 @@ int up_timerisr(int irq, FAR uint8_t *frame)
|
|||||||
|
|
||||||
void up_timerinit(void)
|
void up_timerinit(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_8052_TIMER2
|
#ifdef CONFIG_ARCH_8051_NOSYSTIMER
|
||||||
up_disable_irq(TIMER2_IRQ);
|
up_disable_irq(TIMER2_IRQ);
|
||||||
|
|
||||||
/* Set up timer 2 -- See pjrc.h for details */
|
/* Set up timer 2 -- See pjrc.h for details */
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ config ARCH_8051
|
|||||||
bool "8051"
|
bool "8051"
|
||||||
select CUSTOM_STACK
|
select CUSTOM_STACK
|
||||||
---help---
|
---help---
|
||||||
Intel 8051 architectures and derivaties
|
Intel 8051 architectures and derivatives
|
||||||
|
|
||||||
config ARCH_ARM
|
config ARCH_ARM
|
||||||
bool "ARM"
|
bool "ARM"
|
||||||
|
|||||||
Reference in New Issue
Block a user