Skip to content

Add support for mc02 & add custom controller #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@
[submodule "lib/eigen"]
path = lib/eigen
url = https://gitlab.com/libeigen/eigen.git
[submodule "hw/mcu/st/stm32h7xx_hal_driver"]
path = hw/mcu/st/stm32h7xx_hal_driver
url = https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_h7"]
path = hw/mcu/st/cmsis_device_h7
url = https://github.com/STMicroelectronics/cmsis_device_h7.git
6 changes: 6 additions & 0 deletions .gitmodules_cn
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@
[submodule "lib/eigen"]
path = lib/eigen
url = https://gitee.com/x-robot/eigen.git
[submodule "hw/mcu/st/stm32h7xx_hal_driver"]
path = hw/mcu/st/stm32h7xx_hal_driver
url = https://gitee.com/x-robot/stm32h7xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_h7"]
path = hw/mcu/st/cmsis_device_h7
url = https://gitee.com/x-robot/cmsis_device_h7.git
Empty file added hw/bsp/atom/Kconfig
Empty file.
55 changes: 55 additions & 0 deletions hw/bsp/atom/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
cmake_minimum_required(VERSION 3.11)

add_compile_definitions(STM32G431xx)

set(HAL_DIR ${MCU_DIR}/st/stm32g4xx_hal_driver)
set(STM32_CMSIS_DIR ${MCU_DIR}/st/cmsis_device_g4)
set(ARM_CMSIS_DIR ${LIB_DIR}/cmsis_5)

include(${MCU_DIR}/st/cmake/mcu_stm32g4.cmake)
include(${MCU_DIR}/st/cmake/toolchain_utils.cmake)

add_subdirectory(${BOARD_DIR}/drivers)

add_executable(${PROJECT_NAME}.elf ${BOARD_DIR}/main.cpp)

add_executable(${PROJECT_NAME}_with_bl.elf ${BOARD_DIR}/main.cpp)

target_link_libraries(
${PROJECT_NAME}.elf
PUBLIC bsp
PUBLIC system
PUBLIC robot)

target_link_libraries(
${PROJECT_NAME}_with_bl.elf
PUBLIC bsp
PUBLIC system
PUBLIC robot)


target_include_directories(
${PROJECT_NAME}.elf
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE $<TARGET_PROPERTY:bsp,INTERFACE_INCLUDE_DIRECTORIES>
PRIVATE $<TARGET_PROPERTY:system,INTERFACE_INCLUDE_DIRECTORIES>
PRIVATE $<TARGET_PROPERTY:robot,INTERFACE_INCLUDE_DIRECTORIES>
)

target_include_directories(
${PROJECT_NAME}_with_bl.elf
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE $<TARGET_PROPERTY:bsp,INTERFACE_INCLUDE_DIRECTORIES>
PRIVATE $<TARGET_PROPERTY:system,INTERFACE_INCLUDE_DIRECTORIES>
PRIVATE $<TARGET_PROPERTY:robot,INTERFACE_INCLUDE_DIRECTORIES>
)

target_link_options(${PROJECT_NAME}_with_bl.elf PRIVATE "-T${BOARD_DIR}/ld/LinkerScripts_with_bl.ld")

create_hex_output(${PROJECT_NAME})
create_bin_output(${PROJECT_NAME})
print_section_sizes(${PROJECT_NAME}.elf)

create_hex_output(${PROJECT_NAME}_with_bl)
create_bin_output(${PROJECT_NAME}_with_bl)
print_section_sizes(${PROJECT_NAME}_with_bl.elf)
96 changes: 96 additions & 0 deletions hw/bsp/atom/config/blink.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# CONFIG_auto_generated_config_prefix_board-rm-c is not set
# CONFIG_auto_generated_config_prefix_board-node_imu is not set
# CONFIG_auto_generated_config_prefix_board-f103_can is not set
CONFIG_auto_generated_config_prefix_board-atom=y
# CONFIG_auto_generated_config_prefix_board-microswitch is not set
# CONFIG_auto_generated_config_prefix_board-esp32-c3-idf is not set
# CONFIG_auto_generated_config_prefix_board-mangopi_r818 is not set
# CONFIG_auto_generated_config_prefix_board-MiniPC is not set
# CONFIG_auto_generated_config_prefix_board-Webots is not set
# CONFIG_auto_generated_config_prefix_board-esp32-c3-arduino is not set
# CONFIG_auto_generated_config_prefix_board-c-mini is not set
# CONFIG_auto_generated_config_prefix_system-None is not set
CONFIG_auto_generated_config_prefix_system-FreeRTOS=y
# CONFIG_auto_generated_config_prefix_system-Linux_Webots is not set
# CONFIG_auto_generated_config_prefix_system-Linux is not set

