atti board bsp update to nuttx 10.3

This commit is contained in:
wgzAIIT
2022-06-22 14:17:52 +08:00
parent f7ba07eaea
commit fc60ae4dbd
128 changed files with 348 additions and 3132 deletions
@@ -20,7 +20,7 @@
include $(TOPDIR)/Make.defs
CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c
CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c stm32_perfcount.c
ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += stm32_autoleds.c
@@ -28,10 +28,6 @@ else
CSRCS += stm32_userleds.c
endif
ifeq ($(CONFIG_SCHED_CRITMONITOR),y)
CSRCS += stm32_critmon.c
endif
ifeq ($(CONFIG_AUDIO_CS43L22),y)
CSRCS += stm32_cs43l22.c
endif
@@ -40,7 +36,7 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += stm32_buttons.c
endif
ifeq ($(CONFIG_CAN),y)
ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
CSRCS += stm32_can.c
endif
@@ -22,7 +22,7 @@
* @file aiit-arm32-board.h
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -571,7 +571,7 @@ int stm32_pwm_setup(void);
*
****************************************************************************/
#ifdef CONFIG_CAN
#ifdef CONFIG_STM32_CAN_CHARDRIVER
int stm32_can_setup(void);
#endif
@@ -22,7 +22,7 @@
* @file stm32_appinit.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_autoleds.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -41,7 +41,6 @@
#include <arch/board/board.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_boot.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -38,7 +38,7 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
#include "itm.h"
@@ -22,7 +22,7 @@
* @file stm32_bringup.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -81,6 +81,10 @@
#include "stm32_bmp180.h"
#endif
#ifdef CONFIG_SENSORS_MS5611
#include "stm32_ms5611.h"
#endif
#ifdef CONFIG_SENSORS_MAX6675
#include "stm32_max6675.h"
#endif
@@ -222,6 +226,17 @@ int stm32_bringup(void)
}
#endif
#ifdef CONFIG_SENSORS_MS5611
/* Initialize the MS5611 pressure sensor. */
ret = board_ms5611_initialize(0, 1);
if (ret < 0)
{
syslog(LOG_ERR, "Failed to initialize MS5611, error %d\n", ret);
return ret;
}
#endif
#ifdef CONFIG_SENSORS_BH1750FVI
ret = board_bh1750_initialize(0, 1);
if (ret < 0)
@@ -345,7 +360,7 @@ int stm32_bringup(void)
}
#endif
#ifdef CONFIG_CAN
#ifdef CONFIG_STM32_CAN_CHARDRIVER
/* Initialize CAN and register the CAN driver. */
ret = stm32_can_setup();
@@ -531,7 +546,7 @@ int stm32_bringup(void)
ret = stm32_gs2200m_initialize("/dev/gs2200m", 3);
if (ret < 0)
{
serr("ERROR: Failed to initialize GS2200M: %d \n", ret);
serr("ERROR: Failed to initialize GS2200M: %d\n", ret);
}
#endif
@@ -22,7 +22,7 @@
* @file stm32_buttons.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_can.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -40,8 +40,7 @@
#include <arch/board/board.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32.h"
#include "stm32_can.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_cs43l22.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_ds1307.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -109,7 +109,7 @@ int stm32_ds1307_init(void)
/* Synchronize the system time to the RTC time */
clock_synchronize();
clock_synchronize(NULL);
/* Now we are initialized */
@@ -22,7 +22,7 @@
* @file stm32_enc28j60.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -56,7 +56,6 @@
#include <arch/board/board.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32_spi.h"
@@ -22,7 +22,7 @@
* @file stm32_ethernet.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_extmem.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -40,8 +40,7 @@
#include <arch/board/board.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_gs2200m.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -42,7 +42,7 @@
#include <nuttx/spinlock.h>
#include <nuttx/wireless/gs2200m.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "chip.h"
#include "stm32.h"
@@ -116,7 +116,7 @@ static void gs2200m_irq_enable(void)
irqstate_t flags = spin_lock_irqsave(NULL);
uint32_t dready = 0;
wlinfo("== ec:%" PRId32 " called=%" PRId32 " \n",
wlinfo("== ec:%" PRId32 " called=%" PRId32 "\n",
_enable_count, _n_called++);
if (0 == _enable_count)
@@ -139,7 +139,7 @@ static void gs2200m_irq_enable(void)
{
/* Call g_irq_handler directly */
wlinfo("== ** call irq handler ** \n");
wlinfo("== ** call irq handler **\n");
g_irq_handler(0, NULL, g_irq_arg);
}
}
@@ -152,7 +152,7 @@ static void gs2200m_irq_disable(void)
{
irqstate_t flags = spin_lock_irqsave(NULL);
wlinfo("== ec:%" PRId32 " called=%" PRId32 " \n",
wlinfo("== ec:%" PRId32 " called=%" PRId32 "\n",
_enable_count, _n_called++);
_enable_count--;
@@ -22,7 +22,7 @@
* @file stm32_hciuart.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_idle.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_max7219.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_max7219_leds.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_mmcsd.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -40,7 +40,7 @@
#include <time.h>
#include <unistd.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "chip.h"
#include "stm32.h"
@@ -91,7 +91,7 @@ int stm32_mmcsd_initialize(int port, int minor)
stm32_configgpio(GPIO_MMCSD_NSS); /* Assign CS */
stm32_gpiowrite(GPIO_MMCSD_NSS, 1); /* Ensure the CS is inactive */
mcinfo("INFO: Initializing mmcsd port %d minor %d \n",
mcinfo("INFO: Initializing mmcsd port %d minor %d\n",
port, minor);
spi = stm32_spibus_initialize(port);
@@ -22,7 +22,7 @@
* @file stm32_netinit.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_ostest.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -41,7 +41,6 @@
#include <nuttx/irq.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_pca9635.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -1,5 +1,5 @@
/****************************************************************************
* boards/arm/stm32/aiit-arm32-board/src/stm32_critmon.c
* boards/arm/stm32/stm32f4discovery/src/stm32_perfcount.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,14 +19,13 @@
****************************************************************************/
/**
* @file stm32_critmon.c
* @file stm32_perfcount.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
/****************************************************************************
* Included Files
****************************************************************************/
@@ -37,32 +36,39 @@
#include <fixedmath.h>
#include "dwt.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include <nuttx/clock.h>
#include <arch/board/board.h>
#ifdef CONFIG_SCHED_CRITMONITOR
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: up_critmon_gettime
* Name: up_perf_gettime
****************************************************************************/
uint32_t up_critmon_gettime(void)
uint32_t up_perf_gettime(void)
{
return getreg32(DWT_CYCCNT);
}
/****************************************************************************
* Name: up_critmon_gettime
* Name: up_perf_getfreq
****************************************************************************/
void up_critmon_convert(uint32_t elapsed, FAR struct timespec *ts)
uint32_t up_perf_getfreq(void)
{
return STM32_SYSCLK_FREQUENCY;
}
/****************************************************************************
* Name: up_perf_convert
****************************************************************************/
void up_perf_convert(uint32_t elapsed, FAR struct timespec *ts)
{
b32_t b32elapsed;
@@ -70,5 +76,3 @@ void up_critmon_convert(uint32_t elapsed, FAR struct timespec *ts)
ts->tv_sec = b32toi(b32elapsed);
ts->tv_nsec = NSEC_PER_SEC * b32frac(b32elapsed) / b32ONE;
}
#endif /* CONFIG_SCHED_CRITMONITOR */
@@ -22,7 +22,7 @@
* @file stm32_pm.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -32,10 +32,6 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/board.h>
#include <nuttx/power/pm.h>
#include "arm_internal.h"
#include "stm32_pm.h"
#include "aiit-arm32-board.h"
@@ -66,10 +62,6 @@
void arm_pminitialize(void)
{
/* Then initialize the NuttX power management subsystem proper */
pm_initialize();
#if defined(CONFIG_ARCH_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
/* Initialize the buttons to wake up the system from low power modes */
@@ -22,7 +22,7 @@
* @file stm32_pmbuttons.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -41,7 +41,7 @@
#include <nuttx/power/pm.h>
#include <arch/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
#include "stm32_pwr.h"
#include "stm32_pm.h"
@@ -22,7 +22,7 @@
* @file stm32_pwm.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -40,7 +40,7 @@
#include <arch/board/board.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32_pwm.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_reset.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_rgbled.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -42,7 +42,7 @@
#include <arch/board/board.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32_pwm.h"
#include "aiit-arm32-board.h"
@@ -37,7 +37,7 @@
* @file stm32_romfs.h
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -38,7 +38,7 @@
* @file stm32_romfs_initialize.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_sdio.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -21,7 +21,7 @@
* @file stm32_spi.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -40,7 +40,7 @@
#include <nuttx/spi/spi.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "chip.h"
#include "stm32.h"
@@ -22,7 +22,7 @@
* @file stm32_ssd1289.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -49,7 +49,7 @@
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_ssd1351.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_st7032.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_st7567.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -44,9 +44,7 @@
#include <nuttx/lcd/lcd.h>
#include <nuttx/lcd/st7567.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32_gpio.h"
#include "stm32_spi.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_st7789.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_sx127x.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_timer.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_ug2864ambag01.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_ug2864hsweg01.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -37,7 +37,7 @@
* @file stm32_uid.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_usb.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -46,7 +46,7 @@
#include <nuttx/usb/usbhost.h>
#include <nuttx/usb/usbdev_trace.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32.h"
#include "stm32_otgfs.h"
#include "aiit-arm32-board.h"
@@ -22,7 +22,7 @@
* @file stm32_usbmsc.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -22,7 +22,7 @@
* @file stm32_userleds.c
* @brief nuttx source code
* https://github.com/apache/incubator-nuttx.git
* @version 10.2.0
* @version 10.3.0
* @author AIIT XUOS Lab
* @date 2022-03-17
*/
@@ -42,9 +42,7 @@
#include <arch/board/board.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "stm32.h"
#include "aiit-arm32-board.h"