forked from avrdudes/avrdude
-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: min change #10
Merged
Merged
Conversation
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
Directly use the AVRDUDE_FULL_VERSION macro instead of first defining an initialized variable which is never changed and then using that variable. This means one less layer of indirection both for the computer and for the programmer to go through when trying to understand the code.
When there is no `src/ac_cfg.h` (e.g. a fresh `git clone` or after a working dir cleanup like `git -f -d -x`), running `cmake` will complain about not being able to find `ac_cfg.h`. This is probably because cmake looks for source files in the `CMAKE_CURRENT_SOURCE_DIR`, but when cmake creates `ac_cfg.h` it does so ´CMAKE_CURRENT_BINARY_DIR`, which is often different. Anyway, this makes the location of files generated by `configure_file` explicit as `CMAKE_CURRENT_BINARY_DIR`, and uses that same location in the source file list for the `libavrdude` target (instead of just `ac_cfg.h` with the implicit `CMAKE_CURRENT_SOURCE_DIR`) and adds the same source file to the `avrdude` target to allow cmake to determine the dependencies properly.
As it can happen that there is a leftover `src/ac_cfg.h` when running an out of tree cmake build (you might have run `cmake .` or `./src/bootstrap`), the out of tree cmake build must look for `ac_cfg.h` in its builddir first (e.g. `build_linux/src/`). Otherwise the cmake build picks up and uses whatever data happens to be in `src/ac_cfg.h`. Both the MSVC and GCC C processors are documented to look in the location of the `#include` directive for the included file first for double quoted includes, so the old `#include "ac_cfg.h"` was exactly the wrong thing to do. clang probably does the same, and ISO C specifies the sequence of places to look for include files as implementation defined. So this changes all occurrences of `#include "ac_cfg.h"` to `#include <ac_cfg.h>` which follows the sequence of `-I` or `/I` directives as cmake builds add via `include_directories` or `target_include_directories`. Fixes: avrdudes#1706
This executes five tests for typical programming tasks: - Write/verify a "difficult" sketch to flash: two code sections and one data section separated by "holes" of different sizes - Dump all flash, eg, to make a backup - Write/verify a "difficult" eeprom data file with holes - Dump all eeprom, eg, to make a backup - Chip erase (bootloaders are expected to page erase flash apart from the bootloader itself) and spot check whether flash was erased The reported times are realistic times with overhead of starting avrdude, resetting the board via DTR/RTS, establishing comms, including erasing the flash before writing/verifying the sketch and disengaging the chip. $ test-avrdude -b -d 0 \ -p "u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000" \ -p "u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000" Testing avrdude version 7.3-20240225 (2078871) Prepare "u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000" and press 'enter' or 'space' to continue. Press any other key to skip ✅ 2.174 s: flash -U write/verify holes_rjmp_loops_32768B.hex ✅ 1.339 s: flash -U read all flash ✅ 1.415 s: eeprom -U write/verify holes_pack_my_box_1024B.hex ✅ 1.034 s: eeprom -U read all ✅ 1.604 s: chip erase and spot check flash is actually erased ✅ 7.566 s: benchmark for u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000 Prepare "u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000" and press 'enter' or 'space' to continue. Press any other key to skip ✅ 2.001 s: flash -U write/verify holes_rjmp_loops_32768B.hex ✅ 1.333 s: flash -U read all flash ✅ 1.405 s: eeprom -U write/verify holes_pack_my_box_1024B.hex ✅ 1.029 s: eeprom -U read all ✅ 1.618 s: chip erase and spot check flash is actually erased ✅ 7.386 s: benchmark for u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000 Note the benchmark line with the cumulative time for all five tasks
Uppercase names are typically used for environment variables in bash
The cumulative time for typical user tasks depends on the flash and EEPROM size of the part. This commit computes a size-normalised time. Lower is better. This avrbench number still depends on the part, but less so than the cumulative time of the tasks. The summary line is put in vertical bars to make creation of markdown tables easier.
…o-ac_cfg.h Fix cmake build errors related to ac_cfg.h
Add benchmark option `-b` for `test-avrdude`
Both these functions are called at verbosity level DEBUG and above, so they must not produce INFO level messages. Supposed to fix issue avrdudes#1726
Some messaging needs a functionality to end an open line, so that the next message starts at the left margin, ie, the ability to print a \n if and only if the last printed character was not already a \n. This used to be effected by \v as first char in the message format. This commit introduces a dedicated lmsg_xyz() set of messaging functions that utilises a MSG2_LEFT_MARGIN flag to enforce a left margin start for the message.
Replace msg_info() by msg_debug() in jtag3_prmsg() and jtag3_prevent() Closes avrdudes#1726
…sage Remove unused avrdude_message() Fixes avrdudes#1719
better doc
…ullups Add buspirate hiz and pullups feature
Add support for libgpiod v2+ API
Remove deprecated ucr2 part
Move static buffer to PDATA region in buspirate.c
Closed
sverben
approved these changes
Apr 21, 2024
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.
Please bump version to fix webbased
rmoesbergen
approved these changes
Apr 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.