Skip to content

Commit 2ed8fe1

Browse files
authored
Merge pull request #68 from xrobot-org/dev
Add support for mc02 & add custom controller
2 parents d9253e8 + f767d04 commit 2ed8fe1

File tree

192 files changed

+25468
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+25468
-91
lines changed

Diff for: .gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@
6464
[submodule "lib/eigen"]
6565
path = lib/eigen
6666
url = https://gitlab.com/libeigen/eigen.git
67+
[submodule "hw/mcu/st/stm32h7xx_hal_driver"]
68+
path = hw/mcu/st/stm32h7xx_hal_driver
69+
url = https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git
70+
[submodule "hw/mcu/st/cmsis_device_h7"]
71+
path = hw/mcu/st/cmsis_device_h7
72+
url = https://github.com/STMicroelectronics/cmsis_device_h7.git

Diff for: .gitmodules_cn

+6
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@
6464
[submodule "lib/eigen"]
6565
path = lib/eigen
6666
url = https://gitee.com/x-robot/eigen.git
67+
[submodule "hw/mcu/st/stm32h7xx_hal_driver"]
68+
path = hw/mcu/st/stm32h7xx_hal_driver
69+
url = https://gitee.com/x-robot/stm32h7xx_hal_driver.git
70+
[submodule "hw/mcu/st/cmsis_device_h7"]
71+
path = hw/mcu/st/cmsis_device_h7
72+
url = https://gitee.com/x-robot/cmsis_device_h7.git

Diff for: hw/bsp/atom/Kconfig

Whitespace-only changes.

Diff for: hw/bsp/atom/board.cmake

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
cmake_minimum_required(VERSION 3.11)
2+
3+
add_compile_definitions(STM32G431xx)
4+
5+
set(HAL_DIR ${MCU_DIR}/st/stm32g4xx_hal_driver)
6+
set(STM32_CMSIS_DIR ${MCU_DIR}/st/cmsis_device_g4)
7+
set(ARM_CMSIS_DIR ${LIB_DIR}/cmsis_5)
8+
9+
include(${MCU_DIR}/st/cmake/mcu_stm32g4.cmake)
10+
include(${MCU_DIR}/st/cmake/toolchain_utils.cmake)
11+
12+
add_subdirectory(${BOARD_DIR}/drivers)
13+
14+
add_executable(${PROJECT_NAME}.elf ${BOARD_DIR}/main.cpp)
15+
16+
add_executable(${PROJECT_NAME}_with_bl.elf ${BOARD_DIR}/main.cpp)
17+
18+
target_link_libraries(
19+
${PROJECT_NAME}.elf
20+
PUBLIC bsp
21+
PUBLIC system
22+
PUBLIC robot)
23+
24+
target_link_libraries(
25+
${PROJECT_NAME}_with_bl.elf
26+
PUBLIC bsp
27+
PUBLIC system
28+
PUBLIC robot)
29+
30+
31+
target_include_directories(
32+
${PROJECT_NAME}.elf
33+
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
34+
PRIVATE $<TARGET_PROPERTY:bsp,INTERFACE_INCLUDE_DIRECTORIES>
35+
PRIVATE $<TARGET_PROPERTY:system,INTERFACE_INCLUDE_DIRECTORIES>
36+
PRIVATE $<TARGET_PROPERTY:robot,INTERFACE_INCLUDE_DIRECTORIES>
37+
)
38+
39+
target_include_directories(
40+
${PROJECT_NAME}_with_bl.elf
41+
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
42+
PRIVATE $<TARGET_PROPERTY:bsp,INTERFACE_INCLUDE_DIRECTORIES>
43+
PRIVATE $<TARGET_PROPERTY:system,INTERFACE_INCLUDE_DIRECTORIES>
44+
PRIVATE $<TARGET_PROPERTY:robot,INTERFACE_INCLUDE_DIRECTORIES>
45+
)
46+
47+
target_link_options(${PROJECT_NAME}_with_bl.elf PRIVATE "-T${BOARD_DIR}/ld/LinkerScripts_with_bl.ld")
48+
49+
create_hex_output(${PROJECT_NAME})
50+
create_bin_output(${PROJECT_NAME})
51+
print_section_sizes(${PROJECT_NAME}.elf)
52+
53+
create_hex_output(${PROJECT_NAME}_with_bl)
54+
create_bin_output(${PROJECT_NAME}_with_bl)
55+
print_section_sizes(${PROJECT_NAME}_with_bl.elf)

