mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-16 07:42:37 +00:00
Compare commits
42 Commits
v2.3.9.f06
...
v1.2.63.98
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9879494fc6 | ||
|
|
5088940751 | ||
|
|
888af31d4f | ||
|
|
3ddd74edf6 | ||
|
|
186d7f7d33 | ||
|
|
456f8ab7e8 | ||
|
|
d551c17546 | ||
|
|
af4027e8c8 | ||
|
|
3df0fdd239 | ||
|
|
8510ef3ad0 | ||
|
|
ee419f8b9b | ||
|
|
ab959ded0e | ||
|
|
2a76a5527a | ||
|
|
58d91f0a4b | ||
|
|
e09aafa13f | ||
|
|
aca95248ee | ||
|
|
d81c1c08ee | ||
|
|
317ce2c9cd | ||
|
|
b2827597fd | ||
|
|
6af182228c | ||
|
|
1246c7bb1e | ||
|
|
e6731e28c1 | ||
|
|
d57ac39b02 | ||
|
|
67bc6b1419 | ||
|
|
d328823c03 | ||
|
|
7178d3a2fd | ||
|
|
a0f60f1d07 | ||
|
|
b177313e2d | ||
|
|
53d47146b2 | ||
|
|
f7c6955736 | ||
|
|
9a87e1b53e | ||
|
|
f1478a7c93 | ||
|
|
8fd5d83980 | ||
|
|
5895aaa259 | ||
|
|
1787712a5a | ||
|
|
596a73c0a0 | ||
|
|
d56f8c631b | ||
|
|
682f988c2a | ||
|
|
ce20a2b566 | ||
|
|
d0fc836f0b | ||
|
|
d542267e4a | ||
|
|
756317e7e0 |
11
.devcontainer/Dockerfile
Normal file
11
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ubuntu/.devcontainer/base.Dockerfile
|
||||||
|
|
||||||
|
# [Choice] Ubuntu version: bionic, focal
|
||||||
|
ARG VARIANT="focal"
|
||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
|
||||||
|
|
||||||
|
# [Optional] Uncomment this section to install additional OS packages.
|
||||||
|
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get -y install python3-distutils python3-pip
|
||||||
|
RUN pip3 install platformio meshtastic adafruit-nrfutil
|
||||||
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip -O /tmp/protoc.zip && cd /tmp && unzip protoc.zip && chmod a+x bin/protoc && cp bin/protoc /usr/local/bin
|
||||||
32
.devcontainer/devcontainer.json
Normal file
32
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||||
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ubuntu
|
||||||
|
{
|
||||||
|
"name": "Ubuntu",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile",
|
||||||
|
// Update 'VARIANT' to pick an Ubuntu version: focal, bionic
|
||||||
|
"args": { "VARIANT": "focal" }
|
||||||
|
},
|
||||||
|
|
||||||
|
// Set *default* container specific settings.json values on container create.
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": "/bin/bash"
|
||||||
|
},
|
||||||
|
|
||||||
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
"extensions": [
|
||||||
|
"platformio.platformio-ide",
|
||||||
|
"xaver.clang-format"
|
||||||
|
],
|
||||||
|
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// "forwardPorts": [],
|
||||||
|
|
||||||
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
// "postCreateCommand": "uname -a",
|
||||||
|
|
||||||
|
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||||
|
"remoteUser": "vscode",
|
||||||
|
|
||||||
|
"postCreateCommand": "git submodule update --init"
|
||||||
|
}
|
||||||
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,4 +0,0 @@
|
|||||||
* text=auto eol=lf
|
|
||||||
*.{cmd,[cC][mM][dD]} text eol=crlf
|
|
||||||
*.{bat,[bB][aA][tT]} text eol=crlf
|
|
||||||
*.{sh,[sS][hH]} text eol=lf
|
|
||||||
84
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
84
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
@@ -1,84 +0,0 @@
|
|||||||
name: Bug Report
|
|
||||||
description: File a bug report
|
|
||||||
title: "[Bug]: "
|
|
||||||
labels: ["bug", "triage"]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Thanks for taking the time to fill out this bug report!
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
id: category
|
|
||||||
attributes:
|
|
||||||
label: Category
|
|
||||||
description: How would you catagorize this issue?
|
|
||||||
multiple: true
|
|
||||||
options:
|
|
||||||
- Hardware Compatibility
|
|
||||||
- BLE
|
|
||||||
- Serial
|
|
||||||
- WiFi
|
|
||||||
- Other
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
id: hardware
|
|
||||||
attributes:
|
|
||||||
label: Hardware
|
|
||||||
description: What hardware are you encountering this issue on?
|
|
||||||
multiple: true
|
|
||||||
options:
|
|
||||||
- Not Applicable
|
|
||||||
- T-Beam
|
|
||||||
- T-Beam S3
|
|
||||||
- T-Beam 0.7
|
|
||||||
- T-Lora v1
|
|
||||||
- T-Lora v1.3
|
|
||||||
- T-Lora v2 1.6
|
|
||||||
- T-Deck
|
|
||||||
- T-Echo
|
|
||||||
- T-Watch
|
|
||||||
- Rak4631
|
|
||||||
- Rak11200
|
|
||||||
- Rak11310
|
|
||||||
- Heltec v1
|
|
||||||
- Heltec v2
|
|
||||||
- Heltec v2.1
|
|
||||||
- Heltec V3
|
|
||||||
- Heltec Wireless Paper
|
|
||||||
- Heltec Wireless Tracker
|
|
||||||
- Raspberry Pi Pico (W)
|
|
||||||
- Relay v1
|
|
||||||
- Relay v2
|
|
||||||
- DIY
|
|
||||||
- Other
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: input
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: Firmware Version
|
|
||||||
description: This can be found on the device's screen or via one of the apps.
|
|
||||||
placeholder: x.x.x.yyyyyyy
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: body
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
description: Please provide details on what steps you performed for this to happen.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: logs
|
|
||||||
attributes:
|
|
||||||
label: Relevant log output
|
|
||||||
description: If you have any log output to help in diagnosing your bug, please provide it here.
|
|
||||||
render: Shell
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
46
.github/ISSUE_TEMPLATE/New Board.yml
vendored
46
.github/ISSUE_TEMPLATE/New Board.yml
vendored
@@ -1,46 +0,0 @@
|
|||||||
name: New Board
|
|
||||||
description: Request us to support new hardware
|
|
||||||
title: "[Board]: "
|
|
||||||
labels: ["enhancement", "triage"]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Thanks for requesting a new board, this will not gurantee that we will support it, but will be on our radar.
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
id: soc
|
|
||||||
attributes:
|
|
||||||
label: SOC
|
|
||||||
description: What SOC does your board have?
|
|
||||||
multiple: true
|
|
||||||
options:
|
|
||||||
- NRF52
|
|
||||||
- ESP32
|
|
||||||
- Other
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: input
|
|
||||||
id: lora
|
|
||||||
attributes:
|
|
||||||
label: Lora IC
|
|
||||||
description: What LoRa IC does the board have?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: input
|
|
||||||
id: link
|
|
||||||
attributes:
|
|
||||||
label: Product Link
|
|
||||||
description: Where can we find this product?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: body
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
description: Please provide any further details you think we may need.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
38
.github/ISSUE_TEMPLATE/bug-report-or-feature-proposal.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/bug-report-or-feature-proposal.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Bug report or feature proposal
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Please - if you just have a question (i.e. not a bug report or a feature proposal), post in our [forum](https://meshtastic.discourse.group/) instead.
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Device info:**
|
||||||
|
- Device model: [e.g. TBEAM]
|
||||||
|
- Software Version [e.g. 0.7.8]
|
||||||
|
|
||||||
|
**Smartphone information (if relevant):**
|
||||||
|
- Device: [e.g. iPhone6]
|
||||||
|
- OS: [e.g. iOS8.1]
|
||||||
|
- App Version [e.g. 0.7.2]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
27
.github/ISSUE_TEMPLATE/feature.yml
vendored
27
.github/ISSUE_TEMPLATE/feature.yml
vendored
@@ -1,27 +0,0 @@
|
|||||||
name: Feature Request
|
|
||||||
description: Request a new feature
|
|
||||||
title: "[Feature Request]: "
|
|
||||||
labels: ["enhancement"]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Thanks for your request this will not gurantee that we will implement it, but it will be reviewed.
|
|
||||||
- type: dropdown
|
|
||||||
id: soc
|
|
||||||
attributes:
|
|
||||||
label: Platform
|
|
||||||
description: What device platform will support your feature?
|
|
||||||
multiple: true
|
|
||||||
options:
|
|
||||||
- NRF52
|
|
||||||
- ESP32
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: body
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
description: Please provide details about your enhancement.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
39
.github/actions/initbuild/action.yml
vendored
Normal file
39
.github/actions/initbuild/action.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: 'Common init'
|
||||||
|
|
||||||
|
# WARNING due to https://github.com/actions/runner/issues/646
|
||||||
|
# this code can't work - must copy and paste into workflows for now because 'uses' is not supported
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
# We actually want to run this every time
|
||||||
|
# if: steps.cache-pip.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
|
# Don't cache for now because I want to be lazy with portuino updates githashes
|
||||||
|
# - name: Cache platformio
|
||||||
|
# uses: actions/cache@v1
|
||||||
|
# id: cache-platformio # needed in if test
|
||||||
|
# with:
|
||||||
|
# path: ~/.platformio
|
||||||
|
# key: ${{ runner.os }}-platformio
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
|
||||||
54
.github/actions/setup-base/action.yml
vendored
54
.github/actions/setup-base/action.yml
vendored
@@ -1,54 +0,0 @@
|
|||||||
name: "Setup Build Base Composite Action"
|
|
||||||
description: "Base build actions for Meshtastic Platform IO steps"
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: "recursive"
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Install cppcheck
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y cppcheck
|
|
||||||
|
|
||||||
- name: Install libbluetooth
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y libbluetooth-dev
|
|
||||||
- name: Install libgpiod
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y libgpiod-dev
|
|
||||||
- name: Install libyaml-cpp
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y libyaml-cpp-dev
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Cache python libs
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: cache-pip # needed in if test
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio adafruit-nrfutil
|
|
||||||
pip install -U meshtastic --pre
|
|
||||||
|
|
||||||
- name: Upgrade platformio
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pio upgrade
|
|
||||||
5
.github/pull_request_template.md
vendored
5
.github/pull_request_template.md
vendored
@@ -7,8 +7,7 @@
|
|||||||
is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc...
|
is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc...
|
||||||
- Please do not check in files that don't have real changes
|
- Please do not check in files that don't have real changes
|
||||||
- Please do not reformat lines that you didn't have to change the code on
|
- Please do not reformat lines that you didn't have to change the code on
|
||||||
- We recommend using the [Visual Studio Code](https://platformio.org/install/ide?install=vscode) editor along with the ['Trunk Check' extension](https://marketplace.visualstudio.com/items?itemName=trunk.io) (In beta for windows, WSL2 for the linux version),
|
- We recommend using the [Visual Studio Code](https://platformio.org/install/ide?install=vscode) editor and the 'clang-format' extension,
|
||||||
because it automatically follows our indentation rules and its auto reformatting will not cause spurious changes to lines.
|
because automatically follows our indentation rules and it's auto reformatting will not cause spurious changes to lines.
|
||||||
- If your PR fixes a bug, mention "fixes #bugnum" somewhere in your pull request description.
|
- If your PR fixes a bug, mention "fixes #bugnum" somewhere in your pull request description.
|
||||||
- If your other co-developers have comments on your PR please tweak as needed.
|
- If your other co-developers have comments on your PR please tweak as needed.
|
||||||
- Please also enable "Allow edits by maintainers".
|
|
||||||
|
|||||||
62
.github/workflows/build_esp32.yml
vendored
62
.github/workflows/build_esp32.yml
vendored
@@ -1,62 +0,0 @@
|
|||||||
name: Build ESP32
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
board:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-esp32:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build base
|
|
||||||
id: base
|
|
||||||
uses: ./.github/actions/setup-base
|
|
||||||
|
|
||||||
- name: Pull web ui
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
|
|
||||||
with:
|
|
||||||
repo: meshtastic/web
|
|
||||||
file: build.tar
|
|
||||||
target: build.tar
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Unpack web ui
|
|
||||||
run: |
|
|
||||||
tar -xf build.tar -C data/static
|
|
||||||
rm build.tar
|
|
||||||
|
|
||||||
- name: Remove debug flags for release
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
run: |
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s2.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s3.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32c3.ini
|
|
||||||
|
|
||||||
- name: Build ESP32
|
|
||||||
run: bin/build-esp32.sh ${{ inputs.board }}
|
|
||||||
|
|
||||||
- name: Pull OTA Firmware
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
|
|
||||||
with:
|
|
||||||
repo: meshtastic/firmware-ota
|
|
||||||
file: firmware.bin
|
|
||||||
target: release/bleota.bin
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
shell: bash
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
|
||||||
path: |
|
|
||||||
release/*.bin
|
|
||||||
release/*.elf
|
|
||||||
62
.github/workflows/build_esp32_c3.yml
vendored
62
.github/workflows/build_esp32_c3.yml
vendored
@@ -1,62 +0,0 @@
|
|||||||
name: Build ESP32-C3
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
board:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-esp32-c3:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build base
|
|
||||||
id: base
|
|
||||||
uses: ./.github/actions/setup-base
|
|
||||||
|
|
||||||
- name: Pull web ui
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
|
|
||||||
with:
|
|
||||||
repo: meshtastic/web
|
|
||||||
file: build.tar
|
|
||||||
target: build.tar
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Unpack web ui
|
|
||||||
run: |
|
|
||||||
tar -xf build.tar -C data/static
|
|
||||||
rm build.tar
|
|
||||||
- name: Remove debug flags for release
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
run: |
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s2.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s3.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32c3.ini
|
|
||||||
- name: Build ESP32
|
|
||||||
run: bin/build-esp32.sh ${{ inputs.board }}
|
|
||||||
|
|
||||||
- name: Pull OTA Firmware
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
|
|
||||||
with:
|
|
||||||
repo: meshtastic/firmware-ota
|
|
||||||
file: firmware-c3.bin
|
|
||||||
target: release/bleota-c3.bin
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
shell: bash
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
|
||||||
path: |
|
|
||||||
release/*.bin
|
|
||||||
release/*.elf
|
|
||||||
60
.github/workflows/build_esp32_s3.yml
vendored
60
.github/workflows/build_esp32_s3.yml
vendored
@@ -1,60 +0,0 @@
|
|||||||
name: Build ESP32-S3
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
board:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-esp32-s3:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build base
|
|
||||||
id: base
|
|
||||||
uses: ./.github/actions/setup-base
|
|
||||||
|
|
||||||
- name: Pull web ui
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
|
|
||||||
with:
|
|
||||||
repo: meshtastic/web
|
|
||||||
file: build.tar
|
|
||||||
target: build.tar
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Unpack web ui
|
|
||||||
run: |
|
|
||||||
tar -xf build.tar -C data/static
|
|
||||||
rm build.tar
|
|
||||||
- name: Remove debug flags for release
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
run: |
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s2.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32s3.ini
|
|
||||||
sed -i '/DDEBUG_HEAP/d' ./arch/esp32/esp32c3.ini
|
|
||||||
- name: Build ESP32
|
|
||||||
run: bin/build-esp32.sh ${{ inputs.board }}
|
|
||||||
|
|
||||||
- name: Pull OTA Firmware
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
|
|
||||||
with:
|
|
||||||
repo: meshtastic/firmware-ota
|
|
||||||
file: firmware-s3.bin
|
|
||||||
target: release/bleota-s3.bin
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
shell: bash
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
|
||||||
path: |
|
|
||||||
release/*.bin
|
|
||||||
release/*.elf
|
|
||||||
33
.github/workflows/build_nrf52.yml
vendored
33
.github/workflows/build_nrf52.yml
vendored
@@ -1,33 +0,0 @@
|
|||||||
name: Build NRF52
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
board:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-nrf52:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build base
|
|
||||||
id: base
|
|
||||||
uses: ./.github/actions/setup-base
|
|
||||||
|
|
||||||
- name: Build NRF52
|
|
||||||
run: bin/build-nrf52.sh ${{ inputs.board }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
|
||||||
path: |
|
|
||||||
release/*.uf2
|
|
||||||
release/*.elf
|
|
||||||
release/*.zip
|
|
||||||
45
.github/workflows/build_raspbian.yml
vendored
45
.github/workflows/build_raspbian.yml
vendored
@@ -1,45 +0,0 @@
|
|||||||
name: Build Raspbian
|
|
||||||
|
|
||||||
on: workflow_call
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-raspbian:
|
|
||||||
runs-on: [self-hosted, linux, ARM64]
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio adafruit-nrfutil
|
|
||||||
pip install -U meshtastic --pre
|
|
||||||
|
|
||||||
- name: Upgrade platformio
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pio upgrade
|
|
||||||
|
|
||||||
- name: Build Raspbian
|
|
||||||
run: bin/build-native.sh
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-raspbian-${{ steps.version.outputs.version }}.zip
|
|
||||||
path: |
|
|
||||||
release/meshtasticd_linux_aarch64
|
|
||||||
bin/config-dist.yaml
|
|
||||||
32
.github/workflows/build_rpi2040.yml
vendored
32
.github/workflows/build_rpi2040.yml
vendored
@@ -1,32 +0,0 @@
|
|||||||
name: Build RPI2040
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
board:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-rpi2040:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build base
|
|
||||||
id: base
|
|
||||||
uses: ./.github/actions/setup-base
|
|
||||||
|
|
||||||
- name: Build Raspberry Pi 2040
|
|
||||||
run: ./bin/build-rpi2040.sh ${{ inputs.board }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
|
||||||
path: |
|
|
||||||
release/*.uf2
|
|
||||||
release/*.elf
|
|
||||||
151
.github/workflows/main.yml
vendored
Normal file
151
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
name: Continuous Integration (Legacy serial build)
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
ci-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install cppcheck
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y cppcheck
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools and install platformio
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Check everything
|
||||||
|
run: bin/check-all.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ci-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
# We actually want to run this every time
|
||||||
|
# if: steps.cache-pip.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
|
# - name: Cache platformio
|
||||||
|
# uses: actions/cache@v1
|
||||||
|
# id: cache-platformio # needed in if test
|
||||||
|
# with:
|
||||||
|
# path: ~/.platformio
|
||||||
|
# key: ${{ runner.os }}-platformio
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Pull web ui
|
||||||
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
|
with:
|
||||||
|
repo: "meshtastic/meshtastic-web"
|
||||||
|
file: "build.tar"
|
||||||
|
target: "build.tar"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Unpack web ui
|
||||||
|
run: |
|
||||||
|
tar -xf build.tar -C data/static
|
||||||
|
rm build.tar
|
||||||
|
|
||||||
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
|
- name: Build for native
|
||||||
|
run: platformio run -e native
|
||||||
|
- name: Integration test
|
||||||
|
run: |
|
||||||
|
.pio/build/native/program &
|
||||||
|
sleep 20 # 5 seconds was not enough
|
||||||
|
echo "Simulator started, launching python test..."
|
||||||
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
||||||
|
- name: Cat bin/build-all.sh
|
||||||
|
run: |
|
||||||
|
cat bin/build-all.sh
|
||||||
|
|
||||||
|
- name: Build everything
|
||||||
|
run: bin/build-all.sh
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: release/archive/firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
|
- name: Store debugging elf files as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: debug-elfs
|
||||||
|
path: release/archive/elfs-*.zip
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
|
- name: Download firmware.zip
|
||||||
|
uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: ./
|
||||||
|
|
||||||
|
- name: Pull request artifacts
|
||||||
|
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
|
||||||
|
uses: gavv/pull-request-artifacts@v1.0.0
|
||||||
|
with:
|
||||||
|
commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
artifacts-branch: artifacts
|
||||||
|
artifacts: ./firmware-${{ steps.version.outputs.version }}.zip
|
||||||
546
.github/workflows/main_matrix.yml
vendored
546
.github/workflows/main_matrix.yml
vendored
@@ -1,58 +1,92 @@
|
|||||||
name: CI
|
name: Continuous Integration PR Checks (1.2 Legacy)
|
||||||
#concurrency:
|
|
||||||
# group: ${{ github.ref }}
|
|
||||||
# cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
|
||||||
on:
|
on:
|
||||||
# # Triggers the workflow on push but only for the master branch
|
# # Triggers the workflow on push but only for the master branch
|
||||||
push:
|
push:
|
||||||
branches: [master, develop]
|
branches: [ 1.2-legacy ]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- '**.md'
|
||||||
- "version.properties"
|
- '**.yml'
|
||||||
|
- 'version.properties'
|
||||||
|
|
||||||
# Note: This is different from "pull_request". Need to specify ref when doing checkouts.
|
# Note: This is different from "pull_request". Need to specify ref when doing checkouts.
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
branches: [master, develop]
|
branches: [ 1.2-legacy ]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- '**.md'
|
||||||
#- "**.yml"
|
- '**.yml'
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
check:
|
check:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- board: rak11200
|
- board: rak11200
|
||||||
- board: tlora-v2-1-1_6
|
- board: tlora-v2
|
||||||
|
- board: tlora-v1
|
||||||
|
- board: tlora_v1_3
|
||||||
|
- board: tlora-v2-1-1.6
|
||||||
- board: tbeam
|
- board: tbeam
|
||||||
- board: heltec-v2_1
|
- board: heltec-v1
|
||||||
|
- board: heltec-v2.0
|
||||||
|
- board: heltec-v2.1
|
||||||
|
- board: tbeam0.7
|
||||||
- board: meshtastic-diy-v1
|
- board: meshtastic-diy-v1
|
||||||
- board: rak4631
|
- board: rak4631_5005
|
||||||
|
- board: rak4631_19003
|
||||||
- board: t-echo
|
- board: t-echo
|
||||||
- board: station-g2
|
- board: nano-g1
|
||||||
- board: m5stack-coreink
|
|
||||||
- board: tbeam-s3-core
|
|
||||||
- board: tlora-t3s3-v1
|
|
||||||
- board: t-watch-s3
|
|
||||||
- board: t-deck
|
|
||||||
#- board: rak11310
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build base
|
|
||||||
id: base
|
|
||||||
uses: ./.github/actions/setup-base
|
|
||||||
|
|
||||||
- name: Trunk Check
|
- name: Checkout code
|
||||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
uses: actions/checkout@v2
|
||||||
uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
- name: Check ${{ matrix.board }}
|
- name: Install cppcheck
|
||||||
run: bin/check-all.sh ${{ matrix.board }}
|
run: |
|
||||||
|
sudo apt-get install -y cppcheck
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools and install platformio
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Check ${{ matrix.board }}
|
||||||
|
run: bin/check-all.sh ${{ matrix.board }}
|
||||||
|
|
||||||
|
after-checks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [check]
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
build-esp32:
|
build-esp32:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -63,355 +97,251 @@ jobs:
|
|||||||
- board: tlora-v2
|
- board: tlora-v2
|
||||||
- board: tlora-v1
|
- board: tlora-v1
|
||||||
- board: tlora_v1_3
|
- board: tlora_v1_3
|
||||||
- board: tlora-v2-1-1_6
|
- board: tlora-v2-1-1.6
|
||||||
- board: tlora-v2-1-1_6-tcxo
|
|
||||||
- board: tlora-v2-1-1_8
|
|
||||||
- board: tbeam
|
- board: tbeam
|
||||||
- board: heltec-v2_0
|
- board: heltec-v1
|
||||||
- board: heltec-v2_1
|
- board: heltec-v2.0
|
||||||
- board: tbeam0_7
|
- board: heltec-v2.1
|
||||||
|
- board: tbeam0.7
|
||||||
- board: meshtastic-diy-v1
|
- board: meshtastic-diy-v1
|
||||||
- board: hydra
|
|
||||||
- board: meshtastic-dr-dev
|
|
||||||
- board: nano-g1
|
- board: nano-g1
|
||||||
- board: station-g1
|
|
||||||
- board: m5stack-core
|
runs-on: ubuntu-latest
|
||||||
- board: m5stack-coreink
|
steps:
|
||||||
- board: nano-g1-explorer
|
|
||||||
- board: chatter2
|
|
||||||
uses: ./.github/workflows/build_esp32.yml
|
|
||||||
with:
|
|
||||||
board: ${{ matrix.board }}
|
|
||||||
|
|
||||||
build-esp32-s3:
|
- name: Checkout code
|
||||||
strategy:
|
uses: actions/checkout@v2
|
||||||
fail-fast: false
|
with:
|
||||||
matrix:
|
submodules: 'recursive'
|
||||||
include:
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
- board: heltec-v3
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
- board: heltec-wsl-v3
|
|
||||||
- board: heltec-wireless-tracker
|
|
||||||
- board: heltec-wireless-tracker-V1-0
|
|
||||||
- board: heltec-wireless-paper-v1_0
|
|
||||||
- board: heltec-wireless-paper #v1.1
|
|
||||||
- board: tbeam-s3-core
|
|
||||||
- board: tlora-t3s3-v1
|
|
||||||
- board: t-watch-s3
|
|
||||||
- board: t-deck
|
|
||||||
- board: picomputer-s3
|
|
||||||
- board: station-g2
|
|
||||||
- board: unphone
|
|
||||||
uses: ./.github/workflows/build_esp32_s3.yml
|
|
||||||
with:
|
|
||||||
board: ${{ matrix.board }}
|
|
||||||
|
|
||||||
build-esp32-c3:
|
- name: Setup Python
|
||||||
strategy:
|
uses: actions/setup-python@v2
|
||||||
fail-fast: false
|
with:
|
||||||
matrix:
|
python-version: 3.x
|
||||||
include:
|
|
||||||
- board: heltec-ht62-esp32c3-sx1262
|
- name: Cache python libs
|
||||||
uses: ./.github/workflows/build_esp32_c3.yml
|
uses: actions/cache@v1
|
||||||
with:
|
id: cache-pip # needed in if test
|
||||||
board: ${{ matrix.board }}
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Pull web ui
|
||||||
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
|
with:
|
||||||
|
repo: "meshtastic/meshtastic-web"
|
||||||
|
file: "build.tar"
|
||||||
|
target: "build.tar"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Unpack web ui
|
||||||
|
run: |
|
||||||
|
tar -xf build.tar -C data/static
|
||||||
|
rm build.tar
|
||||||
|
|
||||||
|
- name: Build ESP32
|
||||||
|
run: bin/build-esp32.sh ${{ matrix.board }}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-${{ matrix.board }}-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: |
|
||||||
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
build-nrf52:
|
build-nrf52:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- board: rak4631
|
- board: rak4631_5005
|
||||||
- board: rak4631_eink
|
- board: rak4631_19003
|
||||||
- board: monteops_hw1
|
|
||||||
- board: t-echo
|
- board: t-echo
|
||||||
- board: canaryone
|
|
||||||
- board: pca10059_diy_eink
|
runs-on: ubuntu-latest
|
||||||
- board: feather_diy
|
steps:
|
||||||
- board: nano-g2-ultra
|
|
||||||
uses: ./.github/workflows/build_nrf52.yml
|
|
||||||
with:
|
|
||||||
board: ${{ matrix.board }}
|
|
||||||
|
|
||||||
build-rpi2040:
|
- name: Checkout code
|
||||||
strategy:
|
uses: actions/checkout@v2
|
||||||
fail-fast: false
|
with:
|
||||||
matrix:
|
submodules: 'recursive'
|
||||||
include:
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
- board: pico
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
- board: picow
|
|
||||||
- board: rak11310
|
|
||||||
- board: senselora_rp2040
|
|
||||||
- board: rp2040-lora
|
|
||||||
uses: ./.github/workflows/build_rpi2040.yml
|
|
||||||
with:
|
|
||||||
board: ${{ matrix.board }}
|
|
||||||
|
|
||||||
build-raspbian:
|
- name: Setup Python
|
||||||
strategy:
|
uses: actions/setup-python@v2
|
||||||
fail-fast: false
|
with:
|
||||||
max-parallel: 1
|
python-version: 3.x
|
||||||
uses: ./.github/workflows/build_raspbian.yml
|
|
||||||
|
|
||||||
package-raspbian:
|
- name: Cache python libs
|
||||||
uses: ./.github/workflows/package_raspbian.yml
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Build NRF52
|
||||||
|
run: bin/build-nrf52.sh ${{ matrix.board }}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-${{ matrix.board }}-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: |
|
||||||
|
release/*.uf2
|
||||||
|
release/*.elf
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
build-native:
|
build-native:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build base
|
|
||||||
id: base
|
|
||||||
uses: ./.github/actions/setup-base
|
|
||||||
|
|
||||||
# We now run integration test before other build steps (to quickly see runtime failures)
|
- name: Checkout code
|
||||||
#- name: Build for native
|
uses: actions/checkout@v2
|
||||||
# run: platformio run -e native
|
with:
|
||||||
#- name: Integration test
|
submodules: 'recursive'
|
||||||
# run: |
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
#.pio/build/native/program
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
#& sleep 20 # 5 seconds was not enough
|
|
||||||
#echo "Simulator started, launching python test..."
|
|
||||||
#python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
|
||||||
|
|
||||||
- name: Build Native
|
- name: Setup Python
|
||||||
run: bin/build-native.sh
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Get release version string
|
- name: Cache python libs
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
uses: actions/cache@v1
|
||||||
id: version
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
- name: Upgrade python tools
|
||||||
uses: actions/upload-artifact@v3
|
run: |
|
||||||
with:
|
python -m pip install --upgrade pip
|
||||||
name: firmware-native-${{ steps.version.outputs.version }}.zip
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
path: |
|
|
||||||
release/device-*.sh
|
|
||||||
release/device-*.bat
|
|
||||||
|
|
||||||
- name: Docker login
|
- name: Upgrade platformio
|
||||||
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
run: |
|
||||||
uses: docker/login-action@v2
|
pio upgrade
|
||||||
with:
|
|
||||||
username: meshtastic
|
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
|
||||||
|
|
||||||
- name: Docker setup
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
- name: Build for native
|
||||||
uses: docker/setup-buildx-action@v2
|
run: platformio run -e native
|
||||||
|
- name: Integration test
|
||||||
|
run: |
|
||||||
|
.pio/build/native/program &
|
||||||
|
sleep 20 # 5 seconds was not enough
|
||||||
|
echo "Simulator started, launching python test..."
|
||||||
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
||||||
- name: Docker build and push tagged versions
|
- name: Build Native
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
run: bin/build-native.sh
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: meshtastic/device-simulator:${{ steps.version.outputs.version }}
|
|
||||||
|
|
||||||
- name: Docker build and push
|
- name: Get release version string
|
||||||
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
uses: docker/build-push-action@v3
|
id: version
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: meshtastic/device-simulator:latest
|
|
||||||
|
|
||||||
after-checks:
|
- name: Store binaries as an artifact
|
||||||
runs-on: ubuntu-latest
|
uses: actions/upload-artifact@v2
|
||||||
needs: [check]
|
with:
|
||||||
steps:
|
name: firmware-native-${{ steps.version.outputs.version }}.zip
|
||||||
- name: Checkout code
|
path: |
|
||||||
uses: actions/checkout@v3
|
release/meshtasticd_linux_amd64
|
||||||
with:
|
release/device-*.sh
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
release/device-*.bat
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
retention-days: 90
|
||||||
|
|
||||||
gather-artifacts:
|
gather-artifacts:
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs: [build-esp32, build-nrf52, build-native]
|
||||||
[
|
|
||||||
build-esp32,
|
|
||||||
build-esp32-s3,
|
|
||||||
build-esp32-c3,
|
|
||||||
build-nrf52,
|
|
||||||
build-raspbian,
|
|
||||||
build-native,
|
|
||||||
build-rpi2040,
|
|
||||||
package-raspbian,
|
|
||||||
]
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Get release version string
|
- name: Get release version string
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Move files up
|
- name: Move files up
|
||||||
run: mv -b -t ./ ./*tbeam-2*/littlefs*.bin ./*tbeam-2*/bleota.bin ./*tbeam-s3*/bleota-s3.bin ./*esp32c3*/bleota-c3.bin ./**/firmware*.bin ./*t-echo*/Meshtastic_nRF52_factory_erase_v2.uf2 ./**/firmware-*.uf2 ./**/firmware-*-ota.zip ./**/*.elf ./*native*/*device-*.sh ./*native*/*device-*.bat ./firmware-raspbian-*/release/meshtasticd_linux_aarch64 ./firmware-raspbian-*/bin/config-dist.yaml
|
run: mv -b -t ./ ./*tbeam-*/spiffs*.bin ./*tbeam-*/system-info.bin ./**/firmware*.bin ./**/*.uf2 ./**/*.elf ./**/meshtasticd_linux_amd64 ./*native*/*device-*.sh ./*native*/*device-*.bat
|
||||||
|
|
||||||
- name: Repackage in single firmware zip
|
- name: Repackage in single firmware zip
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
name: firmware-${{ steps.version.outputs.version }}
|
||||||
path: |
|
path: |
|
||||||
./*.bin
|
./*.bin
|
||||||
./*.uf2
|
./*.uf2
|
||||||
./firmware-*-ota.zip
|
./meshtasticd_linux_amd64
|
||||||
./device-*.sh
|
./device-*.sh
|
||||||
./device-*.bat
|
./device-*.bat
|
||||||
./meshtasticd_linux_arm64
|
|
||||||
./config-dist.yaml
|
|
||||||
retention-days: 90
|
retention-days: 90
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
name: firmware-${{ steps.version.outputs.version }}
|
||||||
path: ./output
|
path: ./output
|
||||||
|
|
||||||
# For diagnostics
|
# For diagnostics
|
||||||
- name: Show artifacts
|
- name: Show artifacts
|
||||||
run: ls -lR
|
run: ls -lR
|
||||||
|
|
||||||
- name: Device scripts permissions
|
|
||||||
run: |
|
|
||||||
chmod +x ./output/device-install.sh
|
|
||||||
chmod +x ./output/device-update.sh
|
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
run: zip -j -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
||||||
|
|
||||||
- name: Repackage in single elfs zip
|
- name: Repackage in single elfs zip
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
||||||
path: ./*.elf
|
path: ./*.elf
|
||||||
retention-days: 30
|
retention-days: 90
|
||||||
|
|
||||||
- name: Create request artifacts
|
- name: Create request artifacts
|
||||||
continue-on-error: true # FIXME: Why are we getting 502, but things still work?
|
|
||||||
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
|
||||||
uses: gavv/pull-request-artifacts@v2.1.0
|
uses: gavv/pull-request-artifacts@v1.0.0
|
||||||
with:
|
with:
|
||||||
commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
|
commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
artifacts-token: ${{ secrets.ARTIFACTS_TOKEN }}
|
artifacts-token: ${{ secrets.ARTIFACTS_TOKEN }}
|
||||||
artifacts-repo: meshtastic/artifacts
|
artifacts-repo: meshtastic/artifacts
|
||||||
artifacts-branch: device
|
artifacts-branch: device
|
||||||
|
artifacts-dir: pr
|
||||||
artifacts: ./firmware-${{ steps.version.outputs.version }}.zip
|
artifacts: ./firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
|
||||||
release-artifacts:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
needs: [gather-artifacts, after-checks]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
|
||||||
path: ./output
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: artifact-deb
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Device scripts permissions
|
|
||||||
run: |
|
|
||||||
chmod +x ./output/device-install.sh
|
|
||||||
chmod +x ./output/device-update.sh
|
|
||||||
|
|
||||||
- name: Zip firmware
|
|
||||||
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
|
||||||
path: ./elfs
|
|
||||||
|
|
||||||
- name: Zip Elfs
|
|
||||||
run: zip -j -9 -r ./debug-elfs-${{ steps.version.outputs.version }}.zip ./elfs
|
|
||||||
|
|
||||||
# For diagnostics
|
|
||||||
- name: Show artifacts
|
|
||||||
run: ls -lR
|
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
id: create_release
|
|
||||||
with:
|
|
||||||
draft: true
|
|
||||||
prerelease: true
|
|
||||||
release_name: Meshtastic Firmware ${{ steps.version.outputs.version }} Alpha
|
|
||||||
tag_name: v${{ steps.version.outputs.version }}
|
|
||||||
body: |
|
|
||||||
Autogenerated by github action, developer should edit as required before publishing...
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
- name: Add bins to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./firmware-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_name: firmware-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Add debug elfs to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./debug-elfs-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Add raspbian .deb
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./meshtasticd_${{ steps.version.outputs.version }}_arm64.deb
|
|
||||||
asset_name: meshtasticd_${{ steps.version.outputs.version }}_arm64.deb
|
|
||||||
asset_content_type: application/vnd.debian.binary-package
|
|
||||||
|
|
||||||
- name: Bump version.properties
|
|
||||||
run: >-
|
|
||||||
bin/bump_version.py
|
|
||||||
|
|
||||||
- name: Create version.properties pull request
|
|
||||||
uses: peter-evans/create-pull-request@v3
|
|
||||||
with:
|
|
||||||
add-paths: |
|
|
||||||
version.properties
|
|
||||||
|
|||||||
19
.github/workflows/nightly.yml
vendored
19
.github/workflows/nightly.yml
vendored
@@ -1,19 +0,0 @@
|
|||||||
name: Nightly
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: 0 8 * * 1-5
|
|
||||||
workflow_dispatch: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
trunk_check:
|
|
||||||
name: Trunk Check Upload
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Trunk Check
|
|
||||||
uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b
|
|
||||||
with:
|
|
||||||
trunk-token: ${{ secrets.TRUNK_TOKEN }}
|
|
||||||
75
.github/workflows/package_raspbian.yml
vendored
75
.github/workflows/package_raspbian.yml
vendored
@@ -1,75 +0,0 @@
|
|||||||
name: Package Raspbian
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-raspbian:
|
|
||||||
uses: ./.github/workflows/build_raspbian.yml
|
|
||||||
|
|
||||||
package-raspbian:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build-raspbian
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Pull web ui
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
|
|
||||||
with:
|
|
||||||
repo: meshtastic/web
|
|
||||||
file: build.tar
|
|
||||||
target: build.tar
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: firmware-raspbian-${{ steps.version.outputs.version }}.zip
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: build .debpkg
|
|
||||||
run: |
|
|
||||||
mkdir -p .debpkg/debian
|
|
||||||
mkdir -p .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
mkdir -p .debpkg/usr/sbin
|
|
||||||
mkdir -p .debpkg/etc/meshtasticd
|
|
||||||
mkdir -p .debpkg/usr/lib/systemd/system/
|
|
||||||
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
|
||||||
cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
|
||||||
chmod +x .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service
|
|
||||||
echo "etc/meshtasticd/config.yaml" > .debpkg/debian/conffiles
|
|
||||||
|
|
||||||
- uses: jiro4989/build-deb-action@v3
|
|
||||||
with:
|
|
||||||
package: meshtasticd
|
|
||||||
package_root: .debpkg
|
|
||||||
maintainer: Jonathan Bennett
|
|
||||||
version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.*
|
|
||||||
arch: arm64
|
|
||||||
depends: libyaml-cpp0.7, openssl, libulfius2.7
|
|
||||||
desc: Native Linux Meshtastic binary.
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: artifact-deb
|
|
||||||
path: |
|
|
||||||
./*.deb
|
|
||||||
93
.github/workflows/release.yml
vendored
Normal file
93
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
name: Make Release
|
||||||
|
on:
|
||||||
|
# Can optionally take parameters from the github UI, more info here https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/#:~:text=You%20can%20now%20create%20workflows,the%20workflow%20is%20run%20on.
|
||||||
|
#workflow_dispatch:
|
||||||
|
# inputs:
|
||||||
|
|
||||||
|
# Only want to run if version.properties is bumped in master
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 1.2-legacy
|
||||||
|
paths:
|
||||||
|
- 'version.properties'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
# Will be available in steps.version.outputs.version
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
# Note: we don't use caches on release builds because we don't want to accidentally not have a virgin build machine
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
# We actually want to run this every time
|
||||||
|
# if: steps.cache-pip.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Pull web ui
|
||||||
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
|
with:
|
||||||
|
repo: "meshtastic/meshtastic-web"
|
||||||
|
file: "build.tar"
|
||||||
|
target: "build.tar"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Unpack web ui
|
||||||
|
run: |
|
||||||
|
tar -xf build.tar -C data/static
|
||||||
|
rm build.tar
|
||||||
|
|
||||||
|
- name: Build everything
|
||||||
|
run: bin/build-all.sh
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
id: create_release
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
prerelease: true
|
||||||
|
release_name: ${{ steps.version.outputs.version }} alpha
|
||||||
|
tag_name: v${{ steps.version.outputs.version }}
|
||||||
|
body: |
|
||||||
|
Autogenerated by github action, developer should edit as required before publishing...
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Add bins to release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release/archive/firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
asset_name: firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Add debug elfs to release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release/archive/elfs-${{ steps.version.outputs.version }}.zip
|
||||||
|
asset_name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
40
.github/workflows/sec_sast_flawfinder.yml
vendored
40
.github/workflows/sec_sast_flawfinder.yml
vendored
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
name: Flawfinder Scan
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [master, develop]
|
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
- "version.properties"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
flawfinder:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Flawfinder
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# step 1
|
|
||||||
- name: clone application source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# step 2
|
|
||||||
- name: flawfinder_scan
|
|
||||||
uses: david-a-wheeler/flawfinder@2.0.19
|
|
||||||
with:
|
|
||||||
arguments: "--sarif ./"
|
|
||||||
output: "flawfinder_report.sarif"
|
|
||||||
|
|
||||||
# step 3
|
|
||||||
- name: save report as pipeline artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: flawfinder_report.sarif
|
|
||||||
path: flawfinder_report.sarif
|
|
||||||
|
|
||||||
# step 4
|
|
||||||
- name: publish code scanning alerts
|
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
|
||||||
with:
|
|
||||||
sarif_file: flawfinder_report.sarif
|
|
||||||
category: flawfinder
|
|
||||||
42
.github/workflows/sec_sast_semgrep_cron.yml
vendored
42
.github/workflows/sec_sast_semgrep_cron.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
name: Semgrep Full Scan
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
schedule:
|
|
||||||
- cron: "0 1 * * 6"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
semgrep-full:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: returntocorp/semgrep
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# step 1
|
|
||||||
- name: clone application source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# step 2
|
|
||||||
- name: full scan
|
|
||||||
run: |
|
|
||||||
semgrep \
|
|
||||||
--sarif --output report.sarif \
|
|
||||||
--metrics=off \
|
|
||||||
--config="p/default"
|
|
||||||
|
|
||||||
# step 3
|
|
||||||
- name: save report as pipeline artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: report.sarif
|
|
||||||
path: report.sarif
|
|
||||||
|
|
||||||
# step 4
|
|
||||||
- name: publish code scanning alerts
|
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
|
||||||
with:
|
|
||||||
sarif_file: report.sarif
|
|
||||||
category: semgrep
|
|
||||||
25
.github/workflows/sec_sast_semgrep_pull.yml
vendored
25
.github/workflows/sec_sast_semgrep_pull.yml
vendored
@@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
name: Semgrep Differential Scan
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
semgrep-diff:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: returntocorp/semgrep
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# step 1
|
|
||||||
- name: clone application source code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
# step 2
|
|
||||||
- name: differential scan
|
|
||||||
run: |
|
|
||||||
semgrep scan \
|
|
||||||
--error \
|
|
||||||
--metrics=off \
|
|
||||||
--baseline-commit ${{ github.event.pull_request.base.sha }} \
|
|
||||||
--config="p/default"
|
|
||||||
22
.github/workflows/trunk-check.yml
vendored
22
.github/workflows/trunk-check.yml
vendored
@@ -1,22 +0,0 @@
|
|||||||
name: Pull Request
|
|
||||||
on: [pull_request]
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
trunk_check:
|
|
||||||
name: Trunk Check Runner
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
checks: write # For trunk to post annotations
|
|
||||||
contents: read # For repo checkout
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Trunk Check
|
|
||||||
uses: trunk-io/trunk-action@v1
|
|
||||||
20
.github/workflows/update_protobufs.yml
vendored
20
.github/workflows/update_protobufs.yml
vendored
@@ -7,27 +7,27 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Update submodule
|
- name: Update submodule
|
||||||
run: |
|
run: |
|
||||||
git submodule update --remote protobufs
|
git submodule update --remote proto
|
||||||
|
|
||||||
- name: Download nanopb
|
- name: Download nanopb
|
||||||
run: |
|
run: |
|
||||||
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8-linux-x86.tar.gz
|
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.4-linux-x86.tar.gz
|
||||||
tar xvzf nanopb-0.4.8-linux-x86.tar.gz
|
tar xvzf nanopb-0.4.4-linux-x86.tar.gz
|
||||||
mv nanopb-0.4.8-linux-x86 nanopb-0.4.8
|
mv nanopb-0.4.4-linux-x86 nanopb-0.4.4
|
||||||
|
|
||||||
- name: Re-generate protocol buffers
|
- name: Re-generate protocol buffers
|
||||||
run: |
|
run: |
|
||||||
./bin/regen-protos.sh
|
./bin/regen-protos.sh
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
add-paths: |
|
add-paths: |
|
||||||
protobufs
|
proto
|
||||||
src/mesh
|
src/mesh
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -30,6 +30,3 @@ __pycache__
|
|||||||
venv/
|
venv/
|
||||||
release/
|
release/
|
||||||
.vscode/extensions.json
|
.vscode/extensions.json
|
||||||
/compile_commands.json
|
|
||||||
src/mesh/raspihttp/certificate.pem
|
|
||||||
src/mesh/raspihttp/private_key.pem
|
|
||||||
50
.gitlab-ci.yml
Normal file
50
.gitlab-ci.yml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
image: python:latest
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# make sure GitLab check out submodules
|
||||||
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- buildall
|
||||||
|
- upload
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: buildall
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
# we need zip later for packaging
|
||||||
|
- "apt update;apt -y install zip"
|
||||||
|
- "pip install -U platformio"
|
||||||
|
|
||||||
|
script:
|
||||||
|
# clean up residues from previous run
|
||||||
|
- rm -rf release
|
||||||
|
- bin/build-all.sh
|
||||||
|
|
||||||
|
# This is for my local environment, if your runners are tagged differently, modify or remove
|
||||||
|
tags:
|
||||||
|
- dockerized
|
||||||
|
|
||||||
|
# The files which are to be made available in GitLab
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- release/archive/firmware*.zip
|
||||||
|
|
||||||
|
|
||||||
|
upload:
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
|
||||||
|
stage: upload
|
||||||
|
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/master"
|
||||||
|
cd release/archive
|
||||||
|
for f in *.zip; do
|
||||||
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${f} ${PACKAGE_REGISTRY_URL}/${f}
|
||||||
|
done
|
||||||
|
echo 'Package uploaded!'
|
||||||
|
|
||||||
|
# This is for my local environment, if your runners are tagged differently, modify or remove
|
||||||
|
tags:
|
||||||
|
- dockerized
|
||||||
13
.gitmodules
vendored
13
.gitmodules
vendored
@@ -1,3 +1,10 @@
|
|||||||
[submodule "protobufs"]
|
[submodule "proto"]
|
||||||
path = protobufs
|
path = proto
|
||||||
url = https://github.com/meshtastic/protobufs.git
|
url = https://github.com/meshtastic/Meshtastic-protobufs.git
|
||||||
|
branch = 1.2-legacy
|
||||||
|
[submodule "sdk-nrfxlib"]
|
||||||
|
path = sdk-nrfxlib
|
||||||
|
url = https://github.com/nrfconnect/sdk-nrfxlib.git
|
||||||
|
[submodule "design"]
|
||||||
|
path = design
|
||||||
|
url = https://github.com/meshtastic/meshtastic-design.git
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
.github/workflows/main_matrix.yml
|
|
||||||
src/mesh/compression/unishox2.c
|
|
||||||
9
.trunk/.gitignore
vendored
9
.trunk/.gitignore
vendored
@@ -1,9 +0,0 @@
|
|||||||
*out
|
|
||||||
*logs
|
|
||||||
*actions
|
|
||||||
*notifications
|
|
||||||
*tools
|
|
||||||
plugins
|
|
||||||
user_trunk.yaml
|
|
||||||
user.yaml
|
|
||||||
tmp
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Autoformatter friendly flake8 config (all formatting rules disabled)
|
|
||||||
[flake8]
|
|
||||||
extend-ignore = D1, D2, E1, E2, E3, E501, W1, W2, W3, W5
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Following source doesn't work in most setups
|
|
||||||
ignored:
|
|
||||||
- SC1090
|
|
||||||
- SC1091
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[settings]
|
|
||||||
profile=black
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# Autoformatter friendly markdownlint config (all formatting rules disabled)
|
|
||||||
default: true
|
|
||||||
blank_lines: false
|
|
||||||
bullet: false
|
|
||||||
html: false
|
|
||||||
indentation: false
|
|
||||||
line_length: false
|
|
||||||
spaces: false
|
|
||||||
url: false
|
|
||||||
whitespace: false
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
enable=all
|
|
||||||
source-path=SCRIPTDIR
|
|
||||||
disable=SC2154
|
|
||||||
disable=SC2248
|
|
||||||
disable=SC2250
|
|
||||||
|
|
||||||
# If you're having issues with shellcheck following source, disable the errors via:
|
|
||||||
# disable=SC1090
|
|
||||||
# disable=SC1091
|
|
||||||
#
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
rules:
|
|
||||||
quoted-strings:
|
|
||||||
required: only-when-needed
|
|
||||||
extra-allowed: ["{|}"]
|
|
||||||
empty-values:
|
|
||||||
forbid-in-block-mappings: false
|
|
||||||
forbid-in-flow-mappings: true
|
|
||||||
key-duplicates: {}
|
|
||||||
octal-values:
|
|
||||||
forbid-implicit-octal: true
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Generic, formatter-friendly config.
|
|
||||||
select = ["B", "D3", "D4", "E", "F"]
|
|
||||||
|
|
||||||
# Never enforce `E501` (line length violations). This should be handled by formatters.
|
|
||||||
ignore = ["E501"]
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
plugins: [
|
|
||||||
{
|
|
||||||
name: "preset-default",
|
|
||||||
params: {
|
|
||||||
overrides: {
|
|
||||||
removeViewBox: false, // https://github.com/svg/svgo/issues/1128
|
|
||||||
sortAttrs: true,
|
|
||||||
removeOffCanvasPaths: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
version: 0.1
|
|
||||||
cli:
|
|
||||||
version: 1.20.1
|
|
||||||
plugins:
|
|
||||||
sources:
|
|
||||||
- id: trunk
|
|
||||||
ref: v1.4.4
|
|
||||||
uri: https://github.com/trunk-io/plugins
|
|
||||||
lint:
|
|
||||||
enabled:
|
|
||||||
- trufflehog@3.68.5
|
|
||||||
- yamllint@1.35.1
|
|
||||||
- bandit@1.7.7
|
|
||||||
- checkov@3.2.32
|
|
||||||
- terrascan@1.19.1
|
|
||||||
- trivy@0.49.1
|
|
||||||
#- trufflehog@3.63.2-rc0
|
|
||||||
- taplo@0.8.1
|
|
||||||
- ruff@0.3.1
|
|
||||||
- isort@5.13.2
|
|
||||||
- markdownlint@0.39.0
|
|
||||||
- oxipng@9.0.0
|
|
||||||
- svgo@3.2.0
|
|
||||||
- actionlint@1.6.27
|
|
||||||
- flake8@7.0.0
|
|
||||||
- hadolint@2.12.0
|
|
||||||
- shfmt@3.6.0
|
|
||||||
- shellcheck@0.9.0
|
|
||||||
- black@24.2.0
|
|
||||||
- git-diff-check
|
|
||||||
- gitleaks@8.18.2
|
|
||||||
- clang-format@16.0.3
|
|
||||||
- prettier@3.2.5
|
|
||||||
runtimes:
|
|
||||||
enabled:
|
|
||||||
- python@3.10.8
|
|
||||||
- go@1.21.0
|
|
||||||
- node@18.12.1
|
|
||||||
actions:
|
|
||||||
disabled:
|
|
||||||
- trunk-announce
|
|
||||||
enabled:
|
|
||||||
- trunk-fmt-pre-commit
|
|
||||||
- trunk-check-pre-push
|
|
||||||
- trunk-upgrade-available
|
|
||||||
17
.vscode/extensions.json
vendored
17
.vscode/extensions.json
vendored
@@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||||
// for the documentation about the extensions.json format
|
// for the documentation about the extensions.json format
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"ms-vscode.cpptools",
|
"platformio.platformio-ide",
|
||||||
"platformio.platformio-ide",
|
"xaver.clang-format"
|
||||||
"trunk.io"
|
]
|
||||||
],
|
}
|
||||||
}
|
|
||||||
|
|||||||
87
.vscode/settings.json
vendored
87
.vscode/settings.json
vendored
@@ -1,7 +1,82 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
"files.associations": {
|
||||||
"editor.defaultFormatter": "trunk.io",
|
"type_traits": "cpp",
|
||||||
"trunk.enableWindows": true,
|
"array": "cpp",
|
||||||
"files.insertFinalNewline": false,
|
"*.tcc": "cpp",
|
||||||
"files.trimFinalNewlines": false
|
"cctype": "cpp",
|
||||||
}
|
"clocale": "cpp",
|
||||||
|
"cmath": "cpp",
|
||||||
|
"cstdarg": "cpp",
|
||||||
|
"cstddef": "cpp",
|
||||||
|
"cstdint": "cpp",
|
||||||
|
"cstdio": "cpp",
|
||||||
|
"cstdlib": "cpp",
|
||||||
|
"cstring": "cpp",
|
||||||
|
"ctime": "cpp",
|
||||||
|
"cwchar": "cpp",
|
||||||
|
"cwctype": "cpp",
|
||||||
|
"deque": "cpp",
|
||||||
|
"unordered_map": "cpp",
|
||||||
|
"unordered_set": "cpp",
|
||||||
|
"vector": "cpp",
|
||||||
|
"exception": "cpp",
|
||||||
|
"algorithm": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"system_error": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"initializer_list": "cpp",
|
||||||
|
"iomanip": "cpp",
|
||||||
|
"iosfwd": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"memory": "cpp",
|
||||||
|
"new": "cpp",
|
||||||
|
"ostream": "cpp",
|
||||||
|
"numeric": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"stdexcept": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"cinttypes": "cpp",
|
||||||
|
"utility": "cpp",
|
||||||
|
"typeinfo": "cpp",
|
||||||
|
"string": "cpp",
|
||||||
|
"*.xbm": "cpp",
|
||||||
|
"list": "cpp",
|
||||||
|
"atomic": "cpp",
|
||||||
|
"memory_resource": "cpp",
|
||||||
|
"optional": "cpp",
|
||||||
|
"string_view": "cpp",
|
||||||
|
"cassert": "cpp",
|
||||||
|
"iterator": "cpp",
|
||||||
|
"shared_mutex": "cpp",
|
||||||
|
"iostream": "cpp",
|
||||||
|
"esp_nimble_hci.h": "c"
|
||||||
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"Blox",
|
||||||
|
"EINK",
|
||||||
|
"HFSR",
|
||||||
|
"Meshtastic",
|
||||||
|
"NEMAGPS",
|
||||||
|
"NMEAGPS",
|
||||||
|
"RDEF",
|
||||||
|
"Ublox",
|
||||||
|
"bkpt",
|
||||||
|
"cfsr",
|
||||||
|
"descs",
|
||||||
|
"ocrypto",
|
||||||
|
"protobufs",
|
||||||
|
"wifi"
|
||||||
|
],
|
||||||
|
"C_Cpp.dimInactiveRegions": true,
|
||||||
|
"cmake.configureOnOpen": true,
|
||||||
|
"protoc": {
|
||||||
|
"compile_on_save": false,
|
||||||
|
"compile_all_path": "/home/kevinh/development/meshtastic/meshtastic-esp32/proto",
|
||||||
|
"options": [
|
||||||
|
"--java_out=/tmp",
|
||||||
|
"-I=/home/kevinh/development/meshtastic/meshtastic-esp32/proto"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
30
.vscode/tasks.json
vendored
30
.vscode/tasks.json
vendored
@@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"type": "PlatformIO",
|
"type": "PlatformIO",
|
||||||
"task": "Build",
|
"task": "Build",
|
||||||
"problemMatcher": ["$platformio"],
|
"problemMatcher": [
|
||||||
"group": {
|
"$platformio"
|
||||||
"kind": "build",
|
],
|
||||||
"isDefault": true
|
"group": {
|
||||||
},
|
"kind": "build",
|
||||||
"label": "PlatformIO: Build"
|
"isDefault": true
|
||||||
}
|
},
|
||||||
]
|
"label": "PlatformIO: Build"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
36
CMakeLists.txt
Normal file
36
CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE
|
||||||
|
# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
|
||||||
|
#
|
||||||
|
# If you need to override existing CMake configuration or add extra,
|
||||||
|
# please create `CMakeListsUser.txt` in the root of project.
|
||||||
|
# The `CMakeListsUser.txt` will not be overwritten by PlatformIO.
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
set(CMAKE_SYSTEM_NAME Generic)
|
||||||
|
set(CMAKE_C_COMPILER_WORKS 1)
|
||||||
|
set(CMAKE_CXX_COMPILER_WORKS 1)
|
||||||
|
|
||||||
|
project("meshtastic-esp32" C CXX)
|
||||||
|
|
||||||
|
include(CMakeListsPrivate.txt)
|
||||||
|
|
||||||
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsUser.txt)
|
||||||
|
include(CMakeListsUser.txt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include_directories("$ENV{HOME}/.platformio/packages/framework-portduino")
|
||||||
|
include_directories("/usr/include")
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
Production ALL
|
||||||
|
COMMAND platformio -c clion run "$<$<NOT:$<CONFIG:All>>:-e${CMAKE_BUILD_TYPE}>"
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
Debug ALL
|
||||||
|
COMMAND platformio -c clion run --target debug "$<$<NOT:$<CONFIG:All>>:-e${CMAKE_BUILD_TYPE}>"
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(Z_DUMMY_TARGET ${SRC_LIST})
|
||||||
2041
CMakeListsPrivate.txt
Normal file
2041
CMakeListsPrivate.txt
Normal file
File diff suppressed because it is too large
Load Diff
67
Dockerfile
67
Dockerfile
@@ -1,55 +1,16 @@
|
|||||||
FROM debian:bookworm-slim AS builder
|
FROM ubuntu
|
||||||
|
MAINTAINER Kevin Hester <kevinh@geeksville.com>
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
RUN apt-get update
|
||||||
ENV TZ=Etc/UTC
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install wget python3 g++ zip python3-venv git vim
|
||||||
|
RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -O get-platformio.py; chmod +x get-platformio.py
|
||||||
|
RUN python3 get-platformio.py
|
||||||
|
RUN git clone https://github.com/meshtastic/Meshtastic-device.git
|
||||||
|
RUN cd Meshtastic-device; git submodule update --init --recursive
|
||||||
|
# only build the simulator
|
||||||
|
RUN sed -i 's/^BOARDS_ESP32.*/BOARDS_ESP32=""/' Meshtastic-device/bin/build-all.sh
|
||||||
|
RUN sed -i 's/^BOARDS_NRF52.*/BOARDS_NRF52=""/' Meshtastic-device/bin/build-all.sh
|
||||||
|
RUN sed -i 's/echo "Building SPIFFS.*/exit/' Meshtastic-device/bin/build-all.sh
|
||||||
|
RUN . ~/.platformio/penv/bin/activate; cd Meshtastic-device; ./bin/build-all.sh
|
||||||
|
|
||||||
# http://bugs.python.org/issue19846
|
CMD ["/Meshtastic-device/release/latest/bins/universal/meshtasticd_linux_amd64"]
|
||||||
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
|
|
||||||
ENV LANG C.UTF-8
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
|
|
||||||
# Install build deps
|
|
||||||
USER root
|
|
||||||
|
|
||||||
# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue
|
|
||||||
# trunk-ignore(hadolint/DL3008): Use latest version of packages for buildchain
|
|
||||||
RUN apt-get update && apt-get install --no-install-recommends -y wget python3 python3-pip python3-wheel python3-venv g++ zip git \
|
|
||||||
ca-certificates libgpiod-dev libyaml-cpp-dev libbluetooth-dev \
|
|
||||||
libulfius-dev liborcania-dev libssl-dev pkg-config && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* && mkdir /tmp/firmware
|
|
||||||
|
|
||||||
RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh && chown mesh:mesh /tmp/firmware
|
|
||||||
USER mesh
|
|
||||||
|
|
||||||
WORKDIR /tmp/firmware
|
|
||||||
RUN python3 -m venv /tmp/firmware
|
|
||||||
RUN source ./bin/activate && pip3 install --no-cache-dir -U platformio==6.1.14
|
|
||||||
# trunk-ignore(terrascan/AC_DOCKER_00024): We would actually like these files to be owned by mesh tyvm
|
|
||||||
COPY --chown=mesh:mesh . /tmp/firmware
|
|
||||||
RUN source ./bin/activate && chmod +x /tmp/firmware/bin/build-native.sh && ./bin/build-native.sh
|
|
||||||
RUN cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd"
|
|
||||||
|
|
||||||
|
|
||||||
##### PRODUCTION BUILD #############
|
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
ENV TZ=Etc/UTC
|
|
||||||
|
|
||||||
# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue
|
|
||||||
# trunk-ignore(hadolint/DL3008): Use latest version of packages for buildchain
|
|
||||||
RUN apt-get update && apt-get --no-install-recommends -y install libc-bin libc6 libgpiod2 libyaml-cpp0.7 libulfius2.7 liborcania2.3 libssl3 && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
|
|
||||||
USER mesh
|
|
||||||
|
|
||||||
WORKDIR /home/mesh
|
|
||||||
COPY --from=builder /tmp/firmware/release/meshtasticd /home/mesh/
|
|
||||||
|
|
||||||
VOLUME /home/mesh/data
|
|
||||||
|
|
||||||
CMD [ "sh", "-cx", "./meshtasticd -d /home/mesh/data --hwid=${HWID:-$RANDOM}" ]
|
|
||||||
|
|
||||||
HEALTHCHECK NONE
|
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -1,18 +1,14 @@
|
|||||||
# Meshtastic Firmware
|
# Meshtastic-device
|
||||||
|
[](https://open.vscode.dev/meshtastic/Meshtastic-device)
|
||||||
|
[](https://github.com/meshtastic/Meshtastic-device/actions/workflows/main.yml)
|
||||||
|

|
||||||
|
|
||||||

|
## This repository contains the device firmware used in the [Meshtastic](https://meshtastic.org) project.
|
||||||
[](https://github.com/meshtastic/firmware/actions/workflows/ci.yml)
|
|
||||||
[](https://cla-assistant.io/meshtastic/firmware)
|
|
||||||
[](https://opencollective.com/meshtastic/)
|
|
||||||
[](https://vercel.com?utm_source=meshtastic&utm_campaign=oss)
|
|
||||||
|
|
||||||
## Overview
|
Update Instructions
|
||||||
|
|
||||||
This repository contains the device firmware for the Meshtastic project.
|
[For ESP32 devices click here](https://meshtastic.org/docs/getting-started/flashing-esp32)
|
||||||
|
|
||||||
- **[Building Instructions](https://meshtastic.org/docs/development/firmware/build)**
|
[For nRF52 devices click here](https://meshtastic.org/docs/getting-started/flashing-nrf52)
|
||||||
- **[Flashing Instructions](https://meshtastic.org/docs/getting-started/flashing-firmware/)**
|
|
||||||
|
|
||||||
## Stats
|
For developer information and specific building instructions, please see the [developer doccumentation](https://meshtastic.org/docs/developers)
|
||||||
|
|
||||||

|
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
; Common settings for ESP targes, mixin with extends = esp32_base
|
|
||||||
[esp32_base]
|
|
||||||
extends = arduino_base
|
|
||||||
platform = platformio/espressif32@6.3.2 # This is a temporary fix to the S3-based devices bluetooth issues until we can determine what within ESP-IDF changed and can develop a suitable patch.
|
|
||||||
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> -<mesh/raspihttp>
|
|
||||||
|
|
||||||
upload_speed = 921600
|
|
||||||
debug_init_break = tbreak setup
|
|
||||||
monitor_filters = esp32_exception_decoder
|
|
||||||
|
|
||||||
board_build.filesystem = littlefs
|
|
||||||
|
|
||||||
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
|
|
||||||
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h
|
|
||||||
# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h
|
|
||||||
build_flags =
|
|
||||||
${arduino_base.build_flags}
|
|
||||||
-Wall
|
|
||||||
-Wextra
|
|
||||||
-Isrc/platform/esp32
|
|
||||||
-std=c++11
|
|
||||||
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG
|
|
||||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
|
||||||
-DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL
|
|
||||||
-DAXP_DEBUG_PORT=Serial
|
|
||||||
-DCONFIG_BT_NIMBLE_ENABLED
|
|
||||||
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
|
|
||||||
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
|
|
||||||
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=5120
|
|
||||||
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
|
|
||||||
-DSERIAL_BUFFER_SIZE=4096
|
|
||||||
-DLIBPAX_ARDUINO
|
|
||||||
-DLIBPAX_WIFI
|
|
||||||
-DLIBPAX_BLE
|
|
||||||
;-DDEBUG_HEAP
|
|
||||||
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
${networking_base.lib_deps}
|
|
||||||
${environmental_base.lib_deps}
|
|
||||||
https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2
|
|
||||||
h2zero/NimBLE-Arduino@^1.4.1
|
|
||||||
https://github.com/dbSuS/libpax.git#7bcd3fcab75037505be9b122ab2b24cc5176b587
|
|
||||||
https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
|
|
||||||
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
|
|
||||||
|
|
||||||
lib_ignore =
|
|
||||||
segger_rtt
|
|
||||||
ESP32 BLE Arduino
|
|
||||||
|
|
||||||
; leave this commented out to avoid breaking Windows
|
|
||||||
;upload_port = /dev/ttyUSB0
|
|
||||||
;monitor_port = /dev/ttyUSB0
|
|
||||||
|
|
||||||
; Please don't delete these lines. JM uses them.
|
|
||||||
;upload_port = /dev/cu.SLAB_USBtoUART
|
|
||||||
;monitor_port = /dev/cu.SLAB_USBtoUART
|
|
||||||
|
|
||||||
; customize the partition table
|
|
||||||
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
|
|
||||||
board_build.partitions = partition-table.csv
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[esp32c3_base]
|
|
||||||
extends = esp32_base
|
|
||||||
|
|
||||||
monitor_speed = 115200
|
|
||||||
monitor_filters = esp32_c3_exception_decoder
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
[esp32s2_base]
|
|
||||||
extends = esp32_base
|
|
||||||
|
|
||||||
build_src_filter =
|
|
||||||
${esp32_base.build_src_filter} - <libpax/> -<nimble/> -<mesh/raspihttp>
|
|
||||||
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags}
|
|
||||||
-DHAS_BLUETOOTH=0
|
|
||||||
-DMESHTASTIC_EXCLUDE_PAXCOUNTER
|
|
||||||
-DMESHTASTIC_EXCLUDE_BLUETOOTH
|
|
||||||
|
|
||||||
lib_ignore =
|
|
||||||
${esp32_base.lib_ignore}
|
|
||||||
NimBLE-Arduino
|
|
||||||
libpax
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[esp32s3_base]
|
|
||||||
extends = esp32_base
|
|
||||||
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
[nrf52_base]
|
|
||||||
; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files
|
|
||||||
platform = platformio/nordicnrf52@^10.4.0
|
|
||||||
extends = arduino_base
|
|
||||||
|
|
||||||
build_type = debug
|
|
||||||
build_flags =
|
|
||||||
${arduino_base.build_flags}
|
|
||||||
-DSERIAL_BUFFER_SIZE=1024
|
|
||||||
-Wno-unused-variable
|
|
||||||
-Isrc/platform/nrf52
|
|
||||||
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2040> -<mesh/eth/> -<mesh/raspihttp>
|
|
||||||
|
|
||||||
lib_deps=
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
|
|
||||||
lib_ignore =
|
|
||||||
BluetoothOTA
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[nrf52832_base]
|
|
||||||
extends = nrf52_base
|
|
||||||
|
|
||||||
build_flags = ${nrf52_base.build_flags}
|
|
||||||
|
|
||||||
lib_deps =
|
|
||||||
${nrf52_base.lib_deps}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[nrf52840_base]
|
|
||||||
extends = nrf52_base
|
|
||||||
|
|
||||||
build_flags = ${nrf52_base.build_flags}
|
|
||||||
|
|
||||||
lib_deps =
|
|
||||||
${nrf52_base.lib_deps}
|
|
||||||
${environmental_base.lib_deps}
|
|
||||||
https://github.com/Kongduino/Adafruit_nRFCrypto.git#e31a8825ea3300b163a0a3c1ddd5de34e10e1371
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
|
|
||||||
[portduino_base]
|
|
||||||
platform = https://github.com/meshtastic/platform-native.git#9881bf3721d610cccacf5ae8e3a07839cce75d63
|
|
||||||
framework = arduino
|
|
||||||
|
|
||||||
build_src_filter =
|
|
||||||
${env.build_src_filter}
|
|
||||||
-<platform/esp32/>
|
|
||||||
-<nimble/>
|
|
||||||
-<platform/nrf52/>
|
|
||||||
-<platform/stm32wl/>
|
|
||||||
-<platform/rp2040>
|
|
||||||
-<mesh/wifi/>
|
|
||||||
-<mesh/http/>
|
|
||||||
+<mesh/raspihttp/>
|
|
||||||
-<mesh/eth/>
|
|
||||||
-<modules/esp32>
|
|
||||||
-<modules/Telemetry/EnvironmentTelemetry.cpp>
|
|
||||||
-<modules/Telemetry/AirQualityTelemetry.cpp>
|
|
||||||
-<modules/Telemetry/Sensor>
|
|
||||||
+<../variants/portduino>
|
|
||||||
|
|
||||||
lib_deps =
|
|
||||||
${env.lib_deps}
|
|
||||||
${networking_base.lib_deps}
|
|
||||||
rweather/Crypto@^0.4.0
|
|
||||||
https://github.com/lovyan03/LovyanGFX.git#5a39989aa2c9492572255b22f033843ec8900233
|
|
||||||
|
|
||||||
build_flags =
|
|
||||||
${arduino_base.build_flags}
|
|
||||||
-fPIC
|
|
||||||
-Isrc/platform/portduino
|
|
||||||
-DRADIOLIB_EEPROM_UNSUPPORTED
|
|
||||||
-DPORTDUINO_LINUX_HARDWARE
|
|
||||||
-lbluetooth
|
|
||||||
-lgpiod
|
|
||||||
-lyaml-cpp
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
; Common settings for rp2040 Processor based targets
|
|
||||||
[rp2040_base]
|
|
||||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#60d6ae81fcc73c34b1493ca9e261695e471bc0c2
|
|
||||||
extends = arduino_base
|
|
||||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#3.7.2
|
|
||||||
|
|
||||||
board_build.core = earlephilhower
|
|
||||||
board_build.filesystem_size = 0.5m
|
|
||||||
build_flags =
|
|
||||||
${arduino_base.build_flags} -Wno-unused-variable
|
|
||||||
-Isrc/platform/rp2040
|
|
||||||
-D__PLAT_RP2040__
|
|
||||||
# -D _POSIX_THREADS
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<modules/esp32> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> -<mesh/wifi/> -<mesh/http/> -<mesh/raspihttp>
|
|
||||||
|
|
||||||
lib_ignore =
|
|
||||||
BluetoothOTA
|
|
||||||
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
${environmental_base.lib_deps}
|
|
||||||
rweather/Crypto
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
[stm32wl5e_base]
|
|
||||||
platform_packages = platformio/framework-arduinoststm32 @ https://github.com/stm32duino/Arduino_Core_STM32.git#6e3f9910d0122e82a6c3438507dfac3d2fd80a39
|
|
||||||
platform = ststm32
|
|
||||||
board = generic_wl5e
|
|
||||||
framework = arduino
|
|
||||||
|
|
||||||
build_type = debug
|
|
||||||
|
|
||||||
build_flags =
|
|
||||||
${arduino_base.build_flags}
|
|
||||||
-Isrc/platform/stm32wl -g
|
|
||||||
-DconfigUSE_CMSIS_RTOS_V2=1
|
|
||||||
-DVECT_TAB_OFFSET=0x08000000
|
|
||||||
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/wifi/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<input> -<buzz> -<modules/Telemetry> -<platform/nrf52> -<platform/portduino> -<platform/rp2040> -<mesh/raspihttp>
|
|
||||||
|
|
||||||
board_upload.offset_address = 0x08000000
|
|
||||||
upload_protocol = stlink
|
|
||||||
|
|
||||||
lib_deps =
|
|
||||||
${env.lib_deps}
|
|
||||||
https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b
|
|
||||||
https://github.com/littlefs-project/littlefs.git#v2.5.1
|
|
||||||
https://github.com/stm32duino/STM32FreeRTOS.git#10.3.1
|
|
||||||
|
|
||||||
lib_ignore =
|
|
||||||
mathertel/OneButton
|
|
||||||
Binary file not shown.
111
bin/build-all.sh
Executable file
111
bin/build-all.sh
Executable file
@@ -0,0 +1,111 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
SHORT_VERSION=`bin/buildinfo.py short`
|
||||||
|
|
||||||
|
BOARDS_ESP32="rak11200 tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v1 heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 nano-g1"
|
||||||
|
#BOARDS_ESP32=tbeam
|
||||||
|
|
||||||
|
# FIXME note nrf52840dk build is for some reason only generating a BIN file but not a HEX file nrf52840dk-geeksville is fine
|
||||||
|
BOARDS_NRF52="rak4631_5005 rak4631_19003 t-echo"
|
||||||
|
#BOARDS_NRF52=""
|
||||||
|
|
||||||
|
OUTDIR=release/latest
|
||||||
|
|
||||||
|
# We keep all old builds (and their map files in the archive dir)
|
||||||
|
ARCHIVEDIR=release/archive
|
||||||
|
|
||||||
|
rm -f $OUTDIR/firmware*
|
||||||
|
|
||||||
|
mkdir -p $OUTDIR/bins $ARCHIVEDIR
|
||||||
|
rm -r $OUTDIR/bins/* || true
|
||||||
|
mkdir -p $OUTDIR/bins/universal $OUTDIR/elfs/universal
|
||||||
|
|
||||||
|
# build the named environment and copy the bins to the release directory
|
||||||
|
function do_build() {
|
||||||
|
BOARD=$1
|
||||||
|
isNrf=$3
|
||||||
|
|
||||||
|
echo "Building for $BOARD ($isNrf) with $PLATFORMIO_BUILD_FLAGS"
|
||||||
|
rm -f .pio/build/$BOARD/firmware.*
|
||||||
|
|
||||||
|
# The shell vars the build tool expects to find
|
||||||
|
export APP_VERSION=$VERSION
|
||||||
|
|
||||||
|
# Are we building a universal/regionless rom?
|
||||||
|
export HW_VERSION="1.0"
|
||||||
|
basename=universal/firmware-$BOARD-$VERSION
|
||||||
|
|
||||||
|
pio run --environment $BOARD # -v
|
||||||
|
SRCELF=.pio/build/$BOARD/firmware.elf
|
||||||
|
cp $SRCELF $OUTDIR/elfs/$basename.elf
|
||||||
|
|
||||||
|
if [ "$isNrf" = "false" ]
|
||||||
|
then
|
||||||
|
echo "Copying ESP32 bin file"
|
||||||
|
SRCBIN=.pio/build/$BOARD/firmware.bin
|
||||||
|
cp $SRCBIN $OUTDIR/bins/$basename.bin
|
||||||
|
else
|
||||||
|
echo "Generating NRF52 uf2 file"
|
||||||
|
SRCHEX=.pio/build/$BOARD/firmware.hex
|
||||||
|
bin/uf2conv.py $SRCHEX -c -o $OUTDIR/bins/$basename.uf2 -f 0xADA52840
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function do_boards() {
|
||||||
|
declare boards=$1
|
||||||
|
declare isNrf=$2
|
||||||
|
for board in $boards; do
|
||||||
|
# Build universal
|
||||||
|
echo "about to build $board $isNrf"
|
||||||
|
do_build $board "" "$isNrf"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make sure our submodules are current
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
|
platformio lib update
|
||||||
|
|
||||||
|
do_boards "$BOARDS_ESP32" "false"
|
||||||
|
do_boards "$BOARDS_NRF52" "true"
|
||||||
|
|
||||||
|
pio run --environment native
|
||||||
|
cp .pio/build/native/program $OUTDIR/bins/universal/meshtasticd_linux_amd64
|
||||||
|
|
||||||
|
echo "Building SPIFFS for ESP32 targets"
|
||||||
|
pio run --environment tbeam -t buildfs
|
||||||
|
cp .pio/build/tbeam/spiffs.bin $OUTDIR/bins/universal/spiffs-$VERSION.bin
|
||||||
|
|
||||||
|
# keep the bins in archive also
|
||||||
|
cp $OUTDIR/bins/universal/spiffs* $OUTDIR/bins/universal/firmware* $OUTDIR/elfs/universal/firmware* $ARCHIVEDIR
|
||||||
|
|
||||||
|
echo Updating android bins $OUTDIR/forandroid
|
||||||
|
rm -rf $OUTDIR/forandroid
|
||||||
|
mkdir -p $OUTDIR/forandroid
|
||||||
|
cp -a $OUTDIR/bins/universal/*.bin $OUTDIR/forandroid/
|
||||||
|
|
||||||
|
cat >$OUTDIR/curfirmwareversion.xml <<XML
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!-- This file is kept in source control because it reflects the last stable
|
||||||
|
release. It is used by the android app for forcing software updates. Do not edit.
|
||||||
|
Generated by bin/buildall.sh -->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<string name="cur_firmware_version" translatable="false">$VERSION</string>
|
||||||
|
<string name="short_firmware_version" translatable="false">$SHORT_VERSION</string>
|
||||||
|
</resources>
|
||||||
|
XML
|
||||||
|
|
||||||
|
echo Generating $ARCHIVEDIR/firmware-$VERSION.zip
|
||||||
|
rm -f $ARCHIVEDIR/firmware-$VERSION.zip
|
||||||
|
zip --junk-paths $ARCHIVEDIR/firmware-$VERSION.zip $ARCHIVEDIR/spiffs-$VERSION.bin $OUTDIR/bins/universal/firmware-*-$VERSION.* $OUTDIR/bins/universal/meshtasticd* images/system-info.bin bin/device-install.* bin/device-update.*
|
||||||
|
echo Generating $ARCHIVEDIR/elfs-$VERSION.zip
|
||||||
|
rm -f $ARCHIVEDIR/elfs-$VERSION.zip
|
||||||
|
zip --junk-paths $ARCHIVEDIR/elfs-$VERSION.zip $OUTDIR/elfs/universal/firmware-*-$VERSION.*
|
||||||
|
|
||||||
|
echo BUILT ALL
|
||||||
@@ -10,8 +10,11 @@ OUTDIR=release/
|
|||||||
rm -f $OUTDIR/firmware*
|
rm -f $OUTDIR/firmware*
|
||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
|
# Make sure our submodules are current
|
||||||
|
git submodule update
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
platformio pkg update
|
platformio lib update
|
||||||
|
|
||||||
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
rm -f .pio/build/$1/firmware.*
|
rm -f .pio/build/$1/firmware.*
|
||||||
@@ -19,6 +22,8 @@ rm -f .pio/build/$1/firmware.*
|
|||||||
# The shell vars the build tool expects to find
|
# The shell vars the build tool expects to find
|
||||||
export APP_VERSION=$VERSION
|
export APP_VERSION=$VERSION
|
||||||
|
|
||||||
|
# Are we building a universal/regionless rom?
|
||||||
|
export HW_VERSION="1.0"
|
||||||
basename=firmware-$1-$VERSION
|
basename=firmware-$1-$VERSION
|
||||||
|
|
||||||
pio run --environment $1 # -v
|
pio run --environment $1 # -v
|
||||||
@@ -26,15 +31,13 @@ SRCELF=.pio/build/$1/firmware.elf
|
|||||||
cp $SRCELF $OUTDIR/$basename.elf
|
cp $SRCELF $OUTDIR/$basename.elf
|
||||||
|
|
||||||
echo "Copying ESP32 bin file"
|
echo "Copying ESP32 bin file"
|
||||||
SRCBIN=.pio/build/$1/firmware.factory.bin
|
SRCBIN=.pio/build/$1/firmware.bin
|
||||||
cp $SRCBIN $OUTDIR/$basename.bin
|
cp $SRCBIN $OUTDIR/$basename.bin
|
||||||
|
|
||||||
echo "Copying ESP32 update bin file"
|
echo "Building SPIFFS for ESP32 targets"
|
||||||
SRCBIN=.pio/build/$1/firmware.bin
|
pio run --environment tbeam -t buildfs
|
||||||
cp $SRCBIN $OUTDIR/$basename-update.bin
|
cp .pio/build/tbeam/spiffs.bin $OUTDIR/spiffs-$VERSION.bin
|
||||||
|
cp images/system-info.bin $OUTDIR/system-info.bin
|
||||||
|
|
||||||
echo "Building Filesystem for ESP32 targets"
|
|
||||||
pio run --environment $1 -t buildfs
|
|
||||||
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefs-$VERSION.bin
|
|
||||||
cp bin/device-install.* $OUTDIR
|
cp bin/device-install.* $OUTDIR
|
||||||
cp bin/device-update.* $OUTDIR
|
cp bin/device-update.* $OUTDIR
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=$(bin/buildinfo.py long)
|
VERSION=`bin/buildinfo.py long`
|
||||||
SHORT_VERSION=$(bin/buildinfo.py short)
|
SHORT_VERSION=`bin/buildinfo.py short`
|
||||||
|
|
||||||
OUTDIR=release/
|
OUTDIR=release/
|
||||||
|
|
||||||
@@ -12,9 +12,15 @@ rm -f $OUTDIR/firmware*
|
|||||||
mkdir -p $OUTDIR/
|
mkdir -p $OUTDIR/
|
||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
|
# Make sure our submodules are current
|
||||||
|
git submodule update
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
platformio pkg update --environment native
|
platformio lib update
|
||||||
|
|
||||||
pio run --environment native
|
pio run --environment native
|
||||||
cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(uname -m)"
|
cp .pio/build/native/program $OUTDIR/meshtasticd_linux_amd64
|
||||||
|
|
||||||
cp bin/device-install.* $OUTDIR
|
cp bin/device-install.* $OUTDIR
|
||||||
cp bin/device-update.* $OUTDIR
|
cp bin/device-update.* $OUTDIR
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,11 @@ OUTDIR=release/
|
|||||||
rm -f $OUTDIR/firmware*
|
rm -f $OUTDIR/firmware*
|
||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
|
# Make sure our submodules are current
|
||||||
|
git submodule update
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
platformio pkg update
|
platformio lib update
|
||||||
|
|
||||||
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
rm -f .pio/build/$1/firmware.*
|
rm -f .pio/build/$1/firmware.*
|
||||||
@@ -19,13 +22,12 @@ rm -f .pio/build/$1/firmware.*
|
|||||||
# The shell vars the build tool expects to find
|
# The shell vars the build tool expects to find
|
||||||
export APP_VERSION=$VERSION
|
export APP_VERSION=$VERSION
|
||||||
|
|
||||||
|
export HW_VERSION="1.0"
|
||||||
basename=firmware-$1-$VERSION
|
basename=firmware-$1-$VERSION
|
||||||
|
|
||||||
pio run --environment $1 # -v
|
pio run --environment $1 # -v
|
||||||
SRCELF=.pio/build/$1/firmware.elf
|
SRCELF=.pio/build/$1/firmware.elf
|
||||||
DFUPKG=.pio/build/$1/firmware.zip
|
|
||||||
cp $SRCELF $OUTDIR/$basename.elf
|
cp $SRCELF $OUTDIR/$basename.elf
|
||||||
cp $DFUPKG $OUTDIR/$basename-ota.zip
|
|
||||||
|
|
||||||
echo "Generating NRF52 uf2 file"
|
echo "Generating NRF52 uf2 file"
|
||||||
SRCHEX=.pio/build/$1/firmware.hex
|
SRCHEX=.pio/build/$1/firmware.hex
|
||||||
@@ -33,4 +35,3 @@ bin/uf2conv.py $SRCHEX -c -o $OUTDIR/$basename.uf2 -f 0xADA52840
|
|||||||
|
|
||||||
cp bin/device-install.* $OUTDIR
|
cp bin/device-install.* $OUTDIR
|
||||||
cp bin/device-update.* $OUTDIR
|
cp bin/device-update.* $OUTDIR
|
||||||
cp bin/*.uf2 $OUTDIR
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
VERSION=`bin/buildinfo.py long`
|
|
||||||
SHORT_VERSION=`bin/buildinfo.py short`
|
|
||||||
|
|
||||||
OUTDIR=release/
|
|
||||||
|
|
||||||
rm -f $OUTDIR/firmware*
|
|
||||||
rm -r $OUTDIR/* || true
|
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
|
||||||
platformio pkg update
|
|
||||||
|
|
||||||
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
|
||||||
rm -f .pio/build/$1/firmware.*
|
|
||||||
|
|
||||||
# The shell vars the build tool expects to find
|
|
||||||
export APP_VERSION=$VERSION
|
|
||||||
|
|
||||||
basename=firmware-$1-$VERSION
|
|
||||||
|
|
||||||
pio run --environment $1 # -v
|
|
||||||
SRCELF=.pio/build/$1/firmware.elf
|
|
||||||
cp $SRCELF $OUTDIR/$basename.elf
|
|
||||||
|
|
||||||
echo "Copying uf2 file"
|
|
||||||
SRCBIN=.pio/build/$1/firmware.uf2
|
|
||||||
cp $SRCBIN $OUTDIR/$basename.uf2
|
|
||||||
|
|
||||||
cp bin/device-install.* $OUTDIR
|
|
||||||
cp bin/device-update.* $OUTDIR
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
"""Bump the version number"""
|
|
||||||
|
|
||||||
lines = None
|
|
||||||
|
|
||||||
with open('version.properties', 'r', encoding='utf-8') as f:
|
|
||||||
lines = f.readlines()
|
|
||||||
|
|
||||||
with open('version.properties', 'w', encoding='utf-8') as f:
|
|
||||||
for line in lines:
|
|
||||||
if line.lstrip().startswith("build = "):
|
|
||||||
words = line.split(" = ")
|
|
||||||
ver = f'build = {int(words[1]) + 1}'
|
|
||||||
f.write(f'{ver}\n')
|
|
||||||
else:
|
|
||||||
f.write(line)
|
|
||||||
@@ -4,23 +4,23 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=$(bin/buildinfo.py long)
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
|
||||||
# The shell vars the build tool expects to find
|
# The shell vars the build tool expects to find
|
||||||
export APP_VERSION=$VERSION
|
export APP_VERSION=$VERSION
|
||||||
|
|
||||||
if [[ $# -gt 0 ]]; then
|
if [[ $# -gt 0 ]]; then
|
||||||
# can override which environment by passing arg
|
# can override which environment by passing arg
|
||||||
BOARDS="$@"
|
BOARDS="$@"
|
||||||
else
|
else
|
||||||
BOARDS="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 rak4631 rak4631_eink rak11200 t-echo canaryone pca10059_diy_eink"
|
BOARDS="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v1 heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 rak4631_5005 rak4631_19003 rak11200 t-echo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "BOARDS:${BOARDS}"
|
echo "BOARDS:${BOARDS}"
|
||||||
|
|
||||||
CHECK=""
|
CHECK=""
|
||||||
for BOARD in $BOARDS; do
|
for BOARD in $BOARDS; do
|
||||||
CHECK="${CHECK} -e ${BOARD}"
|
CHECK="${CHECK} -e ${BOARD}"
|
||||||
done
|
done
|
||||||
|
|
||||||
pio check --flags "-DAPP_VERSION=${APP_VERSION} --suppressions-list=suppressions.txt" $CHECK --skip-packages --pattern="src/" --fail-on-defect=medium --fail-on-defect=high
|
pio check --flags "-DAPP_VERSION=${APP_VERSION} --suppressions-list=suppressions.txt" $CHECK --skip-packages --pattern="src/" --fail-on-defect=low --fail-on-defect=medium --fail-on-defect=high
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Note: This is a prototype for how we could add static code analysis to the CI.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [[ $# -gt 0 ]]; then
|
|
||||||
# can override which environment by passing arg
|
|
||||||
BOARDS="$@"
|
|
||||||
else
|
|
||||||
BOARDS="rak4631 rak4631_eink t-echo canaryone pca10059_diy_eink pico rak11200 tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 nano-g1 station-g1 m5stack-core m5stack-coreink tbeam-s3-core"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "BOARDS:${BOARDS}"
|
|
||||||
|
|
||||||
CHECK=""
|
|
||||||
for BOARD in $BOARDS; do
|
|
||||||
CHECK="${CHECK} -e ${BOARD}"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo $CHECK
|
|
||||||
|
|
||||||
pio pkg outdated -e $CHECK
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
### Define your devices here using Broadcom pin numbering
|
|
||||||
### Uncomment the block that corresponds to your hardware
|
|
||||||
### Including the "Module:" line!
|
|
||||||
---
|
|
||||||
Lora:
|
|
||||||
# Module: sx1262 # Waveshare SX126X XXXM
|
|
||||||
# DIO2_AS_RF_SWITCH: true
|
|
||||||
# CS: 21
|
|
||||||
# IRQ: 16
|
|
||||||
# Busy: 20
|
|
||||||
# Reset: 18
|
|
||||||
|
|
||||||
# Module: sx1262 # Waveshare SX1302 LISTEN ONLY AT THIS TIME!
|
|
||||||
# CS: 7
|
|
||||||
# IRQ: 17
|
|
||||||
# Reset: 22
|
|
||||||
|
|
||||||
# Module: sx1262 # pinedio
|
|
||||||
# CS: 0
|
|
||||||
# IRQ: 10
|
|
||||||
# Busy: 11
|
|
||||||
# spidev: spidev0.1
|
|
||||||
|
|
||||||
# Module: RF95 # Adafruit RFM9x
|
|
||||||
# Reset: 25
|
|
||||||
# CS: 7
|
|
||||||
# IRQ: 22
|
|
||||||
# Busy: 23
|
|
||||||
|
|
||||||
# Module: RF95 # Elecrow Lora RFM95 IOT https://www.elecrow.com/lora-rfm95-iot-board-for-rpi.html
|
|
||||||
# Reset: 22
|
|
||||||
# CS: 7
|
|
||||||
# IRQ: 25
|
|
||||||
|
|
||||||
# Module: sx1280 # SX1280
|
|
||||||
# CS: 21
|
|
||||||
# IRQ: 16
|
|
||||||
# Busy: 20
|
|
||||||
# Reset: 18
|
|
||||||
|
|
||||||
# Module: sx1268 # SX1268-based modules, tested with Ebyte E22 400M33S
|
|
||||||
# CS: 21
|
|
||||||
# IRQ: 16
|
|
||||||
# Busy: 20
|
|
||||||
# Reset: 18
|
|
||||||
# TXen: 6
|
|
||||||
# RXen: 12
|
|
||||||
# DIO3_TCXO_VOLTAGE: true
|
|
||||||
|
|
||||||
# DIO3_TCXO_VOLTAGE: true # the Waveshare Core1262 and others are known to need this setting
|
|
||||||
|
|
||||||
# TXen: x # TX and RX enable pins
|
|
||||||
# RXen: x
|
|
||||||
|
|
||||||
# ch341_quirk: true # Uncomment this to use the chunked SPI transfer that seems to fix the ch341
|
|
||||||
|
|
||||||
### Set gpio chip to use in /dev/. Defaults to 0.
|
|
||||||
### Notably the Raspberry Pi 5 puts the GPIO header on gpiochip4
|
|
||||||
# gpiochip: 4
|
|
||||||
|
|
||||||
### Specify the SPI device to use in /dev/. Defaults to spidev0.0
|
|
||||||
### Some devices, like the pinedio, may require spidev0.1 as a workaround.
|
|
||||||
# spidev: spidev0.0
|
|
||||||
|
|
||||||
### Define GPIO buttons here:
|
|
||||||
|
|
||||||
GPIO:
|
|
||||||
# User: 6
|
|
||||||
|
|
||||||
### Define GPS
|
|
||||||
|
|
||||||
GPS:
|
|
||||||
# SerialPath: /dev/ttyS0
|
|
||||||
|
|
||||||
### Specify I2C device, or leave blank for none
|
|
||||||
|
|
||||||
I2C:
|
|
||||||
# I2CDevice: /dev/i2c-1
|
|
||||||
|
|
||||||
### Set up SPI displays here. Note that I2C displays are generally auto-detected.
|
|
||||||
|
|
||||||
Display:
|
|
||||||
|
|
||||||
### Waveshare 2.8inch RPi LCD
|
|
||||||
# Panel: ST7789
|
|
||||||
# CS: 8
|
|
||||||
# DC: 22 # Data/Command pin
|
|
||||||
# Backlight: 18
|
|
||||||
# Width: 240
|
|
||||||
# Height: 320
|
|
||||||
# Reset: 27
|
|
||||||
# Rotate: true
|
|
||||||
# Invert: true
|
|
||||||
|
|
||||||
### Waveshare 1.44inch LCD HAT
|
|
||||||
# Panel: ST7735S
|
|
||||||
# CS: 8 #Chip Select
|
|
||||||
# DC: 25 # Data/Command pin
|
|
||||||
# Backlight: 24
|
|
||||||
# Width: 128
|
|
||||||
# Height: 128
|
|
||||||
# Reset: 27
|
|
||||||
# OffsetX: 0
|
|
||||||
# OffsetY: 0
|
|
||||||
|
|
||||||
### Adafruit PiTFT 2.8 TFT+Touchscreen
|
|
||||||
# Panel: ILI9341
|
|
||||||
# CS: 8
|
|
||||||
# DC: 25
|
|
||||||
# Width: 240
|
|
||||||
# Height: 320
|
|
||||||
# Rotate: true
|
|
||||||
|
|
||||||
Touchscreen:
|
|
||||||
### Note, at least for now, the touchscreen must have a CS pin defined, even if you let Linux manage the CS switching.
|
|
||||||
|
|
||||||
# Module: STMPE610 # Option 1 for Adafruit PiTFT 2.8
|
|
||||||
# CS: 7
|
|
||||||
# IRQ: 24
|
|
||||||
|
|
||||||
# Module: FT5x06 # Option 2 for Adafruit PiTFT 2.8
|
|
||||||
# IRQ: 24
|
|
||||||
# I2CAddr: 0x38
|
|
||||||
|
|
||||||
# Module: XPT2046 # Waveshare 2.8inch
|
|
||||||
# CS: 7
|
|
||||||
# IRQ: 17
|
|
||||||
|
|
||||||
### Configure device for direct keyboard input
|
|
||||||
|
|
||||||
Input:
|
|
||||||
# KeyboardDevice: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
Logging:
|
|
||||||
LogLevel: info # debug, info, warn, error
|
|
||||||
|
|
||||||
Webserver:
|
|
||||||
# Port: 443 # Port for Webserver & Webservices
|
|
||||||
# RootPath: /usr/share/doc/meshtasticd/web # Root Dir of WebServer
|
|
||||||
|
|
||||||
General:
|
|
||||||
MaxNodes: 200
|
|
||||||
27
bin/device-install.bat
Executable file → Normal file
27
bin/device-install.bat
Executable file → Normal file
@@ -26,30 +26,17 @@ IF "__%FILENAME%__" == "____" (
|
|||||||
echo "Missing FILENAME"
|
echo "Missing FILENAME"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
IF EXIST %FILENAME% IF x%FILENAME:update=%==x%FILENAME% (
|
IF EXIST %FILENAME% (
|
||||||
echo Trying to flash update %FILENAME%, but first erasing and writing system information"
|
echo Trying to flash update %FILENAME%, but first erasing and writing system information"
|
||||||
%PYTHON% -m esptool --baud 115200 erase_flash
|
%PYTHON% -m esptool --baud 921600 erase_flash
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x00 %FILENAME%
|
%PYTHON% -m esptool --baud 921600 write_flash 0x1000 system-info.bin
|
||||||
|
for %%f in (spiffs-*.bin) do (
|
||||||
@REM Account for S3 and C3 board's different OTA partition
|
%PYTHON% -m esptool --baud 921600 write_flash 0x00390000 %%f
|
||||||
IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% IF x%FILENAME:t-deck=%==x%FILENAME% IF x%FILENAME:wireless-paper=%==x%FILENAME% IF x%FILENAME:wireless-tracker=%==x%FILENAME% IF x%FILENAME:station-g2=%==x%FILENAME% IF x%FILENAME:unphone=%==x%FILENAME% (
|
|
||||||
IF x%FILENAME:esp32c3=%==x%FILENAME% (
|
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota.bin
|
|
||||||
) else (
|
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-c3.bin
|
|
||||||
)
|
|
||||||
) else (
|
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-s3.bin
|
|
||||||
)
|
)
|
||||||
for %%f in (littlefs-*.bin) do (
|
%PYTHON% -m esptool --baud 921600 write_flash 0x10000 %FILENAME%
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x300000 %%f
|
|
||||||
)
|
|
||||||
) else (
|
|
||||||
echo "Invalid file: %FILENAME%"
|
|
||||||
goto HELP
|
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
|
|
||||||
:EOF
|
:EOF
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PYTHON=${PYTHON:-$(which python3 python | head -n 1)}
|
PYTHON=${PYTHON:-$(which python3 python|head -n 1)}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Usage info
|
# Usage info
|
||||||
show_help() {
|
show_help() {
|
||||||
cat <<EOF
|
cat << EOF
|
||||||
Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME]
|
Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME]
|
||||||
Flash image file to device, but first erasing and writing system information"
|
Flash image file to device, but first erasing and writing system information"
|
||||||
|
|
||||||
@@ -14,58 +14,45 @@ Flash image file to device, but first erasing and writing system information"
|
|||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while getopts ":hp:P:f:" opt; do
|
while getopts ":hp:P:f:" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
h)
|
h)
|
||||||
show_help
|
show_help
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
p)
|
p) export ESPTOOL_PORT=${OPTARG}
|
||||||
export ESPTOOL_PORT=${OPTARG}
|
;;
|
||||||
;;
|
P) PYTHON=${OPTARG}
|
||||||
P)
|
;;
|
||||||
PYTHON=${OPTARG}
|
f) FILENAME=${OPTARG}
|
||||||
;;
|
;;
|
||||||
f)
|
*)
|
||||||
FILENAME=${OPTARG}
|
echo "Invalid flag."
|
||||||
;;
|
show_help >&2
|
||||||
*)
|
exit 1
|
||||||
echo "Invalid flag."
|
;;
|
||||||
show_help >&2
|
esac
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
shift "$((OPTIND - 1))"
|
shift "$((OPTIND-1))"
|
||||||
|
|
||||||
[ -z "$FILENAME" -a -n "$1" ] && {
|
[ -z "$FILENAME" -a -n "$1" ] && {
|
||||||
FILENAME=$1
|
FILENAME=$1
|
||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
|
if [ -f "${FILENAME}" ]; then
|
||||||
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
||||||
"$PYTHON" -m esptool erase_flash
|
"$PYTHON" -m esptool erase_flash
|
||||||
"$PYTHON" -m esptool write_flash 0x00 ${FILENAME}
|
"$PYTHON" -m esptool write_flash 0x1000 system-info.bin
|
||||||
# Account for S3 board's different OTA partition
|
"$PYTHON" -m esptool write_flash 0x00390000 spiffs-*.bin
|
||||||
if [ -n "${FILENAME##*"s3"*}" ] && [ -n "${FILENAME##*"-v3"*}" ] && [ -n "${FILENAME##*"t-deck"*}" ] && [ -n "${FILENAME##*"wireless-paper"*}" ] && [ -n "${FILENAME##*"wireless-tracker"*}" ] && [ -n "${FILENAME##*"station-g2"*}" ] && [ -n "${FILENAME##*"unphone"*}" ]; then
|
"$PYTHON" -m esptool write_flash 0x10000 ${FILENAME}
|
||||||
if [ -n "${FILENAME##*"esp32c3"*}" ]; then
|
|
||||||
"$PYTHON" -m esptool write_flash 0x260000 bleota.bin
|
|
||||||
else
|
|
||||||
"$PYTHON" -m esptool write_flash 0x260000 bleota-c3.bin
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
"$PYTHON" -m esptool write_flash 0x260000 bleota-s3.bin
|
|
||||||
fi
|
|
||||||
"$PYTHON" -m esptool write_flash 0x300000 littlefs-*.bin
|
|
||||||
|
|
||||||
else
|
else
|
||||||
show_help
|
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
|
show_help
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
13
bin/device-update.bat
Executable file → Normal file
13
bin/device-update.bat
Executable file → Normal file
@@ -10,7 +10,7 @@ echo.
|
|||||||
echo -h Display this help and exit
|
echo -h Display this help and exit
|
||||||
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
||||||
echo -f FILENAME The *update.bin file to flash. Custom to your device type.
|
echo -f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
goto EOF
|
goto EOF
|
||||||
|
|
||||||
:GETOPTS
|
:GETOPTS
|
||||||
@@ -26,15 +26,14 @@ IF "__%FILENAME%__" == "____" (
|
|||||||
echo "Missing FILENAME"
|
echo "Missing FILENAME"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
IF EXIST %FILENAME% IF NOT x%FILENAME:update=%==x%FILENAME% (
|
IF EXIST %FILENAME% (
|
||||||
echo Trying to flash update %FILENAME%
|
echo Trying to flash update %FILENAME%
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x10000 %FILENAME%
|
%PYTHON% -m esptool --baud 921600 write_flash 0x10000 %FILENAME%
|
||||||
) else (
|
echo Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used
|
||||||
echo "Invalid file: %FILENAME%"
|
%PYTHON% -m esptool --baud 921600 erase_region 0xe000 0x2000
|
||||||
goto HELP
|
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
|
|
||||||
:EOF
|
:EOF
|
||||||
@@ -11,8 +11,7 @@ Flash image file to device, leave existing system intact."
|
|||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The *update.bin file to flash. Custom to your device type.
|
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,12 +42,14 @@ shift "$((OPTIND-1))"
|
|||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f "${FILENAME}" ] && [ -z "${FILENAME##*"update"*}" ]; then
|
if [ -f "${FILENAME}" ]; then
|
||||||
printf "Trying to flash update ${FILENAME}"
|
echo "Trying to flash update ${FILENAME}."
|
||||||
$PYTHON -m esptool --baud 115200 write_flash 0x10000 ${FILENAME}
|
$PYTHON -m esptool --baud 921600 write_flash 0x10000 ${FILENAME}
|
||||||
|
echo "Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used"
|
||||||
|
$PYTHON -m esptool --baud 921600 erase_region 0xe000 0x2000
|
||||||
else
|
else
|
||||||
show_help
|
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
|
show_help
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -11,23 +11,20 @@ Meshtastic notes:
|
|||||||
* version that's checked into meshtastic repo is based on: https://github.com/me21/EspArduinoExceptionDecoder
|
* version that's checked into meshtastic repo is based on: https://github.com/me21/EspArduinoExceptionDecoder
|
||||||
which adds in ESP32 Backtrace decoding.
|
which adds in ESP32 Backtrace decoding.
|
||||||
* this also updates the defaults to use ESP32, instead of ESP8266 and defaults to the built firmware.bin
|
* this also updates the defaults to use ESP32, instead of ESP8266 and defaults to the built firmware.bin
|
||||||
* also updated the toolchain name, which will be set according to the platform
|
|
||||||
|
|
||||||
To use, copy the "Backtrace: 0x...." line to a file, e.g., backtrace.txt, then run:
|
To use, copy the "Backtrace: 0x...." line to a file, e.g., backtrace.txt, then run:
|
||||||
$ bin/exception_decoder.py backtrace.txt
|
$ bin/exception_decoder.py backtrace.txt
|
||||||
For a platform other than ESP32, use the -p option, e.g.:
|
|
||||||
$ bin/exception_decoder.py -p ESP32S3 backtrace.txt
|
|
||||||
To specify a specific .elf file, use the -e option, e.g.:
|
|
||||||
$ bin/exception_decoder.py -e firmware.elf backtrace.txt
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
EXCEPTIONS = [
|
EXCEPTIONS = [
|
||||||
"Illegal instruction",
|
"Illegal instruction",
|
||||||
"SYSCALL instruction",
|
"SYSCALL instruction",
|
||||||
@@ -58,39 +55,24 @@ EXCEPTIONS = [
|
|||||||
"LoadStorePrivilege: A load or store referenced a virtual address at a ring level less than CRING",
|
"LoadStorePrivilege: A load or store referenced a virtual address at a ring level less than CRING",
|
||||||
"reserved",
|
"reserved",
|
||||||
"LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads",
|
"LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads",
|
||||||
"StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores",
|
"StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores"
|
||||||
]
|
]
|
||||||
|
|
||||||
PLATFORMS = {
|
PLATFORMS = {
|
||||||
"ESP8266": "xtensa-lx106",
|
"ESP8266": "lx106",
|
||||||
"ESP32": "xtensa-esp32",
|
"ESP32": "esp32"
|
||||||
"ESP32S3": "xtensa-esp32s3",
|
|
||||||
"ESP32C3": "riscv32-esp",
|
|
||||||
}
|
|
||||||
TOOLS = {
|
|
||||||
"ESP8266": "xtensa",
|
|
||||||
"ESP32": "xtensa-esp32",
|
|
||||||
"ESP32S3": "xtensa-esp32s3",
|
|
||||||
"ESP32C3": "riscv32-esp",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BACKTRACE_REGEX = re.compile(
|
BACKTRACE_REGEX = re.compile(r"(?:\s+(0x40[0-2](?:\d|[a-f]|[A-F]){5}):0x(?:\d|[a-f]|[A-F]){8})\b")
|
||||||
r"(?:\s+(0x40[0-2](?:\d|[a-f]|[A-F]){5}):0x(?:\d|[a-f]|[A-F]){8})\b"
|
|
||||||
)
|
|
||||||
EXCEPTION_REGEX = re.compile("^Exception \\((?P<exc>[0-9]*)\\):$")
|
EXCEPTION_REGEX = re.compile("^Exception \\((?P<exc>[0-9]*)\\):$")
|
||||||
COUNTER_REGEX = re.compile(
|
COUNTER_REGEX = re.compile('^epc1=(?P<epc1>0x[0-9a-f]+) epc2=(?P<epc2>0x[0-9a-f]+) epc3=(?P<epc3>0x[0-9a-f]+) '
|
||||||
"^epc1=(?P<epc1>0x[0-9a-f]+) epc2=(?P<epc2>0x[0-9a-f]+) epc3=(?P<epc3>0x[0-9a-f]+) "
|
'excvaddr=(?P<excvaddr>0x[0-9a-f]+) depc=(?P<depc>0x[0-9a-f]+)$')
|
||||||
"excvaddr=(?P<excvaddr>0x[0-9a-f]+) depc=(?P<depc>0x[0-9a-f]+)$"
|
|
||||||
)
|
|
||||||
CTX_REGEX = re.compile("^ctx: (?P<ctx>.+)$")
|
CTX_REGEX = re.compile("^ctx: (?P<ctx>.+)$")
|
||||||
POINTER_REGEX = re.compile(
|
POINTER_REGEX = re.compile('^sp: (?P<sp>[0-9a-f]+) end: (?P<end>[0-9a-f]+) offset: (?P<offset>[0-9a-f]+)$')
|
||||||
"^sp: (?P<sp>[0-9a-f]+) end: (?P<end>[0-9a-f]+) offset: (?P<offset>[0-9a-f]+)$"
|
STACK_BEGIN = '>>>stack>>>'
|
||||||
)
|
STACK_END = '<<<stack<<<'
|
||||||
STACK_BEGIN = ">>>stack>>>"
|
|
||||||
STACK_END = "<<<stack<<<"
|
|
||||||
STACK_REGEX = re.compile(
|
STACK_REGEX = re.compile(
|
||||||
"^(?P<off>[0-9a-f]+):\W+(?P<c1>[0-9a-f]+) (?P<c2>[0-9a-f]+) (?P<c3>[0-9a-f]+) (?P<c4>[0-9a-f]+)(\W.*)?$"
|
'^(?P<off>[0-9a-f]+):\W+(?P<c1>[0-9a-f]+) (?P<c2>[0-9a-f]+) (?P<c3>[0-9a-f]+) (?P<c4>[0-9a-f]+)(\W.*)?$')
|
||||||
)
|
|
||||||
|
|
||||||
StackLine = namedtuple("StackLine", ["offset", "content"])
|
StackLine = namedtuple("StackLine", ["offset", "content"])
|
||||||
|
|
||||||
@@ -114,18 +96,15 @@ class ExceptionDataParser(object):
|
|||||||
self.stack = []
|
self.stack = []
|
||||||
|
|
||||||
def _parse_backtrace(self, line):
|
def _parse_backtrace(self, line):
|
||||||
if line.startswith("Backtrace:"):
|
if line.startswith('Backtrace:'):
|
||||||
self.stack = [
|
self.stack = [StackLine(offset=0, content=(addr,)) for addr in BACKTRACE_REGEX.findall(line)]
|
||||||
StackLine(offset=0, content=(addr,))
|
|
||||||
for addr in BACKTRACE_REGEX.findall(line)
|
|
||||||
]
|
|
||||||
return None
|
return None
|
||||||
return self._parse_backtrace
|
return self._parse_backtrace
|
||||||
|
|
||||||
def _parse_exception(self, line):
|
def _parse_exception(self, line):
|
||||||
match = EXCEPTION_REGEX.match(line)
|
match = EXCEPTION_REGEX.match(line)
|
||||||
if match is not None:
|
if match is not None:
|
||||||
self.exception = int(match.group("exc"))
|
self.exception = int(match.group('exc'))
|
||||||
return self._parse_counters
|
return self._parse_counters
|
||||||
return self._parse_exception
|
return self._parse_exception
|
||||||
|
|
||||||
@@ -165,22 +144,14 @@ class ExceptionDataParser(object):
|
|||||||
if line != STACK_END:
|
if line != STACK_END:
|
||||||
match = STACK_REGEX.match(line)
|
match = STACK_REGEX.match(line)
|
||||||
if match is not None:
|
if match is not None:
|
||||||
self.stack.append(
|
self.stack.append(StackLine(offset=match.group("off"),
|
||||||
StackLine(
|
content=(match.group("c1"), match.group("c2"), match.group("c3"),
|
||||||
offset=match.group("off"),
|
match.group("c4"))))
|
||||||
content=(
|
|
||||||
match.group("c1"),
|
|
||||||
match.group("c2"),
|
|
||||||
match.group("c3"),
|
|
||||||
match.group("c4"),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
return self._parse_stack_line
|
return self._parse_stack_line
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def parse_file(self, file, platform, stack_only=False):
|
def parse_file(self, file, platform, stack_only=False):
|
||||||
if platform != "ESP8266":
|
if platform == 'ESP32':
|
||||||
func = self._parse_backtrace
|
func = self._parse_backtrace
|
||||||
else:
|
else:
|
||||||
func = self._parse_exception
|
func = self._parse_exception
|
||||||
@@ -204,9 +175,7 @@ class AddressResolver(object):
|
|||||||
self._address_map = {}
|
self._address_map = {}
|
||||||
|
|
||||||
def _lookup(self, addresses):
|
def _lookup(self, addresses):
|
||||||
cmd = [self._tool, "-aipfC", "-e", self._elf] + [
|
cmd = [self._tool, "-aipfC", "-e", self._elf] + [addr for addr in addresses if addr is not None]
|
||||||
addr for addr in addresses if addr is not None
|
|
||||||
]
|
|
||||||
|
|
||||||
if sys.version_info[0] < 3:
|
if sys.version_info[0] < 3:
|
||||||
output = subprocess.check_output(cmd)
|
output = subprocess.check_output(cmd)
|
||||||
@@ -221,27 +190,19 @@ class AddressResolver(object):
|
|||||||
match = line_regex.match(line)
|
match = line_regex.match(line)
|
||||||
|
|
||||||
if match is None:
|
if match is None:
|
||||||
if last is not None and line.startswith("(inlined by)"):
|
if last is not None and line.startswith('(inlined by)'):
|
||||||
line = line[12:].strip()
|
line = line [12:].strip()
|
||||||
self._address_map[last] += "\n \-> inlined by: " + line
|
self._address_map[last] += ("\n \-> inlined by: " + line)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if match.group("result") == "?? ??:0":
|
if match.group("result") == '?? ??:0':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self._address_map[match.group("addr")] = match.group("result")
|
self._address_map[match.group("addr")] = match.group("result")
|
||||||
last = match.group("addr")
|
last = match.group("addr")
|
||||||
|
|
||||||
def fill(self, parser):
|
def fill(self, parser):
|
||||||
addresses = [
|
addresses = [parser.epc1, parser.epc2, parser.epc3, parser.excvaddr, parser.sp, parser.end, parser.offset]
|
||||||
parser.epc1,
|
|
||||||
parser.epc2,
|
|
||||||
parser.epc3,
|
|
||||||
parser.excvaddr,
|
|
||||||
parser.sp,
|
|
||||||
parser.end,
|
|
||||||
parser.offset,
|
|
||||||
]
|
|
||||||
for line in parser.stack:
|
for line in parser.stack:
|
||||||
addresses.extend(line.content)
|
addresses.extend(line.content)
|
||||||
|
|
||||||
@@ -296,10 +257,8 @@ def print_stack(lines, resolver):
|
|||||||
|
|
||||||
|
|
||||||
def print_result(parser, resolver, platform, full=True, stack_only=False):
|
def print_result(parser, resolver, platform, full=True, stack_only=False):
|
||||||
if platform == "ESP8266" and not stack_only:
|
if platform == 'ESP8266' and not stack_only:
|
||||||
print(
|
print('Exception: {} ({})'.format(parser.exception, EXCEPTIONS[parser.exception]))
|
||||||
"Exception: {} ({})".format(parser.exception, EXCEPTIONS[parser.exception])
|
|
||||||
)
|
|
||||||
|
|
||||||
print("")
|
print("")
|
||||||
print_addr("epc1", parser.epc1, resolver)
|
print_addr("epc1", parser.epc1, resolver)
|
||||||
@@ -326,33 +285,15 @@ def print_result(parser, resolver, platform, full=True, stack_only=False):
|
|||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description="decode ESP Stacktraces.")
|
parser = argparse.ArgumentParser(description="decode ESP Stacktraces.")
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument("-p", "--platform", help="The platform to decode from", choices=PLATFORMS.keys(),
|
||||||
"-p",
|
default="ESP32")
|
||||||
"--platform",
|
parser.add_argument("-t", "--tool", help="Path to the xtensa toolchain",
|
||||||
help="The platform to decode from",
|
default="~/.platformio/packages/toolchain-xtensa32/")
|
||||||
choices=PLATFORMS.keys(),
|
parser.add_argument("-e", "--elf", help="path to elf file",
|
||||||
default="ESP32",
|
default=".pio/build/esp32/firmware.elf")
|
||||||
)
|
parser.add_argument("-f", "--full", help="Print full stack dump", action="store_true")
|
||||||
parser.add_argument(
|
parser.add_argument("-s", "--stack_only", help="Decode only a stractrace", action="store_true")
|
||||||
"-t",
|
parser.add_argument("file", help="The file to read the exception data from ('-' for STDIN)", default="-")
|
||||||
"--tool",
|
|
||||||
help="Path to the toolchain (without specific platform)",
|
|
||||||
default="~/.platformio/packages/toolchain-",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-e", "--elf", help="path to elf file", default=".pio/build/tbeam/firmware.elf"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-f", "--full", help="Print full stack dump", action="store_true"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-s", "--stack_only", help="Decode only a stractrace", action="store_true"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"file",
|
|
||||||
help="The file to read the exception data from ('-' for STDIN)",
|
|
||||||
default="-",
|
|
||||||
)
|
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
@@ -368,12 +309,10 @@ if __name__ == "__main__":
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
file = open(args.file, "r")
|
file = open(args.file, "r")
|
||||||
|
|
||||||
addr2line = os.path.join(
|
addr2line = os.path.join(os.path.abspath(os.path.expanduser(args.tool)),
|
||||||
os.path.abspath(os.path.expanduser(args.tool + TOOLS[args.platform])),
|
"bin/xtensa-" + PLATFORMS[args.platform] + "-elf-addr2line")
|
||||||
"bin/" + PLATFORMS[args.platform] + "-elf-addr2line",
|
if os.name == 'nt':
|
||||||
)
|
addr2line += '.exe'
|
||||||
if os.name == "nt":
|
|
||||||
addr2line += ".exe"
|
|
||||||
if not os.path.exists(addr2line):
|
if not os.path.exists(addr2line):
|
||||||
print("ERROR: addr2line not found (" + addr2line + ")")
|
print("ERROR: addr2line not found (" + addr2line + ")")
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
"""Generate the CI matrix"""
|
|
||||||
|
|
||||||
import configparser
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
rootdir = "variants/"
|
|
||||||
|
|
||||||
options = sys.argv[1:]
|
|
||||||
|
|
||||||
outlist = []
|
|
||||||
|
|
||||||
if len(options) < 1:
|
|
||||||
print(json.dumps(outlist))
|
|
||||||
exit()
|
|
||||||
|
|
||||||
for subdir, dirs, files in os.walk(rootdir):
|
|
||||||
for file in files:
|
|
||||||
if file == "platformio.ini":
|
|
||||||
config = configparser.ConfigParser()
|
|
||||||
config.read(subdir + "/" + file)
|
|
||||||
for c in config.sections():
|
|
||||||
if c.startswith("env:"):
|
|
||||||
section = config[c].name[4:]
|
|
||||||
if "extends" in config[config[c].name]:
|
|
||||||
if config[config[c].name]["extends"] == options[0] + "_base":
|
|
||||||
if "board_level" in config[config[c].name]:
|
|
||||||
if (
|
|
||||||
config[config[c].name]["board_level"] == "extra"
|
|
||||||
) & ("extra" in options):
|
|
||||||
outlist.append(section)
|
|
||||||
else:
|
|
||||||
outlist.append(section)
|
|
||||||
|
|
||||||
print(json.dumps(outlist))
|
|
||||||
37
bin/install-bootloader.sh
Executable file
37
bin/install-bootloader.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# You probably don't want to use this script, it programs a custom bootloader build onto a nrf52 board
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
# apt install srecord
|
||||||
|
|
||||||
|
BOOTDIR=/home/kevinh/development/meshtastic/Adafruit_nRF52_Bootloader
|
||||||
|
BOARD=othernet_ppr1
|
||||||
|
BOOTVER=0.3.2
|
||||||
|
BOOTNUM=128
|
||||||
|
BOOTSHA=gc01b9ea
|
||||||
|
SDCODE=s113
|
||||||
|
SDVER=7.2.0
|
||||||
|
PROJ=ppr1
|
||||||
|
|
||||||
|
# FIXME for nRF52840 use 0xff000, for nRF52833 use 0x7f000
|
||||||
|
BOOTSET=0x7f000
|
||||||
|
|
||||||
|
nrfjprog --eraseall -f nrf52
|
||||||
|
|
||||||
|
# this generates an intel hex file that can be programmed into a NRF52 to tell the adafruit bootloader that the current app image is valid
|
||||||
|
# Bootloader settings are at BOOTLOADER_SETTINGS (rw) : ORIGIN = 0xFF000, LENGTH = 0x1000
|
||||||
|
# first 4 bytes should be 0x01 to indicate valid app image
|
||||||
|
# second 4 bytes should be 0x00 to indicate no CRC required for image
|
||||||
|
echo "01 00 00 00 00 00 00 00" | xxd -r -p - >/tmp/bootconf.bin
|
||||||
|
srec_cat /tmp/bootconf.bin -binary -offset $BOOTSET -output /tmp/bootconf.hex -intel
|
||||||
|
|
||||||
|
echo Generating merged hex file from .pio/build/$PROJ/firmware.hex
|
||||||
|
mergehex -o ${BOARD}_full.hex -m $BOOTDIR/_build/build-$BOARD/${BOARD}_bootloader-$BOOTVER-$BOOTNUM-$BOOTSHA-dirty_${SDCODE}_$SDVER.hex .pio/build/$PROJ/firmware.hex /tmp/bootconf.hex
|
||||||
|
|
||||||
|
echo Telling bootloader app region is valid and telling CPU to run
|
||||||
|
nrfjprog --program ${BOARD}_full.hex -f nrf52 --reset
|
||||||
|
|
||||||
|
# nrfjprog --readuicr /tmp/uicr.hex; objdump -s /tmp/uicr.hex | less
|
||||||
26
bin/install-eink.sh
Executable file
26
bin/install-eink.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# You probably don't want to use this script, it programs a custom bootloader build onto a nrf52 board
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
BOOTDIR=/home/kevinh/development/meshtastic/Adafruit_nRF52_Bootloader
|
||||||
|
|
||||||
|
nrfjprog --eraseall -f nrf52
|
||||||
|
|
||||||
|
# to get tool run "sudo apt-get install srecord"
|
||||||
|
|
||||||
|
# this generates an intel hex file that can be programmed into a NRF52 to tell the adafruit bootloader that the current app image is valid
|
||||||
|
# Bootloader settings are at BOOTLOADER_SETTINGS (rw) : ORIGIN = 0xFF000, LENGTH = 0x1000
|
||||||
|
# first 4 bytes should be 0x01 to indicate valid app image
|
||||||
|
# second 4 bytes should be 0x00 to indicate no CRC required for image
|
||||||
|
echo "01 00 00 00 00 00 00 00" | xxd -r -p - >/tmp/bootconf.bin
|
||||||
|
srec_cat /tmp/bootconf.bin -binary -offset 0xff000 -output /tmp/bootconf.hex -intel
|
||||||
|
|
||||||
|
echo Generating merged hex file
|
||||||
|
mergehex -m $BOOTDIR/_build/build-ttgo_eink/ttgo_eink_bootloader-0.3.2-213-gf67f592-dirty_s140_6.1.1.hex .pio/build/eink/firmware.hex /tmp/bootconf.hex -o ttgo_eink_full.hex
|
||||||
|
|
||||||
|
echo Telling bootloader app region is valid and telling CPU to run
|
||||||
|
nrfjprog --program ttgo_eink_full.hex -f nrf52 --reset
|
||||||
|
|
||||||
|
# nrfjprog --readuicr /tmp/uicr.hex; objdump -s /tmp/uicr.hex | less
|
||||||
Binary file not shown.
61
bin/lora32-openocd.cfg
Normal file
61
bin/lora32-openocd.cfg
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# Example OpenOCD configuration file for ESP-WROOM-32 module.
|
||||||
|
# By default, the following configuration is used:
|
||||||
|
# - dual core debugging
|
||||||
|
# - support for listing FreeRTOS tasks is enabled
|
||||||
|
# - OpenOCD is configured to set SPI flash voltage at 3.3V
|
||||||
|
# by keeping MTDI bootstrapping pin low
|
||||||
|
#
|
||||||
|
# Use variables listed below to customize this.
|
||||||
|
# Variables can be modified in this file or set on the command line.
|
||||||
|
#
|
||||||
|
# For example, OpenOCD can be started for single core ESP32 debugging on
|
||||||
|
# ESP-WROVER-KIT with ESP-WROOM-32 module as follows:
|
||||||
|
#
|
||||||
|
# openocd -f interface/ftdi/esp32_devkitj_v1.cfg -c 'set ESP32_ONLYCPU 1' -f board/esp-wroom-32.cfg
|
||||||
|
#
|
||||||
|
# If a different JTAG interface is used, change the first -f option.
|
||||||
|
#
|
||||||
|
# If OpenOCD is built from source, pass an additional -s option to specify
|
||||||
|
# the location of 'tcl' directory:
|
||||||
|
#
|
||||||
|
# src/openocd -s tcl <rest of the command line>
|
||||||
|
#
|
||||||
|
# Note:
|
||||||
|
# For ESP32-WROVER module use 'esp32-wrover.cfg' configuration file
|
||||||
|
# ESP-WROOM-32 and ESP32-WROVER have different flash voltage setting
|
||||||
|
|
||||||
|
|
||||||
|
# The ESP32 only supports JTAG.
|
||||||
|
transport select jtag
|
||||||
|
|
||||||
|
# The speed of the JTAG interface, in KHz. If you get DSR/DIR errors (and they
|
||||||
|
# do not relate to OpenOCD trying to read from a memory range without physical
|
||||||
|
# memory being present there), you can try lowering this.
|
||||||
|
#
|
||||||
|
# On DevKit-J, this can go as high as 20MHz if CPU frequency is 80MHz, or 26MHz
|
||||||
|
# if CPU frequency is 160MHz or 240MHz.
|
||||||
|
adapter_khz 20000
|
||||||
|
|
||||||
|
# If single core debugging is required, uncomment the following line
|
||||||
|
# set ESP32_ONLYCPU 1
|
||||||
|
|
||||||
|
# To disable RTOS support, uncomment the following line
|
||||||
|
# set ESP32_RTOS none
|
||||||
|
|
||||||
|
# Tell OpenOCD which SPI flash voltage is used by the board (3.3 or 1.8)
|
||||||
|
# The TDI pin of ESP32 is also a bootstrap pin that selects the voltage the SPI flash
|
||||||
|
# chip runs at. When a hard reset happens (e.g. because someone switches the board off
|
||||||
|
# and on) the ESP32 will use the current TDI value as the bootstrap value because the
|
||||||
|
# JTAG adapter overrides the pull-up or pull-down resistor that is supposed to do the
|
||||||
|
# bootstrapping. These lines basically set the idle value of the TDI line to a
|
||||||
|
# specified value, therefore reducing the chance of a bad bootup due to a bad flash
|
||||||
|
# voltage greatly.
|
||||||
|
# This option defaults to 3.3, if not set. To override the default, uncomment
|
||||||
|
# the following line:
|
||||||
|
# set ESP32_FLASH_VOLTAGE 1.8
|
||||||
|
|
||||||
|
# Set semihosting I/O base dir
|
||||||
|
# set ESP_SEMIHOST_BASEDIR ""
|
||||||
|
|
||||||
|
# Source the ESP32 configuration file
|
||||||
|
source [find target/esp32.cfg]
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Meshtastic Native Daemon
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=root
|
|
||||||
Group=root
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/sbin/meshtasticd
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
4
bin/mqtt-listen.sh
Executable file
4
bin/mqtt-listen.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
mosquitto_sub -h mqtt.meshtastic.org -v -t \$SYS/\# -t msh/+/stat/\# -t msh/+/json/\#
|
||||||
|
# mosquitto_sub -h test.mosquitto.org -v -t mesh/\# -F "%j"
|
||||||
3
bin/mqtt-send-status.sh
Executable file
3
bin/mqtt-send-status.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
mosquitto_pub -h mqtt.meshtastic.org -u meshdev -P large4cats -t msh/1/stat/FakeNode -m online -d
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
cp "release/meshtasticd_linux_$(uname -m)" /usr/sbin/meshtasticd
|
|
||||||
mkdir /etc/meshtasticd
|
|
||||||
if [[ -f "/etc/meshtasticd/config.yaml" ]]; then
|
|
||||||
cp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml
|
|
||||||
else
|
|
||||||
cp bin/config-dist.yaml /etc/meshtasticd/config.yaml
|
|
||||||
fi
|
|
||||||
cp bin/meshtasticd.service /usr/lib/systemd/system/meshtasticd.service
|
|
||||||
4
bin/nrf52-console.sh
Executable file
4
bin/nrf52-console.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# JLinkRTTViewer
|
||||||
|
JLinkRTTClient
|
||||||
3
bin/nrf52832-gdbserver.sh
Executable file
3
bin/nrf52832-gdbserver.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52832_XXAA
|
||||||
3
bin/nrf52833-gdbserver.sh
Executable file
3
bin/nrf52833-gdbserver.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52833_XXAA
|
||||||
3
bin/nrf52840-gdbserver.sh
Executable file
3
bin/nrf52840-gdbserver.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52840_XXAA -SuppressInfoUpdateFW -DisableAutoUpdateFW -rtos GDBServer/RTOSPlugin_FreeRTOS
|
||||||
@@ -1,70 +1,17 @@
|
|||||||
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import configparser
|
import configparser
|
||||||
import traceback
|
import traceback
|
||||||
import sys
|
import sys
|
||||||
from os.path import join
|
|
||||||
from readprops import readProps
|
from readprops import readProps
|
||||||
|
|
||||||
Import("env")
|
|
||||||
platform = env.PioPlatform()
|
|
||||||
|
|
||||||
def esp32_create_combined_bin(source, target, env):
|
|
||||||
# this sub is borrowed from ESPEasy build toolchain. It's licensed under GPL V3
|
|
||||||
# https://github.com/letscontrolit/ESPEasy/blob/mega/tools/pio/post_esp32.py
|
|
||||||
print("Generating combined binary for serial flashing")
|
|
||||||
|
|
||||||
app_offset = 0x10000
|
|
||||||
|
|
||||||
new_file_name = env.subst("$BUILD_DIR/${PROGNAME}.factory.bin")
|
|
||||||
sections = env.subst(env.get("FLASH_EXTRA_IMAGES"))
|
|
||||||
firmware_name = env.subst("$BUILD_DIR/${PROGNAME}.bin")
|
|
||||||
chip = env.get("BOARD_MCU")
|
|
||||||
flash_size = env.BoardConfig().get("upload.flash_size")
|
|
||||||
flash_freq = env.BoardConfig().get("build.f_flash", '40m')
|
|
||||||
flash_freq = flash_freq.replace('000000L', 'm')
|
|
||||||
flash_mode = env.BoardConfig().get("build.flash_mode", "dio")
|
|
||||||
memory_type = env.BoardConfig().get("build.arduino.memory_type", "qio_qspi")
|
|
||||||
if flash_mode == "qio" or flash_mode == "qout":
|
|
||||||
flash_mode = "dio"
|
|
||||||
if memory_type == "opi_opi" or memory_type == "opi_qspi":
|
|
||||||
flash_mode = "dout"
|
|
||||||
cmd = [
|
|
||||||
"--chip",
|
|
||||||
chip,
|
|
||||||
"merge_bin",
|
|
||||||
"-o",
|
|
||||||
new_file_name,
|
|
||||||
"--flash_mode",
|
|
||||||
flash_mode,
|
|
||||||
"--flash_freq",
|
|
||||||
flash_freq,
|
|
||||||
"--flash_size",
|
|
||||||
flash_size,
|
|
||||||
]
|
|
||||||
|
|
||||||
print(" Offset | File")
|
|
||||||
for section in sections:
|
|
||||||
sect_adr, sect_file = section.split(" ", 1)
|
|
||||||
print(f" - {sect_adr} | {sect_file}")
|
|
||||||
cmd += [sect_adr, sect_file]
|
|
||||||
|
|
||||||
print(f" - {hex(app_offset)} | {firmware_name}")
|
|
||||||
cmd += [hex(app_offset), firmware_name]
|
|
||||||
|
|
||||||
print('Using esptool.py arguments: %s' % ' '.join(cmd))
|
|
||||||
|
|
||||||
esptool.main(cmd)
|
|
||||||
|
|
||||||
if (platform.name == "espressif32"):
|
|
||||||
sys.path.append(join(platform.get_package_dir("tool-esptoolpy")))
|
|
||||||
import esptool
|
|
||||||
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin)
|
|
||||||
|
|
||||||
Import("projenv")
|
Import("projenv")
|
||||||
|
|
||||||
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
||||||
verObj = readProps(prefsLoc)
|
verObj = readProps(prefsLoc)
|
||||||
print("Using meshtastic platformio-custom.py, firmware version " + verObj['long'])
|
print("Using meshtastic platform-custom.py, firmare version " + verObj['long'])
|
||||||
|
# print("path is" + ','.join(sys.path))
|
||||||
|
|
||||||
# General options that are passed to the C and C++ compilers
|
# General options that are passed to the C and C++ compilers
|
||||||
projenv.Append(CCFLAGS=[
|
projenv.Append(CCFLAGS=[
|
||||||
|
|||||||
5
bin/program-1.0-tbeam.sh
Executable file
5
bin/program-1.0-tbeam.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
esptool.py --baud 921600 write_flash 0x10000 release/archive/old/firmware-tbeam-EU865-1.0.0.bin
|
||||||
|
echo "Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used"
|
||||||
|
esptool.py --baud 921600 erase_region 0xe000 0x2000
|
||||||
3
bin/program-1.1-tbeam.sh
Executable file
3
bin/program-1.1-tbeam.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
esptool.py --baud 921600 write_flash 0x10000 release/archive/old/firmware-tbeam-1.1.50.bin
|
||||||
7
bin/program-release-heltec.sh
Executable file
7
bin/program-release-heltec.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
source bin/version.sh
|
||||||
|
|
||||||
|
esptool.py --baud 921600 write_flash 0x10000 release/latest/bins/firmware-heltec-US-$VERSION.bin
|
||||||
9
bin/program-release-tbeam.sh
Executable file
9
bin/program-release-tbeam.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION=`bin/buildinfo.py`
|
||||||
|
FILENAME=release/latest/bins/universal/firmware-tbeam-$VERSION.bin
|
||||||
|
|
||||||
|
echo Installing $FILENAME
|
||||||
|
esptool.py --baud 921600 write_flash 0x10000 $FILENAME
|
||||||
7
bin/program-release-universal.sh
Executable file
7
bin/program-release-universal.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
source bin/version.sh
|
||||||
|
|
||||||
|
esptool.py --baud 921600 write_flash 0x10000 release/latest/bins/universal/firmware-tbeam-$VERSION.bin
|
||||||
@@ -9,6 +9,9 @@ VERSION=`bin/buildinfo.py long`
|
|||||||
# Must have a V prefix to trigger github
|
# Must have a V prefix to trigger github
|
||||||
git tag "v${VERSION}"
|
git tag "v${VERSION}"
|
||||||
|
|
||||||
|
# Commented out per https://github.com/meshtastic/Meshtastic-device/issues/947
|
||||||
|
#git push root "v${VERSION}" # push the tag
|
||||||
|
|
||||||
git push origin "v${VERSION}" # push the tag
|
git push origin "v${VERSION}" # push the tag
|
||||||
|
|
||||||
echo "Tag ${VERSION} pushed to github, github actions should now be building the draft release. If it seems good, click to publish it"
|
echo "Tag ${VERSION} pushed to github, github actions should now be building the draft release. If it seems good, click to publish it"
|
||||||
|
|||||||
8
bin/qspi-flash-test.sh
Executable file
8
bin/qspi-flash-test.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# You probably don't need this - it is a basic test of the serial flash on the TTGO eink board
|
||||||
|
|
||||||
|
nrfjprog --qspiini nrf52/ttgo_eink_qpsi.ini --qspieraseall
|
||||||
|
nrfjprog --qspiini nrf52/ttgo_eink_qpsi.ini --memwr 0x12000000 --val 0xdeadbeef --verify
|
||||||
|
nrfjprog --qspiini nrf52/ttgo_eink_qpsi.ini --readqspi spi.hex
|
||||||
|
objdump -s spi.hex | less
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
esptool.py --baud 115200 read_flash 0x1000 0xf000 system-info.img
|
esptool.py --baud 921600 read_flash 0x1000 0xf000 system-info.img
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ def readProps(prefsLoc):
|
|||||||
isDirty = subprocess.check_output(
|
isDirty = subprocess.check_output(
|
||||||
['git', 'diff', 'HEAD']).decode("utf-8").strip()
|
['git', 'diff', 'HEAD']).decode("utf-8").strip()
|
||||||
suffix = sha
|
suffix = sha
|
||||||
# if isDirty:
|
if isDirty:
|
||||||
# # short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
# short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
||||||
# suffix = sha + "-d"
|
suffix = sha + "-d"
|
||||||
verObj['long'] = "{}.{}.{}.{}".format(
|
verObj['long'] = "{}.{}.{}.{}".format(
|
||||||
version["major"], version["minor"], version["build"], suffix)
|
version["major"], version["minor"], version["build"], suffix)
|
||||||
except:
|
except:
|
||||||
@@ -32,6 +32,6 @@ def readProps(prefsLoc):
|
|||||||
# traceback.print_exc()
|
# traceback.print_exc()
|
||||||
verObj['long'] = verObj['short']
|
verObj['long'] = verObj['short']
|
||||||
|
|
||||||
# print("firmware version " + verStr)
|
# print("firmare version " + verStr)
|
||||||
return verObj
|
return verObj
|
||||||
# print("path is" + ','.join(sys.path))
|
# print("path is" + ','.join(sys.path))
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
cd protobufs && ..\nanopb-0.4.8\generator-bin\protoc.exe --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:..\src\mesh\generated" -I=..\protobufs\ ..\protobufs\meshtastic\*.proto
|
cd proto && ..\nanopb-0.4.4\generator-bin\protoc.exe --nanopb_out=-v:..\src\mesh\generated -I=..\proto *.proto
|
||||||
|
|||||||
@@ -2,10 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.8 to be located in the"
|
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.4 to be located in the"
|
||||||
echo "firmware root directory if the following step fails, you should download the correct"
|
echo "meshtastic-device root directory if the following step fails, you should download the correct"
|
||||||
echo "prebuilt binaries for your computer into nanopb-0.4.8"
|
echo "prebuilt binaries for your computer into nanopb-0.4.4"
|
||||||
|
|
||||||
# the nanopb tool seems to require that the .options file be in the current directory!
|
# the nanopb tool seems to require that the .options file be in the current directory!
|
||||||
cd protobufs
|
cd proto
|
||||||
../nanopb-0.4.8/generator-bin/protoc --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:../src/mesh/generated/" -I=../protobufs meshtastic/*.proto
|
../nanopb-0.4.4/generator-bin/protoc --nanopb_out=-v:../src/mesh/generated -I=../proto *.proto
|
||||||
|
|
||||||
|
#echo "Regenerating protobuf documentation - if you see an error message"
|
||||||
|
#echo "you can ignore it unless doing a new protobuf release to github."
|
||||||
|
#bin/regen-docs.sh
|
||||||
|
|||||||
3
bin/run-0-monitor.sh
Executable file
3
bin/run-0-monitor.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pio run --upload-port /dev/ttyUSB0 -t upload -t monitor
|
||||||
3
bin/run-1-monitor.sh
Executable file
3
bin/run-1-monitor.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pio run --upload-port /dev/ttyUSB1 -t upload -t monitor
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user