Overhaul source layout to facilitate MUXes being added
This commit is contained in:
parent
324e4d969e
commit
b0aaece493
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,5 +0,0 @@
|
|||
build/
|
||||
serial_debugger*.bak
|
||||
gui_backup/
|
||||
serial_debugger.ino.beta
|
||||
serial_debugger.ino.orig
|
6
.vscode/arduino.json
vendored
6
.vscode/arduino.json
vendored
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"board": "adafruit:nrf52:feather52840",
|
||||
"configuration": "softdevice=s140v6,debug=l0",
|
||||
"sketch": "serial_debugger.ino",
|
||||
"port": "COM4"
|
||||
}
|
1
.vscode/c_cpp_properties.json
vendored
1
.vscode/c_cpp_properties.json
vendored
|
@ -6,6 +6,7 @@
|
|||
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\**",
|
||||
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\**",
|
||||
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\nrf52\\0.21.0\\**",
|
||||
"C:\\Users\\mcros\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.1\\**",
|
||||
"C:\\Program Files (x86)\\Arduino\\libraries\\**",
|
||||
"C:\\Program Files (x86)\\Arduino\\hardware\\**",
|
||||
"C:\\Users\\mcros\\OneDrive\\Documents\\Arduino\\libraries\\**",
|
||||
|
|
15
.vscode/settings.json
vendored
15
.vscode/settings.json
vendored
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"xtemplate.h": "c",
|
||||
"guislice_drv.h": "c",
|
||||
"xradial.h": "c",
|
||||
"*.tpp": "cpp",
|
||||
"array": "cpp",
|
||||
"deque": "cpp",
|
||||
"string": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"vector": "cpp",
|
||||
"string_view": "cpp",
|
||||
"initializer_list": "cpp"
|
||||
}
|
||||
}
|
50
README.md
50
README.md
|
@ -1,54 +1,8 @@
|
|||
# Serial Debugger
|
||||
|
||||
A debug console for serial TTL. This can be used to work with serial TTL directly or operate as a pass through for a computer.
|
||||
This project is a set of hardware builds that allow working with serial devices in an 'easy' way. The goal is to build a configurator that works with a series of modules (Muxers) to provide serial access via USB.
|
||||
|
||||
## Hardware / BoM
|
||||
|
||||
| Item | Quantity | Unit Cost |
|
||||
| ---- | -------- | --------- |
|
||||
| [Keyboard FeatherWing (Keyboard + LCD)](https://www.tindie.com/products/arturo182/keyboard-featherwing-qwerty-keyboard-26-lcd/) | 1 | $55.00 |
|
||||
| [Feather nRF52840 Express](https://www.adafruit.com/product/4062) | 1 | $24.95 |
|
||||
| [Feather M0 Basic Proto](https://www.adafruit.com/product/2772) | 1 | $19.95 |
|
||||
| [FeatherWing Proto](https://www.adafruit.com/product/2884) | 1 | $4.95 |
|
||||
| [2x20 pin IDC Box Header](https://www.adafruit.com/product/1993) | 1 | $0.75 |
|
||||
| [GPIO Ribbon Cable for Raspberry Pi](https://www.adafruit.com/product/1988) | 1 | $2.95 |
|
||||
| [Header Kit for Feather](https://www.adafruit.com/product/2886) | 1 | $0.96 |
|
||||
| [I2C Non-Volatile FRAM Breakout](https://www.adafruit.com/product/1895) | 2 | $9.95 |
|
||||
|
||||
## Hardware Docs
|
||||
|
||||
- [https://www.solder.party/docs/keyboard-featherwing/downloads/](https://www.solder.party/docs/keyboard-featherwing/downloads/)
|
||||
- [https://github.com/arturo182/bbq10kbd_i2c_sw](https://github.com/arturo182/bbq10kbd_i2c_sw)
|
||||
- [https://github.com/lvgl/lv_arduino](https://github.com/lvgl/lv_arduino)
|
||||
|
||||
## Implementation (Incomplete)
|
||||
|
||||
- Main board has FRAM break out for configuration persistence
|
||||
- Converter board has FRAM break out for configuration persistence
|
||||
- Setup 2nd feather + proto board as a 40 pin socket
|
||||
- 2nd feather acts as a mux between different rpi uarts (0 and 1 and 5 in particular)
|
||||
- 2nd feather talks via qwiic connector over i2c to main board
|
||||
- User button on feather to flip between usb and local serial (aka : can be used as a serial adapter)
|
||||
- Note this on the UI
|
||||
- Fall back to internal uart pins if no expander is present
|
||||
- Note this on the UI
|
||||
- Adapter board falls back to saved config *and* goes into stand alone via usb port *if* it's not seeing the main board
|
||||
- Main board startup shows connection setup + waits for OK prompt via main hat switch
|
||||
- Main board has a status bar @ bottom with battery level, selected uart, selected speed
|
||||
- Main board does simple display of serial in/out via lcd
|
||||
- Main board has a button for accessing symbols via pop-up list that aren't on keyboard
|
||||
- Main board has a button for accessing a uart selection pop-up that maps to rpi uarts
|
||||
- Main board has a button for accessing password selection pop-up to help with password entry over serial
|
||||
- Main board has a button for accessing uart speed pop-up to help with configuring line speeds
|
||||
|
||||
## Implementation (Complete)
|
||||
|
||||
- Battery level on feather neopixel (green = >80% ; yellow >=40% ; orange >= 25% ; red < 25%)
|
||||
- User LED (red) always on when feather is running
|
||||
|
||||
## Building / Uploading
|
||||
|
||||
The ```make.ps1```, ```build.ps1``` and ```upload.ps1``` scripts can be used to build/upload this project. These scripts call the ```arduino-cli``` commands programatically.
|
||||
Please see the ```hardware``` directory for a break down of how to build the various components of this project.
|
||||
|
||||
## Licensing
|
||||
|
||||
|
|
12
hardware/README.md
Normal file
12
hardware/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Hardware
|
||||
|
||||
This folder contains all of the different hardware (Arduino) builds that are part of this project.
|
||||
|
||||
Please see the below table for what hardware is currently available and its status.
|
||||
|
||||
## Hardware Status
|
||||
|
||||
| Device | Folder | Status |
|
||||
| ------ | ------ | ------ |
|
||||
| Main Controller | ```_controller``` | In Progress / Alpha |
|
||||
| Raspberry Pi Muxer | ```mux_rpi``` | Early development / Pre Alpha |
|
5
hardware/_controller/.gitignore
vendored
Normal file
5
hardware/_controller/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
build/
|
||||
_controller*.bak
|
||||
gui_backup/
|
||||
_controller.ino.beta
|
||||
_controller.ino.orig
|
38
hardware/_controller/README.md
Normal file
38
hardware/_controller/README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Controller
|
||||
|
||||
A debug console and configuration shield for serial TTL muxers. See the ```muxers``` folder for what connects to this shield.
|
||||
|
||||
## Hardware / BoM
|
||||
|
||||
| Item | Quantity | Unit Cost |
|
||||
| ---- | -------- | --------- |
|
||||
| [Keyboard FeatherWing (Keyboard + LCD)](https://www.tindie.com/products/arturo182/keyboard-featherwing-qwerty-keyboard-26-lcd/) | 1 | $55.00 |
|
||||
| [Feather nRF52840 Express](https://www.adafruit.com/product/4062) | 1 | $24.95 |
|
||||
|
||||
## Hardware Docs
|
||||
|
||||
- [https://www.solder.party/docs/keyboard-featherwing/downloads/](https://www.solder.party/docs/keyboard-featherwing/downloads/)
|
||||
- [https://github.com/arturo182/bbq10kbd_i2c_sw](https://github.com/arturo182/bbq10kbd_i2c_sw)
|
||||
- [https://github.com/lvgl/lv_arduino](https://github.com/lvgl/lv_arduino)
|
||||
|
||||
## Implementation (Incomplete)
|
||||
|
||||
- Startup shows connection setup + waits for OK prompt via main hat switch
|
||||
- Status bar @ top with selected uart, selected speed
|
||||
- Simple display of serial in/out via lcd
|
||||
- Button for accessing symbols via pop-up list that aren't on keyboard
|
||||
- Bccessing a uart selection pop-up that maps to rpi uarts
|
||||
- Button for accessing password selection pop-up to help with password entry over serial
|
||||
- Button for accessing uart speed pop-up to help with configuring line speeds
|
||||
- Way to display pinouts stored on micro sd card
|
||||
- Configuration read from muxes (if attached)
|
||||
|
||||
## Implementation (Complete)
|
||||
|
||||
- Battery level on feather neopixel (green = >80% ; yellow >=40% ; orange >= 25% ; red < 25%)
|
||||
- User LED (red) always on when feather is running
|
||||
- Battery level shown as progress bar in the upper right corner of the screen
|
||||
|
||||
## Building / Uploading
|
||||
|
||||
The ```make.ps1```, ```build.ps1``` and ```upload.ps1``` scripts can be used to build/upload this project. These scripts call the ```arduino-cli``` commands programatically.
|
|
@ -1,5 +1,5 @@
|
|||
//<App !Start!>
|
||||
// FILE: [serial_debugger.ino]
|
||||
// FILE: [_controller.ino]
|
||||
// Created by GUIslice Builder version: [0.15.b004]
|
||||
//
|
||||
// GUIslice Builder Generated File
|
||||
|
@ -24,7 +24,7 @@
|
|||
#include <CircularBuffer.h>
|
||||
|
||||
// Various local includes
|
||||
#include "serial_debugger_GSLC.h"
|
||||
#include "_controller_GSLC.h"
|
||||
|
||||
//<Includes !End!>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
//<File !Start!>
|
||||
// FILE: [serial_debugger_GSLC.h]
|
||||
// FILE: [_controller_GSLC.h]
|
||||
// Created by GUIslice Builder version: [0.15.b004]
|
||||
//
|
||||
// GUIslice Builder Generated GUI Framework File
|
|
@ -1 +1 @@
|
|||
arduino-cli compile --log-level=warn --fqbn adafruit:nrf52:feather52840 serial_debugger.ino
|
||||
arduino-cli compile --log-level=warn --fqbn adafruit:nrf52:feather52840 _controller.ino
|
38
hardware/mux_rpi/README.md
Normal file
38
hardware/mux_rpi/README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# MUX - Raspberry Pi Edition
|
||||
|
||||
This folder contains the necessary sources and information to build a MUX for Raspberry Pis. This mux can be used independently or with the controller.
|
||||
|
||||
Note : The mux needs to be configured via sources if not used with the controller.
|
||||
|
||||
## Important Considerations
|
||||
|
||||
- The Raspberry Pi 4 has 5 available UARTS and we only document how to wire for UART0/1 and UART5
|
||||
- The Raspberry Pi's prior to the 4 had only UART0 exposed. Please use ONLY the UART0 configuration and setup for these devices.
|
||||
|
||||
## Hardware / BoM
|
||||
|
||||
| Item | Quantity | Unit Cost |
|
||||
| ---- | -------- | --------- |
|
||||
| [Feather M0 Basic Proto](https://www.adafruit.com/product/2772) | 1 | $19.95 |
|
||||
| [FeatherWing Proto](https://www.adafruit.com/product/2884) | 1 | $4.95 |
|
||||
| [2x20 pin IDC Box Header](https://www.adafruit.com/product/1993) | 1 | $0.75 |
|
||||
| [GPIO Ribbon Cable for Raspberry Pi](https://www.adafruit.com/product/1988) | 1 | $2.95 |
|
||||
| [Header Kit for Feather](https://www.adafruit.com/product/2886) | 1 | $0.96 |
|
||||
| [I2C Non-Volatile FRAM Breakout](https://www.adafruit.com/product/1895) | 2 | $9.95 |
|
||||
|
||||
## Implementation (Incomplete)
|
||||
|
||||
- FRAM break out for configuration persistence
|
||||
- Fall back to saved config *and* goes into stand alone via usb port *if* it's not seeing the main board
|
||||
- Receive configuration over i2c
|
||||
- Save configuration to FRAM
|
||||
- FRAM config reading
|
||||
- Ability to have USB *and* i2c for the UART output
|
||||
- Use ring buffer @ 16k for i2c
|
||||
- Send direct to USB and then add to ring buffer (always send over usb even if not used)
|
||||
|
||||
## Implementation (Complete)
|
||||
|
||||
## Building / Uploading
|
||||
|
||||
The ```make.ps1```, ```build.ps1``` and ```upload.ps1``` scripts can be used to build/upload this project. These scripts call the ```arduino-cli``` commands programatically.
|
93
notes.md
93
notes.md
|
@ -1,93 +0,0 @@
|
|||
# Notes
|
||||
|
||||
A dumping ground of notes and ideas
|
||||
|
||||
## cpp_settings.json
|
||||
|
||||
```
|
||||
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/home/USER/.arduino15/packages/arduino/tools/**",
|
||||
"/home/USER/.arduino15/packages/arduino/hardware/samd/1.8.7/**",
|
||||
"/usr/local/share/arduino/libraries/**",
|
||||
"/usr/local/share/arduino/hardware/**",
|
||||
"/home/USER/Arduino/libraries/**",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"forcedInclude": [
|
||||
"/home/USER/.arduino15/packages/arduino/hardware/samd/1.8.7/cores/arduino/Arduino.h"
|
||||
],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"compilerPath": "/usr/bin/clang",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "gnu++14"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## clang formatter
|
||||
|
||||
```
|
||||
|
||||
BasedOnStyle: LLVM
|
||||
Language: Cpp
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignConsecutiveMacros: true
|
||||
AlignEscapedNewlines: Left
|
||||
# AlignOperands: AlignAfterOperator
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: true
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
BreakBeforeBraces: Attach
|
||||
BreakStringLiterals: true
|
||||
IncludeBlocks: Regroup
|
||||
#IndentCaseBlocks: true
|
||||
IndentCaseLabels: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
PointerAlignment: Right
|
||||
ReflowComments: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeSquareBrackets: false
|
||||
UseTab: ForContinuationAndIndentation
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
|
||||
```
|
||||
|
||||
## Makefile
|
||||
|
||||
```
|
||||
|
||||
compile=arduino-cli compile --log-level=warn -v
|
||||
upload=arduino-cli upload
|
||||
serial := $(shell arduino-cli board list | grep mkrwifi1010 | awk '{print $$1}')
|
||||
|
||||
all:
|
||||
cd ../ && $(compile) --fqbn arduino:samd:mkrwifi1010 PROJECT
|
||||
|
||||
upload:
|
||||
cd ../ && $(upload) --fqbn arduino:samd:mkrwifi1010 -p ${mkr1010_serial} PROJECT
|
||||
|
||||
monitor:
|
||||
screen ${mkr1010} 9600
|
||||
|
||||
```
|
Reference in a new issue