mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
RX65N RTC Driver added
This commit is contained in:
committed by
Gregory Nutt
parent
aa205b3732
commit
e671a10b2a
+20382
-331
File diff suppressed because it is too large
Load Diff
@@ -182,6 +182,13 @@ config RX65N_EMAC0
|
|||||||
select NETDEVICES
|
select NETDEVICES
|
||||||
select ARCH_HAVE_PHY
|
select ARCH_HAVE_PHY
|
||||||
|
|
||||||
|
config RX65N_RTC
|
||||||
|
bool "RTC"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config RX65N_CARRY
|
||||||
|
bool "RTC"
|
||||||
|
default y
|
||||||
endmenu # RX65N Peripheral Selections
|
endmenu # RX65N Peripheral Selections
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -529,4 +536,11 @@ config RX65N_EMAC_REGDEBUG
|
|||||||
---help---
|
---help---
|
||||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET.
|
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET.
|
||||||
|
|
||||||
|
config RX65N_RTC
|
||||||
|
bool "RTC"
|
||||||
|
default y
|
||||||
|
|
||||||
|
config RX65N_CARRY
|
||||||
|
bool "RTC"
|
||||||
|
default y
|
||||||
endmenu # EMAC0 device driver options
|
endmenu # EMAC0 device driver options
|
||||||
|
|||||||
@@ -52,3 +52,10 @@ CHIP_CSRCS += rx65n_timerisr.c
|
|||||||
ifeq ($(CONFIG_RX65N_EMAC),y)
|
ifeq ($(CONFIG_RX65N_EMAC),y)
|
||||||
CHIP_CSRCS += rx65n_eth.c rx65n_cmtw0.c
|
CHIP_CSRCS += rx65n_eth.c rx65n_cmtw0.c
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_RX65N_RTC),y)
|
||||||
|
CHIP_CSRCS += rx65n_rtc.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_RTC_DRIVER),y)
|
||||||
|
CHIP_CSRCS += rx65n_rtc_lowerhalf.c
|
||||||
|
endif
|
||||||
@@ -1,37 +1,22 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/chip.h
|
* arch/renesas/src/rx65n/chip.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
****************************************************************************/
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __ARCH_RENESAS_SRC_RX65N_CHIP_H
|
#ifndef __ARCH_RENESAS_SRC_RX65N_CHIP_H
|
||||||
#define __ARCH_RENESAS_SRC_RX65N_CHIP_H
|
#define __ARCH_RENESAS_SRC_RX65N_CHIP_H
|
||||||
@@ -39,7 +24,7 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
@@ -50,23 +35,19 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
**************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
extern uint16_t ebss;
|
extern uint16_t ebss;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* __ARCH_RENESAS_SRC_SH1_CHIP_H */
|
#endif /* __ARCH_RENESAS_SRC_SH1_CHIP_H */
|
||||||
|
|||||||
@@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_cgc.c
|
* arch/renesas/src/rx65n/rx65n_cgc.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -54,6 +39,7 @@
|
|||||||
|
|
||||||
void r_cgc_create(void)
|
void r_cgc_create(void)
|
||||||
{
|
{
|
||||||
|
volatile uint8_t i;
|
||||||
#if ((24 * RX_CLK_1MHz) == RX_RESONATOR)
|
#if ((24 * RX_CLK_1MHz) == RX_RESONATOR)
|
||||||
/* Set main clock control registers */
|
/* Set main clock control registers */
|
||||||
|
|
||||||
@@ -141,33 +127,8 @@ void r_cgc_create(void)
|
|||||||
/* Set LOCO */
|
/* Set LOCO */
|
||||||
|
|
||||||
SYSTEM.LOCOCR.BIT.LCSTP = 1U;
|
SYSTEM.LOCOCR.BIT.LCSTP = 1U;
|
||||||
#elif ((12 * RX_CLK_1MHz) == RX_RESONATOR)
|
#ifdef CONFIG_RX65N_RTC
|
||||||
SYSTEM.MOFCR.BIT.MOFXIN = 0;
|
RTC.RCR4.BYTE = _00_RTC_SOURCE_SELECT_SUB;
|
||||||
SYSTEM.MOFCR.BIT.MOSEL = 0;
|
|
||||||
|
|
||||||
if (1 == SYSTEM.HOCOCR.BIT.HCSTP)
|
|
||||||
{
|
|
||||||
SYSTEM.HOCOPCR.BYTE = 0x01;
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
while (0 == SYSTEM.OSCOVFSR.BIT.HCOVF);
|
|
||||||
}
|
|
||||||
SYSTEM.MOFCR.BIT.MODRV2 = 2;
|
|
||||||
SYSTEM.MOSCWTCR.BYTE = 0x53;
|
|
||||||
SYSTEM.MOSCCR.BYTE = 0x00;
|
|
||||||
|
|
||||||
if (0x00 == SYSTEM.MOSCCR.BYTE)
|
|
||||||
{
|
|
||||||
__asm("nop");
|
|
||||||
}
|
|
||||||
|
|
||||||
while (0 == SYSTEM.OSCOVFSR.BIT.MOOVF);
|
|
||||||
if (0 == SYSTEM.RSTSR1.BIT.CWSF)
|
|
||||||
{
|
|
||||||
volatile uint8_t i;
|
|
||||||
RTC.RCR4.BIT.RCKSEL = 0;
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
__asm("nop");
|
__asm("nop");
|
||||||
@@ -196,6 +157,124 @@ void r_cgc_create(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (0 != SYSTEM.OSCOVFSR.BIT.SOOVF);
|
while (0 != SYSTEM.OSCOVFSR.BIT.SOOVF);
|
||||||
|
RTC.RCR3.BIT.RTCDV = 1U;
|
||||||
|
|
||||||
|
/* Wait for the register modification to complete */
|
||||||
|
|
||||||
|
while (1U != RTC.RCR3.BIT.RTCDV)
|
||||||
|
{
|
||||||
|
/* Do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set sub-clock oscillation wait time */
|
||||||
|
|
||||||
|
SYSTEM.SOSCWTCR.BYTE = _25_CGC_SOSCWTCR_VALUE;
|
||||||
|
|
||||||
|
/* Set sub-clock */
|
||||||
|
|
||||||
|
SYSTEM.SOSCCR.BIT.SOSTP = 0U;
|
||||||
|
|
||||||
|
/* Wait for the register modification to complete */
|
||||||
|
|
||||||
|
while (0U != SYSTEM.SOSCCR.BIT.SOSTP)
|
||||||
|
{
|
||||||
|
/* Do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wait for sub-clock to be stable */
|
||||||
|
|
||||||
|
while (1U != SYSTEM.OSCOVFSR.BIT.SOOVF)
|
||||||
|
{
|
||||||
|
/* Do nothing */
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#elif ((12 * RX_CLK_1MHz) == RX_RESONATOR)
|
||||||
|
SYSTEM.MOFCR.BIT.MOFXIN = 0;
|
||||||
|
SYSTEM.MOFCR.BIT.MOSEL = 0;
|
||||||
|
|
||||||
|
if (1 == SYSTEM.HOCOCR.BIT.HCSTP)
|
||||||
|
{
|
||||||
|
SYSTEM.HOCOPCR.BYTE = 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (0 == SYSTEM.OSCOVFSR.BIT.HCOVF);
|
||||||
|
}
|
||||||
|
|
||||||
|
SYSTEM.MOFCR.BIT.MODRV2 = 2;
|
||||||
|
SYSTEM.MOSCWTCR.BYTE = 0x53;
|
||||||
|
SYSTEM.MOSCCR.BYTE = 0x00;
|
||||||
|
|
||||||
|
if (0x00 == SYSTEM.MOSCCR.BYTE)
|
||||||
|
{
|
||||||
|
__asm("nop");
|
||||||
|
}
|
||||||
|
|
||||||
|
while (0 == SYSTEM.OSCOVFSR.BIT.MOOVF);
|
||||||
|
if (0 == SYSTEM.RSTSR1.BIT.CWSF)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_RX65N_RTC
|
||||||
|
RTC.RCR4.BYTE = _00_RTC_SOURCE_SELECT_SUB;
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
__asm("nop");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 != RTC.RCR4.BIT.RCKSEL)
|
||||||
|
{
|
||||||
|
__asm("nop");
|
||||||
|
}
|
||||||
|
|
||||||
|
RTC.RCR3.BIT.RTCEN = 0;
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
__asm("nop");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 != RTC.RCR3.BIT.RTCEN)
|
||||||
|
{
|
||||||
|
__asm("nop");
|
||||||
|
}
|
||||||
|
|
||||||
|
SYSTEM.SOSCCR.BYTE = 0x01;
|
||||||
|
if (0x01 != SYSTEM.SOSCCR.BYTE)
|
||||||
|
{
|
||||||
|
__asm("nop");
|
||||||
|
}
|
||||||
|
|
||||||
|
while (0 != SYSTEM.OSCOVFSR.BIT.SOOVF);
|
||||||
|
RTC.RCR3.BIT.RTCDV = 1U;
|
||||||
|
|
||||||
|
/* Wait for the register modification to complete */
|
||||||
|
|
||||||
|
while (1U != RTC.RCR3.BIT.RTCDV)
|
||||||
|
{
|
||||||
|
/* Do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set sub-clock oscillation wait time */
|
||||||
|
|
||||||
|
SYSTEM.SOSCWTCR.BYTE = _25_CGC_SOSCWTCR_VALUE;
|
||||||
|
|
||||||
|
/* Set sub-clock */
|
||||||
|
|
||||||
|
SYSTEM.SOSCCR.BIT.SOSTP = 0U;
|
||||||
|
|
||||||
|
/* Wait for the register modification to complete */
|
||||||
|
|
||||||
|
while (0U != SYSTEM.SOSCCR.BIT.SOSTP)
|
||||||
|
{
|
||||||
|
/* Do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wait for sub-clock to be stable */
|
||||||
|
|
||||||
|
while (1U != SYSTEM.OSCOVFSR.BIT.SOOVF)
|
||||||
|
{
|
||||||
|
/* Do nothing */
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_cgc.h
|
* arch/renesas/src/rx65n/rx65n_cgc.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -253,7 +238,7 @@
|
|||||||
|
|
||||||
#define _00_RTC_SOURCE_SELECT_SUB (0x00u) /* Select sub-clock oscillator */
|
#define _00_RTC_SOURCE_SELECT_SUB (0x00u) /* Select sub-clock oscillator */
|
||||||
#define _01_RTC_SOURCE_SELECT_MAIN_FORCED (0x01u) /* Select main clock oscillator */
|
#define _01_RTC_SOURCE_SELECT_MAIN_FORCED (0x01u) /* Select main clock oscillator */
|
||||||
|
#define _25_CGC_SOSCWTCR_VALUE (0x25U)
|
||||||
/* Interrupt Source Priority Register n (IPRn) */
|
/* Interrupt Source Priority Register n (IPRn) */
|
||||||
|
|
||||||
/* Interrupt Priority Level Select (IPR[3:0]) */
|
/* Interrupt Priority Level Select (IPR[3:0]) */
|
||||||
@@ -281,7 +266,7 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: r_cgc_create
|
* Name: r_cgc_create
|
||||||
|
|||||||
@@ -1,45 +1,29 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_definitions.h
|
* arch/renesas/src/rx65n/rx65n_definitions.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* Surya <surya.prakash@tataelxsi.co.in>
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
****************************************************************************/
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __ARCH_RENESAS_SRC_RX65N_RX65N_DEFINITIONS_H
|
#ifndef __ARCH_RENESAS_SRC_RX65N_RX65N_DEFINITIONS_H
|
||||||
#define __ARCH_RENESAS_SRC_RX65N_RX65N_DEFINITIONS_H
|
#define __ARCH_RENESAS_SRC_RX65N_RX65N_DEFINITIONS_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include "rx65n/iodefine.h"
|
#include "rx65n/iodefine.h"
|
||||||
@@ -47,9 +31,9 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Memory-mapped register addresses ****************************************/
|
/* Memory-mapped register addresses *****************************************/
|
||||||
|
|
||||||
#define RX65N_SCI0_BASE (uint32_t)&SCI0
|
#define RX65N_SCI0_BASE (uint32_t)&SCI0
|
||||||
#define RX65N_SCI1_BASE (uint32_t)&SCI1
|
#define RX65N_SCI1_BASE (uint32_t)&SCI1
|
||||||
@@ -468,13 +452,98 @@
|
|||||||
#define SET_BYTE_HIGH (0xff)
|
#define SET_BYTE_HIGH (0xff)
|
||||||
#define SET_BYTE_LOW (0x00)
|
#define SET_BYTE_LOW (0x00)
|
||||||
|
|
||||||
|
/* RTC Register Offsets */
|
||||||
|
|
||||||
|
#define RX65N_RTC_R64CNT_OFFSET (0x0000)
|
||||||
|
#define RX65N_RTC_RSECCNT_OFFSET (0x0002)
|
||||||
|
#define RX65N_RTC_RMINCNT_OFFSET (0x0004)
|
||||||
|
#define RX65N_RTC_RHRCNT_OFFSET (0x0006)
|
||||||
|
#define RX65N_RTC_RWKCNT_OFFSET (0x0008)
|
||||||
|
#define RX65N_RTC_RDAYCNT_OFFSET (0x000a)
|
||||||
|
#define RX65N_RTC_RMONCNT_OFFSET (0x000c)
|
||||||
|
#define RX65N_RTC_RYRCNT_OFFSET (0x000e)
|
||||||
|
#define RX65N_RTC_RSECAR_OFFSET (0x0010)
|
||||||
|
#define RX65N_RTC_RMINAR_OFFSET (0x0012)
|
||||||
|
#define RX65N_RTC_RHRAR_OFFSET (0x0014)
|
||||||
|
#define RX65N_RTC_RWKAR_OFFSET (0x0016)
|
||||||
|
#define RX65N_RTC_RDAYAR_OFFSET (0x0018)
|
||||||
|
#define RX65N_RTC_RMONAR_OFFSET (0x001a)
|
||||||
|
#define RX65N_RTC_RYRAR_OFFSET (0x001c)
|
||||||
|
#define RX65N_RTC_RYRAREN_OFFSET (0x001e)
|
||||||
|
#define RX65N_RTC_RCR1_OFFSET (0x0022)
|
||||||
|
#define RX65N_RTC_RCR2_OFFSET (0x0024)
|
||||||
|
#define RX65N_RTC_RCR3_OFFSET (0x0026)
|
||||||
|
#define RX65N_RTC_RCR4_OFFSET (0x0028)
|
||||||
|
#define RX65N_RTC_RADJ_OFFSET (0x002e)
|
||||||
|
|
||||||
|
#define RX65N_RTC_BASE (0x0008c400)
|
||||||
|
#define RX65N_RTC_R64CNT (RX65N_RTC_BASE + RX65N_RTC_R64CNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RSECCNT (RX65N_RTC_BASE + RX65N_RTC_RSECCNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RMINCNT (RX65N_RTC_BASE + RX65N_RTC_RMINCNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RHRCNT (RX65N_RTC_BASE + RX65N_RTC_RHRCNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RWKCNT (RX65N_RTC_BASE + RX65N_RTC_RWKCNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RDAYCNT (RX65N_RTC_BASE + RX65N_RTC_RDAYCNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RMONCNT (RX65N_RTC_BASE + RX65N_RTC_RMONCNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RYRCNT (RX65N_RTC_BASE + RX65N_RTC_RYRCNT_OFFSET)
|
||||||
|
#define RX65N_RTC_RSECAR (RX65N_RTC_BASE + RX65N_RTC_RSECAR_OFFSET)
|
||||||
|
#define RX65N_RTC_RMINAR (RX65N_RTC_BASE + RX65N_RTC_RMINAR_OFFSET)
|
||||||
|
#define RX65N_RTC_RHRAR (RX65N_RTC_BASE + RX65N_RTC_RHRAR_OFFSET)
|
||||||
|
#define RX65N_RTC_RWKAR (RX65N_RTC_BASE + RX65N_RTC_RWKAR_OFFSET)
|
||||||
|
#define RX65N_RTC_RDAYAR (RX65N_RTC_BASE + RX65N_RTC_RDAYAR_OFFSET)
|
||||||
|
#define RX65N_RTC_RMONAR (RX65N_RTC_BASE + RX65N_RTC_RMONAR_OFFSET)
|
||||||
|
#define RX65N_RTC_RYRAR (RX65N_RTC_BASE + RX65N_RTC_RYRAR_OFFSET)
|
||||||
|
#define RX65N_RTC_RYRAREN (RX65N_RTC_BASE + RX65N_RTC_RYRAREN_OFFSET)
|
||||||
|
#define RX65N_RTC_RCR1 (RX65N_RTC_BASE + RX65N_RTC_RCR1_OFFSET)
|
||||||
|
#define RX65N_RTC_RCR2 (RX65N_RTC_BASE + RX65N_RTC_RCR2_OFFSET)
|
||||||
|
#define RX65N_RTC_RCR3 (RX65N_RTC_BASE + RX65N_RTC_RCR3_OFFSET)
|
||||||
|
#define RX65N_RTC_RCR4 (RX65N_RTC_BASE + RX65N_RTC_RCR4_OFFSET)
|
||||||
|
#define RX65N_RTC_RADJ (RX65N_RTC_BASE + RX65N_RTC_RADJ_OFFSET)
|
||||||
|
|
||||||
|
#define RTC_RTC_ALRDIS (0x00)
|
||||||
|
#define RTC_RCR4_RCKSEL (0x00)
|
||||||
|
#define RTC_RCR3_RTCEN (0x01)
|
||||||
|
#define RTC_RCR3_RTCDV (0x02)
|
||||||
|
#define RTC_RCR2_START (0x01)
|
||||||
|
#define RTC_RCR2_CNTMD (0x00)
|
||||||
|
#define RTC_RCR2_RESET (0x01)
|
||||||
|
#define RTC_ALARM_INT_ENABLE (0x01)
|
||||||
|
#define RTC_CARRY_INT_ENABLE (0x02)
|
||||||
|
#define RTC_PERIOD_INT_ENABLE (0x04)
|
||||||
|
#define RTC_PERIODIC_INT_PERIOD_1 (0xe0)
|
||||||
|
#define _04_FOUR_READ_COUNT (0x04)
|
||||||
|
#define RTC_1_64_SEC_CYCLE (0x0005b8d9)
|
||||||
|
#define _0F_RTC_PRIORITY_LEVEL15 (0x0f)
|
||||||
|
#define RTC_RCR1_CUP (0x02)
|
||||||
|
#define RX65N_SUBCLKOSC_SOSCCR (0x00080033)
|
||||||
|
#define SUBCLKOSC_SOSCCR_SOSTP (0x01)
|
||||||
|
#define RX65N_SUBCLKOSC_SOSCWTCR (0x0008c293)
|
||||||
|
#define RTC_SOSCWTCR_VALUE (0x21)
|
||||||
|
#define RTC_DUMMY_READ (3)
|
||||||
|
#define _00_RTC_PRIORITY_LEVEL0 (0)
|
||||||
|
#define _04_RTC_PERIOD_INT_ENABLE (0x04)
|
||||||
|
#define RTC_RTC_CARRYDIS (0xe5)
|
||||||
|
#define RTC_RTC_PERDIS (0xe3)
|
||||||
|
#define RTC_RADJ_INITVALUE (0x0)
|
||||||
|
#define RTC_RCR2_AADJE (0x10)
|
||||||
|
#define RTC_RCR2_AADJP (0x20)
|
||||||
|
|
||||||
|
#if defined(CONFIG_RTC) || defined(CONFIG_RTC_DRIVER)
|
||||||
|
|
||||||
|
#define HAVE_RTC_DRIVER 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define RX65N_RTC_WAIT_PERIOD 184
|
||||||
|
#define RTC_RCR2_HR24 (0x40)
|
||||||
|
#define RTC_PERIODIC_INTERRUPT_2_SEC (0xf)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
/* Serial Communications interface (SCI) */
|
/* Serial Communications interface (SCI) */
|
||||||
|
|||||||
@@ -1,37 +1,22 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_icu.h
|
* arch/renesas/src/rx65n/rx65n_icu.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved. Gregory Nutt.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
****************************************************************************/
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __ARCH_RENESAS_SRC_RX65N_RX65N_ICU_H
|
#ifndef __ARCH_RENESAS_SRC_RX65N_RX65N_ICU_H
|
||||||
#define __ARCH_RENESAS_SRC_RX65N_RX65N_ICU_H
|
#define __ARCH_RENESAS_SRC_RX65N_RX65N_ICU_H
|
||||||
@@ -250,7 +235,7 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: r_icu_create
|
* Name: r_icu_create
|
||||||
@@ -478,4 +463,4 @@ void r_icu_irqsetfallingedge(const uint8_t irq_no, const uint8_t set_f_edge);
|
|||||||
|
|
||||||
void r_icu_irqsetrisingedge(const uint8_t irq_no, const uint8_t set_r_edge);
|
void r_icu_irqsetrisingedge(const uint8_t irq_no, const uint8_t set_r_edge);
|
||||||
|
|
||||||
#endif /* __ARCH_RENESAS_SRC_RX65N_RX65N_ICU_H *.
|
#endif /* __ARCH_RENESAS_SRC_RX65N_RX65N_ICU_H */
|
||||||
|
|||||||
@@ -1,36 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_irq.c
|
* arch/renesas/src/rx65n/rx65n_irq.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* Surya <surya.prakash@tataelxsi.co.in>
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -174,6 +158,7 @@ void up_disable_irq(int irq)
|
|||||||
ICU.GENBL0.BIT.EN4 = 0;
|
ICU.GENBL0.BIT.EN4 = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RX65N_SCI3
|
#ifdef CONFIG_RX65N_SCI3
|
||||||
if (irq == RX65N_RXI3_IRQ)
|
if (irq == RX65N_RXI3_IRQ)
|
||||||
{
|
{
|
||||||
@@ -245,6 +230,7 @@ void up_disable_irq(int irq)
|
|||||||
ICU.GENBL0.BIT.EN10 = 0;
|
ICU.GENBL0.BIT.EN10 = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RX65N_SCI6
|
#ifdef CONFIG_RX65N_SCI6
|
||||||
if (irq == RX65N_RXI6_IRQ)
|
if (irq == RX65N_RXI6_IRQ)
|
||||||
{
|
{
|
||||||
@@ -420,6 +406,26 @@ void up_disable_irq(int irq)
|
|||||||
ICU.GENAL1.BIT.EN4 = 0;
|
ICU.GENAL1.BIT.EN4 = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_RX65N_RTC
|
||||||
|
if (irq == RX65N_ALM_IRQ)
|
||||||
|
{
|
||||||
|
ICU.IER[0x0b].BIT.IEN4 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (irq == RX65N_PRD_IRQ)
|
||||||
|
{
|
||||||
|
ICU.IER[0x0b].BIT.IEN5 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_RX65N_PERIB
|
||||||
|
if (irq == RX65N_INTB176_IRQ)
|
||||||
|
{
|
||||||
|
ICU.IER[16].BIT.IEN0 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -511,6 +517,7 @@ void up_enable_irq(int irq)
|
|||||||
ICU.GENBL0.BIT.EN4 = 1;
|
ICU.GENBL0.BIT.EN4 = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RX65N_SCI3
|
#ifdef CONFIG_RX65N_SCI3
|
||||||
if (irq == RX65N_RXI3_IRQ)
|
if (irq == RX65N_RXI3_IRQ)
|
||||||
{
|
{
|
||||||
@@ -582,6 +589,7 @@ void up_enable_irq(int irq)
|
|||||||
ICU.GENBL0.BIT.EN10 = 1;
|
ICU.GENBL0.BIT.EN10 = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RX65N_SCI6
|
#ifdef CONFIG_RX65N_SCI6
|
||||||
if (irq == RX65N_RXI6_IRQ)
|
if (irq == RX65N_RXI6_IRQ)
|
||||||
{
|
{
|
||||||
@@ -757,4 +765,24 @@ void up_enable_irq(int irq)
|
|||||||
ICU.GENAL1.BIT.EN4 = 1;
|
ICU.GENAL1.BIT.EN4 = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_RX65N_RTC
|
||||||
|
if (irq == RX65N_ALM_IRQ)
|
||||||
|
{
|
||||||
|
ICU.IER[0x0b].BIT.IEN4 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (irq == RX65N_PRD_IRQ)
|
||||||
|
{
|
||||||
|
ICU.IER[0x0b].BIT.IEN5 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_RX65N_PERIB
|
||||||
|
if (irq == RX65N_INTB176_IRQ)
|
||||||
|
{
|
||||||
|
ICU.IER[16].BIT.IEN0 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_port.c
|
* arch/renesas/src/rx65n/rx65n_port.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* Surya <surya.prakash@tataelxsi.co.in>
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -137,6 +121,7 @@ void r_port_create(void)
|
|||||||
# error "No Selection for PORT definition in rx65n_port.c"
|
# error "No Selection for PORT definition in rx65n_port.c"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_RX65N_EMAC0
|
#ifdef CONFIG_RX65N_EMAC0
|
||||||
void r_ether_port_configuration(void)
|
void r_ether_port_configuration(void)
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,246 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* arch/renesas/src/rx65n/rx65n_rtc.h
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ARCH_RENESAS_SRC_RX65N_RTC_H
|
||||||
|
#define __ARCH_RENESAS_SRC_RX65N_RTC_H
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include "chip.h"
|
||||||
|
#include "rx65n_definitions.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Types
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTC_ALARM
|
||||||
|
|
||||||
|
/* The form of an alarm callback */
|
||||||
|
|
||||||
|
typedef CODE void (*alm_callback_t)(FAR void *arg, unsigned int alarmid);
|
||||||
|
|
||||||
|
/* Structure used to pass parameters to set an alarm */
|
||||||
|
|
||||||
|
struct alm_setalarm_s
|
||||||
|
{
|
||||||
|
int as_id; /* enum alm_id_e */
|
||||||
|
struct tm as_time; /* Alarm expiration time */
|
||||||
|
alm_callback_t as_cb; /* Callback (if non-NULL) */
|
||||||
|
FAR void *as_arg; /* Argument for callback */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Structure used to pass parameters to query an alarm */
|
||||||
|
|
||||||
|
struct alm_rdalarm_s
|
||||||
|
{
|
||||||
|
int ar_id; /* enum alm_id_e */
|
||||||
|
FAR struct rtc_time *ar_time; /* Argument for storing ALARM RTC time */
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* CONFIG_RTC_ALARM */
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTC_PERIODIC
|
||||||
|
typedef CODE int (*periodiccb_t)(FAR void *arg, unsigned int alarmid);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_RX65N_CARRY
|
||||||
|
typedef void (*carrycb_t)(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EXTERN extern "C"
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
#define EXTERN extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_setdatetime
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Set the RTC to the provided time. RTC implementations which provide
|
||||||
|
* up_rtc_getdatetime() (CONFIG_RTC_DATETIME is selected) should provide
|
||||||
|
* this function.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* tp - the time to use
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) on success; a negated errno on failure
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTC_DATETIME
|
||||||
|
struct tm;
|
||||||
|
int rx65n_rtc_setdatetime(FAR const struct tm *tp);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_havesettime
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Check if RTC time has been set.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Returns true if RTC date-time have been previously set.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
bool rx65n_rtc_havesettime(void);
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTC_ALARM
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_setalarm
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Set an alarm to an absolute time using associated hardware.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* alminfo - Information about the alarm configuration.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) on success; a negated errno on failure
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int rx65n_rtc_setalarm(FAR struct alm_setalarm_s *alminfo);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_rdalarm
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Query an alarm configured in hardware.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* alminfo - Information about the alarm configuration.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) on success; a negated errno on failure
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int rx65n_rtc_rdalarm(FAR struct alm_rdalarm_s *alminfo);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_cancelalarm
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Cancel an alarm.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* alarmid - Identifies the alarm to be cancelled
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) on success; a negated errno on failure
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int rx65n_rtc_cancelalarm(void);
|
||||||
|
#endif /* CONFIG_RTC_ALARM */
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTC_PERIODIC
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_setperiodic
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Set a periodic RTC wakeup
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* period - Time to sleep between wakeups
|
||||||
|
* callback - Function to call when the period expires.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) on success; a negated errno on failure
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int rx65n_rtc_setperiodic(FAR const struct timespec *period,
|
||||||
|
periodiccb_t callback);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_cancelperiodic
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Cancel a periodic wakeup
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) on success; a negated errno on failure
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int rx65n_rtc_cancelperiodic(void);
|
||||||
|
#endif /* CONFIG_RTC_PERIODIC */
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_rtc_lowerhalf
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Instantiate the RTC lower half driver for the rx65n. General usage:
|
||||||
|
*
|
||||||
|
* #include <nuttx/timers/rtc.h>
|
||||||
|
* #include "rx65n_rtc.h>
|
||||||
|
*
|
||||||
|
* struct rtc_lowerhalf_s *lower;
|
||||||
|
* lower = rx65n_rtc_lowerhalf();
|
||||||
|
* rtc_initialize(0, lower);
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* On success, a non-NULL RTC lower interface is returned. NULL is
|
||||||
|
* returned on any failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTC_DRIVER
|
||||||
|
struct rtc_lowerhalf_s;
|
||||||
|
FAR struct rtc_lowerhalf_s *rx65n_rtc_lowerhalf(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* __ASSEMBLY__ */
|
||||||
|
#endif /* __ARCH_RENESAS_SRC_RX65N_RTC_H */
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_schedulesigaction.c
|
* arch/renesas/src/rx65n/rx65n_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -51,7 +36,7 @@
|
|||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Funictions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_sci.c
|
* arch/renesas/src/rx65n/rx65n_sci.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -1529,6 +1514,7 @@ MD_STATUS r_sci5_serial_receive(uint8_t * const rx_buf, uint16_t rx_num)
|
|||||||
SCI5.SCR.BIT.RE = 1u;
|
SCI5.SCR.BIT.RE = 1u;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: r_sci5_serial_send
|
* Name: r_sci5_serial_send
|
||||||
*
|
*
|
||||||
@@ -2177,6 +2163,7 @@ MD_STATUS r_sci10_serial_receive(uint8_t * const rx_buf, uint16_t rx_num)
|
|||||||
SCI10.SCR.BIT.RE = 1u;
|
SCI10.SCR.BIT.RE = 1u;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: r_sci10_serial_send
|
* Name: r_sci10_serial_send
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,37 +1,22 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_serial.c
|
* arch/renesas/src/rx65n/rx65n_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
****************************************************************************/
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -306,7 +291,7 @@ static void up_txint(struct uart_dev_s *dev, bool enable);
|
|||||||
static bool up_txready(struct uart_dev_s *dev);
|
static bool up_txready(struct uart_dev_s *dev);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void up_enable_irq(int irq);
|
void up_enable_irq(int irq);
|
||||||
@@ -413,11 +398,13 @@ static uart_dev_t g_sci0port =
|
|||||||
.size = CONFIG_SCI0_RXBUFSIZE,
|
.size = CONFIG_SCI0_RXBUFSIZE,
|
||||||
.buffer = g_sci0rxbuffer,
|
.buffer = g_sci0rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI0_TXBUFSIZE,
|
.size = CONFIG_SCI0_TXBUFSIZE,
|
||||||
.buffer = g_sci0txbuffer,
|
.buffer = g_sci0txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci0priv,
|
.priv = &g_sci0priv,
|
||||||
};
|
};
|
||||||
@@ -447,11 +434,13 @@ static uart_dev_t g_sci1port =
|
|||||||
.size = CONFIG_SCI1_RXBUFSIZE,
|
.size = CONFIG_SCI1_RXBUFSIZE,
|
||||||
.buffer = g_sci1rxbuffer,
|
.buffer = g_sci1rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI1_TXBUFSIZE,
|
.size = CONFIG_SCI1_TXBUFSIZE,
|
||||||
.buffer = g_sci1txbuffer,
|
.buffer = g_sci1txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci1priv,
|
.priv = &g_sci1priv,
|
||||||
};
|
};
|
||||||
@@ -481,11 +470,13 @@ static uart_dev_t g_sci2port =
|
|||||||
.size = CONFIG_SCI2_RXBUFSIZE,
|
.size = CONFIG_SCI2_RXBUFSIZE,
|
||||||
.buffer = g_sci2rxbuffer,
|
.buffer = g_sci2rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI2_TXBUFSIZE,
|
.size = CONFIG_SCI2_TXBUFSIZE,
|
||||||
.buffer = g_sci2txbuffer,
|
.buffer = g_sci2txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci2priv,
|
.priv = &g_sci2priv,
|
||||||
};
|
};
|
||||||
@@ -515,11 +506,13 @@ static uart_dev_t g_sci3port =
|
|||||||
.size = CONFIG_SCI3_RXBUFSIZE,
|
.size = CONFIG_SCI3_RXBUFSIZE,
|
||||||
.buffer = g_sci3rxbuffer,
|
.buffer = g_sci3rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI3_TXBUFSIZE,
|
.size = CONFIG_SCI3_TXBUFSIZE,
|
||||||
.buffer = g_sci3txbuffer,
|
.buffer = g_sci3txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci3priv,
|
.priv = &g_sci3priv,
|
||||||
};
|
};
|
||||||
@@ -549,11 +542,13 @@ static uart_dev_t g_sci4port =
|
|||||||
.size = CONFIG_SCI4_RXBUFSIZE,
|
.size = CONFIG_SCI4_RXBUFSIZE,
|
||||||
.buffer = g_sci4rxbuffer,
|
.buffer = g_sci4rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI4_TXBUFSIZE,
|
.size = CONFIG_SCI4_TXBUFSIZE,
|
||||||
.buffer = g_sci4txbuffer,
|
.buffer = g_sci4txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci4priv,
|
.priv = &g_sci4priv,
|
||||||
};
|
};
|
||||||
@@ -583,11 +578,13 @@ static uart_dev_t g_sci5port =
|
|||||||
.size = CONFIG_SCI5_RXBUFSIZE,
|
.size = CONFIG_SCI5_RXBUFSIZE,
|
||||||
.buffer = g_sci5rxbuffer,
|
.buffer = g_sci5rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI5_TXBUFSIZE,
|
.size = CONFIG_SCI5_TXBUFSIZE,
|
||||||
.buffer = g_sci5txbuffer,
|
.buffer = g_sci5txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci5priv,
|
.priv = &g_sci5priv,
|
||||||
};
|
};
|
||||||
@@ -617,11 +614,13 @@ static uart_dev_t g_sci6port =
|
|||||||
.size = CONFIG_SCI6_RXBUFSIZE,
|
.size = CONFIG_SCI6_RXBUFSIZE,
|
||||||
.buffer = g_sci6rxbuffer,
|
.buffer = g_sci6rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI6_TXBUFSIZE,
|
.size = CONFIG_SCI6_TXBUFSIZE,
|
||||||
.buffer = g_sci6txbuffer,
|
.buffer = g_sci6txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci6priv,
|
.priv = &g_sci6priv,
|
||||||
};
|
};
|
||||||
@@ -651,11 +650,13 @@ static uart_dev_t g_sci7port =
|
|||||||
.size = CONFIG_SCI7_RXBUFSIZE,
|
.size = CONFIG_SCI7_RXBUFSIZE,
|
||||||
.buffer = g_sci7rxbuffer,
|
.buffer = g_sci7rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI7_TXBUFSIZE,
|
.size = CONFIG_SCI7_TXBUFSIZE,
|
||||||
.buffer = g_sci7txbuffer,
|
.buffer = g_sci7txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci7priv,
|
.priv = &g_sci7priv,
|
||||||
};
|
};
|
||||||
@@ -670,7 +671,7 @@ static struct up_dev_s g_sci8priv =
|
|||||||
.xmitirq = RX65N_TXI8_IRQ,
|
.xmitirq = RX65N_TXI8_IRQ,
|
||||||
.eriirq = RX65N_ERI8_IRQ,
|
.eriirq = RX65N_ERI8_IRQ,
|
||||||
.teiirq = RX65N_TEI8_IRQ,
|
.teiirq = RX65N_TEI8_IRQ,
|
||||||
.grpibase = RX65N_GRPBL6_ADDR,
|
.grpibase = RX65N_GRPBL1_ADDR,
|
||||||
.erimask = RX65N_GRPBL1_ERI8_MASK,
|
.erimask = RX65N_GRPBL1_ERI8_MASK,
|
||||||
.teimask = RX65N_GRPBL1_TEI8_MASK,
|
.teimask = RX65N_GRPBL1_TEI8_MASK,
|
||||||
.parity = CONFIG_SCI8_PARITY,
|
.parity = CONFIG_SCI8_PARITY,
|
||||||
@@ -685,11 +686,13 @@ static uart_dev_t g_sci8port =
|
|||||||
.size = CONFIG_SCI8_RXBUFSIZE,
|
.size = CONFIG_SCI8_RXBUFSIZE,
|
||||||
.buffer = g_sci8rxbuffer,
|
.buffer = g_sci8rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI8_TXBUFSIZE,
|
.size = CONFIG_SCI8_TXBUFSIZE,
|
||||||
.buffer = g_sci8txbuffer,
|
.buffer = g_sci8txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci8priv,
|
.priv = &g_sci8priv,
|
||||||
};
|
};
|
||||||
@@ -719,11 +722,13 @@ static uart_dev_t g_sci9port =
|
|||||||
.size = CONFIG_SCI9_RXBUFSIZE,
|
.size = CONFIG_SCI9_RXBUFSIZE,
|
||||||
.buffer = g_sci9rxbuffer,
|
.buffer = g_sci9rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI9_TXBUFSIZE,
|
.size = CONFIG_SCI9_TXBUFSIZE,
|
||||||
.buffer = g_sci9txbuffer,
|
.buffer = g_sci9txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci9priv,
|
.priv = &g_sci9priv,
|
||||||
};
|
};
|
||||||
@@ -753,11 +758,13 @@ static uart_dev_t g_sci10port =
|
|||||||
.size = CONFIG_SCI10_RXBUFSIZE,
|
.size = CONFIG_SCI10_RXBUFSIZE,
|
||||||
.buffer = g_sci10rxbuffer,
|
.buffer = g_sci10rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI10_TXBUFSIZE,
|
.size = CONFIG_SCI10_TXBUFSIZE,
|
||||||
.buffer = g_sci10txbuffer,
|
.buffer = g_sci10txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci10priv,
|
.priv = &g_sci10priv,
|
||||||
};
|
};
|
||||||
@@ -787,11 +794,13 @@ static uart_dev_t g_sci11port =
|
|||||||
.size = CONFIG_SCI11_RXBUFSIZE,
|
.size = CONFIG_SCI11_RXBUFSIZE,
|
||||||
.buffer = g_sci11rxbuffer,
|
.buffer = g_sci11rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI11_TXBUFSIZE,
|
.size = CONFIG_SCI11_TXBUFSIZE,
|
||||||
.buffer = g_sci11txbuffer,
|
.buffer = g_sci11txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci11priv,
|
.priv = &g_sci11priv,
|
||||||
};
|
};
|
||||||
@@ -821,11 +830,13 @@ static uart_dev_t g_sci12port =
|
|||||||
.size = CONFIG_SCI12_RXBUFSIZE,
|
.size = CONFIG_SCI12_RXBUFSIZE,
|
||||||
.buffer = g_sci12rxbuffer,
|
.buffer = g_sci12rxbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.xmit =
|
.xmit =
|
||||||
{
|
{
|
||||||
.size = CONFIG_SCI12_TXBUFSIZE,
|
.size = CONFIG_SCI12_TXBUFSIZE,
|
||||||
.buffer = g_sci12txbuffer,
|
.buffer = g_sci12txbuffer,
|
||||||
},
|
},
|
||||||
|
|
||||||
.ops = &g_sci_ops,
|
.ops = &g_sci_ops,
|
||||||
.priv = &g_sci12priv,
|
.priv = &g_sci12priv,
|
||||||
};
|
};
|
||||||
@@ -1429,6 +1440,7 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
|
|||||||
* in this event, priv->scr should hold the correct value upon
|
* in this event, priv->scr should hold the correct value upon
|
||||||
* return from uuart_xmitchars().
|
* return from uuart_xmitchars().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uart_xmitchars(dev);
|
uart_xmitchars(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +1,22 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/renesas/src/rx65n/rx65n_vector_table.c
|
* arch/renesas/src/rx65n/rx65n_vector_table.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
****************************************************************************/
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -181,6 +166,7 @@ void r_access_exception(void)
|
|||||||
__asm("nop");
|
__asm("nop");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: r_floatingpoint_exception
|
* Name: r_floatingpoint_exception
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ Contents
|
|||||||
- Serial Console
|
- Serial Console
|
||||||
- LEDs
|
- LEDs
|
||||||
- Networking
|
- Networking
|
||||||
|
|
||||||
|
- RTC
|
||||||
- Debugging
|
- Debugging
|
||||||
|
|
||||||
Board Features
|
Board Features
|
||||||
@@ -219,6 +221,22 @@ Configure UDP blaster application as mentioned below :
|
|||||||
CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801 (10.75.24.1) ------> Gateway IP
|
CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801 (10.75.24.1) ------> Gateway IP
|
||||||
CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00 (255.255.254.0) --------> Netmask
|
CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00 (255.255.254.0) --------> Netmask
|
||||||
CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b (10.75.24.155) ---------> Target IP
|
CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b (10.75.24.155) ---------> Target IP
|
||||||
|
RTC
|
||||||
|
==========
|
||||||
|
|
||||||
|
NuttX Configurations
|
||||||
|
---------------
|
||||||
|
The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled.
|
||||||
|
|
||||||
|
RTC Testing
|
||||||
|
------------------
|
||||||
|
The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed
|
||||||
|
as part of RTC testing.
|
||||||
|
|
||||||
|
The following configurations are to be enabled as part of testing RTC examples.
|
||||||
|
CONFIG_EXAMPLES_ALARM
|
||||||
|
CONFIG_EXAMPLES_PERIODIC
|
||||||
|
CONFIG_EXAMPLES_CARRY
|
||||||
Debugging
|
Debugging
|
||||||
==========
|
==========
|
||||||
|
|
||||||
@@ -252,3 +270,8 @@ endif
|
|||||||
Select Motorola SREC format.
|
Select Motorola SREC format.
|
||||||
4. Download Renesas flash programmer tool from https://www.renesas.com/in/en/products/software-tools/tools/programmer/renesas-flash-programmer-programming-gui.html#downloads
|
4. Download Renesas flash programmer tool from https://www.renesas.com/in/en/products/software-tools/tools/programmer/renesas-flash-programmer-programming-gui.html#downloads
|
||||||
5. Refer to the user manual document, for steps to flash NuttX binary using RFP tool.
|
5. Refer to the user manual document, for steps to flash NuttX binary using RFP tool.
|
||||||
|
Changes Made in NuttX 8.2 Code
|
||||||
|
================================
|
||||||
|
1. In wd_start.c file, in function wd_expiration(), typecasting is done when the signal handler nxsig_timeout() is invoked.
|
||||||
|
2. In rtc.c, (drivers/timers/rtc.c) file, in function rtc_periodic_callback(), alarminfo->active = false is commented.
|
||||||
|
The reason being, periodic interrupt should not be disabled. Uncommenting the above mentioned line (alarminfo->active = false), will make the periodic interrupt come only once.
|
||||||
|
|||||||
@@ -5,58 +5,72 @@
|
|||||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
# modifications.
|
# modifications.
|
||||||
#
|
#
|
||||||
CONFIG_ARCH="renesas"
|
|
||||||
CONFIG_ARCH_BOARD="rx65n-grrose"
|
|
||||||
CONFIG_ARCH_BOARD_RX65N_GRROSE=y
|
CONFIG_ARCH_BOARD_RX65N_GRROSE=y
|
||||||
CONFIG_ARCH_CHIP="rx65n"
|
CONFIG_ARCH_BOARD="rx65n-grrose"
|
||||||
CONFIG_ARCH_CHIP_R5F565NEHDFP=y
|
CONFIG_ARCH_CHIP_R5F565NEHDFP=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=1024
|
|
||||||
CONFIG_ARCH_RENESAS=y
|
CONFIG_ARCH_RENESAS=y
|
||||||
CONFIG_ARCH_STACKDUMP=y
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
|
CONFIG_ARCH="renesas"
|
||||||
|
CONFIG_ARCH_CHIP="rx65n"
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=15001
|
CONFIG_BOARD_LOOPSPERMSEC=15001
|
||||||
CONFIG_BUILTIN=y
|
|
||||||
CONFIG_DEBUG_FEATURES=y
|
|
||||||
CONFIG_EXAMPLES_SERIALBLASTER=y
|
|
||||||
CONFIG_EXAMPLES_SERIALRX=y
|
|
||||||
CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y
|
|
||||||
CONFIG_EXAMPLES_SERIALRX_PRIORITY=75
|
|
||||||
CONFIG_FS_PROCFS=y
|
|
||||||
CONFIG_FS_PROCFS_REGISTER=y
|
|
||||||
CONFIG_MAX_TASKS=8
|
|
||||||
CONFIG_MOTOROLA_SREC=y
|
CONFIG_MOTOROLA_SREC=y
|
||||||
|
CONFIG_ENDIAN_LITTLE=y
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_MAX_TASKS=8
|
||||||
|
CONFIG_DEBUG_FEATURES=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=1024
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_ETH0_PHY_LAN8720A=y
|
||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
CONFIG_NETDB_DNSCLIENT=y
|
CONFIG_NETDB_DNSCLIENT=y
|
||||||
CONFIG_NETDB_DNSSERVER_NOADDR=y
|
CONFIG_NETDB_DNSSERVER_NOADDR=y
|
||||||
CONFIG_NETDEV_PHY_IOCTL=y
|
CONFIG_NETDEV_PHY_IOCTL=y
|
||||||
CONFIG_NETDEV_STATISTICS=y
|
CONFIG_NETDEV_STATISTICS=y
|
||||||
CONFIG_NETINIT_DHCPC=y
|
|
||||||
CONFIG_NETUTILS_DHCPC=y
|
|
||||||
CONFIG_NETUTILS_DHCPD=y
|
|
||||||
CONFIG_NETUTILS_TFTPC=y
|
CONFIG_NETUTILS_TFTPC=y
|
||||||
CONFIG_NETUTILS_WEBCLIENT=y
|
CONFIG_NETUTILS_WEBCLIENT=y
|
||||||
CONFIG_NET_ARP_SEND=y
|
CONFIG_NET_ARP_SEND=y
|
||||||
CONFIG_NET_BROADCAST=y
|
CONFIG_NET_BROADCAST=y
|
||||||
CONFIG_NET_ICMP=y
|
CONFIG_NET_ICMP=y
|
||||||
CONFIG_NET_ICMP_SOCKET=y
|
CONFIG_NET_ICMP_SOCKET=y
|
||||||
|
CONFIG_NET_SOCKOPTS=y
|
||||||
CONFIG_NET_STATISTICS=y
|
CONFIG_NET_STATISTICS=y
|
||||||
CONFIG_NET_TCP=y
|
CONFIG_NET_TCP=y
|
||||||
CONFIG_NET_TCPBACKLOG=y
|
CONFIG_NET_TCPBACKLOG=y
|
||||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||||
CONFIG_NET_UDP=y
|
CONFIG_NET_UDP=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
CONFIG_NFILE_DESCRIPTORS=8
|
CONFIG_NFILE_DESCRIPTORS=8
|
||||||
CONFIG_NFILE_STREAMS=8
|
CONFIG_NFILE_STREAMS=8
|
||||||
CONFIG_NSH_BUILTIN_APPS=y
|
|
||||||
CONFIG_NSH_FILEIOSIZE=512
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
CONFIG_NSH_LINELEN=64
|
CONFIG_NSH_LINELEN=64
|
||||||
CONFIG_NSH_READLINE=y
|
CONFIG_NSH_READLINE=y
|
||||||
CONFIG_NUNGET_CHARS=0
|
CONFIG_NUNGET_CHARS=0
|
||||||
CONFIG_PREALLOC_TIMERS=0
|
CONFIG_PREALLOC_TIMERS=0
|
||||||
CONFIG_PTHREAD_STACK_DEFAULT=1024
|
CONFIG_PTHREAD_STACK_DEFAULT=1024
|
||||||
CONFIG_RAM_SIZE=655360
|
CONFIG_RAM_SIZE=262144
|
||||||
CONFIG_RAM_START=0x00000000
|
CONFIG_RAM_START=0x00000000
|
||||||
CONFIG_RAW_BINARY=y
|
CONFIG_RAW_BINARY=y
|
||||||
|
CONFIG_RX65N_SCI0=y
|
||||||
|
CONFIG_RX65N_SCI1=y
|
||||||
|
CONFIG_RX65N_SCI2=y
|
||||||
|
CONFIG_RX65N_SCI5=y
|
||||||
|
CONFIG_RX65N_SCI6=y
|
||||||
|
CONFIG_RX65N_SCI8=y
|
||||||
|
CONFIG_SCI0_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI0_BAUD=115200
|
||||||
|
CONFIG_SCI1_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_SCI1_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI1_BAUD=115200
|
||||||
|
CONFIG_SCI2_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI2_BAUD=115200
|
||||||
|
CONFIG_SCI5_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI5_BAUD=921600
|
||||||
|
CONFIG_SCI6_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI6_BAUD=115200
|
||||||
|
CONFIG_SCI8_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI8_BAUD=115200
|
||||||
|
CONFIG_RX65N_EMAC=y
|
||||||
CONFIG_RX65N_EMAC0=y
|
CONFIG_RX65N_EMAC0=y
|
||||||
CONFIG_RX65N_EMAC0_PHYADDR=0
|
|
||||||
CONFIG_RX65N_EMAC0_PHYSR=30
|
CONFIG_RX65N_EMAC0_PHYSR=30
|
||||||
CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18
|
CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18
|
||||||
CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08
|
CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08
|
||||||
@@ -65,16 +79,42 @@ CONFIG_RX65N_EMAC0_PHYSR_10HD=0x04
|
|||||||
CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y
|
CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y
|
||||||
CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c
|
CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c
|
||||||
CONFIG_RX65N_EMAC0_RMII=y
|
CONFIG_RX65N_EMAC0_RMII=y
|
||||||
CONFIG_RX65N_SCI0=y
|
CONFIG_RX65N_EMAC0_PHYADDR=0
|
||||||
|
CONFIG_SCHED_WORKQUEUE=y
|
||||||
CONFIG_SCHED_HPWORK=y
|
CONFIG_SCHED_HPWORK=y
|
||||||
CONFIG_SCHED_LPWORK=y
|
CONFIG_SCHED_LPWORK=y
|
||||||
CONFIG_SCI1_SERIAL_CONSOLE=y
|
|
||||||
CONFIG_SCI5_BAUD=921600
|
|
||||||
CONFIG_SDCLONE_DISABLE=y
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
|
||||||
CONFIG_SYSTEM_NSH=y
|
|
||||||
CONFIG_SYSTEM_NSH_PRIORITY=50
|
|
||||||
CONFIG_SYSTEM_PING=y
|
CONFIG_SYSTEM_PING=y
|
||||||
|
CONFIG_ICU=y
|
||||||
|
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||||
CONFIG_TASK_NAME_SIZE=0
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
CONFIG_USERMAIN_STACKSIZE=1024
|
|
||||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_USERMAIN_STACKSIZE=1024
|
||||||
|
CONFIG_IDLETHREAD_STACKSIZE=1024
|
||||||
|
CONFIG_FS_PROCFS=y
|
||||||
|
CONFIG_FS_PROCFS_REGISTER=y
|
||||||
|
CONFIG_NET_ETH_PKTSIZE = 590
|
||||||
|
CONFIG_RX65N_CMTW0=y
|
||||||
|
CONFIG_RX65N_PERIB=y
|
||||||
|
CONFIG_NETUTILS_DHCPC=y
|
||||||
|
CONFIG_NETUTILS_DHCPD=y
|
||||||
|
CONFIG_NSH_DHCPC=y
|
||||||
|
CONFIG_NETINIT_DHCPC=y
|
||||||
|
CONFIG_SYSTEM_NSH_PRIORITY=50
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER=y
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER_STACKSIZE=2048
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER_PRIORITY=50
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER_DEVPATH="/dev/ttyS2"
|
||||||
|
CONFIG_EXAMPLES_SERIALRX=y
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_STACKSIZE=2048
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_PRIORITY=75
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_BUFSIZE=11520
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_DEVPATH="/dev/ttyS0"
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y
|
||||||
|
CONFIG_RTC=y
|
||||||
|
CONFIG_RTC_HIRES=y
|
||||||
|
CONFIG_RTC_ALARM=y
|
||||||
|
CONFIG_RX65N_RTC=y
|
||||||
|
CONFIG_RX65N_CARRY=y
|
||||||
|
CONFIG_RTC_DRIVER=y
|
||||||
|
CONFIG_NSH_ARCHINIT=y
|
||||||
@@ -5,22 +5,24 @@
|
|||||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
# modifications.
|
# modifications.
|
||||||
#
|
#
|
||||||
CONFIG_ARCH="renesas"
|
|
||||||
CONFIG_ARCH_BOARD="rx65n-grrose"
|
|
||||||
CONFIG_ARCH_BOARD_RX65N_GRROSE=y
|
CONFIG_ARCH_BOARD_RX65N_GRROSE=y
|
||||||
CONFIG_ARCH_CHIP="rx65n"
|
CONFIG_ARCH_BOARD="rx65n-grrose"
|
||||||
CONFIG_ARCH_CHIP_R5F565NEHDFP=y
|
CONFIG_ARCH_CHIP_R5F565NEHDFP=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=1024
|
|
||||||
CONFIG_ARCH_RENESAS=y
|
CONFIG_ARCH_RENESAS=y
|
||||||
CONFIG_ARCH_STACKDUMP=y
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
|
CONFIG_ARCH="renesas"
|
||||||
|
CONFIG_ARCH_CHIP="rx65n"
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=15001
|
CONFIG_BOARD_LOOPSPERMSEC=15001
|
||||||
CONFIG_BUILTIN=y
|
|
||||||
CONFIG_DEBUG_FEATURES=y
|
|
||||||
CONFIG_MAX_TASKS=8
|
|
||||||
CONFIG_MOTOROLA_SREC=y
|
CONFIG_MOTOROLA_SREC=y
|
||||||
|
CONFIG_ENDIAN_LITTLE=y
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_MAX_TASKS=8
|
||||||
|
CONFIG_DEBUG_FEATURES=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=1024
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
CONFIG_NFILE_DESCRIPTORS=8
|
CONFIG_NFILE_DESCRIPTORS=8
|
||||||
CONFIG_NFILE_STREAMS=8
|
CONFIG_NFILE_STREAMS=8
|
||||||
CONFIG_NSH_BUILTIN_APPS=y
|
|
||||||
CONFIG_NSH_FILEIOSIZE=512
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
CONFIG_NSH_LINELEN=64
|
CONFIG_NSH_LINELEN=64
|
||||||
CONFIG_NSH_READLINE=y
|
CONFIG_NSH_READLINE=y
|
||||||
@@ -31,10 +33,29 @@ CONFIG_RAM_SIZE=655360
|
|||||||
CONFIG_RAM_START=0x00000000
|
CONFIG_RAM_START=0x00000000
|
||||||
CONFIG_RAW_BINARY=y
|
CONFIG_RAW_BINARY=y
|
||||||
CONFIG_RX65N_SCI0=y
|
CONFIG_RX65N_SCI0=y
|
||||||
|
CONFIG_RX65N_SCI1=y
|
||||||
|
CONFIG_RX65N_SCI2=y
|
||||||
|
CONFIG_RX65N_SCI5=y
|
||||||
|
CONFIG_RX65N_SCI6=y
|
||||||
|
CONFIG_RX65N_SCI8=y
|
||||||
|
CONFIG_SCI0_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI0_BAUD=115200
|
||||||
CONFIG_SCI1_SERIAL_CONSOLE=y
|
CONFIG_SCI1_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_SCI1_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI1_BAUD=115200
|
||||||
|
CONFIG_SCI2_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI2_BAUD=115200
|
||||||
|
CONFIG_SCI5_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI5_BAUD=115200
|
||||||
|
CONFIG_SCI6_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI6_BAUD=115200
|
||||||
|
CONFIG_SCI8_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI8_BAUD=115200
|
||||||
CONFIG_SDCLONE_DISABLE=y
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
|
CONFIG_ICU=y
|
||||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||||
CONFIG_SYSTEM_NSH=y
|
|
||||||
CONFIG_TASK_NAME_SIZE=0
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
CONFIG_USERMAIN_STACKSIZE=1024
|
|
||||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_USERMAIN_STACKSIZE=1024
|
||||||
|
CONFIG_IDLETHREAD_STACKSIZE=1024
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
README
|
||||||
|
======
|
||||||
|
|
||||||
|
Overview
|
||||||
|
--------
|
||||||
|
This directory contains logic to support a custom ROMFS start-up script.
|
||||||
|
This startup script is used by by the NSH when it starts provided that
|
||||||
|
CONFIG_NSH_ARCHROMFS=y. The script provides a ROMFS volume that will be
|
||||||
|
mounted at /etc and will look like this at run-time:
|
||||||
|
|
||||||
|
NuttShell (NSH) NuttX-8.2
|
||||||
|
nsh> ls -l /etc
|
||||||
|
/etc:
|
||||||
|
dr-xr-xr-x 0 .
|
||||||
|
-r--r--r-- 20 group
|
||||||
|
dr-xr-xr-x 0 init.d/
|
||||||
|
-r--r--r-- 35 passwd
|
||||||
|
/etc/init.d:
|
||||||
|
dr-xr-xr-x 0 ..
|
||||||
|
-r--r--r-- 110 rcS
|
||||||
|
nsh>
|
||||||
|
|
||||||
|
/etc/init.d/rcS is the start-up script; /etc/passwd is a the password
|
||||||
|
file. It supports a single user:
|
||||||
|
|
||||||
|
USERNAME: admin
|
||||||
|
PASSWORD: Adminstrator
|
||||||
|
|
||||||
|
nsh> cat /etc/passwd
|
||||||
|
admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/
|
||||||
|
|
||||||
|
The encrypted passwords in the provided passwd file are only valid if the
|
||||||
|
TEA key is set to: 012345678 9abcdef0 012345678 9abcdef0. Changes to either
|
||||||
|
the key or the password word will require regeneration of the nsh_romfimg.h
|
||||||
|
header file.
|
||||||
|
|
||||||
|
The format of the password file is:
|
||||||
|
|
||||||
|
user:x:uid:gid:home
|
||||||
|
|
||||||
|
Where:
|
||||||
|
user: User name
|
||||||
|
x: Encrypted password
|
||||||
|
uid: User ID (0 for now)
|
||||||
|
gid: Group ID (0 for now)
|
||||||
|
home: Login directory (/ for now)
|
||||||
|
|
||||||
|
/etc/group is a group file. It is not currently used.
|
||||||
|
|
||||||
|
nsh> cat /etc/group
|
||||||
|
root:*:0:root,admin
|
||||||
|
|
||||||
|
The format of the group file is:
|
||||||
|
|
||||||
|
group:x:gid:users
|
||||||
|
|
||||||
|
Where:
|
||||||
|
group: The group name
|
||||||
|
x: Group password
|
||||||
|
gid: Group ID
|
||||||
|
users: A comma separated list of members of the group
|
||||||
|
|
||||||
|
/etc/init.d/rcS should have the following contents :
|
||||||
|
vi rcS
|
||||||
|
echo "This is NuttX"
|
||||||
|
|
||||||
|
Updating the ROMFS File System
|
||||||
|
------------------------------
|
||||||
|
The content on the nsh_romfsimg.h header file is generated from a sample
|
||||||
|
directory structure. That directory structure is contained in the etc/ directory and can be modified per the following steps:
|
||||||
|
|
||||||
|
|
||||||
|
1. Change directory to etc/:
|
||||||
|
|
||||||
|
cd etc/
|
||||||
|
|
||||||
|
2. Make modifications as desired.
|
||||||
|
|
||||||
|
3. Create the new ROMFS image.
|
||||||
|
|
||||||
|
genromfs -f romfs_img -d etc -V SimEtcVol
|
||||||
|
|
||||||
|
4. Convert the ROMFS image to a C header file
|
||||||
|
|
||||||
|
xxd -i romfs_img >nsh_romfsimg.h
|
||||||
|
|
||||||
|
5. Edit nsh_romfsimg.h, mark both data definitions as 'const' so that
|
||||||
|
that will be stored in FLASH.
|
||||||
|
|
||||||
@@ -1,44 +1,29 @@
|
|||||||
/***************************************************************************
|
/****************************************************************************
|
||||||
* boards/renesas/rx65n/rx65n-grrose/include/board.h
|
* boards/renesas/rx65n/rx65n-grrose/include/board.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
****************************************************************************/
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __BOARDS_RENESAS_RX65N_RX65N_GRROSE_INCLUDE_BOARD_H
|
#ifndef __BOARDS_RENESAS_RX65N_RX65N_GRROSE_INCLUDE_BOARD_H
|
||||||
#define __BOARDS_RENESAS_RX65N_RX65N_GRROSE_INCLUDE_BOARD_H
|
#define __BOARDS_RENESAS_RX65N_RX65N_GRROSE_INCLUDE_BOARD_H
|
||||||
|
|
||||||
/***************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
@@ -46,9 +31,9 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Clocking ****************************************************************/
|
/* Clocking *****************************************************************/
|
||||||
|
|
||||||
#define RX_CLK_1MHz (1000UL * 1000UL)
|
#define RX_CLK_1MHz (1000UL * 1000UL)
|
||||||
#define RX_FCLK ( 60 * RX_CLK_1MHz)
|
#define RX_FCLK ( 60 * RX_CLK_1MHz)
|
||||||
@@ -137,10 +122,6 @@ extern "C"
|
|||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ SECTIONS
|
|||||||
} > ROM
|
} > ROM
|
||||||
/* RSK-RX65N-1MB */
|
/* RSK-RX65N-1MB */
|
||||||
|
|
||||||
.text 0xFFF00000: AT(0xFFF00000)
|
/* .text 0xFFF00000: AT(0xFFF00000) */
|
||||||
|
|
||||||
/* RSK-RX65N-2MB | GR-ROSE */
|
/* RSK-RX65N-2MB | GR-ROSE */
|
||||||
/*.text 0xFFE00000: AT(0xFFE00000) */
|
.text 0xFFE00000: AT(0xFFE00000)
|
||||||
{
|
{
|
||||||
*(.text)
|
*(.text)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|||||||
@@ -1,35 +1,20 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# configs/rx65n-grrose/src/Makefile
|
# configs/rx65n-grrose/src/Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
# Author: Anjana <anjana@tataelxsi.co.in>
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership. The
|
||||||
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance with the
|
||||||
|
# License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
#
|
#
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# notice, this list of conditions and the following disclaimer.
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# notice, this list of conditions and the following disclaimer in
|
# License for the specific language governing permissions and limitations
|
||||||
# the documentation and/or other materials provided with the
|
# under the License.
|
||||||
# distribution.
|
|
||||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
@@ -41,7 +26,7 @@ CFLAGS += -I=$(ARCH_SRCDIR)/chip
|
|||||||
|
|
||||||
ASRCS =
|
ASRCS =
|
||||||
AOBJS = $(ASRCS:.asm=$(OBJEXT))
|
AOBJS = $(ASRCS:.asm=$(OBJEXT))
|
||||||
CSRCS = rx65n_main.c
|
CSRCS = rx65n_appinit.c rx65n_bringup.c
|
||||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||||
|
|
||||||
SRCS = $(ASRCS) $(CSRCS)
|
SRCS = $(ASRCS) $(CSRCS)
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* boards/renesas/rx65n/rx65n-grrose/src/rx65n_appinit.c
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_LIB_BOARDCTL
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_app_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Perform application specific initialization. This function is never
|
||||||
|
* called directly from application code, but only indirectly via the
|
||||||
|
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||||
|
*
|
||||||
|
* CONFIG_LIB_BOARDCTL=y :
|
||||||
|
* Called from the NSH library
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, &&
|
||||||
|
* CONFIG_LIB_BOARDCTL=n :
|
||||||
|
* Called from board_late_initialize().
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||||
|
* implementation without modification. The argument has no
|
||||||
|
* meaning to NuttX; the meaning of the argument is a contract
|
||||||
|
* between the board-specific initialization logic and the
|
||||||
|
* matching application logic. The value cold be such things as a
|
||||||
|
* mode enumeration value, a set of DIP switch switch settings, a
|
||||||
|
* pointer to configuration data read from a file or serial FLASH,
|
||||||
|
* or whatever you would like to do with it. Every implementation
|
||||||
|
* should accept zero/NULL as a default configuration.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||||
|
* any failure to indicate the nature of the failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int board_app_initialize(uintptr_t arg)
|
||||||
|
{
|
||||||
|
/* Did we already initialize via board_late_initialize()? */
|
||||||
|
|
||||||
|
#ifndef CONFIG_BOARD_LATE_INITIALIZE
|
||||||
|
return rx65n_bringup();
|
||||||
|
#else
|
||||||
|
return OK;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_LIB_BOARDCTL */
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* boards/renesas/rx65n/rx65n-grrose/src/rx65n_bringup.c
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#include <syslog.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
|
#include <rx65n_definitions.h>
|
||||||
|
#ifdef CONFIG_LIB_BOARDCTL
|
||||||
|
|
||||||
|
#ifdef HAVE_RTC_DRIVER
|
||||||
|
# include <nuttx/timers/rtc.h>
|
||||||
|
# include "rx65n_rtc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rtc_driver_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Initialize and register the RTC driver.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_RTC_DRIVER
|
||||||
|
static int rtc_driver_initialize(void)
|
||||||
|
{
|
||||||
|
FAR struct rtc_lowerhalf_s *lower;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Instantiate the rx65n lower-half RTC driver */
|
||||||
|
|
||||||
|
lower = rx65n_rtc_lowerhalf();
|
||||||
|
if (lower == NULL)
|
||||||
|
{
|
||||||
|
serr("ERROR: Failed to instantiate the RTC lower-half driver\n");
|
||||||
|
ret = -ENOMEM;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Bind the lower half driver and register the combined RTC driver
|
||||||
|
* as /dev/rtc0
|
||||||
|
*/
|
||||||
|
|
||||||
|
ret = rtc_initialize(0, lower);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_bringup
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Perform architecture-specific initialization
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||||
|
* Called from board_late_initialize().
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
|
||||||
|
* Called from the NSH library
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int rx65n_bringup(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
#ifdef HAVE_RTC_DRIVER
|
||||||
|
ret = rtc_driver_initialize();
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: rtc_driver_initialize failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
|
||||||
|
/* Mount the procfs file system */
|
||||||
|
|
||||||
|
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR,
|
||||||
|
"ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||||
|
ret, errno);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (CONFIG_ARCH_HAVE_LEDS) && (CONFIG_ARCH_LEDS)
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled1_on
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns on LED 0
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled1_on(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled2_on
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns on LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled2_on(int led)
|
||||||
|
{
|
||||||
|
LED1 = LED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled_on
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns on LED 0 & LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled_on(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_ON;
|
||||||
|
LED1 = LED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled1_off
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns off LED 0
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled1_off(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled2_off
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns off LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled2_off(int led)
|
||||||
|
{
|
||||||
|
LED1 = LED_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled_off
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns off LED 0 & LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled_off(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_OFF;
|
||||||
|
LED1 = LED_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/rx65n-grrose/src/rx65n.main.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
*Included files
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#include "rx65n_macrodriver.h"
|
|
||||||
#include "arch/board/board.h"
|
|
||||||
#include "rx65n_definitions.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled1_on
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns on LED 0
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled1_on(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled2_on
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns on LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled2_on(int led)
|
|
||||||
{
|
|
||||||
LED1 = LED_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled_on
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns on LED 0 & LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled_on(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_ON;
|
|
||||||
LED1 = LED_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled1_off
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns off LED 0
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled1_off(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled2_off
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns off LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled2_off(int led)
|
|
||||||
{
|
|
||||||
LED1 = LED_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled_off
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns off LED 0 & LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled_off(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_OFF;
|
|
||||||
LED1 = LED_OFF;
|
|
||||||
}
|
|
||||||
@@ -11,6 +11,7 @@ Contents
|
|||||||
- Serial Console
|
- Serial Console
|
||||||
- LEDs
|
- LEDs
|
||||||
- Networking
|
- Networking
|
||||||
|
- RTC
|
||||||
- Debugging
|
- Debugging
|
||||||
|
|
||||||
Board Features
|
Board Features
|
||||||
@@ -177,6 +178,22 @@ Configure UDP blaster application as mentioned below :
|
|||||||
CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801 (10.75.24.1) ------> Gateway IP
|
CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801 (10.75.24.1) ------> Gateway IP
|
||||||
CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00 (255.255.254.0) --------> Netmask
|
CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00 (255.255.254.0) --------> Netmask
|
||||||
CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b (10.75.24.155) ---------> Target IP
|
CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b (10.75.24.155) ---------> Target IP
|
||||||
|
RTC
|
||||||
|
==========
|
||||||
|
|
||||||
|
NuttX Configurations
|
||||||
|
---------------
|
||||||
|
The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled.
|
||||||
|
|
||||||
|
RTC Testing
|
||||||
|
------------------
|
||||||
|
The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed
|
||||||
|
as part of RTC testing.
|
||||||
|
|
||||||
|
The following configurations are to be enabled as part of testing RTC examples.
|
||||||
|
CONFIG_EXAMPLES_ALARM
|
||||||
|
CONFIG_EXAMPLES_PERIODIC
|
||||||
|
CONFIG_EXAMPLES_CARRY
|
||||||
|
|
||||||
Debugging
|
Debugging
|
||||||
==========
|
==========
|
||||||
@@ -210,3 +227,8 @@ endif
|
|||||||
Select Motorola SREC format.
|
Select Motorola SREC format.
|
||||||
4. Download Renesas flash programmer tool from https://www.renesas.com/in/en/products/software-tools/tools/programmer/renesas-flash-programmer-programming-gui.html#downloads
|
4. Download Renesas flash programmer tool from https://www.renesas.com/in/en/products/software-tools/tools/programmer/renesas-flash-programmer-programming-gui.html#downloads
|
||||||
5. Refer to the user manual document, for steps to flash NuttX binary using RFP tool.
|
5. Refer to the user manual document, for steps to flash NuttX binary using RFP tool.
|
||||||
|
Changes Made in NuttX 8.2 Code
|
||||||
|
================================
|
||||||
|
1. In wd_start.c file, in function wd_expiration(), typecasting is done when the signal handler nxsig_timeout() is invoked.
|
||||||
|
2. In rtc.c, (drivers/timers/rtc.c) file, in function rtc_periodic_callback(), alarminfo->active = false is commented.
|
||||||
|
The reason being, periodic interrupt should not be disabled. Uncommenting the above mentioned line (alarminfo->active = false), will make the periodic interrupt come only once.
|
||||||
|
|||||||
@@ -5,58 +5,60 @@
|
|||||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
# modifications.
|
# modifications.
|
||||||
#
|
#
|
||||||
CONFIG_ARCH="renesas"
|
|
||||||
CONFIG_ARCH_BOARD="rx65n-rsk2mb"
|
|
||||||
CONFIG_ARCH_BOARD_RX65N_RSK2MB=y
|
CONFIG_ARCH_BOARD_RX65N_RSK2MB=y
|
||||||
CONFIG_ARCH_CHIP="rx65n"
|
CONFIG_ARCH_BOARD="rx65n"
|
||||||
CONFIG_ARCH_CHIP_R5F565NEHDFC=y
|
CONFIG_ARCH_CHIP_R5F565NEHDFC=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=1024
|
|
||||||
CONFIG_ARCH_RENESAS=y
|
CONFIG_ARCH_RENESAS=y
|
||||||
CONFIG_ARCH_STACKDUMP=y
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
|
CONFIG_ARCH="renesas"
|
||||||
|
CONFIG_ARCH_CHIP="rx65n"
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=15001
|
CONFIG_BOARD_LOOPSPERMSEC=15001
|
||||||
CONFIG_BUILTIN=y
|
|
||||||
CONFIG_DEBUG_FEATURES=y
|
|
||||||
CONFIG_EXAMPLES_SERIALBLASTER=y
|
|
||||||
CONFIG_EXAMPLES_SERIALRX=y
|
|
||||||
CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y
|
|
||||||
CONFIG_EXAMPLES_SERIALRX_PRIORITY=75
|
|
||||||
CONFIG_FS_PROCFS=y
|
|
||||||
CONFIG_FS_PROCFS_REGISTER=y
|
|
||||||
CONFIG_MAX_TASKS=8
|
|
||||||
CONFIG_MOTOROLA_SREC=y
|
CONFIG_MOTOROLA_SREC=y
|
||||||
|
CONFIG_ENDIAN_LITTLE=y
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_MAX_TASKS=8
|
||||||
|
CONFIG_DEBUG_FEATURES=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=1024
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_ETH0_PHY_DP83620=y
|
||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
CONFIG_NETDB_DNSCLIENT=y
|
CONFIG_NETDB_DNSCLIENT=y
|
||||||
CONFIG_NETDB_DNSSERVER_NOADDR=y
|
CONFIG_NETDB_DNSSERVER_NOADDR=y
|
||||||
CONFIG_NETDEV_PHY_IOCTL=y
|
CONFIG_NETDEV_PHY_IOCTL=y
|
||||||
CONFIG_NETDEV_STATISTICS=y
|
CONFIG_NETDEV_STATISTICS=y
|
||||||
CONFIG_NETINIT_DHCPC=y
|
|
||||||
CONFIG_NETUTILS_DHCPC=y
|
|
||||||
CONFIG_NETUTILS_DHCPD=y
|
|
||||||
CONFIG_NETUTILS_TFTPC=y
|
CONFIG_NETUTILS_TFTPC=y
|
||||||
CONFIG_NETUTILS_WEBCLIENT=y
|
CONFIG_NETUTILS_WEBCLIENT=y
|
||||||
CONFIG_NET_ARP_SEND=y
|
CONFIG_NET_ARP_SEND=y
|
||||||
CONFIG_NET_BROADCAST=y
|
CONFIG_NET_BROADCAST=y
|
||||||
CONFIG_NET_ICMP=y
|
CONFIG_NET_ICMP=y
|
||||||
CONFIG_NET_ICMP_SOCKET=y
|
CONFIG_NET_ICMP_SOCKET=y
|
||||||
|
CONFIG_NET_SOCKOPTS=y
|
||||||
CONFIG_NET_STATISTICS=y
|
CONFIG_NET_STATISTICS=y
|
||||||
CONFIG_NET_TCP=y
|
CONFIG_NET_TCP=y
|
||||||
CONFIG_NET_TCPBACKLOG=y
|
CONFIG_NET_TCPBACKLOG=y
|
||||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||||
CONFIG_NET_UDP=y
|
CONFIG_NET_UDP=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
CONFIG_NFILE_DESCRIPTORS=8
|
CONFIG_NFILE_DESCRIPTORS=8
|
||||||
CONFIG_NFILE_STREAMS=8
|
CONFIG_NFILE_STREAMS=8
|
||||||
CONFIG_NSH_BUILTIN_APPS=y
|
|
||||||
CONFIG_NSH_FILEIOSIZE=512
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
CONFIG_NSH_LINELEN=64
|
CONFIG_NSH_LINELEN=64
|
||||||
CONFIG_NSH_READLINE=y
|
CONFIG_NSH_READLINE=y
|
||||||
CONFIG_NUNGET_CHARS=0
|
CONFIG_NUNGET_CHARS=0
|
||||||
CONFIG_PREALLOC_TIMERS=0
|
CONFIG_PREALLOC_TIMERS=0
|
||||||
CONFIG_PTHREAD_STACK_DEFAULT=1024
|
CONFIG_PTHREAD_STACK_DEFAULT=1024
|
||||||
CONFIG_RAM_SIZE=655360
|
CONFIG_RAM_SIZE=262144
|
||||||
CONFIG_RAM_START=0x00000000
|
CONFIG_RAM_START=0x00000000
|
||||||
|
CONFIG_RAMDISK_SIZE=393216
|
||||||
|
CONFIG_RAMDISK_START=0x00800000
|
||||||
CONFIG_RAW_BINARY=y
|
CONFIG_RAW_BINARY=y
|
||||||
|
CONFIG_SCI2_SERIALDRIVER=y
|
||||||
|
CONFIG_RX65N_SCI2=y
|
||||||
|
CONFIG_SCI8_SERIALDRIVER=y
|
||||||
|
CONFIG_SCI8_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_RX65N_SCI8=y
|
||||||
|
CONFIG_RX65N_EMAC=y
|
||||||
CONFIG_RX65N_EMAC0=y
|
CONFIG_RX65N_EMAC0=y
|
||||||
CONFIG_RX65N_EMAC0_PHYADDR=30
|
|
||||||
CONFIG_RX65N_EMAC0_PHYSR=30
|
CONFIG_RX65N_EMAC0_PHYSR=30
|
||||||
CONFIG_RX65N_EMAC0_PHYSR_100FD=0x4
|
CONFIG_RX65N_EMAC0_PHYSR_100FD=0x4
|
||||||
CONFIG_RX65N_EMAC0_PHYSR_100HD=0x0
|
CONFIG_RX65N_EMAC0_PHYSR_100HD=0x0
|
||||||
@@ -64,16 +66,42 @@ CONFIG_RX65N_EMAC0_PHYSR_10FD=0x6
|
|||||||
CONFIG_RX65N_EMAC0_PHYSR_10HD=0x2
|
CONFIG_RX65N_EMAC0_PHYSR_10HD=0x2
|
||||||
CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y
|
CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y
|
||||||
CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x6
|
CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x6
|
||||||
CONFIG_RX65N_SCI2=y
|
CONFIG_RX65N_EMAC0_MII=y
|
||||||
CONFIG_RX65N_SCI8=y
|
CONFIG_RX65N_EMAC0_PHYADDR=30
|
||||||
|
CONFIG_SCHED_WORKQUEUE=y
|
||||||
CONFIG_SCHED_HPWORK=y
|
CONFIG_SCHED_HPWORK=y
|
||||||
CONFIG_SCHED_LPWORK=y
|
CONFIG_SCHED_LPWORK=y
|
||||||
CONFIG_SCI8_SERIAL_CONSOLE=y
|
|
||||||
CONFIG_SDCLONE_DISABLE=y
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
|
||||||
CONFIG_SYSTEM_NSH=y
|
|
||||||
CONFIG_SYSTEM_NSH_PRIORITY=50
|
|
||||||
CONFIG_SYSTEM_PING=y
|
CONFIG_SYSTEM_PING=y
|
||||||
|
CONFIG_ICU=y
|
||||||
|
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||||
CONFIG_TASK_NAME_SIZE=0
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
CONFIG_USERMAIN_STACKSIZE=1024
|
|
||||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_USERMAIN_STACKSIZE=1024
|
||||||
|
CONFIG_FS_PROCFS=y
|
||||||
|
CONFIG_FS_PROCFS_REGISTER=y
|
||||||
|
CONFIG_NET_ETH_PKTSIZE = 590
|
||||||
|
CONFIG_RX65N_CMTW0=y
|
||||||
|
CONFIG_RX65N_PERIB=y
|
||||||
|
CONFIG_NETUTILS_DHCPC=y
|
||||||
|
CONFIG_NETUTILS_DHCPD=y
|
||||||
|
CONFIG_NSH_DHCPC=y
|
||||||
|
CONFIG_NETINIT_DHCPC=y
|
||||||
|
CONFIG_SYSTEM_NSH_PRIORITY=50
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER=y
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER_STACKSIZE=2048
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER_PRIORITY=50
|
||||||
|
CONFIG_EXAMPLES_SERIALBLASTER_DEVPATH="/dev/ttyS2"
|
||||||
|
CONFIG_EXAMPLES_SERIALRX=y
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_STACKSIZE=2048
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_PRIORITY=75
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_BUFSIZE=11520
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_DEVPATH="/dev/ttyS0"
|
||||||
|
CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y
|
||||||
|
CONFIG_RTC=y
|
||||||
|
CONFIG_RTC_HIRES=y
|
||||||
|
CONFIG_RTC_ALARM=y
|
||||||
|
CONFIG_RX65N_RTC=y
|
||||||
|
CONFIG_RX65N_CARRY=y
|
||||||
|
CONFIG_RTC_DRIVER=y
|
||||||
|
CONFIG_NSH_ARCHINIT=y
|
||||||
|
|||||||
@@ -7,21 +7,30 @@
|
|||||||
#
|
#
|
||||||
# CONFIG_NSH_DISABLE_IFCONFIG is not set
|
# CONFIG_NSH_DISABLE_IFCONFIG is not set
|
||||||
# CONFIG_NSH_DISABLE_PS is not set
|
# CONFIG_NSH_DISABLE_PS is not set
|
||||||
CONFIG_ARCH="renesas"
|
|
||||||
CONFIG_ARCH_BOARD="rx65n-rsk2mb"
|
|
||||||
CONFIG_ARCH_BOARD_RX65N_RSK2MB=y
|
CONFIG_ARCH_BOARD_RX65N_RSK2MB=y
|
||||||
CONFIG_ARCH_CHIP="rx65n"
|
CONFIG_ARCH_BOARD="rx65n"
|
||||||
CONFIG_ARCH_CHIP_R5F565NEHDFC=y
|
CONFIG_ARCH_CHIP_R5F565NEHDFC=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=1024
|
|
||||||
CONFIG_ARCH_RENESAS=y
|
CONFIG_ARCH_RENESAS=y
|
||||||
CONFIG_ARCH_STACKDUMP=y
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
CONFIG_BUILTIN=y
|
CONFIG_ARCH="renesas"
|
||||||
CONFIG_DEBUG_FEATURES=y
|
#CONFIG_BOARD_LOOPSPERMSEC=572
|
||||||
CONFIG_MAX_TASKS=8
|
#CONFIG_DISABLE_MOUNTPOINT=y
|
||||||
|
#CONFIG_DISABLE_MQUEUE=y
|
||||||
|
#CONFIG_DISABLE_POLL=y
|
||||||
|
#CONFIG_DISABLE_POSIX_TIMERS=y
|
||||||
|
#CONFIG_DISABLE_PTHREAD=y
|
||||||
|
#CONFIG_DISABLE_SIGNALS=y
|
||||||
CONFIG_MOTOROLA_SREC=y
|
CONFIG_MOTOROLA_SREC=y
|
||||||
|
CONFIG_ENDIAN_LITTLE=y
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_MAX_TASKS=8
|
||||||
|
CONFIG_DEBUG_FEATURES=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=1024
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
CONFIG_NFILE_DESCRIPTORS=8
|
CONFIG_NFILE_DESCRIPTORS=8
|
||||||
CONFIG_NFILE_STREAMS=8
|
CONFIG_NFILE_STREAMS=8
|
||||||
CONFIG_NSH_BUILTIN_APPS=y
|
#CONFIG_NSH_CONSOLE_LOGIN=y
|
||||||
CONFIG_NSH_FILEIOSIZE=512
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
CONFIG_NSH_LINELEN=64
|
CONFIG_NSH_LINELEN=64
|
||||||
CONFIG_NSH_READLINE=y
|
CONFIG_NSH_READLINE=y
|
||||||
@@ -31,12 +40,22 @@ CONFIG_PTHREAD_STACK_DEFAULT=1024
|
|||||||
CONFIG_RAM_SIZE=655360
|
CONFIG_RAM_SIZE=655360
|
||||||
CONFIG_RAM_START=0x00000000
|
CONFIG_RAM_START=0x00000000
|
||||||
CONFIG_RAW_BINARY=y
|
CONFIG_RAW_BINARY=y
|
||||||
CONFIG_RX65N_SCI2=y
|
#CONFIG_SCI0_SERIALDRIVER=y
|
||||||
CONFIG_RX65N_SCI8=y
|
#CONFIG_SCI0_SERIAL_CONSOLE=y
|
||||||
|
#CONFIG_RX65N_SCI0=y
|
||||||
|
#CONFIG_SCI1_SERIALDRIVER=y
|
||||||
|
#CONFIG_SCI1_SERIAL_CONSOLE=y
|
||||||
|
#CONFIG_RX65N_SCI1=y
|
||||||
|
CONFIG_SCI2_SERIALDRIVER=y
|
||||||
CONFIG_SCI2_SERIAL_CONSOLE=y
|
CONFIG_SCI2_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_RX65N_SCI2=y
|
||||||
|
CONFIG_SCI8_SERIALDRIVER=y
|
||||||
|
#CONFIG_SCI8_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_RX65N_SCI8=y
|
||||||
CONFIG_SDCLONE_DISABLE=y
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
|
CONFIG_ICU=y
|
||||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||||
CONFIG_SYSTEM_NSH=y
|
|
||||||
CONFIG_TASK_NAME_SIZE=0
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
CONFIG_USERMAIN_STACKSIZE=1024
|
|
||||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_USERMAIN_STACKSIZE=1024
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
README
|
||||||
|
======
|
||||||
|
|
||||||
|
Overview
|
||||||
|
--------
|
||||||
|
This directory contains logic to support a custom ROMFS start-up script.
|
||||||
|
This startup script is used by by the NSH when it starts provided that
|
||||||
|
CONFIG_NSH_ARCHROMFS=y. The script provides a ROMFS volume that will be
|
||||||
|
mounted at /etc and will look like this at run-time:
|
||||||
|
|
||||||
|
NuttShell (NSH) NuttX-8.2
|
||||||
|
nsh> ls -l /etc
|
||||||
|
/etc:
|
||||||
|
dr-xr-xr-x 0 .
|
||||||
|
-r--r--r-- 20 group
|
||||||
|
dr-xr-xr-x 0 init.d/
|
||||||
|
-r--r--r-- 35 passwd
|
||||||
|
/etc/init.d:
|
||||||
|
dr-xr-xr-x 0 ..
|
||||||
|
-r--r--r-- 110 rcS
|
||||||
|
nsh>
|
||||||
|
|
||||||
|
/etc/init.d/rcS is the start-up script; /etc/passwd is a the password
|
||||||
|
file. It supports a single user:
|
||||||
|
|
||||||
|
USERNAME: admin
|
||||||
|
PASSWORD: Adminstrator
|
||||||
|
|
||||||
|
nsh> cat /etc/passwd
|
||||||
|
admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/
|
||||||
|
|
||||||
|
The encrypted passwords in the provided passwd file are only valid if the
|
||||||
|
TEA key is set to: 012345678 9abcdef0 012345678 9abcdef0. Changes to either
|
||||||
|
the key or the password word will require regeneration of the nsh_romfimg.h
|
||||||
|
header file.
|
||||||
|
|
||||||
|
The format of the password file is:
|
||||||
|
|
||||||
|
user:x:uid:gid:home
|
||||||
|
|
||||||
|
Where:
|
||||||
|
user: User name
|
||||||
|
x: Encrypted password
|
||||||
|
uid: User ID (0 for now)
|
||||||
|
gid: Group ID (0 for now)
|
||||||
|
home: Login directory (/ for now)
|
||||||
|
|
||||||
|
/etc/group is a group file. It is not currently used.
|
||||||
|
|
||||||
|
nsh> cat /etc/group
|
||||||
|
root:*:0:root,admin
|
||||||
|
|
||||||
|
The format of the group file is:
|
||||||
|
|
||||||
|
group:x:gid:users
|
||||||
|
|
||||||
|
Where:
|
||||||
|
group: The group name
|
||||||
|
x: Group password
|
||||||
|
gid: Group ID
|
||||||
|
users: A comma separated list of members of the group
|
||||||
|
|
||||||
|
Updating the ROMFS File System
|
||||||
|
------------------------------
|
||||||
|
The content on the nsh_romfsimg.h header file is generated from a sample
|
||||||
|
directory structure. That directory structure is contained in the etc/ directory and can be modified per the following steps:
|
||||||
|
|
||||||
|
|
||||||
|
1. Change directory to etc/:
|
||||||
|
|
||||||
|
cd etc/
|
||||||
|
|
||||||
|
2. Make modifications as desired.
|
||||||
|
|
||||||
|
3. Create the new ROMFS image.
|
||||||
|
|
||||||
|
genromfs -f romfs_img -d etc -V SimEtcVol
|
||||||
|
|
||||||
|
4. Convert the ROMFS image to a C header file
|
||||||
|
|
||||||
|
xxd -i romfs_img >nsh_romfsimg.h
|
||||||
|
|
||||||
|
5. Edit nsh_romfsimg.h, mark both data definitions as 'const' so that
|
||||||
|
that will be stored in FLASH.
|
||||||
|
|
||||||
@@ -1,44 +1,29 @@
|
|||||||
/***************************************************************************
|
/****************************************************************************
|
||||||
* boards/renesas/rx65n/rx65n-rsk2mb/include/board.h
|
* boards/renesas/rx65n/rx65n-rsk2mb/include/board.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
****************************************************************************/
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __BOARDS_RENESAS_RX65N_RX65N_RSK2MB_INCLUDE_BOARD_H
|
#ifndef __BOARDS_RENESAS_RX65N_RX65N_RSK2MB_INCLUDE_BOARD_H
|
||||||
#define __BOARDS_RENESAS_RX65N_RX65N_RSK2MB_INCLUDE_BOARD_H
|
#define __BOARDS_RENESAS_RX65N_RX65N_RSK2MB_INCLUDE_BOARD_H
|
||||||
|
|
||||||
/***************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
@@ -46,9 +31,9 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
***************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Clocking ****************************************************************/
|
/* Clocking *****************************************************************/
|
||||||
|
|
||||||
#define RX_CLK_1MHz (1000UL * 1000UL)
|
#define RX_CLK_1MHz (1000UL * 1000UL)
|
||||||
#define RX_FCLK ( 60 * RX_CLK_1MHz)
|
#define RX_FCLK ( 60 * RX_CLK_1MHz)
|
||||||
@@ -137,10 +122,6 @@ extern "C"
|
|||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,35 +1,20 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# configs/rx65n-rsk2mb/src/Makefile
|
# configs/rx65n-rsk2mb/src/Makefile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
# Author: Anjana <anjana@tataelxsi.co.in>
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership. The
|
||||||
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance with the
|
||||||
|
# License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
#
|
#
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# notice, this list of conditions and the following disclaimer.
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# notice, this list of conditions and the following disclaimer in
|
# License for the specific language governing permissions and limitations
|
||||||
# the documentation and/or other materials provided with the
|
# under the License.
|
||||||
# distribution.
|
|
||||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
@@ -41,13 +26,14 @@ CFLAGS += -I=$(ARCH_SRCDIR)/chip
|
|||||||
|
|
||||||
ASRCS =
|
ASRCS =
|
||||||
AOBJS = $(ASRCS:.asm=$(OBJEXT))
|
AOBJS = $(ASRCS:.asm=$(OBJEXT))
|
||||||
CSRCS = rx65n_main.c
|
CSRCS = rx65n_appinit.c rx65n_bringup.c
|
||||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||||
|
|
||||||
SRCS = $(ASRCS) $(CSRCS)
|
SRCS = $(ASRCS) $(CSRCS)
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
CFLAGS += -I=$(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
CFLAGS += -I=$(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||||
|
CFLAGS += -I=$(TOPDIR)/arch/$(CONFIG_ARCH)/include
|
||||||
|
|
||||||
all: libboard$(LIBEXT)
|
all: libboard$(LIBEXT)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_appinit.c
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_LIB_BOARDCTL
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_app_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Perform application specific initialization. This function is never
|
||||||
|
* called directly from application code, but only indirectly via the
|
||||||
|
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||||
|
*
|
||||||
|
* CONFIG_LIB_BOARDCTL=y :
|
||||||
|
* Called from the NSH library
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, &&
|
||||||
|
* CONFIG_LIB_BOARDCTL=n :
|
||||||
|
* Called from board_late_initialize().
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||||
|
* implementation without modification. The argument has no
|
||||||
|
* meaning to NuttX; the meaning of the argument is a contract
|
||||||
|
* between the board-specific initialization logic and the
|
||||||
|
* matching application logic. The value cold be such things as a
|
||||||
|
* mode enumeration value, a set of DIP switch switch settings, a
|
||||||
|
* pointer to configuration data read from a file or serial FLASH,
|
||||||
|
* or whatever you would like to do with it. Every implementation
|
||||||
|
* should accept zero/NULL as a default configuration.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||||
|
* any failure to indicate the nature of the failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int board_app_initialize(uintptr_t arg)
|
||||||
|
{
|
||||||
|
/* Did we already initialize via board_late_initialize()? */
|
||||||
|
|
||||||
|
#ifndef CONFIG_BOARD_LATE_INITIALIZE
|
||||||
|
return rx65n_bringup();
|
||||||
|
#else
|
||||||
|
return OK;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_LIB_BOARDCTL */
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n.bringup.c
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#include <syslog.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
|
#include <rx65n_definitions.h>
|
||||||
|
#ifdef CONFIG_LIB_BOARDCTL
|
||||||
|
|
||||||
|
#ifdef HAVE_RTC_DRIVER
|
||||||
|
# include <nuttx/timers/rtc.h>
|
||||||
|
# include "rx65n_rtc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rtc_driver_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Initialize and register the RTC driver.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_RTC_DRIVER
|
||||||
|
static int rtc_driver_initialize(void)
|
||||||
|
{
|
||||||
|
FAR struct rtc_lowerhalf_s *lower;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Instantiate the rx65n lower-half RTC driver */
|
||||||
|
|
||||||
|
lower = rx65n_rtc_lowerhalf();
|
||||||
|
if (lower == NULL)
|
||||||
|
{
|
||||||
|
serr("ERROR: Failed to instantiate the RTC lower-half driver\n");
|
||||||
|
ret = -ENOMEM;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Bind the lower half driver and register the combined RTC driver
|
||||||
|
* as /dev/rtc0
|
||||||
|
*/
|
||||||
|
|
||||||
|
ret = rtc_initialize(0, lower);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: rx65n_bringup
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Perform architecture-specific initialization
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||||
|
* Called from board_late_initialize().
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
|
||||||
|
* Called from the NSH library
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int rx65n_bringup(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
#ifdef HAVE_RTC_DRIVER
|
||||||
|
ret = rtc_driver_initialize();
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: rtc_driver_initialize failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
|
||||||
|
/* Mount the procfs file system */
|
||||||
|
|
||||||
|
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR,
|
||||||
|
"ERROR: Failed to mount the PROC filesystem: %d (%d)\n",
|
||||||
|
ret, errno);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (CONFIG_ARCH_HAVE_LEDS) && (CONFIG_ARCH_LEDS)
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled1_on
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns on LED 0
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled1_on(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled2_on
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns on LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled2_on(int led)
|
||||||
|
{
|
||||||
|
LED1 = LED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled_on
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns on LED 0 & LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled_on(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_ON;
|
||||||
|
LED1 = LED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled1_off
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns off LED 0
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled1_off(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled2_off
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns off LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled2_off(int led)
|
||||||
|
{
|
||||||
|
LED1 = LED_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled_off
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Turns off LED 0 & LED 1
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled_off(int led)
|
||||||
|
{
|
||||||
|
LED0 = LED_OFF;
|
||||||
|
LED1 = LED_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/rx65n-grrose/src/rx65n.main.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Anjana <anjana@tataelxsi.co.in>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
*Included files
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#include "rx65n_macrodriver.h"
|
|
||||||
#include "arch/board/board.h"
|
|
||||||
#include "rx65n_definitions.h"
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled1_on
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns on LED 0
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled1_on(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled2_on
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns on LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled2_on(int led)
|
|
||||||
{
|
|
||||||
LED1 = LED_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled_on
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns on LED 0 & LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled_on(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_ON;
|
|
||||||
LED1 = LED_ON;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled1_off
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns off LED 0
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled1_off(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled2_off
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns off LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled2_off(int led)
|
|
||||||
{
|
|
||||||
LED1 = LED_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_autoled_off
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Turns off LED 0 & LED 1
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_autoled_off(int led)
|
|
||||||
{
|
|
||||||
LED0 = LED_OFF;
|
|
||||||
LED1 = LED_OFF;
|
|
||||||
}
|
|
||||||
@@ -5,22 +5,23 @@
|
|||||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
# modifications.
|
# modifications.
|
||||||
#
|
#
|
||||||
CONFIG_ARCH="renesas"
|
|
||||||
CONFIG_ARCH_BOARD="rx65n"
|
|
||||||
CONFIG_ARCH_BOARD_RX65N=y
|
CONFIG_ARCH_BOARD_RX65N=y
|
||||||
CONFIG_ARCH_CHIP="rx65n"
|
CONFIG_ARCH_BOARD="rx65n"
|
||||||
CONFIG_ARCH_CHIP_R5F565NEDDFC=y
|
CONFIG_ARCH_CHIP_R5F565NEDDFC=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=1024
|
|
||||||
CONFIG_ARCH_RENESAS=y
|
CONFIG_ARCH_RENESAS=y
|
||||||
CONFIG_ARCH_STACKDUMP=y
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
CONFIG_BUILTIN=y
|
CONFIG_ARCH="renesas"
|
||||||
|
CONFIG_MOTOROLA_SREC=y
|
||||||
|
CONFIG_ENDIAN_LITTLE=y
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_MAX_TASKS=8
|
||||||
CONFIG_DEBUG_FEATURES=y
|
CONFIG_DEBUG_FEATURES=y
|
||||||
CONFIG_DEBUG_SYMBOLS=y
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
CONFIG_MAX_TASKS=8
|
CONFIG_ARCH_INTERRUPTSTACK=1024
|
||||||
CONFIG_MOTOROLA_SREC=y
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
CONFIG_NFILE_DESCRIPTORS=8
|
CONFIG_NFILE_DESCRIPTORS=8
|
||||||
CONFIG_NFILE_STREAMS=8
|
CONFIG_NFILE_STREAMS=8
|
||||||
CONFIG_NSH_BUILTIN_APPS=y
|
|
||||||
CONFIG_NSH_FILEIOSIZE=512
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
CONFIG_NSH_LINELEN=64
|
CONFIG_NSH_LINELEN=64
|
||||||
CONFIG_NSH_READLINE=y
|
CONFIG_NSH_READLINE=y
|
||||||
@@ -30,11 +31,13 @@ CONFIG_PTHREAD_STACK_DEFAULT=1024
|
|||||||
CONFIG_RAM_SIZE=262144
|
CONFIG_RAM_SIZE=262144
|
||||||
CONFIG_RAM_START=0x00000000
|
CONFIG_RAM_START=0x00000000
|
||||||
CONFIG_RAW_BINARY=y
|
CONFIG_RAW_BINARY=y
|
||||||
CONFIG_RX65N_SCI2=y
|
CONFIG_SCI2_SERIALDRIVER=y
|
||||||
CONFIG_SCI2_SERIAL_CONSOLE=y
|
CONFIG_SCI2_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_RX65N_SCI2=y
|
||||||
CONFIG_SDCLONE_DISABLE=y
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
|
CONFIG_ICU=y
|
||||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||||
CONFIG_SYSTEM_NSH=y
|
|
||||||
CONFIG_TASK_NAME_SIZE=0
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
CONFIG_USERMAIN_STACKSIZE=1024
|
|
||||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_USERMAIN_STACKSIZE=1024
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user