-
Notifications
You must be signed in to change notification settings - Fork 339
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
Add warning message if gdb is not installed/found. #211
Comments
We could also do this to preserve CMake 3.13 compatibility: find_program(CMAKE_C_COMPILER NAMES ${STM32_TARGET_TRIPLET}-gcc PATHS ${TOOLCHAIN_BIN_PATH})
if (NOT CMAKE_C_COMPILER)
message(FATAL_ERROR "${STM32_TARGET_TRIPLET}-gcc not found at ${TOOLCHAIN_BIN_PATH}.")
endif() If some Edit: The reason I created this issue was I for some reason did not have |
find_program()
?
Hello @rmspacefish |
Hello @gudnimg Please consider doing a pull request doing the modification and referencing the issue. |
@atsju Thanks for the reply. Your comment about 3.13 makes a lot of sense now (I’ve seen other repos also use 3.13 as minimum) I will submit a PR. It may be today or later this week. 😊 |
@gudnimg I looked at your PR #218. |
@atsju I use it externally. Though now that you mention it... does the repo need to find Edit: For example this is one way to do it with NRF52 (based on https://github.com/Polidea/cmake-nRF5x), for STM32 we could swap nrfjprog for gdb. function(flash_application_firmware
target # target name
)
# Generate HEX file
convert_to_hex(${target})
add_custom_target(flash
COMMAND # Flash application firmware
${NRF5_NRFJPROG} --log --program "${target}.hex" --family nrf52 --sectorerase ${nrfjprog_jlink_sn_opt} ${nrfjprog_jlink_sn_arg}
COMMAND # Apply reset in order to start the application
${NRF5_NRFJPROG} --reset --family nrf52 ${nrfjprog_jlink_sn_opt} ${nrfjprog_jlink_sn_arg}
COMMENT "Flashing application firmware.."
)
endfunction() Then when I want to flash the stm32 I just call At the moment I am using the terminal directly to flash. |
This is the point. But you proved that someone will find an use so we can keep it. But maybe it should be I let you think about it and update the PR. |
find_program()
?
With CMake 3.18 there is a
REQUIRED
option forfind_program()
Example: If the
arm-none-eabi-gcc
is not found, the CMake will stop processing and create an error message.CMake >= 3.18:
CMake < 3.18:
The text was updated successfully, but these errors were encountered: