openBLT-系统结构及框架

2023-05-16

openBLT-系统结构及框架

  • 前言
  • 1 框架
    • 1.1设备层
    • 1.2中间件
      • 1.2.1 COM
      • 1.2.2 BACKDOOR
      • 1.2.3 FILE
    • 1.3应用层

前言

openBLT 是开源的小型嵌入式系统bootloader,目前支持ST、NXP、T、InfineonI等多个厂商的ARM、HSC12等内核MCU,非常小巧精致,整体代码整洁规范,下面就从整体上梳理下openBLT。

1 框架

在这里插入图片描述
先整体把握一下openBLT的框架,所谓一图胜千言,从上面的图基本就能大概看懂整体系统框架以及实现的机制了。接下来逐个击破。

1.1设备层

设备层是最接近硬件设备的部分,涵盖了在固件升级过程中会使用到的各个硬件接口,如:

  • 通信接口:CAN、ETH、USART、USB、IIC、MMC等
  • 外设模块:TIM、FLASH等

openBLT在设备层针对不同的MCU做了不同的硬件实现,每个硬件接口都做了统一了约定。

  • CAN底层接口
/************************************************************************************//**
* \file         Source/can.h
* \brief        Bootloader CAN communication interface header file.
* \ingroup      Core
* \internal
*-----------------------------------------------------------------------------------*/
#ifndef CAN_H
#define CAN_H

#if (BOOT_COM_CAN_ENABLE > 0)
/****************************************************************************************
* Function prototypes
****************************************************************************************/
void     CanInit(void);
void     CanTransmitPacket(blt_int8u *data, blt_int8u len);
blt_bool CanReceivePacket(blt_int8u *data, blt_int8u *len);
#endif /* BOOT_COM_CAN_ENABLE > 0 */

#endif /* CAN_H */
  • UART底层接口
/************************************************************************************//**
* \file         Source/uart.h
* \brief        Bootloader UART communication interface header file.
* \ingroup      Core
* \internal
*------------------------------------------------------------------------------------*/
#ifndef UART_H
#define UART_H

#if (BOOT_COM_UART_ENABLE > 0)
/****************************************************************************************
* Function prototypes
****************************************************************************************/
void     UartInit(void);
void     UartTransmitPacket(blt_int8u *data, blt_int8u len);
blt_bool UartReceivePacket(blt_int8u *data, blt_int8u *len);
#endif /* BOOT_COM_UART_ENABLE > 0 */


#endif /* UART_H */
/*********************************** end of uart.h *************************************/

类似的都对设备的硬件接口进行统一了封装,这样做的好处有二:

  • 方便了接下来中间件实现更高一级的功能实现;
  • 实现了中间件与不同硬件MCU的隔离,方便不同平台的移植。

所以这一层的文件下就会有各种各样的板级文件夹,里面实现了不同MCU底层驱动的封装:

.
├── ARM7_LPC2000
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM0_STM32F0
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── Keil
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM0_XMC1
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM3_EFM32
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM3_LM3S
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM3_STM32F1
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── Keil
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   ├── uart.c
│   └── usb.c
├── ARMCM3_STM32F2
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM4_STM32F3
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   ├── uart.c
│   └── usb.c
├── ARMCM4_STM32F4
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   ├── uart.c
│   └── usb.c
├── ARMCM4_STM32L4
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM4_TM4C
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   ├── uart.c
│   └── usb.c
├── ARMCM4_XMC4
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── ARMCM7_STM32F7
│   ├── can.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   └── cpu_comp.c
│   ├── IAR
│   │   └── cpu_comp.c
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c
├── HCS12
│   ├── can.c
│   ├── CodeWarrior
│   │   └── cpu_comp.c
│   ├── cpu.c
│   ├── flash.c
│   ├── flash_ecc.c
│   ├── flash.h
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c

├── TRICORE_TC1798
│   ├── cpu.c
│   ├── flash.c
│   ├── flash.h
│   ├── GCC
│   │   ├── cpu_comp.c
│   │   └── cpu_comp.h
│   ├── nvm.c
│   ├── target.dox
│   ├── timer.c
│   ├── types.h
│   └── uart.c

1.2中间件

