Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable logging in the Simulator #591

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

Open
tadeubas wants to merge 2 commits into Coldcard:master
base: master
Choose a base branch
Loading
from tadeubas:readme_changes

Conversation

@tadeubas
Copy link

@tadeubas tadeubas commented Dec 30, 2025
edited
Loading

EDITED: Removed docker.

  • (削除) Adds a new Dockerfile for building the simulator (削除ここまで)
  • (削除) Updates README.md with instructions for building the simulator using Docker (削除ここまで)
  • Creates /tmp/cc_simulator.log to facilitate debugging of ./simulator.py
  • Adds the firmware folder to .gitignore.

Tested on Linux Mint 22.2 (zara)

Copy link
Collaborator

@scgbckbone scgbckbone left a comment

Choose a reason for hiding this comment

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

I like your simulator logging file part. That seem very useful to me as you cannot copy/pasta from termux itself. I would like that change to be split from other docker stuff & resolved my two review comments.

I'm not sure your dockerfile belongs to this repo - would be better if you create your own repo where other users can add other dockerfiles (for instance different os version/type, python version etc.). We can mention your repo in README.md of course.

child.kill()
return

logfile = '/tmp/cc_simulator.log'
Copy link
Collaborator

@scgbckbone scgbckbone Dec 30, 2025

Choose a reason for hiding this comment

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

logfile needs to take into consideration whether simulator is run with --segregate argument. If yes, you need to add log to the specific simulator directory /tmp/cc-simulators/<pid>/cc_simulator.log

check few lines up


xterm = subprocess.Popen(['xterm', '-title', 'Coldcard Simulator REPL',
'-geom', '132x40+650+40', '-e'] + cc_cmd,
'-geom', '132x40+650+40', '-l', '-lf', logfile, '-e'] + cc_cmd,
Copy link
Collaborator

@scgbckbone scgbckbone Dec 30, 2025

Choose a reason for hiding this comment

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

I'd like to see this parametrized, so it only logs to file if user runs simulator with some specific flag (for instance --logf), as I worry about performance penalty when running multiple simulators

@tadeubas tadeubas changed the title (削除) Enable building the Simulator using Docker (削除ここまで) (追記) Enable logging in the Simulator (追記ここまで) Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@scgbckbone scgbckbone scgbckbone requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /