-
Notifications
You must be signed in to change notification settings - Fork 975
List usable targets with a targets subcommand #1361
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
Conversation
if spec.FlashMethod == "" && spec.FlashCommand == "" && spec.Emulator == nil { | ||
// This doesn't look like a regular target file, but rather like | ||
// a parent target (such as targets/cortex-m.json). | ||
continue | ||
} |
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.
The nintendoswitch.json is not listed, so either change the conditions a bit or put a trick in the json.
My only concern is that it may be difficult to keep this rule in place in the future.
If I have trouble in the future, I will consider it.
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 same issue, which is that the nintendoswitch
target does not appear in the list.
Instead of specifying the emulator command in atmega328p.json, specify it in the two boards based on it (arduino and arduino-nano). This makes the configuration consistent with the machine package, which only defines the CPUFrequency function in the board files (and not in machine_atmega328p.json).
This patch adds the `tinygo targets` command, which lists usable targets (targets that can be used in the `-target` flag). The assumption here is that usable targets can either be flashed or emulated by TinyGo. There is one exception where it doesn't work yet: the nintendoswitch target. Right now it requires some manual steps to build a .nro file which can then be run by yuzu, hence why it doesn't show up in the list.
Yes, I'm aware of the Nintendo Switch limitation:
I looked into adding emulator support, but it's hard to test with the issue I hit here: #1226 (comment) |
I propose we merge this PR now, and then once the 2 nintendoswitch related PRs are merged, another PR can be created that adds it to the list. |
Yes, that was what I was trying to suggest. |
OK, now merging. Let the awesome tooling commence! |
This is something that should be useful for autocomplete and similar tools.