有了设备层的加持,中间件就可以实现更多高级的东西啦,在最开始的框图里面,我们在第二层里面能看到很多的中间件:

  • COM,负责整个通信数据的收发
    • 硬件层面,CAN、UART、ETH、USB等等;
    • 应用协议,XCP;
  • COP,看门狗;
  • DOOR,后门,负责固件跳转、与主机端连接等工作;
  • FILE,负责实现固件从文件系统(FatFS)中进行更新的逻辑;
  • Assert,断言检测,出现异常后,保持正常喂看门狗,防止异常程序跑飞;

可以说中间件在设备层的支持下,基本实现了固件数据的获取(CAN、UART、USB、ETH、MMC等)以及固件更新(NVM);

1.2.1 COM

COM主要功能逻辑是通过硬件接口获取数数据、按照既定的协议进行数据的解包和封包,完成整个系统的数据交换;

/************************************************************************************//**
* \file         Source/com.h
* \brief        Bootloader communication interface header file.
* \ingroup      Core
* \internal
*----------------------------------------------------------------------------------------*/
#ifndef COM_H
#define COM_H

#if (BOOT_COM_ENABLE > 0)
/****************************************************************************************
* Include files
****************************************************************************************/
#include "xcp.h"                                      /* xcp communication layer       */


/****************************************************************************************
* Macro definitions
****************************************************************************************/
/** \brief Defines the maximum number of bytes for transport layer reception
 *         depending on the activates interface(s).
 */
#define BOOT_COM_RX_MAX_DATA            (1)
/* update in case CAN interface uses more */
#if (BOOT_COM_CAN_RX_MAX_DATA > BOOT_COM_RX_MAX_DATA)
#undef BOOT_COM_RX_MAX_DATA
#define BOOT_COM_RX_MAX_DATA            (BOOT_COM_CAN_RX_MAX_DATA)
#endif
/* update in case UART interface uses more */
#if (BOOT_COM_UART_RX_MAX_DATA > BOOT_COM_RX_MAX_DATA)
#undef BOOT_COM_RX_MAX_DATA
#define BOOT_COM_RX_MAX_DATA            (BOOT_COM_UART_RX_MAX_DATA)
#endif
/* update in case USB interface uses more */
#if (BOOT_COM_USB_RX_MAX_DATA > BOOT_COM_RX_MAX_DATA)
#undef BOOT_COM_RX_MAX_DATA
#define BOOT_COM_RX_MAX_DATA            (BOOT_COM_USB_RX_MAX_DATA)
#endif
/* update in case NET interface uses more */
#if (BOOT_COM_NET_RX_MAX_DATA > BOOT_COM_RX_MAX_DATA)
#undef BOOT_COM_RX_MAX_DATA
#define BOOT_COM_RX_MAX_DATA            (BOOT_COM_NET_RX_MAX_DATA)
#endif

/** \brief Defines the maximum number of bytes for transport layer transmission
 *         depending on the activates interface(s).
 */
#define BOOT_COM_TX_MAX_DATA            (1)
/* update in case CAN interface uses more */
#if (BOOT_COM_CAN_TX_MAX_DATA > BOOT_COM_TX_MAX_DATA)
#undef BOOT_COM_TX_MAX_DATA
#define BOOT_COM_TX_MAX_DATA            (BOOT_COM_CAN_TX_MAX_DATA)
#endif
/* update in case UART interface uses more */
#if (BOOT_COM_UART_TX_MAX_DATA > BOOT_COM_TX_MAX_DATA)
#undef BOOT_COM_TX_MAX_DATA
#define BOOT_COM_TX_MAX_DATA            (BOOT_COM_UART_TX_MAX_DATA)
#endif
/* update in case USB interface uses more */
#if (BOOT_COM_USB_TX_MAX_DATA > BOOT_COM_TX_MAX_DATA)
#undef BOOT_COM_TX_MAX_DATA
#define BOOT_COM_TX_MAX_DATA            (BOOT_COM_USB_TX_MAX_DATA)
#endif
/* update in case NET interface uses more */
#if (BOOT_COM_NET_TX_MAX_DATA > BOOT_COM_TX_MAX_DATA)
#undef BOOT_COM_TX_MAX_DATA
#define BOOT_COM_TX_MAX_DATA            (BOOT_COM_NET_TX_MAX_DATA)
#endif


/****************************************************************************************
* Plausibility
****************************************************************************************/
#if (BOOT_COM_TX_MAX_DATA < 1)
#undef BOOT_COM_TX_MAX_DATA
#define BOOT_COM_TX_MAX_DATA   (8)
#endif

#if (BOOT_COM_TX_MAX_DATA > 256)
#error  "COM.H, BOOT_COM_TX_MAX_DATA cannot be larger than 256."
#endif

#if (BOOT_COM_RX_MAX_DATA < 1)
#undef BOOT_COM_RX_MAX_DATA
#define BOOT_COM_RX_MAX_DATA   (8)
#endif

#if (BOOT_COM_RX_MAX_DATA > 65536)
#error  "COM.H, BOOT_COM_RX_MAX_DATA cannot be larger than 65536."
#endif


/****************************************************************************************
* Type definitions
****************************************************************************************/
/** \brief Enumeration for the different communication interfaces. */
typedef enum
{
  COM_IF_UART,                                   /**< UART interface                   */
  COM_IF_CAN,                                    /**< CAN interface                    */
  COM_IF_USB,                                    /**< USB interface                    */
  COM_IF_NET,                                    /**< NET interface                    */
  COM_IF_OTHER                                   /**< Other interface                  */
} tComInterfaceId;


/****************************************************************************************
* Function prototypes
****************************************************************************************/
void       ComInit(void);
#if (BOOT_COM_DEFERRED_INIT_ENABLE == 1)
void       ComDeferredInit(void);
#endif
void       ComTask(void);
void       ComFree(void);
blt_int16u ComGetActiveInterfaceMaxRxLen(void);
blt_int16u ComGetActiveInterfaceMaxTxLen(void);
void       ComTransmitPacket(blt_int8u *data, blt_int16u len);
blt_bool   ComIsConnected(void);

#endif /* BOOT_COM_ENABLE > 0 */

#endif /* COM_H */
/*********************************** end of com.h **************************************/

/**********************************************************************************//
** \brief Updates the communication module by checking if new data was received
** and submitting the request to process newly received data.
** \return none
**
****************************************************************************************/
void ComTask(void);
主要是完成硬件接口的数据获取(调用设备层通信接口),然后调用XCP接口进行解析

/**********************************************************************************//
** \brief Releases the communication module.
** \return none
**
****************************************************************************************/
void ComFree(void);
调用硬件接口关闭底层通信

/**********************************************************************************//
** \brief Transmits the packet using the xcp transport layer.
** \param data Pointer to the byte buffer with packet data.
** \param len Number of data bytes that need to be transmitted.
** \return none
**
****************************************************************************************/
void ComTransmitPacket(blt_int8u *data, blt_int16u len)
调用XCP接口进行数据封包

1.2.2 BACKDOOR

Backdoor整体逻辑比较简单,主要判断是否满足程序跳转逻辑。

  • 是否超时
  • 是否与主机建立连接
/************************************************************************************//**
* \file         Source/backdoor.h
* \brief        Bootloader backdoor entry header file.
* \ingroup      Core
* \internal
*----------------------------------------------------------------------------------------*/
#ifndef BACKDOOR_H
#define BACKDOOR_H

/****************************************************************************************
* Function prototypes
****************************************************************************************/
void       BackDoorInit(void);
void       BackDoorCheck(void);
#if (BOOT_BACKDOOR_HOOKS_ENABLE == 0)
void       BackDoorSetExtension(blt_int32u extension_ms);
blt_int32u BackDoorGetExtension(void);
void       BackDoorRestartTimer(void);
#endif

#endif /* BACKDOOR_H */
/*********************************** end of backdoor.h *********************************/

1.2.3 FILE

file实现固件从文件系统中更新,依赖MMC、USB等设备接口的支持。

/************************************************************************************//**
* \file         Source/file.h
* \brief        Bootloader file system interface header file.
* \ingroup      Core
* \internal
*----------------------------------------------------------------------------------------*/
#ifndef FILE_H
#define FILE_H

#if (BOOT_FILE_SYS_ENABLE > 0)
/****************************************************************************************
* Include files
****************************************************************************************/
#include "ff.h"                                  /* FATFS file system library          */


