Skip to content

Add instructions to erase on-device non-volatile storage to accept secrets.json changes. #52

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
merged 2 commits into from
Jun 29, 2025

Conversation

ijoseph
Copy link

@ijoseph ijoseph commented Jun 29, 2025

I wasted about 4 hours trying to figure this out, so I figured I'd add this to help others. Basically, it caches the settings in secrets.json the first time you run upload on in-device non-volatile storage, so subsequent runs will fail to upload any parameters there, for example (and in my case) the URL of the remote server.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @ijoseph, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request provides an important documentation update to guide users on properly flashing Tidbyt Gen1 devices. It introduces a pre-upload step to erase the device's non-volatile memory, which is essential for ensuring that new configuration settings are correctly applied and not overridden by previously cached data.

Highlights

  • Documentation Update: The README.md has been updated to include a crucial step for users flashing a Tidbyt Gen1 device. The pio run command sequence now explicitly includes an --target erase command before the --target upload command.
  • Address Configuration Caching: This change resolves an issue where device settings, once cached in non-volatile storage, could prevent subsequent uploads from correctly applying new configuration parameters, such as a remote server URL. Erasing the memory ensures a clean slate for new uploads.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ijoseph ijoseph changed the title Add instructions to erase non-volatile memory prior to upload. Add instructions to erase on-device non-volatile storage to accept secrets.json changes. Jun 29, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the README.md to instruct users to erase the device's non-volatile memory before uploading new firmware. This is a helpful addition for users who might be struggling with cached settings. My review provides a correction to the suggested command to ensure it works correctly in a multi-environment PlatformIO project and suggests a more idiomatic approach.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@tavdog
Copy link
Member

tavdog commented Jun 29, 2025

Oh dang. Sorry you had to go through that. Ideally we could detect a modified secrets.json and inform the user they need to erase first or even do it for them in a pre/post script section. Maybe rename secrets.json to secrets.injected. If it's renamed due to a change then it knows it should erase first.

@tavdog tavdog merged commit 1dfb88d into tronbyt:main Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants