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

Please update firmware to v0257 to support multi-drop #9

Open
CoelacanthusHex opened this issue Oct 14, 2022 · 9 comments
Open

Please update firmware to v0257 to support multi-drop #9

CoelacanthusHex opened this issue Oct 14, 2022 · 9 comments

Comments

@CoelacanthusHex
Copy link

CoelacanthusHex commented Oct 14, 2022

Openocd added multi-drop support, but it needs CMSIS-DAP support SWD_Sequeue. It means we need a firmware that is newer than this commit, for version, it is v0257.
If no newer firmware, nanoDAP-HS can't debug hardware with multi-drop, such as Raspberry Pi Pico.
Hope nanoDAP-HS can be better and better.

@flaviut
Copy link

flaviut commented Oct 16, 2022

According to the readme, the firmware is just DAPLink. You can compile it using these instructions. The command is python tools/progen_compile.py -v sam3u2c_if.

I've been unable to test myself due to some issues with drag-and-drop programming on my device, but please tell me if it works.

@CoelacanthusHex
Copy link
Author

I've been unable to test myself due to some issues with drag-and-drop programming on my device, but please tell me if it works.

I tried to compile it by myself before but met the same problem.

@flaviut
Copy link

flaviut commented Oct 16, 2022

I spoke with wuxx on AliExpress, and I think I have the situation cleared up, at least for me. There's two debug probes models here, and the branding is confusing:

  • The nanoDAP is about $6, uses an GD32F150G8 MCU, and doesn't support USB Mass Storage-based flashing. wuxx said that it runs proprietary firmware, although it looks like this is it? https://github.com/wuxx/nanoDAP/tree/master/software
  • The nanoDAP-HS is about $15, uses an ATMEL SAM3U MCU, and supports USB Mass Storage-based flashing. I assume the upstream DAPLink works on this device.

I've also done a bit of my own poking around, and I think I have a pinout for the nanoDAP debug header:

Mini-DAPLink-Debug-Probe-TYPE-C-STM32-NRF51-52-ARM-Cortex-M-MCU-JTAG-SWD-CDC jpg_Q90

@CoelacanthusHex
Copy link
Author

I spoke with wuxx on AliExpress, and I think I have the situation cleared up, at least for me. There's two debug probes models here, and the branding is confusing:

* The nanoDAP is about $6, uses an GD32F150G8 MCU, and doesn't support USB Mass Storage-based flashing. wuxx said that it runs proprietary firmware, although it looks like this is it? [wuxx/nanoDAP@`master`/software](https://github.com/wuxx/nanoDAP/tree/master/software?rgh-link-date=2022-10-16T13%3A05%3A16Z)

* The nanoDAP-HS is about $15, uses an ATMEL SAM3U MCU, and supports USB Mass Storage-based flashing. I assume the upstream DAPLink works on this device.

I've also done a bit of my own poking around, and I think I have a pinout for the nanoDAP debug header:

Mini-DAPLink-Debug-Probe-TYPE-C-STM32-NRF51-52-ARM-Cortex-M-MCU-JTAG-SWD-CDC jpg_Q90

What I have is the nanoDAP-HS version, the board silkscreen is "nanoDAP-hs v1.3", and the SoC silkscreen is "Atmel ATSAM3U2C AU", but I still cannot use USB Mass Storage-based flashing with the official DAPLink firmware.

@ckrenslehner
Copy link

@flaviut did you actually manage to flash the rp2040 using the nanoDAP?
I plan to update the firmware of the nanoDAP as you described above. :-)

I have version V1.5 but I always get a SWD Sequence expected error when I try to flash the rp2040 with pyocd..

@flaviut
Copy link

flaviut commented Jan 26, 2023

Yup, I've had great luck flashing my rp2040 with the nanodap-hs. Iirc I had to pull the latest upstream changes into the port's repo.

@BobbyCounts
Copy link

@flaviut Is the pin configuration different from what is default in daplink for the sam3u2c target? I tried compiling the latest daplink but when I upload I get nothing.

@flaviut
Copy link

flaviut commented Jan 30, 2024

I wish I could answer... I went through my files and I wasn't able to find the configuration I used. Sorry :(

@flaviut
Copy link

flaviut commented Apr 13, 2024

I recently needed to update a new device. First I checked out the latest tagged version: git checkout v0257, then applied this patch:

diff --git a/records/tools/gcc_arm.yaml b/records/tools/gcc_arm.yaml
index 3ca532e6..0e54800d 100644
--- a/records/tools/gcc_arm.yaml
+++ b/records/tools/gcc_arm.yaml
@@ -31,6 +31,7 @@ tool_specific:
                 - -Wl,--gc-sections
                 - -Wl,--no-wchar-size-warning
                 - -Wl,--print-memory-usage
+                - -Wl,--no-warn-rwx-segment
             pre_build_script:
                 - tools/pre_build_script.py
             post_build_script:
diff --git a/source/daplink/sdk_stub.c b/source/daplink/sdk_stub.c
index e9116a63..87a2736b 100644
--- a/source/daplink/sdk_stub.c
+++ b/source/daplink/sdk_stub.c
@@ -25,3 +25,8 @@ __WEAK void sdk_init()
 {
     // Do nothing
 }
+
+void _close_r(void) {}
+void _lseek_r(void) {}
+void _read_r(void) {}
+void _write_r(void) {}

here's my bin file, which I dragged into the MAINTENANCE drive: sam3u2c_if.bin.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants