-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Summary
<!-- Quick summary of changes, optional -->
Support binaries for STMH733xx microcontrollers, and add a project for
the H7 dev board.
### Changelist
<!-- Give a list of the changes covered in this PR. This will help both
you and the reviewer keep this PR within scope. -->
- Support ARM Cortex-M7
- Support STM33H7xx microcontrollers with SEGGER SystemView, FreeRTOS,
and H7 HAL drivers
- Add project for H7 dev board
Note: CAN is not supported on H7 yet, since it ST's FD CAN HAL driver
rather than ST's CAN HAL driver (which we use on the rest of our
microcontrollers).
### Testing Done
<!-- Outline the testing that was done to demonstrate the changes are
solid. This could be unit tests, integration tests, testing on the car,
etc. Include relevant code snippets, screenshots, etc as needed. -->
- None
### Resolved Issues
<!-- Link any issues that this PR resolved like so: `Resolves #1, #2,
and #5` (Note: Using this format, Github will automatically close the
issue(s) when this PR is merged in). -->
### Checklist
*Please change `[ ]` to `[x]` when you are ready.*
- [x] I have read and followed the code conventions detailed in
[README.md](../README.md) (*This will save time for both you and the
reviewer!*).
- [x] If this pull request is longer then **500** lines, I have provided
*explicit* justification in the summary above explaining why I *cannot*
break this up into multiple pull requests (*Small PR's are faster and
less painful for everyone involved!*).
- Loading branch information
1 parent
73c12c6
commit 4188410
Showing
24 changed files
with
2,817 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
add_subdirectory(f4dev) | ||
add_subdirectory(f4dev) | ||
add_subdirectory(h7dev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
set(ARM_CORE "cm7") | ||
set(IOC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/cubemx/h7dev.ioc") | ||
set(LINKER_SCRIPT "${THIRD_PARTY_DIR}/linker/STM32H733VGTX_FLASH.ld") | ||
|
||
file(GLOB_RECURSE APP_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/app/*.c") | ||
list(APPEND APP_SRCS "${SHARED_APP_SRCS}") | ||
list(REMOVE_ITEM APP_SRCS "${SHARED_EMBEDDED_DIR}/app/App_SharedSetPeriodicCanSignals.c") | ||
list(REMOVE_ITEM APP_SRCS "${SHARED_EMBEDDED_DIR}/app/App_SharedSignal.c") | ||
list(REMOVE_ITEM APP_SRCS "${SHARED_EMBEDDED_DIR}/app/App_SharedHeartbeatMonitor.c") | ||
list(REMOVE_ITEM APP_SRCS "${SHARED_EMBEDDED_DIR}/app/App_SharedStateMachine.c") | ||
list(REMOVE_ITEM APP_SRCS "${SHARED_EMBEDDED_DIR}/app/App_SharedWaitSignal.c") | ||
set(APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/app" "${SHARED_APP_INCLUDE_DIR}") | ||
|
||
file(GLOB_RECURSE IO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/io/*.c") | ||
list(APPEND IO_SRCS "${SHARED_IO_SRCS}") | ||
list(REMOVE_ITEM IO_SRCS "${SHARED_IO_INCLUDE_DIR}/Io_SharedAdc.c") | ||
list(REMOVE_ITEM IO_SRCS "${SHARED_IO_INCLUDE_DIR}/Io_SharedSpi.c") | ||
list(REMOVE_ITEM IO_SRCS "${SHARED_EMBEDDED_DIR}/io/Io_SharedCan.c") | ||
set(IO_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/io" "${SHARED_IO_INCLUDE_DIR}") | ||
|
||
file(GLOB_RECURSE HW_SRCS | ||
"${CMAKE_CURRENT_SOURCE_DIR}/src/hw/*.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/src/cubemx/Src/*.c" | ||
) | ||
list(APPEND HW_SRCS "${SHARED_HW_SRCS}") | ||
list(REMOVE_ITEM HW_SRCS "${SHARED_EMBEDDED_DIR}/hw/hw_sd.c") | ||
set(HW_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/hw" "${SHARED_HW_INCLUDE_DIR}") | ||
|
||
|
||
if("${TARGET}" STREQUAL "deploy") | ||
generate_stm32cube_code( | ||
"h7dev" | ||
"${IOC_PATH}" | ||
) | ||
|
||
set(STM32_HAL_SRCS | ||
"stm32h7xx_hal_adc_ex.c" | ||
"stm32h7xx_hal_adc.c" | ||
"stm32h7xx_hal_cortex.c" | ||
"stm32h7xx_hal_dma_ex.c" | ||
"stm32h7xx_hal_dma.c" | ||
"stm32h7xx_hal_exti.c" | ||
"stm32h7xx_hal_gpio.c" | ||
"stm32h7xx_hal_iwdg.c" | ||
"stm32h7xx_hal_pwr_ex.c" | ||
"stm32h7xx_hal_rcc_ex.c" | ||
"stm32h7xx_hal_rcc.c" | ||
"stm32h7xx_hal_tim_ex.c" | ||
"stm32h7xx_hal_tim.c" | ||
"stm32h7xx_hal_uart_ex.c" | ||
"stm32h7xx_hal_uart.c" | ||
"stm32h7xx_hal.c" | ||
) | ||
|
||
# Pass syscalls to the cube library so we can build without warnings. | ||
set(SYSCALLS "${CMAKE_CURRENT_SOURCE_DIR}/src/cubemx/Src/syscalls.c") | ||
stm32h733xx_cube_library( | ||
"h7dev_stm32cube" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/src/cubemx/Inc" | ||
"${STM32_HAL_SRCS}" | ||
"${SYSCALLS}" | ||
"${IOC_PATH}.md5" | ||
) | ||
|
||
set(SRCS ${APP_SRCS} ${IO_SRCS} ${HW_SRCS}) | ||
set(INCLUDE_DIRS ${APP_INCLUDE_DIRS} ${IO_INCLUDE_DIRS} ${HW_INCLUDE_DIRS}) | ||
embedded_binary( | ||
"h7dev.elf" | ||
"${SRCS}" | ||
"${INCLUDE_DIRS}" | ||
"${LINKER_SCRIPT}" | ||
"${ARM_CORE}" | ||
) | ||
target_link_libraries("h7dev.elf" "h7dev_stm32cube") | ||
endif() |
Oops, something went wrong.