aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-12-26 02:31:47 +0100
committerRon Evans <[email protected]>2019-12-29 19:41:24 +0100
commita5a90a57b9a575ce7605219d0342a6dc04e800b3 (patch)
treedf0695482d53b135d712d4f5e0018ac8f65b7621 /main.go
parent71a380ce8c622480eb4df50f9f43f2e63c00bccc (diff)
downloadtinygo-a5a90a57b9a575ce7605219d0342a6dc04e800b3.tar.gz
tinygo-a5a90a57b9a575ce7605219d0342a6dc04e800b3.zip
main: remove getting a serial port in gdb subcommand
Remove this code for two reasons: 1. It is not needed. 2. It breaks `tinygo gdb` for debugging QEMU targets (such as cortex-m-qemu).
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/main.go b/main.go
index dea040b5d..f9059d2db 100644
--- a/main.go
+++ b/main.go
@@ -274,15 +274,7 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
//
// Note: this command is expected to execute just before exiting, as it
// modifies global state.
-func FlashGDB(pkgName, port string, ocdOutput bool, options *compileopts.Options) error {
- if port == "" {
- var err error
- port, err = getDefaultPort()
- if err != nil {
- return err
- }
- }
-
+func FlashGDB(pkgName string, ocdOutput bool, options *compileopts.Options) error {
config, err := builder.NewConfig(options)
if err != nil {
return err
@@ -769,7 +761,7 @@ func main() {
usage()
os.Exit(1)
}
- err := FlashGDB(flag.Arg(0), *port, *ocdOutput, options)
+ err := FlashGDB(flag.Arg(0), *ocdOutput, options)
handleCompilerError(err)
}
case "run":