-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
CMake: Improve debug configuration #1051
Conversation
POST_BUILD | ||
COMMAND adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application ${IMAGE_MCUBOOT_RECOVERYLOADER_FILE_NAME} ${DFU_MCUBOOT_RECOVERYLOADER_FILE_NAME} | ||
COMMENT "post build (DFU) steps for ${EXECUTABLE_MCUBOOT_RECOVERYLOADER_FILE_NAME}" | ||
) | ||
endif() | ||
|
||
|
||
# FLASH | ||
if (USE_JLINK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff looks a bit odd, I only corrected the indentation here as well.
I rebased this PR on the latest development version, and removed any hardware target configuration options. These will be moved to #1050 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bin to hex change is blocking this currently, since there's concern that it may break compatibility with some companion apps. #256 also has this same change, so we'll reconsider that first.
Maybe something about the DFU. I'm not entirely sure. Someone else will need to take a closer look at it. |
The image creating tool |
I unfortunately do not have much time to think about those changes right now. I'm currently working on improving the memory usage and monitoring, and I do not have much brain bandwidth for other things :) This PR is not easy to read as it serves multiples goals (change the debug configuration behavior, switch from bin to hex, change indentation,...). As I am the one who wrote the original script, I decided to use .bin file because that's what I'm used to use... I'm in full control of where the data will be flashed in memory and that fine for me. I know other people prefer the hex file because they don't have to worry about the offset in memory. I don't think one is better than the other, they are just different. Now, other than this practical aspect, do we have other valid reasons to change how the files (firmwares, DFUs, mcuboot images) are generated? This PR also changes the behavior of the |
@JF002 Thanks for your feedback. I see that there are valid concerns about third party tools. How about I revert the process of the DFU generation back to its original state, but add a My main motivation to generate hex files is that the toolchain I use (J-Link / nrfjprog) can only process hex files. OpenOCD is somehow unstable on my system, and lacks some debugging functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StarGate01 I've finally taken the time to check a few things : the .bin and .hex files are correctly generated, and the DFU file still contains a .bin file. So I guess my concerns were unfounded. Sorry about that!
@Riksu9000 @StarGate01 Which PR should we merge? This one or #256? |
Enable debug output for InfiniTime, Nimble and the NRF SDK via SEGGER RTT on debug builds.
I rebased this PR, it now contains only the debug config enhancements as well as the fixes for the indentation. All good to merge afaik, the two obsolete commits were the same as in #256 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not using on device debugging, so I can't comment on that.
But the changes are simple and seem to be sound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better than before, I think.
Thanks for this PR, @StarGate01 ! Looks good to me :-) By the way, as you've touched the flash commands in the CMake file, may I ask your opinion about #801 ? It removes those custom targets as I think they are not generic/portable enough. I haven't dared to merge it as I'm afraid to confuse some developers who might use them. |
This PR has been broken out of #1050.
Use correct linker script in RECOVERY_MCUBOOTmerged via src/CMakeLists.txt: use iHEX format for mcuboot image creation #256Use iHEX format for mcuboot image creationmerged via src/CMakeLists.txt: use iHEX format for mcuboot image creation #256