/****************************************************************************************
* Defines
****************************************************************************************/
/** \brief Error code for not being able to open the firmware file. */
#define FILE_ERROR_CANNOT_OPEN_FIRMWARE_FILE       (1)
/** \brief Error code for not being able to read from the firmware file. */
#define FILE_ERROR_CANNOT_READ_FROM_FILE           (2)
/** \brief Error code because in incorrect checksum was found in the firmware file. */
#define FILE_ERROR_INVALID_CHECKSUM_IN_FILE        (3)
/** \brief Error code because the file pointers read pointer could not be rewinded. */
#define FILE_ERROR_REWINDING_FILE_READ_POINTER     (4)
/** \brief Error code because an error occurred during the memory erase operation. */
#define FILE_ERROR_CANNOT_ERASE_MEMORY             (5)
/** \brief Error code because an error occurred during the memory write operation. */
#define FILE_ERROR_CANNOT_PROGRAM_MEMORY           (6)
/** \brief Error code because the program's checksum could not be written to memory. */
#define FILE_ERROR_CANNOT_WRITE_CHECKSUM           (7)

/** \brief Maximum number of characters that can be on a line in the firmware file. */
#define MAX_CHARS_PER_LINE                  (256)
/** \brief Maximum number of data bytes that can be on a line in the firmware file
 *         (S-record).
 */
#define MAX_DATA_BYTES_PER_LINE             (MAX_CHARS_PER_LINE/2)
/** \brief Return code in case an invalid checksum was detected on an S-record line. */
#define ERROR_SREC_INVALID_CHECKSUM         (-1)


/****************************************************************************************
* Type definitions
****************************************************************************************/
/** \brief Enumeration for the different S-record line types. */
typedef enum
{
  LINE_TYPE_S1,                                  /**< 16-bit address line              */
  LINE_TYPE_S2,                                  /**< 24-bit address line              */
  LINE_TYPE_S3,                                  /**< 32-bit address line              */
  LINE_TYPE_UNSUPPORTED                          /**< unsupported line                 */
} tSrecLineType;

/** \brief Structure type for grouping the parsing results of an S-record line. */
typedef struct
{
  blt_char  line[MAX_CHARS_PER_LINE];            /**< string buffer for the line chars */
  blt_int8u data[MAX_DATA_BYTES_PER_LINE];       /**< array for S1, S2 or S3 data bytes*/
  blt_addr  address;                             /**< address on S1, S2 or S3 line     */
} tSrecLineParseObject;


/****************************************************************************************
* Function prototypes
****************************************************************************************/
void          FileInit(void);
void          FileTask(void);
blt_bool      FileIsIdle(void);
blt_bool      FileHandleFirmwareUpdateRequest(void);
/* functions for reading data from a Motorola S-record file. */
tSrecLineType FileSrecGetLineType(const blt_char *line);
blt_bool      FileSrecVerifyChecksum(const blt_char *line);
blt_int16s    FileSrecParseLine(const blt_char *line, blt_addr *address, blt_int8u *data);

#endif /* BOOT_FILE_SYS_ENABLE > 0 */


#endif /* FILE_H */
/*********************************** end of file.h *************************************/

1.3应用层

应用层主要是通过调用各个中间件来实现整个完整openBLT的应用逻辑。

/************************************************************************************//**
* \file         Source/boot.h
* \brief        Bootloader core module header file.
* \ingroup      Core
* \internal
*------------------------------------------------------------------------------------*/
#ifndef BOOT_H
#define BOOT_H

/****************************************************************************************
* Defines
****************************************************************************************/
/** \brief Main version number of the bootloader core. */
#define BOOT_VERSION_CORE_MAIN     (1u)
/** \brief Minor version number of the bootloader core. */
#define BOOT_VERSION_CORE_MINOR    (8u)
/** \brief Patch number of the bootloader core. */
#define BOOT_VERSION_CORE_PATCH    (0u)


/****************************************************************************************
* Include files
****************************************************************************************/
/* Note that it is possible to override the standard blt_conf.h configuration header
 * file with a project specific one that is defined in the IDE/makefile. For example,
 * the following define could be configured: PROJ_BLT_CONF_H="my_boot_config.h". This can
 * be handy if you use the bootloader in several projects with a different configuration,
 * and enables you to have just one bootloader source base.
 */