#
# FreeRTOS
#
CONFIG_INIT_TASK_STACK_DEPTH=1024
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=256
CONFIG_FREERTOS_USB_TASK_STACK_DEPTH=256
CONFIG_FREERTOS_TERM_TASK_STACK_DEPTH=512
# end of FreeRTOS

# CONFIG_auto_generated_config_prefix_robot-dart is not set
# CONFIG_auto_generated_config_prefix_robot-uart_net_config is not set
# CONFIG_auto_generated_config_prefix_robot-engineer is not set
# CONFIG_auto_generated_config_prefix_robot-infantry is not set
# CONFIG_auto_generated_config_prefix_robot-microswitch is not set
# CONFIG_auto_generated_config_prefix_robot-can_to_uart is not set
CONFIG_auto_generated_config_prefix_robot-blink=y
# CONFIG_auto_generated_config_prefix_robot-sentry is not set
# CONFIG_auto_generated_config_prefix_robot-ble_net_config is not set
# CONFIG_auto_generated_config_prefix_robot-wearlab_imu is not set
# CONFIG_auto_generated_config_prefix_robot-hero is not set
# CONFIG_auto_generated_config_prefix_robot-custom_controller is not set
# CONFIG_auto_generated_config_prefix_robot-sim_balance is not set
# CONFIG_auto_generated_config_prefix_robot-sim_mecanum is not set
# CONFIG_auto_generated_config_prefix_robot-balance_infantry is not set
# CONFIG_auto_generated_config_prefix_robot-udp_to_uart is not set

#
# 组件
#

#
# 设备
#
# CONFIG_auto_generated_config_prefix_device-wearlab is not set
# CONFIG_auto_generated_config_prefix_device-imu is not set
# CONFIG_auto_generated_config_prefix_device-ahrs is not set
# CONFIG_auto_generated_config_prefix_device-dr16 is not set
# CONFIG_auto_generated_config_prefix_device-mech is not set
# CONFIG_auto_generated_config_prefix_device-microswitch is not set
# CONFIG_auto_generated_config_prefix_device-net_config is not set
# CONFIG_auto_generated_config_prefix_device-laser is not set
# CONFIG_auto_generated_config_prefix_device-simulator is not set
# CONFIG_auto_generated_config_prefix_device-buzzer is not set
# CONFIG_auto_generated_config_prefix_device-tof is not set
# CONFIG_auto_generated_config_prefix_device-custom_controller is not set
CONFIG_auto_generated_config_prefix_device-blink_led=y
# CONFIG_auto_generated_config_prefix_device-led_rgb is not set
# CONFIG_auto_generated_config_prefix_device-motor is not set
# CONFIG_auto_generated_config_prefix_device-cap is not set
# CONFIG_auto_generated_config_prefix_device-can is not set
# CONFIG_auto_generated_config_prefix_device-ai is not set
# CONFIG_auto_generated_config_prefix_device-servo is not set
# CONFIG_auto_generated_config_prefix_device-bmi088 is not set
# CONFIG_auto_generated_config_prefix_device-referee is not set
# end of 设备

