arduino / arduino/ArduinoCore-megaavr

Nano every reset

Open
#118 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
111
Forks
65
PR merge metrics
No merged PRs in 30d

Description

I am not able to reset the Nano Every by sending a 1200 baud signal.

I am thinking this might because the ATSAMD11D14A chip on the board is not doing that.

I noticed the latest commit on the MuxTO firmware is to "Reset 4809 on baudrate change / port open": https://github.com/arduino/ArduinoCore-megaavr/pull/52.
I don't really like the reset on port open, but I do like the reset 4809 on the 1200 baud. I am thinking if i can compile the project and load the firmware, then I might be able to modify it to only reset at 1200 baud and not reset at port open.

So I try to compile the firmware, and found out that is not easy:

https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145
and also I got the file size

```text
/home/myname/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld: MuxTO.ino.elf section `.text' will not fit in region `FLASH'
/home/myname/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 112 bytes
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Generic D11D14AS.
```

![image](https://user-images.githubusercontent.com/7526459/147504216-664be75b-8d9f-4c93-b65e-d2ad851224b6.png)

By changing the Bootloader size to compile with "no bootloader", the GUI can compile. Then I try to upload it

I connected USB with the SWDIO and GND pins as instructed in the getting started (https://www.arduino.cc/en/Guide/NANOEvery#firmware-for-samd11d14a):

> To reprogram the D11, simply power it while shorting SWDIO to GND pins.

Then I have the
```text
Bus 001 Device 048: ID 2 341:5058 Arduino SA MuxTO BL
```
and also have

```text
/dev/ttyACM0
```

Selecting the Mattair generic D11D14AS

![image](https://user-images.githubusercontent.com/7526459/147504171-dea4f1dd-ecec-4b71-9a12-763772eeb8ce.png)

I can not upload:
![image](https://user-images.githubusercontent.com/7526459/147504248-92088d9c-7990-47ee-a898-16e0a3fd80c8.png)

I am using a Debian 11 and Arduino IDE 1.8.16, with revision https://github.com/arduino/ArduinoCore-megaavr/commit/4137a5 of this repo.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the MuxTO compile and upload failures on ArduinoCore-megaavr revision 4137a5, using the linked Nano Every firmware instructions. Read the MuxTO firmware and the referenced reset-on-baud-change change to determine where 1200-baud reset behavior is handled. Done means establishing whether the reset can work without port-open reset and documenting a successful build and upload path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.