#include "types.h"                                    /* variable types                */
#include "assert.h"                                   /* assertion checks              */
#ifdef PROJ_BLT_CONF_H
#include PROJ_BLT_CONF_H                              /* custom configuration          */
#else
#include "blt_conf.h"                                 /* bootloader configuration      */
#endif /* PROJ_BLT_CONF_H */
#include "plausibility.h"                             /* plausibility checks           */
#include "cpu.h"                                      /* cpu driver module             */
#include "cop.h"                                      /* watchdog driver module        */
#include "nvm.h"                                      /* memory driver module          */
#include "timer.h"                                    /* timer driver module           */
#include "backdoor.h"                                 /* backdoor entry module         */
#include "file.h"                                     /* file system module            */
#include "com.h"                                      /* communication interface       */
#include "led.h"                                      /* communication interface       */
#if (ADDON_GATEWAY_MOD_ENABLE > 0)
#include "gateway.h"                                  /* gateway add-on module         */
#endif


/****************************************************************************************
* Function prototypes
****************************************************************************************/
void BootInit(void);
void BootTask(void);


#endif /* BOOT_H */
/*********************************** end of boot.h *************************************/

整个代码运行的功能逻辑入口就在void BootTask(void);

/************************************************************************************//**
** \brief     Task function of the bootloader core that drives the program.
** \return    none
**
****************************************************************************************/
void BootTask(void)
{
  /* service the watchdog */
  CopService();
  /* update the millisecond timer */
  TimerUpdate();
  /* update the led */
  LedBlinkTask();
#if (BOOT_FILE_SYS_ENABLE > 0)
  /* call worker task for updating firmware from locally attached file storage */
  FileTask();
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
#if (BOOT_COM_ENABLE > 0)
  /* process possibly pending communication data */
  ComTask();
#endif
#if (ADDON_GATEWAY_MOD_ENABLE > 0)
  /* run the gateway */
  GatewayTask();
#endif
  /* control the backdoor */
  BackDoorCheck();
} /*** end of BootTask ***/

总体来说openBLT的代码层级非常清晰,也很简洁,是一个非常不错的bootloader。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

openBLT-系统结构及框架 的相关文章

