-
-
Notifications
You must be signed in to change notification settings - Fork 20
add --format json output enhacement to flash and certificates commands
#56
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
Merged
Conversation
This file contains hidden or 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
d9d776b to
832a945
Compare
832a945 to
4b36452
Compare
silvanocerza
suggested changes
Jun 16, 2021
Contributor
silvanocerza
left a comment
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.
There are some small changes to do but the rest is alright.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
flashandcertificatescommands output now can be set to json 🥳By running
FirmwareUploader firmware flash -b arduino:samd:mkr1000 -a /dev/ttyACM0 --format jsonsomething like this is returned:{ "programmer": { "stdout": "Set binary mode\nreadWord(addr=0)=0x20007ffc\nreadWord(addr=0xe000ed00)=0x410cc601\nreadWord(addr=0x41002018)=0x10010305\nversion()=v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43\nchipId=0x10010005\nConnected at 921600 baud\nreadWord(addr=0)=0x20007ffc\nreadWord(addr=0xe000ed00)=0x410cc601\nreadWord(addr=0x41002018)=0x10010305\nAtmel SMART device 0x10010005 found\nwrite(addr=0x20004000,size=0x34)\nwriteWord(addr=0x20004030,value=0x10)\nwriteWord(addr=0x20004020,value=0x20008000)\nDevice : ATSAMD21G18A\nreadWord(addr=0)=0x20007ffc\nreadWord(addr=0xe000ed00)=0x410cc601\nreadWord(addr=0x41002018)=0x10010305\nChip ID : 10010005\nversion()=v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43\nVersion : v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43\nAddress : 8192\nPages : 3968\nPage Size : 64 bytes\nTotal Size : 248KB\nPlanes : 1\nLock Regions : 16\nLocked : readWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nreadWord(addr=0x41004020)=0xffff\nnone\nreadWord(addr=0x41004018)=0\nSecurity : false\nBoot Flash : true\nreadWord(addr=0x40000834)=0x7000a\nBOD : true\nreadWord(addr=0x40000834)=0x7000a\nBOR : true\nArduino : FAST_CHIP_ERASE\nArduino : FAST_MULTI_PAGE_WRITE\nArduino : CAN_CHECKSUM_MEMORY_BUFFER\nErase flash\nchipErase(addr=0x2000)\ndone in 0.852 seconds\n\nWrite 16328 bytes to flash (256 pages)\nwrite(addr=0x20005000,size=0x1000)\nwriteBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)\n\r[======= ] 25% (64/256 pages)write(addr=0x20005000,size=0x1000)\nwriteBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)\n\r[=============== ] 50% (128/256 pages)write(addr=0x20005000,size=0x1000)\nwriteBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0x1000)\n\r[====================== ] 75% (192/256 pages)write(addr=0x20005000,size=0x1000)\nwriteBuffer(scr_addr=0x20005000, dst_addr=0x5000, size=0x1000)\n\r[==============================] 100% (256/256 pages)\ndone in 0.103 seconds\n\nVerify 16328 bytes of flash with checksum.\nchecksumBuffer(start_addr=0x2000, size=0x1000) = a16c\nchecksumBuffer(start_addr=0x3000, size=0x1000) = 684a\nchecksumBuffer(start_addr=0x4000, size=0x1000) = 4179\nchecksumBuffer(start_addr=0x5000, size=0xfc8) = efe8\nVerify successful\ndone in 0.014 seconds\nCPU reset.\nreadWord(addr=0)=0x20007ffc\nreadWord(addr=0xe000ed00)=0x410cc601\nreadWord(addr=0x41002018)=0x10010305\nwriteWord(addr=0xe000ed0c,value=0x5fa0004)\n", "stderr": "" }, "flasher": { "stdout": "Flashing firmware /tmp/fwuploader/firmwares/WINC1500/19.6.1/m2m_aio_3a0.bin\nFlashed all the things\n", "stderr": "" } }The same applies to
flashcommand.Along the way I solved a 🐛 in #57