Skip to content

Paths to elf, hex, lst and map files are more flexible #24

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MartinStej
Copy link

This should fix problem with file location when building in customdirectory.
Add frequency speed into compiler flags.
Unless variable is cache, they should be lower_case. But if required, I can change it to UPPER_CASE.

This should fix problem with file location when building in custom
directory.
Add frequency speed into compiler flags.
@@ -166,26 +166,30 @@ function(add_avr_executable EXECUTABLE_NAME)
message(FATAL_ERROR "No source files given for ${EXECUTABLE_NAME}.")
endif(NOT ARGN)

set(target_name ${EXECUTABLE_NAME}${MCU_TYPE_FOR_FILENAME})
set(bin_dir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing the output directory, i.e. it changes behaviour, doesn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it changes build directory, respectively define relation between build directory and output file. In previous case it as relative to executed cmake command.

Not saying you have to accept it, but in general, output files shall be defined as inside "build" directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally the user chooses the build directory depending on the needs, like

cmake . -Bbuild-firmware

where the build is done in build-firmware. IMHO the CMake code should respect the choice of the user and not change it in an arbitrary way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants