adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
MIT License
3.95k stars 1.16k forks source link

atmel-samd DEBUG UART support #4771

Closed EmergReanimator closed 3 years ago

EmergReanimator commented 3 years ago

Firmware

atmel-samd based boards.

Code/REPL

Not applicable

Behavior

Not applicable

Description

Additional Info

EmergReanimator commented 3 years ago

I made the changes in existing code to support DEBUG UART on atmel-samd based boards. The changes have been tested on ATSAME51J20A custom board. But I may check it out on SAME54 Xplained Pro too, if needed.

CircuitPython 7.0.0-alpha.2-586-g0ac107b73-dirty on 2021-05-17; ATSAME51J20A custom board

I would like to submit my changes, but I would to clarify some doubts before doing this:

  1. There is generic part which is relevant for all atmel-samX based boards. But there is board specific part which currently resides inside of asf4_conf directory. The issue is that this configuration is really board specific, rather than chip specific. So I would like to introduce board specific configuration.
  2. I have already allocated circuitpython fork for LPC17xx development, which is not yet complete. But I would like to deliver the changes in atmel-samd port now. May I create a branch from circuitpython and deliver atmel-samd changes there?
EmergReanimator commented 3 years ago

suggested labels:

EmergReanimator commented 3 years ago

Added patch for review, before delivering atmel-samd_uart.generic-part.patch.zip

dhalbert commented 3 years ago

Have you forked adafruit/circuitpython on GitHub? Do so and you can create multiple branches in your fork to handle all these changes. A GitHub pull request is the best way to submit code for review.

If this UART port connection needs to exist when the CircuitPython VM is running, you should be able to implement it in a port and device-independent way. You can call the common-hal UART routines to set up the connection and then have serial.c and maybe other places direct output and take input from that UART connection. I don't think it needs to be atmel-samd specific.

dhalbert commented 3 years ago

The multiterminal module did something like this in the past, but is not currently used. (I think I may have told you about this already.)

EmergReanimator commented 3 years ago

Have you forked adafruit/circuitpython on GitHub? Do so and you can create multiple branches in your fork to handle all these changes. A GitHub pull request is the best way to submit code for review.

Right! I did it this way. Created a branch atmel-samd in my fork.

EmergReanimator commented 3 years ago

I believe this issue may be closed soon, since: #4772 passed the review.