Diff for: hw/bsp/atom/config/blink.config

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# CONFIG_auto_generated_config_prefix_board-rm-c is not set
2+
# CONFIG_auto_generated_config_prefix_board-node_imu is not set
3+
# CONFIG_auto_generated_config_prefix_board-f103_can is not set
4+
CONFIG_auto_generated_config_prefix_board-atom=y
5+
# CONFIG_auto_generated_config_prefix_board-microswitch is not set
6+
# CONFIG_auto_generated_config_prefix_board-esp32-c3-idf is not set
7+
# CONFIG_auto_generated_config_prefix_board-mangopi_r818 is not set
8+
# CONFIG_auto_generated_config_prefix_board-MiniPC is not set
9+
# CONFIG_auto_generated_config_prefix_board-Webots is not set
10+
# CONFIG_auto_generated_config_prefix_board-esp32-c3-arduino is not set
11+
# CONFIG_auto_generated_config_prefix_board-c-mini is not set
12+
# CONFIG_auto_generated_config_prefix_system-None is not set
13+
CONFIG_auto_generated_config_prefix_system-FreeRTOS=y
14+
# CONFIG_auto_generated_config_prefix_system-Linux_Webots is not set
15+
# CONFIG_auto_generated_config_prefix_system-Linux is not set
16+
17+
#
18+
# FreeRTOS
19+
#
20+
CONFIG_INIT_TASK_STACK_DEPTH=1024
21+
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=256
22+
CONFIG_FREERTOS_USB_TASK_STACK_DEPTH=256
23+
CONFIG_FREERTOS_TERM_TASK_STACK_DEPTH=512
24+
# end of FreeRTOS
25+
26+
# CONFIG_auto_generated_config_prefix_robot-dart is not set
27+
# CONFIG_auto_generated_config_prefix_robot-uart_net_config is not set
28+
# CONFIG_auto_generated_config_prefix_robot-engineer is not set
29+
# CONFIG_auto_generated_config_prefix_robot-infantry is not set
30+
# CONFIG_auto_generated_config_prefix_robot-microswitch is not set
31+
# CONFIG_auto_generated_config_prefix_robot-can_to_uart is not set
32+
CONFIG_auto_generated_config_prefix_robot-blink=y
33+
# CONFIG_auto_generated_config_prefix_robot-sentry is not set
34+
# CONFIG_auto_generated_config_prefix_robot-ble_net_config is not set
35+
# CONFIG_auto_generated_config_prefix_robot-wearlab_imu is not set
36+
# CONFIG_auto_generated_config_prefix_robot-hero is not set
37+
# CONFIG_auto_generated_config_prefix_robot-custom_controller is not set
38+
# CONFIG_auto_generated_config_prefix_robot-sim_balance is not set
39+
# CONFIG_auto_generated_config_prefix_robot-sim_mecanum is not set
40+
# CONFIG_auto_generated_config_prefix_robot-balance_infantry is not set
41+
# CONFIG_auto_generated_config_prefix_robot-udp_to_uart is not set
42+
43+
#
44+
# 组件
45+
#
46+
47+
#
48+
# 设备
49+
#
50+
# CONFIG_auto_generated_config_prefix_device-wearlab is not set
51+
# CONFIG_auto_generated_config_prefix_device-imu is not set
52+
# CONFIG_auto_generated_config_prefix_device-ahrs is not set
53+
# CONFIG_auto_generated_config_prefix_device-dr16 is not set
54+
# CONFIG_auto_generated_config_prefix_device-mech is not set
55+
# CONFIG_auto_generated_config_prefix_device-microswitch is not set
56+
# CONFIG_auto_generated_config_prefix_device-net_config is not set
57+
# CONFIG_auto_generated_config_prefix_device-laser is not set
58+
# CONFIG_auto_generated_config_prefix_device-simulator is not set
59+
# CONFIG_auto_generated_config_prefix_device-buzzer is not set
60+
# CONFIG_auto_generated_config_prefix_device-tof is not set
61+
# CONFIG_auto_generated_config_prefix_device-custom_controller is not set
62+
CONFIG_auto_generated_config_prefix_device-blink_led=y
63+
# CONFIG_auto_generated_config_prefix_device-led_rgb is not set
64+
# CONFIG_auto_generated_config_prefix_device-motor is not set
65+
# CONFIG_auto_generated_config_prefix_device-cap is not set
66+
# CONFIG_auto_generated_config_prefix_device-can is not set
67+
# CONFIG_auto_generated_config_prefix_device-ai is not set
68+
# CONFIG_auto_generated_config_prefix_device-servo is not set
69+
# CONFIG_auto_generated_config_prefix_device-bmi088 is not set
70+
# CONFIG_auto_generated_config_prefix_device-referee is not set
71+
# end of 设备
72+
73+
#
74+
# 模块
75+
#
76+
# CONFIG_auto_generated_config_prefix_module-gimbal is not set
77+
# CONFIG_auto_generated_config_prefix_module-uart_udp is not set
78+
# CONFIG_auto_generated_config_prefix_module-chassis is not set
79+
# CONFIG_auto_generated_config_prefix_module-balance is not set
80+
# CONFIG_auto_generated_config_prefix_module-dart_gimbal is not set
81+
# CONFIG_auto_generated_config_prefix_module-uart_udp_client is not set
82+
# CONFIG_auto_generated_config_prefix_module-ore_collect is not set
83+
# CONFIG_auto_generated_config_prefix_module-microswitch is not set
84+
# CONFIG_auto_generated_config_prefix_module-wheel_leg is not set
85+
# CONFIG_auto_generated_config_prefix_module-can_usart is not set
86+
# CONFIG_auto_generated_config_prefix_module-ble_net_config is not set
87+
# CONFIG_auto_generated_config_prefix_module-dart_launcher is not set
88+
# CONFIG_auto_generated_config_prefix_module-custom_controller is not set
89+
# CONFIG_auto_generated_config_prefix_module-can_imu is not set
90+
# CONFIG_auto_generated_config_prefix_module-free_gimbal is not set
91+
CONFIG_auto_generated_config_prefix_module-performance=y
92+
# CONFIG_auto_generated_config_prefix_module-topic_share_uart is not set
93+
# CONFIG_auto_generated_config_prefix_module-engineer_chassis is not set
94+
# CONFIG_auto_generated_config_prefix_module-can_imu_wearlab is not set
95+
# CONFIG_auto_generated_config_prefix_module-launcher is not set
96+
# end of 模块

