wokwi / rp2040js

A Raspberry Pi Pico Emulator in JavaScript
MIT License
384 stars 40 forks source link

Cli options "--image" and "--gdb" #116

Closed BrianPugh closed 1 year ago

BrianPugh commented 1 year ago

PR for issue #114

Adds CLI options to allows specification of the UF2 image being loaded as well as whether or not to start the GDB server. All default functionality is the same as before. Example usage:

npm run start:micropython -- --gdb --image=circuitpython.uf2

This is my first time using javascript/typescript, so I would love feedback on if anything in this PR isn't idiomatic.

EDIT: updated title/example command to match changing --no_gdb -> --gdb.

urish commented 1 year ago

Thanks for making the changes!

Can you please also format the code with prettier and make sure eslint is happy?

npx prettier --write filename should do the trick

There's a pre-commit hook that should do this automatically, but it didn't work in your case for some reason

BrianPugh commented 1 year ago

linted

Also, I don't see a .pre-commit-config.yaml in this repo.

urish commented 1 year ago

Thanks! Then I think the only things we are missing is:

Please also document the new options in the project's README (so other users can find out about them)

BrianPugh commented 1 year ago

sorry I missed that! Added

urish commented 1 year ago

Thanks!