The Wayback Machine - https://web.archive.org/web/20201223164607/https://github.com/tinygo-org/tinygo/issues/1320
Skip to content
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

There is a problem after writing atsamd / nrf5 with openocd #1320

Open
sago35 opened this issue Aug 26, 2020 · 4 comments
Open

There is a problem after writing atsamd / nrf5 with openocd #1320

sago35 opened this issue Aug 26, 2020 · 4 comments
Labels

Comments

@sago35
Copy link
Member

@sago35 sago35 commented Aug 26, 2020

#1310 makes it easier to write from openocd with feather-m4 and others.
However, two problems remain.

1. touchSerialPortAt1200bps() is executed when programmer is specified

As for 1, the following json does not have the flash-1200-bps-reset setting and will not cause a problem.
However, it is not reasonable to separate json, so you need to set flash-1200-bps-reset = false when -programmer is specified.

{
    "inherits": ["atsamd51j19a"],
    "build-tags": ["sam", "atsamd51j19a", "feather_m4"]
}

If you solve this problem, we will be able to write to the board in panic state.
(Normally flash-1200-bps-reset cannot be performed on a board in panic state.)

Also, we will be able to do rewrites very quickly.

2. Sometimes bootloader mode is triggered after writing

I think the reason for this problem is that the reset is performed multiple times when writing.
I don't know why, but changing program *.hex reset exit to program *.hex verify reset exit solved the problem.
I don't know if this is the right solution, but I'd like to fix it in some way.

@sago35
Copy link
Member Author

@sago35 sago35 commented Aug 26, 2020

Both issues 1 and 2 also occurred with feather-nrc52840.

@sago35 sago35 changed the title There is a problem after writing atsamd with openocd There is a problem after writing atsamd / nrf5 with openocd Aug 26, 2020
@sago35
Copy link
Member Author

@sago35 sago35 commented Sep 3, 2020

  1. touchSerialPortAt1200bps() is executed when programmer is specified

fixed. (flash: call PortReset only on other than openocd #1335)

@deadprogram
Copy link
Member

@deadprogram deadprogram commented Sep 18, 2020

This issue was corrected in v0.15.0 which was just released. Now closing.

@sago35
Copy link
Member Author

@sago35 sago35 commented Sep 18, 2020

  1. Sometimes bootloader mode is triggered after writing
    This one is still unresolved.

If I check with feather-m4 and wioterminal now, it's almost certainly a bootloader state.
The writes are successful, so when I reset it, it starts working normally.

Trying it with feather-nrf52840 and xiao did not reproduce the problem.

  • environment
    • ubuntu 20.04
    • jlink edu mini
    • cmsis-dap-v2 debug adptor (XIAO)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.