Diff for: hw/bsp/atom/config/canfd_imu.config

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# CONFIG_auto_generated_config_prefix_board-c-mini is not set
2+
# CONFIG_auto_generated_config_prefix_board-dual_canfd is not set
3+
# CONFIG_auto_generated_config_prefix_board-esp32-c3-arduino is not set
4+
# CONFIG_auto_generated_config_prefix_board-esp32-c3-idf is not set
5+
# CONFIG_auto_generated_config_prefix_board-f103_can is not set
6+
# CONFIG_auto_generated_config_prefix_board-mangopi_r818 is not set
7+
# CONFIG_auto_generated_config_prefix_board-mc02 is not set
8+
# CONFIG_auto_generated_config_prefix_board-microswitch is not set
9+
# CONFIG_auto_generated_config_prefix_board-MiniPC is not set
10+
# CONFIG_auto_generated_config_prefix_board-MiniPC_with_canfd is not set
11+
# CONFIG_auto_generated_config_prefix_board-node_imu is not set
12+
# CONFIG_auto_generated_config_prefix_board-rm-c is not set
13+
# CONFIG_auto_generated_config_prefix_board-Webots is not set
14+
CONFIG_auto_generated_config_prefix_board-atom=y
15+
# CONFIG_auto_generated_config_prefix_board-collar is not set
16+
# CONFIG_auto_generated_config_prefix_board-emg-bsp-stm32g431cb is not set
17+
# CONFIG_auto_generated_config_prefix_board-esp32c3_wifi_imu is not set
18+
# CONFIG_auto_generated_config_prefix_system-Bootloader is not set
19+
CONFIG_auto_generated_config_prefix_system-FreeRTOS=y
20+
# CONFIG_auto_generated_config_prefix_system-Linux is not set
21+
# CONFIG_auto_generated_config_prefix_system-Linux_Webots is not set
22+
# CONFIG_auto_generated_config_prefix_system-None is not set
23+
24+
#
25+
# FreeRTOS
26+
#
27+
CONFIG_INIT_TASK_STACK_DEPTH=768
28+
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=256
29+
CONFIG_FREERTOS_USB_TASK_STACK_DEPTH=256
30+
CONFIG_FREERTOS_TERM_TASK_STACK_DEPTH=384
31+
# end of FreeRTOS
32+
33+
# CONFIG_auto_generated_config_prefix_robot-balance_infantry is not set
34+
# CONFIG_auto_generated_config_prefix_robot-ble_net_config is not set
35+
# CONFIG_auto_generated_config_prefix_robot-blink is not set
36+
# CONFIG_auto_generated_config_prefix_robot-bootloader is not set
37+
# CONFIG_auto_generated_config_prefix_robot-canfd_to_uart is not set
38+
# CONFIG_auto_generated_config_prefix_robot-can_to_uart is not set
39+
# CONFIG_auto_generated_config_prefix_robot-custom_controller is not set
40+
# CONFIG_auto_generated_config_prefix_robot-dart is not set
41+
# CONFIG_auto_generated_config_prefix_robot-drone_gimbal is not set
42+
# CONFIG_auto_generated_config_prefix_robot-engineer is not set
43+
# CONFIG_auto_generated_config_prefix_robot-helm_infantry is not set
44+
# CONFIG_auto_generated_config_prefix_robot-hero is not set
45+
# CONFIG_auto_generated_config_prefix_robot-infantry is not set
46+
# CONFIG_auto_generated_config_prefix_robot-microswitch is not set
47+
# CONFIG_auto_generated_config_prefix_robot-sentry is not set
48+
# CONFIG_auto_generated_config_prefix_robot-sim_balance is not set
49+
# CONFIG_auto_generated_config_prefix_robot-sim_mecanum is not set
50+
# CONFIG_auto_generated_config_prefix_robot-uart_net_config is not set
51+
# CONFIG_auto_generated_config_prefix_robot-udp_to_uart is not set
52+
# CONFIG_auto_generated_config_prefix_robot-wearlab_imu is not set
53+
CONFIG_auto_generated_config_prefix_robot-canfd_imu=y
54+
# CONFIG_auto_generated_config_prefix_robot-robot_collar is not set
55+
# CONFIG_auto_generated_config_prefix_robot-robot_wifi_imu is not set
56+
57+
#
58+
# 组件
59+
#
60+
61+
#
62+
# 设备
63+
#
64+
# CONFIG_auto_generated_config_prefix_device-ahrs is not set
65+
CONFIG_DEVICE_AHRS_TASK_STACK_DEPTH=256
66+
CONFIG_auto_generated_config_prefix_device-ahrs-9=y
67+
# CONFIG_auto_generated_config_prefix_device-ai is not set
68+
CONFIG_auto_generated_config_prefix_device-blink_led=y
69+
# CONFIG_auto_generated_config_prefix_device-bmi088 is not set
70+
# CONFIG_auto_generated_config_prefix_device-bq27220 is not set
71+
# CONFIG_auto_generated_config_prefix_device-buzzer is not set
72+
# CONFIG_auto_generated_config_prefix_device-can is not set
73+
CONFIG_auto_generated_config_prefix_device-canfd=y
74+
# CONFIG_auto_generated_config_prefix_device-cap is not set
75+
# CONFIG_auto_generated_config_prefix_device-custom_controller is not set
76+
# CONFIG_auto_generated_config_prefix_device-dev_bw16 is not set
77+
# CONFIG_auto_generated_config_prefix_device-dr16 is not set
78+
CONFIG_auto_generated_config_prefix_device-icm42688=y
79+
CONFIG_DEVICE_ICM42688_TASK_STACK_DEPTH=256
80+
# CONFIG_auto_generated_config_prefix_device-imu is not set
81+
# CONFIG_auto_generated_config_prefix_device-ina226 is not set
82+
# CONFIG_auto_generated_config_prefix_device-laser is not set
83+
# CONFIG_auto_generated_config_prefix_device-led_rgb is not set
84+
# CONFIG_auto_generated_config_prefix_device-mech is not set
85+
# CONFIG_auto_generated_config_prefix_device-microswitch is not set
86+
CONFIG_auto_generated_config_prefix_device-mmc5603=y
87+
CONFIG_DEVICE_MMC5603_TASK_STACK_DEPTH=384
88+
# CONFIG_auto_generated_config_prefix_device-motor is not set
89+
# CONFIG_auto_generated_config_prefix_device-net_config is not set
90+
# CONFIG_auto_generated_config_prefix_device-referee is not set
91+
# CONFIG_auto_generated_config_prefix_device-servo is not set
92+
# CONFIG_auto_generated_config_prefix_device-simulator is not set
93+
# CONFIG_auto_generated_config_prefix_device-spl06_001 is not set
94+
# CONFIG_auto_generated_config_prefix_device-tof is not set
95+
# CONFIG_auto_generated_config_prefix_device-dev_gps is not set
96+
# CONFIG_auto_generated_config_prefix_device-dev_net_config_smartconfig is not set
97+
# CONFIG_auto_generated_config_prefix_device-dev_rdss is not set
98+
CONFIG_auto_generated_config_prefix_device-wearlab=y
99+
# end of 设备
100+
101+
#
102+
# 模块
103+
#
104+
# CONFIG_auto_generated_config_prefix_module-balance is not set
105+
# CONFIG_auto_generated_config_prefix_module-ble_net_config is not set
106+
# CONFIG_auto_generated_config_prefix_module-canfd_to_uart is not set
107+
# CONFIG_auto_generated_config_prefix_module-can_imu is not set
108+
# CONFIG_auto_generated_config_prefix_module-can_imu_wearlab is not set
109+
# CONFIG_auto_generated_config_prefix_module-can_usart is not set
110+
# CONFIG_auto_generated_config_prefix_module-chassis is not set
111+
# CONFIG_auto_generated_config_prefix_module-custom_controller is not set
112+
# CONFIG_auto_generated_config_prefix_module-dart_gimbal is not set
113+
# CONFIG_auto_generated_config_prefix_module-dart_launcher is not set
114+
# CONFIG_auto_generated_config_prefix_module-engineer_chassis is not set
115+
# CONFIG_auto_generated_config_prefix_module-gimbal is not set
116+
# CONFIG_auto_generated_config_prefix_module-helm_chassis is not set
117+
# CONFIG_auto_generated_config_prefix_module-launcher is not set
118+
# CONFIG_auto_generated_config_prefix_module-launcher_drone is not set
119+
# CONFIG_auto_generated_config_prefix_module-microswitch is not set
120+
# CONFIG_auto_generated_config_prefix_module-ore_collect is not set
121+
# CONFIG_auto_generated_config_prefix_module-performance is not set
122+
# CONFIG_auto_generated_config_prefix_module-topic_share_uart is not set
123+
# CONFIG_auto_generated_config_prefix_module-uart_update is not set
124+
# CONFIG_auto_generated_config_prefix_module-wheel_leg is not set
125+
CONFIG_auto_generated_config_prefix_module-canfd_imu=y
126+
# CONFIG_auto_generated_config_prefix_module-collar_ctrl is not set
127+
# CONFIG_auto_generated_config_prefix_module-mod_research_imu is not set
128+
# end of 模块

0 commit comments

Comments
 (0)