#
# 模块
#
# CONFIG_auto_generated_config_prefix_module-gimbal is not set
# CONFIG_auto_generated_config_prefix_module-uart_udp is not set
# CONFIG_auto_generated_config_prefix_module-chassis is not set
# CONFIG_auto_generated_config_prefix_module-balance is not set
# CONFIG_auto_generated_config_prefix_module-dart_gimbal is not set
# CONFIG_auto_generated_config_prefix_module-uart_udp_client is not set
# CONFIG_auto_generated_config_prefix_module-ore_collect is not set
# CONFIG_auto_generated_config_prefix_module-microswitch is not set
# CONFIG_auto_generated_config_prefix_module-wheel_leg is not set
# CONFIG_auto_generated_config_prefix_module-can_usart is not set
# CONFIG_auto_generated_config_prefix_module-ble_net_config is not set
# CONFIG_auto_generated_config_prefix_module-dart_launcher is not set
# CONFIG_auto_generated_config_prefix_module-custom_controller is not set
# CONFIG_auto_generated_config_prefix_module-can_imu is not set
# CONFIG_auto_generated_config_prefix_module-free_gimbal is not set
CONFIG_auto_generated_config_prefix_module-performance=y
# CONFIG_auto_generated_config_prefix_module-topic_share_uart is not set
# CONFIG_auto_generated_config_prefix_module-engineer_chassis is not set
# CONFIG_auto_generated_config_prefix_module-can_imu_wearlab is not set
# CONFIG_auto_generated_config_prefix_module-launcher is not set
# end of 模块
128 changes: 128 additions & 0 deletions hw/bsp/atom/config/canfd_imu.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# CONFIG_auto_generated_config_prefix_board-c-mini is not set
# CONFIG_auto_generated_config_prefix_board-dual_canfd is not set
# CONFIG_auto_generated_config_prefix_board-esp32-c3-arduino is not set
# CONFIG_auto_generated_config_prefix_board-esp32-c3-idf is not set
# CONFIG_auto_generated_config_prefix_board-f103_can is not set
# CONFIG_auto_generated_config_prefix_board-mangopi_r818 is not set
# CONFIG_auto_generated_config_prefix_board-mc02 is not set
# CONFIG_auto_generated_config_prefix_board-microswitch is not set
# CONFIG_auto_generated_config_prefix_board-MiniPC is not set
# CONFIG_auto_generated_config_prefix_board-MiniPC_with_canfd is not set
# CONFIG_auto_generated_config_prefix_board-node_imu is not set
# CONFIG_auto_generated_config_prefix_board-rm-c is not set
# CONFIG_auto_generated_config_prefix_board-Webots is not set
CONFIG_auto_generated_config_prefix_board-atom=y
# CONFIG_auto_generated_config_prefix_board-collar is not set
# CONFIG_auto_generated_config_prefix_board-emg-bsp-stm32g431cb is not set
# CONFIG_auto_generated_config_prefix_board-esp32c3_wifi_imu is not set
# CONFIG_auto_generated_config_prefix_system-Bootloader is not set
CONFIG_auto_generated_config_prefix_system-FreeRTOS=y
# CONFIG_auto_generated_config_prefix_system-Linux is not set
# CONFIG_auto_generated_config_prefix_system-Linux_Webots is not set
# CONFIG_auto_generated_config_prefix_system-None is not set

#
# FreeRTOS
#
CONFIG_INIT_TASK_STACK_DEPTH=768
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=256
CONFIG_FREERTOS_USB_TASK_STACK_DEPTH=256
CONFIG_FREERTOS_TERM_TASK_STACK_DEPTH=384
# end of FreeRTOS

# CONFIG_auto_generated_config_prefix_robot-balance_infantry is not set
# CONFIG_auto_generated_config_prefix_robot-ble_net_config is not set
# CONFIG_auto_generated_config_prefix_robot-blink is not set
# CONFIG_auto_generated_config_prefix_robot-bootloader is not set
# CONFIG_auto_generated_config_prefix_robot-canfd_to_uart is not set
# CONFIG_auto_generated_config_prefix_robot-can_to_uart is not set
# CONFIG_auto_generated_config_prefix_robot-custom_controller is not set
# CONFIG_auto_generated_config_prefix_robot-dart is not set
# CONFIG_auto_generated_config_prefix_robot-drone_gimbal is not set
# CONFIG_auto_generated_config_prefix_robot-engineer is not set
# CONFIG_auto_generated_config_prefix_robot-helm_infantry is not set
# CONFIG_auto_generated_config_prefix_robot-hero is not set
# CONFIG_auto_generated_config_prefix_robot-infantry is not set
# CONFIG_auto_generated_config_prefix_robot-microswitch is not set
# CONFIG_auto_generated_config_prefix_robot-sentry is not set
# CONFIG_auto_generated_config_prefix_robot-sim_balance is not set
# CONFIG_auto_generated_config_prefix_robot-sim_mecanum is not set
# CONFIG_auto_generated_config_prefix_robot-uart_net_config is not set
# CONFIG_auto_generated_config_prefix_robot-udp_to_uart is not set
# CONFIG_auto_generated_config_prefix_robot-wearlab_imu is not set
CONFIG_auto_generated_config_prefix_robot-canfd_imu=y
# CONFIG_auto_generated_config_prefix_robot-robot_collar is not set
# CONFIG_auto_generated_config_prefix_robot-robot_wifi_imu is not set

#
# 组件
#

