Comments (7)
even the CLI might have a use for it: in terminal mode
AVRDUDE only ever considers one part/programmer combo in each incarnation; once that's fixed -A
either makes sense or not, but it wouldn't be required (or, in my understanding, make sense) to toggle that option back and forth.
from avrdude.
[global, access functions or context pointer]
As a quick shot I'd make this option global in the first instance, and then at some point change to context pointer for all global variables.
from avrdude.
Also, what I don't understand, from my protocol:
2024-03-30T09:55:55 Read 8666 bytes
2024-03-30T09:56:05 Wrote 16384 bytes to /home/joerg/src/avrdude/foo.hex
It clearly optimized the trailing 0xFF when reading (through avr_read_mem()
, as can be seen from the 8666 bytes. Yet, when writing the memory buffer through fileio()
, the entire memory region is saved. The code suggests to me that only the "relevant" bytes ought to be written.
from avrdude.
OK, I understand the latter:
if(size < 0 || op == FIO_READ || op == FIO_READ_FOR_VERIFY)
size = mem->size;
So the upper layer is supposed to track the size.
from avrdude.
There is no way to turn it on again? This is not good.
I agree. AVRDUDE doesn't need to switch -A
off again, but a library might want to. I suggest to make the -A
flag a global variable that can be accessed by the library.
-A
is meant to not remove trailing 0xff sequences from avr_reads() or file input, as they could be relevant data and the programmer could see AVR flash as normal memory (as certain bootloaders do or AVR with page erase) rather than NOR memory.
from avrdude.
Global variable sounds OK to me.
Other users of the library might turn -A
into their own option system.
Btw. even the CLI might have a use for it: in terminal mode.
from avrdude.
Rather than making the variable global, it could remain static
(module-internal, not exposed in the library). That enforces the use of access functions.
A completely different option would be a kind of library context structure that holds all that kind of options (also verbose
, and quell_progress
). It could start out as a global, and eventually moved as a pointer into API calls – that could even make the library API reentrant. :-)
from avrdude.
Related Issues (20)
- Which programmer supports "-E reset"? HOT 8
- Regression: EEPROM issue with official STK500 V1 FW -- avrdude 7.1 is okay but not 7.2 and 7.3 HOT 12
- EE-Prom data falsified by mySmartUSB Progammer HOT 32
- avr_{read,write}_mem fail to initialize progress reporting HOT 4
- Old `avrdude_message()` can go away HOT 3
- avr_write_mem() does not really write something HOT 13
- Progress reporting functions should be better documented HOT 1
- avr*timestamp() oddities HOT 4
- Help wanted: CMake to compile Qt .ui files HOT 7
- Wrong message level in `jtag3_prmsg()` HOT 1
- Error when using linuxgpio HOT 3
- v7.3 detected as malware HOT 1
- Add support for libgpiod v2+ API HOT 2
- "jtag2 is not a unique start of a programmer name"
- `-F` option not honored
- Add support for more AVR-DU parts HOT 2
- Add support for emscripten HOT 6
- Trouble with Raspberry pi 5 HOT 9
- linuxgpio sysfs fallback improvement to deal with shifted GPIO numbering in new kernel version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avrdude.