mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:37:27 +08:00
durandal-v1 Nuttx Based PX4 bootloader
durandal bootloader:Run at 480 Mhz durandal-v1:bootloader use VBUS detection Add Durandal bootloader to build
This commit is contained in:
committed by
Lorenz Meier
parent
4836fc0719
commit
b2f28c977d
@@ -36,7 +36,7 @@ pipeline {
|
|||||||
"px4_fmu-v5_default", "px4_fmu-v5_fixedwing", "px4_fmu-v5_multicopter", "px4_fmu-v5_rover", "px4_fmu-v5_rtps", "px4_fmu-v5_stackcheck",
|
"px4_fmu-v5_default", "px4_fmu-v5_fixedwing", "px4_fmu-v5_multicopter", "px4_fmu-v5_rover", "px4_fmu-v5_rtps", "px4_fmu-v5_stackcheck",
|
||||||
"px4_fmu-v5x_default",
|
"px4_fmu-v5x_default",
|
||||||
"intel_aerofc-v1_default", "auav_x21_default", "av_x-v1_default", "bitcraze_crazyflie_default", "airmind_mindpx-v2_default",
|
"intel_aerofc-v1_default", "auav_x21_default", "av_x-v1_default", "bitcraze_crazyflie_default", "airmind_mindpx-v2_default",
|
||||||
"holybro_kakutef7", "holybro_durandal-v1_default", "modalai_fc-v1_default", "mro_ctrl-zero-f7_default", "nxp_fmuk66-v3_default", "omnibus_f4sd_default",
|
"holybro_kakutef7", "holybro_durandal-v1_default", "holybro_durandal-v1_bootloader", "modalai_fc-v1_default", "mro_ctrl-zero-f7_default", "nxp_fmuk66-v3_default", "omnibus_f4sd_default",
|
||||||
"uvify_core_default"],
|
"uvify_core_default"],
|
||||||
image: docker_images.nuttx,
|
image: docker_images.nuttx,
|
||||||
archive: true
|
archive: true
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
px4_add_board(
|
||||||
|
PLATFORM nuttx
|
||||||
|
VENDOR holybro
|
||||||
|
MODEL durandal-v1
|
||||||
|
LABEL bootloader
|
||||||
|
TOOLCHAIN arm-none-eabi
|
||||||
|
ARCHITECTURE cortex-m7
|
||||||
|
|
||||||
|
|
||||||
|
DRIVERS
|
||||||
|
# bootloader
|
||||||
|
|
||||||
|
MODULES
|
||||||
|
|
||||||
|
SYSTEMCMDS
|
||||||
|
|
||||||
|
EXAMPLES
|
||||||
|
|
||||||
|
)
|
||||||
@@ -0,0 +1,256 @@
|
|||||||
|
#
|
||||||
|
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||||
|
#
|
||||||
|
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||||
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
|
# modifications.
|
||||||
|
#
|
||||||
|
# CONFIG_DISABLE_OS_API is not set
|
||||||
|
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||||
|
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||||
|
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||||
|
# CONFIG_MMCSD_MMCSUPPORT is not set
|
||||||
|
# CONFIG_MMCSD_SPI is not set
|
||||||
|
# CONFIG_NSH_DISABLEBG is not set
|
||||||
|
# CONFIG_NSH_DISABLESCRIPT is not set
|
||||||
|
# CONFIG_NSH_DISABLE_DF is not set
|
||||||
|
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||||
|
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||||
|
# CONFIG_NSH_DISABLE_GET is not set
|
||||||
|
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||||
|
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||||
|
# CONFIG_NSH_DISABLE_SEMICOLON is not set
|
||||||
|
# CONFIG_NSH_DISABLE_TIME is not set
|
||||||
|
CONFIG_ARCH="arm"
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
|
||||||
|
CONFIG_ARCH_CHIP="stm32h7"
|
||||||
|
CONFIG_ARCH_CHIP_STM32H743ZI=y
|
||||||
|
CONFIG_ARCH_CHIP_STM32H7=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||||
|
CONFIG_ARCH_MATH_H=y
|
||||||
|
CONFIG_ARCH_STACKDUMP=y
|
||||||
|
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||||
|
# this is off because H7 is not maintaining alignment yet CONFIG_ARMV7M_DCACHE=y
|
||||||
|
CONFIG_ARMV7M_DTCM=y
|
||||||
|
CONFIG_ARMV7M_ICACHE=y
|
||||||
|
CONFIG_ARMV7M_MEMCPY=y
|
||||||
|
CONFIG_ARMV7M_USEBASEPRI=y
|
||||||
|
CONFIG_BOARDCTL_RESET=y
|
||||||
|
CONFIG_BOARD_CRASHDUMP=y
|
||||||
|
CONFIG_BOARD_LOOPSPERMSEC=22114
|
||||||
|
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_C99_BOOL8=y
|
||||||
|
CONFIG_CDCACM=y
|
||||||
|
CONFIG_CDCACM_PRODUCTID=0x008b
|
||||||
|
CONFIG_CDCACM_PRODUCTSTR="PX4 DurandalV1"
|
||||||
|
CONFIG_CDCACM_RXBUFSIZE=600
|
||||||
|
CONFIG_CDCACM_TXBUFSIZE=12000
|
||||||
|
CONFIG_CDCACM_VENDORID=0x26ac
|
||||||
|
CONFIG_CDCACM_VENDORSTR="Holybro"
|
||||||
|
CONFIG_CLOCK_MONOTONIC=y
|
||||||
|
CONFIG_DEBUG_FULLOPT=y
|
||||||
|
CONFIG_DEBUG_HARDFAULT_ALERT=y
|
||||||
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
CONFIG_DEFAULT_SMALL=y
|
||||||
|
CONFIG_DEV_FIFO_SIZE=0
|
||||||
|
CONFIG_DEV_PIPE_MAXSIZE=1024
|
||||||
|
CONFIG_DEV_PIPE_SIZE=70
|
||||||
|
CONFIG_EXPERIMENTAL=y
|
||||||
|
CONFIG_FAT_DMAMEMORY=y
|
||||||
|
CONFIG_FAT_LCNAMES=y
|
||||||
|
CONFIG_FAT_LFN=y
|
||||||
|
CONFIG_FAT_LFN_ALIAS_HASH=y
|
||||||
|
CONFIG_FDCLONE_STDIO=y
|
||||||
|
CONFIG_FS_BINFS=y
|
||||||
|
CONFIG_FS_CROMFS=y
|
||||||
|
CONFIG_FS_FAT=y
|
||||||
|
CONFIG_FS_FATTIME=y
|
||||||
|
CONFIG_FS_PROCFS=y
|
||||||
|
CONFIG_FS_PROCFS_EXCLUDE_BLOCKS=y
|
||||||
|
CONFIG_FS_PROCFS_EXCLUDE_MOUNT=y
|
||||||
|
CONFIG_FS_PROCFS_EXCLUDE_MOUNTS=y
|
||||||
|
CONFIG_FS_PROCFS_EXCLUDE_PARTITIONS=y
|
||||||
|
CONFIG_FS_PROCFS_EXCLUDE_USAGE=y
|
||||||
|
CONFIG_FS_PROCFS_REGISTER=y
|
||||||
|
CONFIG_FS_ROMFS=y
|
||||||
|
CONFIG_GRAN=y
|
||||||
|
CONFIG_GRAN_INTR=y
|
||||||
|
CONFIG_HAVE_CXX=y
|
||||||
|
CONFIG_HAVE_CXXINITIALIZE=y
|
||||||
|
CONFIG_I2C=y
|
||||||
|
CONFIG_I2C_RESET=y
|
||||||
|
CONFIG_IDLETHREAD_STACKSIZE=750
|
||||||
|
CONFIG_LIBC_FLOATINGPOINT=y
|
||||||
|
CONFIG_LIBC_LONG_LONG=y
|
||||||
|
CONFIG_LIBC_STRERROR=y
|
||||||
|
CONFIG_MAX_TASKS=64
|
||||||
|
CONFIG_MAX_WDOGPARMS=2
|
||||||
|
CONFIG_MEMSET_64BIT=y
|
||||||
|
CONFIG_MEMSET_OPTSPEED=y
|
||||||
|
CONFIG_MMCSD=y
|
||||||
|
CONFIG_MMCSD_MULTIBLOCK_DISABLE=y
|
||||||
|
CONFIG_MMCSD_SDIO=y
|
||||||
|
CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y
|
||||||
|
CONFIG_MM_REGIONS=3
|
||||||
|
CONFIG_MTD=y
|
||||||
|
CONFIG_MTD_BYTE_WRITE=y
|
||||||
|
CONFIG_MTD_PARTITION=y
|
||||||
|
CONFIG_MTD_PROGMEM=y
|
||||||
|
CONFIG_MTD_RAMTRON=y
|
||||||
|
CONFIG_NFILE_DESCRIPTORS=20
|
||||||
|
CONFIG_NFILE_STREAMS=8
|
||||||
|
CONFIG_NSH_ARCHINIT=y
|
||||||
|
CONFIG_NSH_ARCHROMFS=y
|
||||||
|
CONFIG_NSH_ARGCAT=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
|
CONFIG_NSH_CMDPARMS=y
|
||||||
|
CONFIG_NSH_CROMFSETC=y
|
||||||
|
CONFIG_NSH_DISABLE_IFCONFIG=y
|
||||||
|
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||||
|
CONFIG_NSH_DISABLE_MB=y
|
||||||
|
CONFIG_NSH_DISABLE_MH=y
|
||||||
|
CONFIG_NSH_DISABLE_TELNETD=y
|
||||||
|
CONFIG_NSH_LINELEN=128
|
||||||
|
CONFIG_NSH_MAXARGUMENTS=12
|
||||||
|
CONFIG_NSH_NESTDEPTH=8
|
||||||
|
CONFIG_NSH_QUOTE=y
|
||||||
|
CONFIG_NSH_ROMFSETC=y
|
||||||
|
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||||
|
CONFIG_NSH_STRERROR=y
|
||||||
|
CONFIG_NSH_VARS=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_16BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_1BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_24BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_2BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_32BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_4BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_8BPP=y
|
||||||
|
CONFIG_PIPES=y
|
||||||
|
CONFIG_PREALLOC_MQ_MSGS=4
|
||||||
|
CONFIG_PREALLOC_TIMERS=50
|
||||||
|
CONFIG_PREALLOC_WDOGS=50
|
||||||
|
CONFIG_PRIORITY_INHERITANCE=y
|
||||||
|
CONFIG_PTHREAD_MUTEX_ROBUST=y
|
||||||
|
CONFIG_PTHREAD_STACK_MIN=512
|
||||||
|
CONFIG_RAMTRON_SETSPEED=y
|
||||||
|
CONFIG_RAMTRON_WRITEWAIT=y
|
||||||
|
CONFIG_RAM_SIZE=245760
|
||||||
|
CONFIG_RAM_START=0x20010000
|
||||||
|
CONFIG_RAW_BINARY=y
|
||||||
|
CONFIG_RTC_DATETIME=y
|
||||||
|
CONFIG_SCHED_ATEXIT=y
|
||||||
|
CONFIG_SCHED_HPWORK=y
|
||||||
|
CONFIG_SCHED_HPWORKPRIORITY=249
|
||||||
|
CONFIG_SCHED_HPWORKSTACKSIZE=1280
|
||||||
|
CONFIG_SCHED_INSTRUMENTATION=y
|
||||||
|
CONFIG_SCHED_LPWORK=y
|
||||||
|
CONFIG_SCHED_LPWORKPRIORITY=50
|
||||||
|
CONFIG_SCHED_LPWORKSTACKSIZE=1536
|
||||||
|
CONFIG_SCHED_WAITPID=y
|
||||||
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
|
CONFIG_SDMMC1_SDIO_MODE=y
|
||||||
|
CONFIG_SEM_NNESTPRIO=8
|
||||||
|
CONFIG_SEM_PREALLOCHOLDERS=0
|
||||||
|
CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS=y
|
||||||
|
CONFIG_SERIAL_TERMIOS=y
|
||||||
|
CONFIG_SIG_DEFAULT=y
|
||||||
|
CONFIG_SIG_SIGALRM_ACTION=y
|
||||||
|
CONFIG_SIG_SIGUSR1_ACTION=y
|
||||||
|
CONFIG_SIG_SIGUSR2_ACTION=y
|
||||||
|
CONFIG_SIG_SIGWORK=4
|
||||||
|
CONFIG_STACK_COLORATION=y
|
||||||
|
CONFIG_START_DAY=30
|
||||||
|
CONFIG_START_MONTH=11
|
||||||
|
CONFIG_STDIO_BUFFER_SIZE=32
|
||||||
|
CONFIG_STM32H7_ADC1=y
|
||||||
|
CONFIG_STM32H7_BBSRAM=y
|
||||||
|
CONFIG_STM32H7_BBSRAM_FILES=5
|
||||||
|
CONFIG_STM32H7_BKPSRAM=y
|
||||||
|
CONFIG_STM32H7_DMA1=y
|
||||||
|
CONFIG_STM32H7_DMA2=y
|
||||||
|
CONFIG_STM32H7_DMACAPABLE=y
|
||||||
|
CONFIG_STM32H7_DTCMEXCLUDE=y
|
||||||
|
CONFIG_STM32H7_DTCM_PROCFS=y
|
||||||
|
CONFIG_STM32H7_FLOWCONTROL_BROKEN=y
|
||||||
|
CONFIG_STM32H7_I2C1=y
|
||||||
|
CONFIG_STM32H7_I2C2=y
|
||||||
|
CONFIG_STM32H7_I2C3=y
|
||||||
|
CONFIG_STM32H7_I2C4=y
|
||||||
|
CONFIG_STM32H7_I2C_DYNTIMEO=y
|
||||||
|
CONFIG_STM32H7_I2C_DYNTIMEO_STARTSTOP=10
|
||||||
|
CONFIG_STM32H7_OTGFS=y
|
||||||
|
CONFIG_STM32H7_PROGMEM=y
|
||||||
|
CONFIG_STM32H7_RTC=y
|
||||||
|
CONFIG_STM32H7_RTC_MAGIC_REG=1
|
||||||
|
CONFIG_STM32H7_SAVE_CRASHDUMP=y
|
||||||
|
CONFIG_STM32H7_SDMMC1=y
|
||||||
|
CONFIG_STM32H7_SERIALBRK_BSDCOMPAT=y
|
||||||
|
CONFIG_STM32H7_SERIAL_DISABLE_REORDERING=y
|
||||||
|
CONFIG_STM32H7_SPI1=y
|
||||||
|
CONFIG_STM32H7_SPI2=y
|
||||||
|
CONFIG_STM32H7_SPI4=y
|
||||||
|
CONFIG_STM32H7_SPI5=y
|
||||||
|
CONFIG_STM32H7_SPI6=y
|
||||||
|
CONFIG_STM32H7_TIM1=y
|
||||||
|
CONFIG_STM32H7_TIM3=y
|
||||||
|
CONFIG_STM32H7_TIM4=y
|
||||||
|
CONFIG_STM32H7_UART4=y
|
||||||
|
CONFIG_STM32H7_UART7=y
|
||||||
|
CONFIG_STM32H7_UART8=y
|
||||||
|
CONFIG_STM32H7_USART1=y
|
||||||
|
CONFIG_STM32H7_USART2=y
|
||||||
|
CONFIG_STM32H7_USART3=y
|
||||||
|
CONFIG_STM32H7_USART6=y
|
||||||
|
CONFIG_STM32H7_USART_BREAKS=y
|
||||||
|
CONFIG_STM32H7_USART_INVERT=y
|
||||||
|
CONFIG_STM32H7_USART_SINGLEWIRE=y
|
||||||
|
CONFIG_STM32H7_USART_SWAP=y
|
||||||
|
CONFIG_SYSTEM_CDCACM=y
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_TASK_NAME_SIZE=24
|
||||||
|
CONFIG_TIME_EXTENDED=y
|
||||||
|
CONFIG_TTY_SIGINT=y
|
||||||
|
CONFIG_TTY_SIGSTP=y
|
||||||
|
CONFIG_UART4_BAUD=57600
|
||||||
|
CONFIG_UART4_DMA=y
|
||||||
|
CONFIG_UART4_RXBUFSIZE=600
|
||||||
|
CONFIG_UART4_TXBUFSIZE=1500
|
||||||
|
CONFIG_UART7_BAUD=57600
|
||||||
|
CONFIG_UART7_RXBUFSIZE=600
|
||||||
|
CONFIG_UART7_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_UART7_TXBUFSIZE=1500
|
||||||
|
CONFIG_UART8_BAUD=57600
|
||||||
|
CONFIG_UART8_DMA=y
|
||||||
|
CONFIG_UART8_RXBUFSIZE=600
|
||||||
|
CONFIG_UART8_TXBUFSIZE=1500
|
||||||
|
CONFIG_USART1_BAUD=57600
|
||||||
|
CONFIG_USART1_DMA=y
|
||||||
|
CONFIG_USART1_RXBUFSIZE=600
|
||||||
|
CONFIG_USART1_TXBUFSIZE=1500
|
||||||
|
CONFIG_USART2_BAUD=57600
|
||||||
|
CONFIG_USART2_DMA=y
|
||||||
|
CONFIG_USART2_IFLOWCONTROL=y
|
||||||
|
CONFIG_USART2_OFLOWCONTROL=y
|
||||||
|
CONFIG_USART2_RXBUFSIZE=600
|
||||||
|
CONFIG_USART2_TXBUFSIZE=1500
|
||||||
|
CONFIG_USART3_BAUD=57600
|
||||||
|
CONFIG_USART3_DMA=y
|
||||||
|
CONFIG_USART3_IFLOWCONTROL=y
|
||||||
|
CONFIG_USART3_OFLOWCONTROL=y
|
||||||
|
CONFIG_USART3_RXBUFSIZE=600
|
||||||
|
CONFIG_USART3_TXBUFSIZE=3000
|
||||||
|
CONFIG_USART6_BAUD=57600
|
||||||
|
CONFIG_USART6_DMA=y
|
||||||
|
CONFIG_USART6_RXBUFSIZE=600
|
||||||
|
CONFIG_USART6_TXBUFSIZE=1500
|
||||||
|
CONFIG_USBDEV=y
|
||||||
|
CONFIG_USBDEV_BUSPOWERED=y
|
||||||
|
CONFIG_USBDEV_MAXPOWER=500
|
||||||
|
CONFIG_USEC_PER_TICK=1000
|
||||||
|
CONFIG_USERMAIN_STACKSIZE=2624
|
||||||
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_WATCHDOG=y
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
#
|
||||||
|
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||||
|
#
|
||||||
|
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||||
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
|
# modifications.
|
||||||
|
#
|
||||||
|
# CONFIG_DEV_CONSOLE is not set
|
||||||
|
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||||
|
# CONFIG_SPI_EXCHANGE is not set
|
||||||
|
# CONFIG_STM32H7_SYSCFG is not set
|
||||||
|
CONFIG_ARCH="arm"
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||||
|
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
|
||||||
|
CONFIG_ARCH_CHIP="stm32h7"
|
||||||
|
CONFIG_ARCH_CHIP_STM32H743ZI=y
|
||||||
|
CONFIG_ARCH_CHIP_STM32H7=y
|
||||||
|
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||||
|
CONFIG_ARCH_MATH_H=y
|
||||||
|
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||||
|
CONFIG_ARMV7M_ICACHE=y
|
||||||
|
CONFIG_ARMV7M_MEMCPY=y
|
||||||
|
CONFIG_ARMV7M_USEBASEPRI=y
|
||||||
|
CONFIG_BOARDCTL_RESET=y
|
||||||
|
CONFIG_BOARD_INITTHREAD_PRIORITY=254
|
||||||
|
CONFIG_BOARD_LATE_INITIALIZE=y
|
||||||
|
CONFIG_BOARD_LOOPSPERMSEC=22114
|
||||||
|
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||||
|
CONFIG_C99_BOOL8=y
|
||||||
|
CONFIG_CDCACM=y
|
||||||
|
CONFIG_CDCACM_PRODUCTID=0x008b
|
||||||
|
CONFIG_CDCACM_PRODUCTSTR="PX4 BL Holybro Durandal Vx"
|
||||||
|
CONFIG_CDCACM_RXBUFSIZE=600
|
||||||
|
CONFIG_CDCACM_TXBUFSIZE=12000
|
||||||
|
CONFIG_CDCACM_VENDORID=0x26ac
|
||||||
|
CONFIG_CDCACM_VENDORSTR="Holybro"
|
||||||
|
CONFIG_CLOCK_MONOTONIC=y
|
||||||
|
CONFIG_DEBUG_FULLOPT=y
|
||||||
|
CONFIG_DEBUG_SYMBOLS=y
|
||||||
|
CONFIG_DEFAULT_SMALL=y
|
||||||
|
CONFIG_DISABLE_MQUEUE=y
|
||||||
|
CONFIG_DISABLE_PTHREAD=y
|
||||||
|
CONFIG_EXPERIMENTAL=y
|
||||||
|
CONFIG_FDCLONE_DISABLE=y
|
||||||
|
CONFIG_FDCLONE_STDIO=y
|
||||||
|
CONFIG_FS_WRITABLE=y
|
||||||
|
CONFIG_HAVE_CXX=y
|
||||||
|
CONFIG_HAVE_CXXINITIALIZE=y
|
||||||
|
CONFIG_IDLETHREAD_STACKSIZE=750
|
||||||
|
CONFIG_LIBC_FLOATINGPOINT=y
|
||||||
|
CONFIG_LIBC_LONG_LONG=y
|
||||||
|
CONFIG_LIBC_STRERROR=y
|
||||||
|
CONFIG_LIB_BOARDCTL=y
|
||||||
|
CONFIG_MAX_TASKS=8
|
||||||
|
CONFIG_MAX_WDOGPARMS=2
|
||||||
|
CONFIG_MEMSET_64BIT=y
|
||||||
|
CONFIG_MEMSET_OPTSPEED=y
|
||||||
|
CONFIG_MM_REGIONS=3
|
||||||
|
CONFIG_NFILE_DESCRIPTORS=5
|
||||||
|
CONFIG_NFILE_STREAMS=3
|
||||||
|
CONFIG_NPTHREAD_KEYS=4
|
||||||
|
CONFIG_NXFONTS_DISABLE_16BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_1BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_24BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_2BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_32BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_4BPP=y
|
||||||
|
CONFIG_NXFONTS_DISABLE_8BPP=y
|
||||||
|
CONFIG_PREALLOC_TIMERS=50
|
||||||
|
CONFIG_PREALLOC_WDOGS=50
|
||||||
|
CONFIG_PTHREAD_STACK_MIN=512
|
||||||
|
CONFIG_RAM_SIZE=245760
|
||||||
|
CONFIG_RAM_START=0x20010000
|
||||||
|
CONFIG_RAW_BINARY=y
|
||||||
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
|
CONFIG_SERIAL_TERMIOS=y
|
||||||
|
CONFIG_SIG_DEFAULT=y
|
||||||
|
CONFIG_SIG_SIGALRM_ACTION=y
|
||||||
|
CONFIG_SIG_SIGUSR1_ACTION=y
|
||||||
|
CONFIG_SIG_SIGUSR2_ACTION=y
|
||||||
|
CONFIG_SPI=y
|
||||||
|
CONFIG_STACK_COLORATION=y
|
||||||
|
CONFIG_START_DAY=30
|
||||||
|
CONFIG_START_MONTH=11
|
||||||
|
CONFIG_STDIO_BUFFER_SIZE=32
|
||||||
|
CONFIG_STM32H7_BKPSRAM=y
|
||||||
|
CONFIG_STM32H7_DMA1=y
|
||||||
|
CONFIG_STM32H7_OTGFS=y
|
||||||
|
CONFIG_STM32H7_PROGMEM=y
|
||||||
|
CONFIG_STM32H7_SERIAL_DISABLE_REORDERING=y
|
||||||
|
CONFIG_STM32H7_TIM1=y
|
||||||
|
CONFIG_STM32H7_USART3=y
|
||||||
|
CONFIG_SYSTEMTICK_HOOK=y
|
||||||
|
CONFIG_SYSTEM_CDCACM=y
|
||||||
|
CONFIG_TASK_NAME_SIZE=24
|
||||||
|
CONFIG_TIME_EXTENDED=y
|
||||||
|
CONFIG_TTY_SIGINT=y
|
||||||
|
CONFIG_TTY_SIGINT_CHAR=0x03
|
||||||
|
CONFIG_TTY_SIGSTP=y
|
||||||
|
CONFIG_USART3_DMA=y
|
||||||
|
CONFIG_USART3_RXBUFSIZE=600
|
||||||
|
CONFIG_USART3_TXBUFSIZE=300
|
||||||
|
CONFIG_USBDEV=y
|
||||||
|
CONFIG_USBDEV_BUSPOWERED=y
|
||||||
|
CONFIG_USBDEV_MAXPOWER=500
|
||||||
|
CONFIG_USEC_PER_TICK=1000
|
||||||
|
CONFIG_USERMAIN_STACKSIZE=2624
|
||||||
|
CONFIG_USER_ENTRYPOINT="bootloader_main"
|
||||||
@@ -0,0 +1,226 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* scripts/script.ld
|
||||||
|
*
|
||||||
|
* Copyright (C) 2016, 2019 Gregory Nutt. All rights reserved.
|
||||||
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* The Durandal-v1 uses an STM32H743II has 2048Kb of main FLASH memory.
|
||||||
|
* The flash memory is partitioned into a User Flash memory and a System
|
||||||
|
* Flash memory. Each of these memories has two banks:
|
||||||
|
*
|
||||||
|
* 1) User Flash memory:
|
||||||
|
*
|
||||||
|
* Bank 1: Start address 0x0800:0000 to 0x080F:FFFF with 8 sectors, 128Kb each
|
||||||
|
* Bank 2: Start address 0x0810:0000 to 0x081F:FFFF with 8 sectors, 128Kb each
|
||||||
|
*
|
||||||
|
* 2) System Flash memory:
|
||||||
|
*
|
||||||
|
* Bank 1: Start address 0x1FF0:0000 to 0x1FF1:FFFF with 1 x 128Kb sector
|
||||||
|
* Bank 1: Start address 0x1FF4:0000 to 0x1FF5:FFFF with 1 x 128Kb sector
|
||||||
|
*
|
||||||
|
* 3) User option bytes for user configuration, only in Bank 1.
|
||||||
|
*
|
||||||
|
* In the STM32H743II, two different boot spaces can be selected through
|
||||||
|
* the BOOT pin and the boot base address programmed in the BOOT_ADD0 and
|
||||||
|
* BOOT_ADD1 option bytes:
|
||||||
|
*
|
||||||
|
* 1) BOOT=0: Boot address defined by user option byte BOOT_ADD0[15:0].
|
||||||
|
* ST programmed value: Flash memory at 0x0800:0000
|
||||||
|
* 2) BOOT=1: Boot address defined by user option byte BOOT_ADD1[15:0].
|
||||||
|
* ST programmed value: System bootloader at 0x1FF0:0000
|
||||||
|
*
|
||||||
|
* The Durandal has a Swtich on board, the BOOT0 pin is at ground so by default,
|
||||||
|
* the STM32 will boot to address 0x0800:0000 in FLASH unless the swiutch is
|
||||||
|
* drepresed, then the boot will be from 0x1FF0:0000
|
||||||
|
*
|
||||||
|
* The STM32H743ZI also has 1024Kb of data SRAM.
|
||||||
|
* SRAM is split up into several blocks and into three power domains:
|
||||||
|
*
|
||||||
|
* 1) TCM SRAMs are dedicated to the Cortex-M7 and are accessible with
|
||||||
|
* 0 wait states by the Cortex-M7 and by MDMA through AHBS slave bus
|
||||||
|
*
|
||||||
|
* 1.1) 128Kb of DTCM-RAM beginning at address 0x2000:0000
|
||||||
|
*
|
||||||
|
* The DTCM-RAM is organized as 2 x 64Kb DTCM-RAMs on 2 x 32 bit
|
||||||
|
* DTCM ports. The DTCM-RAM could be used for critical real-time
|
||||||
|
* data, such as interrupt service routines or stack / heap memory.
|
||||||
|
* Both DTCM-RAMs can be used in parallel (for load/store operations)
|
||||||
|
* thanks to the Cortex-M7 dual issue capability.
|
||||||
|
*
|
||||||
|
* 1.2) 64Kb of ITCM-RAM beginning at address 0x0000:0000
|
||||||
|
*
|
||||||
|
* This RAM is connected to ITCM 64-bit interface designed for
|
||||||
|
* execution of critical real-times routines by the CPU.
|
||||||
|
*
|
||||||
|
* 2) AXI SRAM (D1 domain) accessible by all system masters except BDMA
|
||||||
|
* through D1 domain AXI bus matrix
|
||||||
|
*
|
||||||
|
* 2.1) 512Kb of SRAM beginning at address 0x2400:0000
|
||||||
|
*
|
||||||
|
* 3) AHB SRAM (D2 domain) accessible by all system masters except BDMA
|
||||||
|
* through D2 domain AHB bus matrix
|
||||||
|
*
|
||||||
|
* 3.1) 128Kb of SRAM1 beginning at address 0x3000:0000
|
||||||
|
* 3.2) 128Kb of SRAM2 beginning at address 0x3002:0000
|
||||||
|
* 3.3) 32Kb of SRAM3 beginning at address 0x3004:0000
|
||||||
|
*
|
||||||
|
* SRAM1 - SRAM3 are one contiguous block: 288Kb at address 0x3000:0000
|
||||||
|
*
|
||||||
|
* 4) AHB SRAM (D3 domain) accessible by most of system masters
|
||||||
|
* through D3 domain AHB bus matrix
|
||||||
|
*
|
||||||
|
* 4.1) 64Kb of SRAM4 beginning at address 0x3800:0000
|
||||||
|
* 4.1) 4Kb of backup RAM beginning at address 0x3880:0000
|
||||||
|
*
|
||||||
|
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||||
|
* where the code expects to begin execution by jumping to the entry point in
|
||||||
|
* the 0x0800:0000 address range.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||||
|
flash (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
|
||||||
|
dtcm1 (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||||
|
dtcm2 (rwx) : ORIGIN = 0x20010000, LENGTH = 64K
|
||||||
|
sram (rwx) : ORIGIN = 0x24000000, LENGTH = 512K
|
||||||
|
sram1 (rwx) : ORIGIN = 0x30000000, LENGTH = 128K
|
||||||
|
sram2 (rwx) : ORIGIN = 0x30020000, LENGTH = 128K
|
||||||
|
sram3 (rwx) : ORIGIN = 0x30040000, LENGTH = 32K
|
||||||
|
sram4 (rwx) : ORIGIN = 0x38000000, LENGTH = 64K
|
||||||
|
bbram (rwx) : ORIGIN = 0x38800000, LENGTH = 4K
|
||||||
|
}
|
||||||
|
|
||||||
|
OUTPUT_ARCH(arm)
|
||||||
|
EXTERN(_vectors)
|
||||||
|
ENTRY(_stext)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure that abort() is present in the final object. The exception handling
|
||||||
|
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
|
||||||
|
*/
|
||||||
|
EXTERN(abort)
|
||||||
|
EXTERN(_bootdelay_signature)
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text : {
|
||||||
|
_stext = ABSOLUTE(.);
|
||||||
|
*(.vectors)
|
||||||
|
. = ALIGN(32);
|
||||||
|
/*
|
||||||
|
This signature provides the bootloader with a way to delay booting
|
||||||
|
*/
|
||||||
|
_bootdelay_signature = ABSOLUTE(.);
|
||||||
|
FILL(0xffecc2925d7d05c5)
|
||||||
|
. += 8;
|
||||||
|
*(.text .text.*)
|
||||||
|
*(.fixup)
|
||||||
|
*(.gnu.warning)
|
||||||
|
*(.rodata .rodata.*)
|
||||||
|
*(.gnu.linkonce.t.*)
|
||||||
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
*(.got)
|
||||||
|
*(.gcc_except_table)
|
||||||
|
*(.gnu.linkonce.r.*)
|
||||||
|
_etext = ABSOLUTE(.);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a hack to make the newlib libm __errno() call
|
||||||
|
* use the NuttX get_errno_ptr() function.
|
||||||
|
*/
|
||||||
|
__errno = get_errno_ptr;
|
||||||
|
} > flash
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init functions (static constructors and the like)
|
||||||
|
*/
|
||||||
|
.init_section : {
|
||||||
|
_sinit = ABSOLUTE(.);
|
||||||
|
KEEP(*(.init_array .init_array.*))
|
||||||
|
_einit = ABSOLUTE(.);
|
||||||
|
} > flash
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Construction data for parameters.
|
||||||
|
*/
|
||||||
|
__param ALIGN(4): {
|
||||||
|
__param_start = ABSOLUTE(.);
|
||||||
|
KEEP(*(__param*))
|
||||||
|
__param_end = ABSOLUTE(.);
|
||||||
|
} > flash
|
||||||
|
|
||||||
|
.ARM.extab : {
|
||||||
|
*(.ARM.extab*)
|
||||||
|
} > flash
|
||||||
|
|
||||||
|
__exidx_start = ABSOLUTE(.);
|
||||||
|
.ARM.exidx : {
|
||||||
|
*(.ARM.exidx*)
|
||||||
|
} > flash
|
||||||
|
__exidx_end = ABSOLUTE(.);
|
||||||
|
|
||||||
|
_eronly = ABSOLUTE(.);
|
||||||
|
|
||||||
|
.data : {
|
||||||
|
_sdata = ABSOLUTE(.);
|
||||||
|
*(.data .data.*)
|
||||||
|
*(.gnu.linkonce.d.*)
|
||||||
|
CONSTRUCTORS
|
||||||
|
_edata = ABSOLUTE(.);
|
||||||
|
} > sram AT > flash
|
||||||
|
|
||||||
|
.bss : {
|
||||||
|
_sbss = ABSOLUTE(.);
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(.gnu.linkonce.b.*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
_ebss = ABSOLUTE(.);
|
||||||
|
} > sram
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_info 0 : { *(.debug_info) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
}
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
|
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
|
flash (rx) : ORIGIN = 0x08020000, LENGTH = 1920K
|
||||||
dtcm1 (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
dtcm1 (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||||
dtcm2 (rwx) : ORIGIN = 0x20010000, LENGTH = 64K
|
dtcm2 (rwx) : ORIGIN = 0x20010000, LENGTH = 64K
|
||||||
sram (rwx) : ORIGIN = 0x24000000, LENGTH = 512K
|
sram (rwx) : ORIGIN = 0x24000000, LENGTH = 512K
|
||||||
|
|||||||
@@ -30,7 +30,19 @@
|
|||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
if("${PX4_BOARD_LABEL}" STREQUAL "bootloader")
|
||||||
|
add_library(drivers_board
|
||||||
|
bootloader_main.c
|
||||||
|
usb.c
|
||||||
|
)
|
||||||
|
target_link_libraries(drivers_board
|
||||||
|
PRIVATE
|
||||||
|
nuttx_arch # sdio
|
||||||
|
nuttx_drivers # sdio
|
||||||
|
bootloader
|
||||||
|
)
|
||||||
|
|
||||||
|
else()
|
||||||
add_library(drivers_board
|
add_library(drivers_board
|
||||||
can.c
|
can.c
|
||||||
init.c
|
init.c
|
||||||
@@ -51,3 +63,4 @@ target_link_libraries(drivers_board
|
|||||||
nuttx_drivers # sdio
|
nuttx_drivers # sdio
|
||||||
px4_layer
|
px4_layer
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019 PX4 Development Team. All rights reserved.
|
||||||
|
*
|
||||||
|
* 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 PX4 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.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file bootloader_main.c
|
||||||
|
*
|
||||||
|
* PX4FMU-specific early startup code for bootloader
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "board_config.h"
|
||||||
|
#include "bl.h"
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <debug.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
#include <chip.h>
|
||||||
|
#include <stm32_uart.h>
|
||||||
|
#include <arch/board/board.h>
|
||||||
|
#include "up_internal.h"
|
||||||
|
|
||||||
|
extern int sercon_main(int c, char **argv);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-Processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
__EXPORT void
|
||||||
|
stm32_boardinitialize(void)
|
||||||
|
{
|
||||||
|
/* configure USB interfaces */
|
||||||
|
|
||||||
|
stm32_usbinitialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void board_late_initialize(void)
|
||||||
|
{
|
||||||
|
sercon_main(0, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern void sys_tick_handler(void);
|
||||||
|
void board_timerhook(void)
|
||||||
|
{
|
||||||
|
sys_tick_handler();
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
* hw_config.h
|
||||||
|
*
|
||||||
|
* Created on: May 17, 2015
|
||||||
|
* Author: david_s5
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HW_CONFIG_H_
|
||||||
|
#define HW_CONFIG_H_
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* 10-8--2016:
|
||||||
|
* To simplify the ripple effect on the tools, we will be using
|
||||||
|
* /dev/serial/by-id/<asterisk>PX4<asterisk> to locate PX4 devices. Therefore
|
||||||
|
* moving forward all Bootloaders must contain the prefix "PX4 BL "
|
||||||
|
* in the USBDEVICESTRING
|
||||||
|
* This Change will be made in an upcoming BL release
|
||||||
|
****************************************************************************/
|
||||||
|
/*
|
||||||
|
* Define usage to configure a bootloader
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Constant example Usage
|
||||||
|
* APP_LOAD_ADDRESS 0x08004000 - The address in Linker Script, where the app fw is org-ed
|
||||||
|
* BOOTLOADER_DELAY 5000 - Ms to wait while under USB pwr or bootloader request
|
||||||
|
* BOARD_FMUV2
|
||||||
|
* INTERFACE_USB 1 - (Optional) Scan and use the USB interface for bootloading
|
||||||
|
* INTERFACE_USART 1 - (Optional) Scan and use the Serial interface for bootloading
|
||||||
|
* USBDEVICESTRING "PX4 BL FMU v2.x" - USB id string
|
||||||
|
* USBPRODUCTID 0x0011 - PID Should match defconfig
|
||||||
|
* BOOT_DELAY_ADDRESS 0x000001a0 - (Optional) From the linker script from Linker Script to get a custom
|
||||||
|
* delay provided by an APP FW
|
||||||
|
* BOARD_TYPE 9 - Must match .prototype boad_id
|
||||||
|
* _FLASH_KBYTES (*(uint16_t *)0x1fff7a22) - Run time flash size detection
|
||||||
|
* BOARD_FLASH_SECTORS ((_FLASH_KBYTES == 0x400) ? 11 : 23) - Run time determine the physical last sector
|
||||||
|
* BOARD_FLASH_SECTORS 11 - Hard coded zero based last sector
|
||||||
|
* BOARD_FLASH_SIZE (_FLASH_KBYTES*1024)- Total Flash size of device, determined at run time.
|
||||||
|
* (1024 * 1024) - Hard coded Total Flash of device - The bootloader and app reserved will be deducted
|
||||||
|
* programmatically
|
||||||
|
*
|
||||||
|
* BOARD_FIRST_FLASH_SECTOR_TO_ERASE 2 - Optional sectors index in the flash_sectors table (F4 only), to begin erasing.
|
||||||
|
* This is to allow sectors to be reserved for app fw usage. That will NOT be erased
|
||||||
|
* during a FW upgrade.
|
||||||
|
* The default is 0, and selects the first sector to be erased, as the 0th entry in the
|
||||||
|
* flash_sectors table. Which is the second physical sector of FLASH in the device.
|
||||||
|
* The first physical sector of FLASH is used by the bootloader, and is not defined
|
||||||
|
* in the table.
|
||||||
|
*
|
||||||
|
* APP_RESERVATION_SIZE (BOARD_FIRST_FLASH_SECTOR_TO_ERASE * 16 * 1024) - Number of bytes reserved by the APP FW. This number plus
|
||||||
|
* BOOTLOADER_RESERVATION_SIZE will be deducted from
|
||||||
|
* BOARD_FLASH_SIZE to determine the size of the App FW
|
||||||
|
* and hence the address space of FLASH to erase and program.
|
||||||
|
* USBMFGSTRING "PX4 AP" - Optional USB MFG string (default is '3D Robotics' if not defined.)
|
||||||
|
* SERIAL_BREAK_DETECT_DISABLED - Optional prevent break selection on Serial port from entering or staying in BL
|
||||||
|
*
|
||||||
|
* * Other defines are somewhat self explanatory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Boot device selection list*/
|
||||||
|
#define USB0_DEV 0x01
|
||||||
|
#define SERIAL0_DEV 0x02
|
||||||
|
#define SERIAL1_DEV 0x04
|
||||||
|
|
||||||
|
#define APP_LOAD_ADDRESS 0x08020000
|
||||||
|
#define BOOTLOADER_DELAY 5000
|
||||||
|
#define INTERFACE_USB 1
|
||||||
|
#define INTERFACE_USB_CONFIG "/dev/ttyACM0"
|
||||||
|
#define BOARD_VBUS MK_GPIO_INPUT(GPIO_OTGFS_VBUS)
|
||||||
|
|
||||||
|
//#define USE_VBUS_PULL_DOWN
|
||||||
|
#define INTERFACE_USART 1
|
||||||
|
#define INTERFACE_USART_CONFIG "/dev/ttyS0,115200"
|
||||||
|
#define BOOT_DELAY_ADDRESS 0x000001a0
|
||||||
|
#define BOARD_TYPE 139
|
||||||
|
#define _FLASH_KBYTES (*(uint32_t *)0x1FF1E880)
|
||||||
|
#define BOARD_FLASH_SECTORS (15)
|
||||||
|
#define BOARD_FLASH_SIZE (_FLASH_KBYTES * 1024)
|
||||||
|
|
||||||
|
#define OSC_FREQ 16
|
||||||
|
|
||||||
|
#define BOARD_PIN_LED_ACTIVITY GPIO_nLED_BLUE // BLUE
|
||||||
|
#define BOARD_PIN_LED_BOOTLOADER GPIO_nLED_GREEN // GREEN
|
||||||
|
#define BOARD_LED_ON 0
|
||||||
|
#define BOARD_LED_OFF 1
|
||||||
|
|
||||||
|
#define SERIAL_BREAK_DETECT_DISABLED 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uncommenting this allows to force the bootloader through
|
||||||
|
* a PWM output pin. As this can accidentally initialize
|
||||||
|
* an ESC prematurely, it is not recommended. This feature
|
||||||
|
* has not been used and hence defaults now to off.
|
||||||
|
*
|
||||||
|
* # define BOARD_FORCE_BL_PIN_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN14)
|
||||||
|
* # define BOARD_FORCE_BL_PIN_IN (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTE|GPIO_PIN11)
|
||||||
|
*
|
||||||
|
* # define BOARD_POWER_PIN_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4)
|
||||||
|
* # define BOARD_POWER_ON 1
|
||||||
|
* # define BOARD_POWER_OFF 0
|
||||||
|
* # undef BOARD_POWER_PIN_RELEASE // Leave pin enabling Power - un comment to release (disable power)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(ARCH_SN_MAX_LENGTH)
|
||||||
|
# define ARCH_SN_MAX_LENGTH 12
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(APP_RESERVATION_SIZE)
|
||||||
|
# define APP_RESERVATION_SIZE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(BOARD_FIRST_FLASH_SECTOR_TO_ERASE)
|
||||||
|
# define BOARD_FIRST_FLASH_SECTOR_TO_ERASE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(USB_DATA_ALIGN)
|
||||||
|
# define USB_DATA_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BOOT_DEVICES_SELECTION
|
||||||
|
# define BOOT_DEVICES_SELECTION USB0_DEV|SERIAL0_DEV|SERIAL1_DEV
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BOOT_DEVICES_FILTER_ONUSB
|
||||||
|
# define BOOT_DEVICES_FILTER_ONUSB USB0_DEV|SERIAL0_DEV|SERIAL1_DEV
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* HW_CONFIG_H_ */
|
||||||
@@ -87,7 +87,7 @@ struct boardinfo board_info = {
|
|||||||
.board_type = BOARD_TYPE,
|
.board_type = BOARD_TYPE,
|
||||||
.board_rev = 0,
|
.board_rev = 0,
|
||||||
.fw_size = 0,
|
.fw_size = 0,
|
||||||
.systick_mhz = 416,
|
.systick_mhz = 480,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void board_init(void);
|
static void board_init(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user