#
# 设备
#
# CONFIG_auto_generated_config_prefix_device-ahrs is not set
CONFIG_DEVICE_AHRS_TASK_STACK_DEPTH=256
CONFIG_auto_generated_config_prefix_device-ahrs-9=y
# CONFIG_auto_generated_config_prefix_device-ai is not set
CONFIG_auto_generated_config_prefix_device-blink_led=y
# CONFIG_auto_generated_config_prefix_device-bmi088 is not set
# CONFIG_auto_generated_config_prefix_device-bq27220 is not set
# CONFIG_auto_generated_config_prefix_device-buzzer is not set
# CONFIG_auto_generated_config_prefix_device-can is not set
CONFIG_auto_generated_config_prefix_device-canfd=y
# CONFIG_auto_generated_config_prefix_device-cap is not set
# CONFIG_auto_generated_config_prefix_device-custom_controller is not set
# CONFIG_auto_generated_config_prefix_device-dev_bw16 is not set
# CONFIG_auto_generated_config_prefix_device-dr16 is not set
CONFIG_auto_generated_config_prefix_device-icm42688=y
CONFIG_DEVICE_ICM42688_TASK_STACK_DEPTH=256
# CONFIG_auto_generated_config_prefix_device-imu is not set
# CONFIG_auto_generated_config_prefix_device-ina226 is not set
# CONFIG_auto_generated_config_prefix_device-laser is not set
# CONFIG_auto_generated_config_prefix_device-led_rgb is not set
# CONFIG_auto_generated_config_prefix_device-mech is not set
# CONFIG_auto_generated_config_prefix_device-microswitch is not set
CONFIG_auto_generated_config_prefix_device-mmc5603=y
CONFIG_DEVICE_MMC5603_TASK_STACK_DEPTH=384
# CONFIG_auto_generated_config_prefix_device-motor is not set
# CONFIG_auto_generated_config_prefix_device-net_config is not set
# CONFIG_auto_generated_config_prefix_device-referee is not set
# CONFIG_auto_generated_config_prefix_device-servo is not set
# CONFIG_auto_generated_config_prefix_device-simulator is not set
# CONFIG_auto_generated_config_prefix_device-spl06_001 is not set
# CONFIG_auto_generated_config_prefix_device-tof is not set
# CONFIG_auto_generated_config_prefix_device-dev_gps is not set
# CONFIG_auto_generated_config_prefix_device-dev_net_config_smartconfig is not set
# CONFIG_auto_generated_config_prefix_device-dev_rdss is not set
CONFIG_auto_generated_config_prefix_device-wearlab=y
# end of 设备

#
# 模块
#
# CONFIG_auto_generated_config_prefix_module-balance is not set
# CONFIG_auto_generated_config_prefix_module-ble_net_config is not set
# CONFIG_auto_generated_config_prefix_module-canfd_to_uart is not set
# CONFIG_auto_generated_config_prefix_module-can_imu is not set
# CONFIG_auto_generated_config_prefix_module-can_imu_wearlab is not set
# CONFIG_auto_generated_config_prefix_module-can_usart is not set
# CONFIG_auto_generated_config_prefix_module-chassis is not set
# CONFIG_auto_generated_config_prefix_module-custom_controller is not set
# CONFIG_auto_generated_config_prefix_module-dart_gimbal is not set
# CONFIG_auto_generated_config_prefix_module-dart_launcher is not set
# CONFIG_auto_generated_config_prefix_module-engineer_chassis is not set
# CONFIG_auto_generated_config_prefix_module-gimbal is not set
# CONFIG_auto_generated_config_prefix_module-helm_chassis is not set
# CONFIG_auto_generated_config_prefix_module-launcher is not set
# CONFIG_auto_generated_config_prefix_module-launcher_drone is not set
# CONFIG_auto_generated_config_prefix_module-microswitch is not set
# CONFIG_auto_generated_config_prefix_module-ore_collect is not set
# CONFIG_auto_generated_config_prefix_module-performance is not set
# CONFIG_auto_generated_config_prefix_module-topic_share_uart is not set
# CONFIG_auto_generated_config_prefix_module-uart_update is not set
# CONFIG_auto_generated_config_prefix_module-wheel_leg is not set
CONFIG_auto_generated_config_prefix_module-canfd_imu=y
# CONFIG_auto_generated_config_prefix_module-collar_ctrl is not set
# CONFIG_auto_generated_config_prefix_module-mod_research_imu is not set
# end of 模块
Loading
Loading