-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ESP Efuse : Get selected efuse value as JSON object #436
ESP Efuse : Get selected efuse value as JSON object #436
Conversation
CC @ghemal |
@sbertrand-witekio Thanks for sending this PR. We've been discussing the need for something similar internally, specifically a machine-parseable output for the efuse values. Rather than having a command that reads a single efuse as JSON, what about adding an option to the existing The main advantage would be that a single JSON file can contain machine-parseable data about all efuses. This will be much more convenient for any use case that involves reading more than one efuse at a time, because espefuse.py doesn't have to re-connect to the bootloader on each invocation. I look forward to hearing what you think about this idea. |
That would be fine. I was just concerned about processing time, efuses are read from the device one at a time or in blocks then parsed by Python ? I have added other processing for the MAC address, to get the raw data was hex, as to avoid further processing. |
In terms of runtime, nearly all of the time is spent connecting to the ESP32. Fetching the efuse information from the chip is quite fast. Are you interested in updating this PR along the lines of what was discussed? Angus |
Hi,
I'll work on this this week. |
I have updated the PR. |
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.
Thanks for that! Left a few minor comments but it looks pretty good.
Please also check the Travis CI output for flake8 warnings, etc.
I have fix the coding style based on the feedback. |
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.
I have made changes based on the feedback.
Thanks @sbertrand-witekio ! |
Description of change
Addition to get efuse value as JSON object for further processing
I have tested this change with the following hardware & software combinations:
Linux, ESP32, WROOM, WROVER
Comment
This allow to get efuse value so script can flash devices appropriately depending on secure boot or flash encryption state of the device.