随机推荐

  • 跌倒检测和识别3:Android实现跌倒检测(含源码,可实时跌倒检测)

    跌倒检测和识别3 xff1a Android实现跌倒检测 含源码 xff0c 可实时跌倒检测 目录 跌倒检测和识别3 xff1a Android实现跌倒检测 含源码 xff0c 可实时跌倒检测 1 前言 2 跌倒检测数据集说明 3 基于YO
  • 跌倒检测和识别4:C++实现跌倒检测(含源码,可实时跌倒检测)

    跌倒检测和识别4 xff1a C 43 43 实现跌倒检测 含源码 xff0c 可实时跌倒检测 目录 跌倒检测和识别4 xff1a C 43 43 实现跌倒检测 含源码 xff0c 可实时跌倒检测 1 前言 2 跌倒检测模型 xff08 Y
  • 接口测试工具:Postman

    无论是接口调试还是接口测试 xff0c postman都算的上很优秀的工具 xff0c 好多接口测试平台 接口测试工具框架的设计也都能看到postman的影子 xff0c 我们真正了解了这款工具 xff0c 才可以在这个基础上进行自己的设计
  • ROS实验笔记之——move_base_simple/goal

    本博文打算通过节点发布导航的坐标让机器人自动移动到目标点 通过自定义节点来实现导航功能 nbsp 目录 创建仿真环境 编写导航发布者 move base msgs MoveBaseActionGoal Message 实现代码 参考资料 n
  • ROS实验笔记之——自主搭建四旋翼无人机

    最近搭建了一台小的四旋翼无人机 xff0c 本博文记录一下搭建的过程以及一些问题 请问我博客就记录了自己做实验的搭建的飞机有什么问题 xff1f xff1f xff1f 目录 组装 飞行前准备 试飞 组装 首先是一系列的散装原件 到最后搭建
  • ROS实验笔记之——基于l515激光相机的FLVIS与MLMapping

    之前博客 ROS实验笔记之 VINS Mono在l515上的实现 在l515上实现了vins xff0c 博客 ROS实验笔记之 SLAM无人驾驶初入门 配置flvis并跑了对应的kitti数据集 本博文在l515上先实现flvis然后再用
  • Chapter 2. ROS 创建和编译功能包

    1 创建ROS功能包 使用catkin create pkg命令来创建一个新的catkin程序包 首先切换到之前通过创建catkin工作空间教程创建的catkin工作空间中的src目录下 xff1a ros workspace span c
  • linux ulimit命令用法解析

    以下内容转载自 xff1a http www linuxidc com Linux 2012 10 72782 htm Linux对于每个用户 xff0c 系统限制其最大进程数 为提高性能 xff0c 可以根据设备资源情况 xff0c 设置
  • 机体坐标系的角速度分量

    一 角速度分量 机体坐标系的三个角速度分量 xff0c 是机体坐标系相对于地面坐标系的转动角速度在机体坐标系各轴上的分量 其中 xff1a 角速度 xff50 xff0c 与机体轴 xff58 重合一致 xff1b 角速度 xff51 xf
  • 使用Realsense测试aruco_ros包

    01 准备工作 安装realsense ros安装aruco ros span class token builtin class name cd span ur ws src span class token function git s
  • DIY遥控船(一):电调和舵机的驱动[使用STC89C52]

    在动力模型中 xff0c 有两样东西是最基本 最必要的 xff0c 即舵机和无刷电机 舵机提供转动特定角度的功能 xff0c 而无刷电机需要由电调 xff0d xff0d 电子调速器驱动 舵机 舵机又叫伺服电机 xff0c 可以按照输入的指
  • GD32VF103之CRC

    在GD32VF103内部有一个CRC 循环冗余校验计算单元 xff0c 使用它可以对数据的完整性和正确性进行校验 xff0c 比如固件的完整性和正确性校验 通信数据的校验等 它使用固定的32位多项式 xff1a 0x4C11DB7 xff1
  • GD32VF103之GPIO最小配置

    longan nano是Sipeed xff08 矽速科技 xff09 推出的开发板 xff0c 使用兆易创新的gd32vf103cbt6芯片 xff0c 该芯片是基于芯来科技的Nuclei Bumblebee处理器的32位通用微控制器 x
  • Linux控制I2C/SMBus设备

    平台 xff1a 树莓派 bcm2835 Raspberry Pi 3 Model B Rev 1 2 I2C是Philips开发的一种两线通信协议 xff0c 常用于一些对速度要求不高的小型器件上 SMBus是系统管理总线 xff0c 基
  • ArduPilot/APM源码学习笔记(一)

    最近开始学习ArduPilot APM飞控的源码 xff0c 源码托管在github上 源码链接 xff1a https github com diydrones ardupilot 飞控主页 xff1a http ardupilot co
  • GRUB2引导修复

    本来是想把GRUB2装到U盘 xff0c 却不小心把电脑的GRUB搞坏了 原因可能是我执行命令grub install时没有加任何参数 xff0c 由于不知道没有参数怎么执行 xff0c 我赶紧ctrl 43 c终止了安装 xff0c 最后
  • ardupilot的libraries之PID

    在源码的libraries中 xff0c 有两个关于PID的源文件文件夹 xff0c 一个叫AC PID xff0c 另一个是PID AC PID中又细分为AC HELI PID AC P和AC PID xff0c 这里我们只讨论AC PI
  • stm32串口HAL库的DMA发送问题

    本文使用stm32f411ret的串口1的DMA方式发送数据 xff0c 刚开始调试的时候发现串口只能发送一次数据 xff0c 之后就把系统hang住了 通过网上搜资料和不断尝试 xff0c 发现问题是中断回调函数没有写的原因 使用HAL库
  • stm32的HAL库i2c从机实现

    stm32的i2c默认就是slave模式 xff0c 本文基于HAL库实现中断方式的接收和发送 xff0c 首先是初始化gpio和i2c xff0c 代码如下 xff1a I2C HandleTypeDef I2cHandle void H
  • openBLT-系统结构及框架

    openBLT 系统结构及框架 前言1 框架1 1设备层1 2中间件1 2 1 COM1 2 2 BACKDOOR1 2 3 FILE 1 3应用层 前言 openBLT 是开源的小型嵌入式系统bootloader xff0c 目前支持ST