-
Notifications
You must be signed in to change notification settings - Fork 137
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
In terminal only offer commands a programmer actually supports #1113
Conversation
Here an example:
Now that those commands that are not available are not called, we can remove all those lines such as if (pgm->set_sck_period == NULL) {
terminal_message(MSG_INFO, "%s (sck): the %s programmer cannot set SCK period\n",
progname, pgm->type);
return -2;
} I am a big fan of recycling, so we can reuse the bytes saved here elsewhere ;) |
Wow, that's a really clever solution to the problem! Much neater than what I probably would have done. Many thanks, @stefanrueger! Tested with an USBasp and a pkobn_updi (Curiosity Nano), and seems to work perfectly. |
@stefanrueger I think they will not support the following command.
Run log:
|
Same issue for stk500v2.
|
Maybe adding a note will be good, something like |
For Arduino Nano Every, there is a known issue. Interestingly using 'flush' and then
|
Interestingly for my Arduino Nano ATmega4808, it can not write EEPROM in terminal mode. SInce this has nothing to do with this PR, I have created a new issue.
|
Have just added a |
@stefanrueger I tried to use optibioot (with eeprom support) and it does not seem to support this command.
|
jtag2updi seems to support pgerase for Flash but not for EEPROM. The EEPROM issue is probably the same as #1116. @stefanrueger
Run log:
|
Some problem with AVRISP mkii as well.
|
#1112 can be merged and then
|
Perhaps we'll have to add something like |
@MCUdude and @stefanrueger As for As for the
|
Actually for STK500 v1 and STK 500 v2, the current git message is actually good, just adding "STK500 only" in the end and we are done. There are too many derivative programmer from them so that it is hard to get everything right.
|
It's easy to remove terminal commands from the most popular bootloader implementations. In arduino.c, we just need to clear some function pointers after Lines 119 to 132 in 44fe5be
The same goes for wiring.c Lines 206 to 218 in 44fe5be
|
Trouble is, we don't know what the bootloader does. It may not be optiboot, and it could be a bootloader that implements everything that is promised by stk500. |
Supposed to fix Issue #1104