Sorry,
I created this one :P
As Calamity pointed out there is some missing runtime type identification of the board, which I recently commented out. (I owe a unit test ! :P)
Now some history on it :
MRL can now "potentially" compile and upload the board, its necessary to send the correct command line parameters to avrdude. This is "sort of" done in the ArduinoUtils - but it does not have all the needed types for all the boards.
args.add("--board");if (board.equalsIgnoreCase("nano")) {args.add("arduino:avr:" + board + ":cpu=atmega328");} else {args.add("arduino:avr:" + board);}
The problem with the above code is its trying to support a mapping of internal defintiions - "nano" with needed compiler directives. The "boards.txt" file does this already, and it is the controlling source of this information. It's "from" the Arduino sdk.
So I made a parser which digests a boards.txt and, builds the UI and delivers the correct compiler directive based on user selection...
Below is how the code is now ..
args.add(port);args.add("--board");String[] parts = boardKey.split("\\.");
Sorry I did not finish this (and then forgot that I did not finish is :P), but the intent was to have all 3 of these things agree
- The UI
- The compiler directive
- The runtime board information
And have them ALL - base their information on the source which controls it in the Arduino SDK, ie "boards.txt"
Its not complete, but searching for runtime identification I found some more interesting info.
- http://tonygaitatzis.tumblr.com/post/134967126657/determine-arduino-boa…;
- https://github.com/backupbrain/ArduinoBoardManager
- https://electronics.stackexchange.com/questions/58386/how-can-i-detect-…
It would be nice if all the definitions would line up - For example if the user does not manually select board type, the connected board would send the correct identifier, such that it had enough information to have the correct parameters on the command line for avrdude to correctly compile and upload a new mrlcomm.
I "think" this is possible if "boards.txt" is used .. but not finished yet...
I completely agree with what
I completely agree with what you are trying to do.
I think to work fine, when MRL connect to an Arduino, the Arduino should answer "hello, i'm an UNO and I run MrlComm vXX. Then Arduino.java can setup his things base on boards.txt.
Unfortunatly Arduino are stupid. You can't ask them who are you, it won't know how to answer. You can only ask if you are a UNO, do that.
That's why I made some define in MRLComm to it can send the board info to MRL.
Maybe we can make that section auto-generated based on the info found in boards.txt. So whenever Arduino changes boards.txt, MRLComm can keep updated with it. So we never need to manually update that list
Brilliant ! That's it !
Brilliant !
That's it ! AutoGenerate ! ... perfect ! The ArduinoMsgGenerator will maintain what you've started Calamity.
Great suggestion !
"MRL can now "potentially"
"MRL can now "potentially" compile and upload the board"
wahoo ! I invoque : autoupdate/install mrlcomm