mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-17 16:22:48 +00:00
Compare commits
10 Commits
v2.0.14.2b
...
v1.2.56.59
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
|
||||||
76
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
76
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
@@ -1,76 +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 0.7
|
|
||||||
- T-Lora v1
|
|
||||||
- T-Lora v1.3
|
|
||||||
- T-Lora v2 1.6
|
|
||||||
- T-Echo
|
|
||||||
- Rak4631
|
|
||||||
- Rak11200
|
|
||||||
- Heltec v1
|
|
||||||
- Heltec v2
|
|
||||||
- Heltec v2.1
|
|
||||||
- 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
|
||||||
|
|
||||||
|
|
||||||
41
.github/actions/setup-base/action.yml
vendored
41
.github/actions/setup-base/action.yml
vendored
@@ -1,41 +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: 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
|
|
||||||
61
.github/workflows/build_esp32.yml
vendored
61
.github/workflows/build_esp32.yml
vendored
@@ -1,61 +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@master
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Build ESP32
|
|
||||||
run: bin/build-esp32.sh ${{ inputs.board }}
|
|
||||||
|
|
||||||
- name: Pull OTA Firmware
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@master
|
|
||||||
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
|
|
||||||
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
|
|
||||||
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
|
||||||
450
.github/workflows/main_matrix.yml
vendored
450
.github/workflows/main_matrix.yml
vendored
@@ -1,51 +1,91 @@
|
|||||||
name: CI
|
name: Continuous Integration PR Checks (1.2 Legacy)
|
||||||
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
|
||||||
|
- board: tlora-v1
|
||||||
|
- board: tlora_v1_3
|
||||||
- board: tlora-v2-1-1.6
|
- board: tlora-v2-1-1.6
|
||||||
- board: tbeam
|
- board: tbeam
|
||||||
|
- board: heltec-v1
|
||||||
|
- board: heltec-v2.0
|
||||||
- board: heltec-v2.1
|
- 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-g1
|
|
||||||
- board: m5stack-coreink
|
|
||||||
- board: tbeam-s3-core
|
|
||||||
- board: tlora-t3s3-v1
|
|
||||||
|
|
||||||
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
|
||||||
uses: trunk-io/trunk-action@v1
|
uses: actions/checkout@v2
|
||||||
|
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:
|
||||||
@@ -57,178 +97,240 @@ jobs:
|
|||||||
- 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.8
|
|
||||||
- board: tbeam
|
- board: tbeam
|
||||||
- board: heltec-v1
|
- board: heltec-v1
|
||||||
- board: heltec-v2.0
|
- board: heltec-v2.0
|
||||||
- board: heltec-v2.1
|
- board: heltec-v2.1
|
||||||
- board: heltec-v3
|
|
||||||
- board: heltec-wsl-v3
|
|
||||||
- board: tbeam0.7
|
- board: tbeam0.7
|
||||||
- board: meshtastic-diy-v1
|
- board: meshtastic-diy-v1
|
||||||
- board: meshtastic-dr-dev
|
|
||||||
- board: nano-g1
|
runs-on: ubuntu-latest
|
||||||
- board: station-g1
|
steps:
|
||||||
- board: m5stack-core
|
|
||||||
- board: m5stack-coreink
|
- name: Checkout code
|
||||||
- board: tbeam-s3-core
|
uses: actions/checkout@v2
|
||||||
- board: tlora-t3s3-v1
|
with:
|
||||||
uses: ./.github/workflows/build_esp32.yml
|
submodules: 'recursive'
|
||||||
with:
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
board: ${{ matrix.board }}
|
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
|
||||||
|
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
|
||||||
max-parallel: 2
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- board: rak4631
|
- board: rak4631_5005
|
||||||
- board: rak4631_eink
|
- board: rak4631_19003
|
||||||
- board: t-echo
|
- board: t-echo
|
||||||
- board: pca10059_diy_eink
|
|
||||||
- board: feather_diy
|
runs-on: ubuntu-latest
|
||||||
uses: ./.github/workflows/build_nrf52.yml
|
steps:
|
||||||
with:
|
|
||||||
board: ${{ matrix.board }}
|
|
||||||
|
|
||||||
build-rpi2040:
|
- name: Checkout code
|
||||||
strategy:
|
uses: actions/checkout@v2
|
||||||
fail-fast: false
|
with:
|
||||||
max-parallel: 2
|
submodules: 'recursive'
|
||||||
matrix:
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
include:
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
- board: pico
|
|
||||||
uses: ./.github/workflows/build_rpi2040.yml
|
- name: Setup Python
|
||||||
with:
|
uses: actions/setup-python@v2
|
||||||
board: ${{ matrix.board }}
|
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
|
||||||
|
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
|
||||||
uses: docker/login-action@v2
|
run: |
|
||||||
with:
|
pio upgrade
|
||||||
username: meshtastic
|
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
|
||||||
|
|
||||||
- name: Docker setup
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
uses: docker/setup-buildx-action@v2
|
- 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: 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'
|
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:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-esp32, build-nrf52, build-native, build-rpi2040]
|
needs: [build-esp32, build-nrf52, build-native]
|
||||||
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: 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 ./**/firmware*.bin ./*t-echo*/Meshtastic_nRF52_factory_erase.uf2 ./**/firmware-*.uf2 ./**/firmware-*-ota.zip ./**/*.elf ./*native*/*device-*.sh ./*native*/*device-*.bat
|
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
|
||||||
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
|
||||||
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
|
||||||
@@ -236,93 +338,5 @@ jobs:
|
|||||||
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-branch: artifacts
|
||||||
artifacts-repo: meshtastic/artifacts
|
|
||||||
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
|
|
||||||
|
|
||||||
- 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 }}
|
|
||||||
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: 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@v1
|
|
||||||
with:
|
|
||||||
trunk-token: ${{ secrets.TRUNK_TOKEN }}
|
|
||||||
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"
|
|
||||||
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.7-linux-x86.tar.gz
|
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.4-linux-x86.tar.gz
|
||||||
tar xvzf nanopb-0.4.7-linux-x86.tar.gz
|
tar xvzf nanopb-0.4.4-linux-x86.tar.gz
|
||||||
mv nanopb-0.4.7-linux-x86 nanopb-0.4.7
|
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
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -29,4 +29,3 @@ __pycache__
|
|||||||
|
|
||||||
venv/
|
venv/
|
||||||
release/
|
release/
|
||||||
.vscode/extensions.json
|
|
||||||
|
|||||||
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
|
||||||
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -1,3 +1,9 @@
|
|||||||
[submodule "protobufs"]
|
[submodule "proto"]
|
||||||
path = protobufs
|
path = proto
|
||||||
url = https://github.com/meshtastic/protobufs.git
|
url = https://github.com/meshtastic/Meshtastic-protobufs.git
|
||||||
|
[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
|
|
||||||
7
.trunk/.gitignore
vendored
7
.trunk/.gitignore
vendored
@@ -1,7 +0,0 @@
|
|||||||
*out
|
|
||||||
*logs
|
|
||||||
*actions
|
|
||||||
*notifications
|
|
||||||
plugins
|
|
||||||
user_trunk.yaml
|
|
||||||
user.yaml
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Following source doesn't work in most setups
|
|
||||||
ignored:
|
|
||||||
- SC1090
|
|
||||||
- SC1091
|
|
||||||
@@ -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,7 +0,0 @@
|
|||||||
enable=all
|
|
||||||
source-path=SCRIPTDIR
|
|
||||||
disable=SC2154
|
|
||||||
|
|
||||||
# If you're having issues with shellcheck following source, disable the errors via:
|
|
||||||
# disable=SC1090
|
|
||||||
# disable=SC1091
|
|
||||||
@@ -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,33 +0,0 @@
|
|||||||
version: 0.1
|
|
||||||
cli:
|
|
||||||
version: 1.3.1
|
|
||||||
plugins:
|
|
||||||
sources:
|
|
||||||
- id: trunk
|
|
||||||
ref: v0.0.8
|
|
||||||
uri: https://github.com/trunk-io/plugins
|
|
||||||
lint:
|
|
||||||
enabled:
|
|
||||||
- git-diff-check
|
|
||||||
- gitleaks@8.15.2
|
|
||||||
- clang-format@14.0.0
|
|
||||||
- prettier@2.8.3
|
|
||||||
disabled:
|
|
||||||
- shellcheck@0.9.0
|
|
||||||
- shfmt@3.5.0
|
|
||||||
- oxipng@8.0.0
|
|
||||||
- actionlint@1.6.22
|
|
||||||
- markdownlint@0.33.0
|
|
||||||
- hadolint@2.12.0
|
|
||||||
- svgo@3.0.2
|
|
||||||
runtimes:
|
|
||||||
enabled:
|
|
||||||
- go@1.18.3
|
|
||||||
- node@18.12.1
|
|
||||||
actions:
|
|
||||||
disabled:
|
|
||||||
- trunk-announce
|
|
||||||
- trunk-check-pre-push
|
|
||||||
- trunk-fmt-pre-commit
|
|
||||||
enabled:
|
|
||||||
- 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"
|
]
|
||||||
],
|
}
|
||||||
}
|
|
||||||
|
|||||||
84
.vscode/settings.json
vendored
84
.vscode/settings.json
vendored
@@ -1,4 +1,82 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
"files.associations": {
|
||||||
"editor.defaultFormatter": "trunk.io"
|
"type_traits": "cpp",
|
||||||
}
|
"array": "cpp",
|
||||||
|
"*.tcc": "cpp",
|
||||||
|
"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
53
Dockerfile
53
Dockerfile
@@ -1,41 +1,16 @@
|
|||||||
FROM debian:bullseye-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
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y install wget python3 g++ zip python3-venv git vim ca-certificates
|
|
||||||
|
|
||||||
# create a non-priveleged user & group
|
|
||||||
RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
|
|
||||||
|
|
||||||
USER mesh
|
|
||||||
RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -qO /tmp/get-platformio.py && \
|
|
||||||
chmod +x /tmp/get-platformio.py && \
|
|
||||||
python3 /tmp/get-platformio.py && \
|
|
||||||
git clone https://github.com/meshtastic/firmware --recurse-submodules /tmp/firmware && \
|
|
||||||
cd /tmp/firmware && \
|
|
||||||
chmod +x /tmp/firmware/bin/build-native.sh && \
|
|
||||||
source ~/.platformio/penv/bin/activate && \
|
|
||||||
./bin/build-native.sh
|
|
||||||
|
|
||||||
FROM frolvlad/alpine-glibc
|
|
||||||
|
|
||||||
RUN apk --update add --no-cache g++ shadow && \
|
|
||||||
groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
|
|
||||||
|
|
||||||
COPY --from=builder /tmp/firmware/release/meshtasticd_linux_amd64 /home/mesh/
|
|
||||||
|
|
||||||
USER mesh
|
|
||||||
WORKDIR /home/mesh
|
|
||||||
CMD sh -cx "./meshtasticd_linux_amd64 --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,54 +0,0 @@
|
|||||||
; Common settings for ESP targes, mixin with extends = esp32_base
|
|
||||||
[esp32_base]
|
|
||||||
extends = arduino_base
|
|
||||||
platform = platformio/espressif32@^5.2.0
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/>
|
|
||||||
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
|
|
||||||
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
|
|
||||||
-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.0
|
|
||||||
https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
|
|
||||||
caveman99/ESP32 Codec2@^1.0.1
|
|
||||||
|
|
||||||
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,47 +0,0 @@
|
|||||||
[esp32s2_base]
|
|
||||||
extends = arduino_base
|
|
||||||
platform = platformio/espressif32@^5.2.0
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> -<nimble/>
|
|
||||||
upload_speed = 961200
|
|
||||||
monitor_speed = 115200
|
|
||||||
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
|
|
||||||
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
|
|
||||||
-DHAS_BLUETOOTH=0
|
|
||||||
-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
|
|
||||||
https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
|
|
||||||
caveman99/ESP32 Codec2@^1.0.1
|
|
||||||
|
|
||||||
lib_ignore =
|
|
||||||
segger_rtt
|
|
||||||
ESP32 BLE Arduino
|
|
||||||
|
|
||||||
; customize the partition table
|
|
||||||
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
|
|
||||||
board_build.partitions = partition-table.csv
|
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
[esp32s3_base]
|
|
||||||
extends = arduino_base
|
|
||||||
platform = platformio/espressif32@^5.2.0
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/>
|
|
||||||
upload_speed = 961200
|
|
||||||
monitor_speed = 115200
|
|
||||||
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
|
|
||||||
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
|
|
||||||
-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.0
|
|
||||||
https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
|
|
||||||
caveman99/ESP32 Codec2@^1.0.1
|
|
||||||
|
|
||||||
lib_ignore =
|
|
||||||
segger_rtt
|
|
||||||
ESP32 BLE Arduino
|
|
||||||
|
|
||||||
; customize the partition table
|
|
||||||
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
|
|
||||||
board_build.partitions = partition-table.csv
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
[nrf52_base]
|
|
||||||
; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files
|
|
||||||
platform = platformio/nordicnrf52@^9.4.0
|
|
||||||
|
|
||||||
extends = arduino_base
|
|
||||||
build_type = debug ; I'm debugging with ICE a lot now
|
|
||||||
build_flags =
|
|
||||||
${arduino_base.build_flags} -Wno-unused-variable
|
|
||||||
-Isrc/platform/nrf52
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mqtt/> -<platform/rp2040> -<mesh/eth/>
|
|
||||||
lib_ignore =
|
|
||||||
BluetoothOTA
|
|
||||||
|
|
||||||
; Note: By default no lora device is created for this build - it uses a simulated interface
|
|
||||||
[env:feather_nrf52832]
|
|
||||||
extends = nrf52_base
|
|
||||||
board = adafruit_feather_nrf52832
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
[nrf52840_base]
|
|
||||||
extends = nrf52_base
|
|
||||||
build_flags = ${nrf52_base.build_flags}
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
${environmental_base.lib_deps}
|
|
||||||
https://github.com/Kongduino/Adafruit_nRFCrypto.git#e31a8825ea3300b163a0a3c1ddd5de34e10e1371
|
|
||||||
|
|
||||||
; Note: By default no lora device is created for this build - it uses a simulated interface
|
|
||||||
[env:nrf52840dk]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = nrf52840_dk
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,21 +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#096b3c3e9c5c8e19d4c3b6cd803fffef2a9be4c5
|
|
||||||
framework = arduino
|
|
||||||
build_src_filter =
|
|
||||||
${env.build_src_filter}
|
|
||||||
-<platform/esp32/>
|
|
||||||
-<nimble/>
|
|
||||||
-<platform/nrf52/>
|
|
||||||
-<platform/stm32wl/>
|
|
||||||
-<platform/rp2040>
|
|
||||||
-<mesh/http/>
|
|
||||||
-<mesh/eth/>
|
|
||||||
-<modules/esp32>
|
|
||||||
-<modules/Telemetry>
|
|
||||||
+<../variants/portduino>
|
|
||||||
lib_deps =
|
|
||||||
${env.lib_deps}
|
|
||||||
${networking_base.lib_deps}
|
|
||||||
rweather/Crypto@^0.4.0
|
|
||||||
build_flags = ${arduino_base.build_flags} -Isrc/platform/portduino
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
; Common settings for rp2040 Processor based targets
|
|
||||||
[rp2040_base]
|
|
||||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#20c7dbfcfe6677c5305fa28ecf5e3870321cb157
|
|
||||||
platform_packages =
|
|
||||||
earlephilhower/toolchain-rp2040-earlephilhower@^5.100300.221223
|
|
||||||
extends = arduino_base
|
|
||||||
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/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mqtt/> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/>
|
|
||||||
lib_ignore =
|
|
||||||
BluetoothOTA
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
${environmental_base.lib_deps}
|
|
||||||
https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
[stm32wl5e_base]
|
|
||||||
platform = platformio/ststm32@^15.4.1
|
|
||||||
board = generic_wl5e
|
|
||||||
framework = arduino
|
|
||||||
build_type = debug
|
|
||||||
build_flags =
|
|
||||||
${arduino_base.build_flags}
|
|
||||||
-Isrc/platform/stm32wl -g
|
|
||||||
-DHAL_SUBGHZ_MODULE_ENABLED
|
|
||||||
# Arduino/PlatformIO framework-arduinoststm32 package does not presently have SUBGHZSPI support
|
|
||||||
# -DPIN_SPI_MOSI=PINSUBGHZSPIMOSI -DPIN_SPI_MISO=PINSUBGHZSPIMISO -DPIN_SPI_SCK=PINSUBGHZSPISCK
|
|
||||||
build_src_filter =
|
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<mqtt/> -<graphics> -<input> -<buzz> -<modules/Telemetry> -<platform/nrf52> -<platform/portduino> -<platform/rp2040>
|
|
||||||
lib_deps =
|
|
||||||
${env.lib_deps}
|
|
||||||
https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b
|
|
||||||
lib_ignore =
|
|
||||||
mathertel/OneButton@^2.0.3
|
|
||||||
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"
|
||||||
|
#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
|
|
||||||
cp $SRCBIN $OUTDIR/$basename-update.bin
|
|
||||||
|
|
||||||
echo "Building Filesystem for ESP32 targets"
|
|
||||||
pio run --environment tbeam -t buildfs
|
pio run --environment tbeam -t buildfs
|
||||||
cp .pio/build/tbeam/littlefs.bin $OUTDIR/littlefs-$VERSION.bin
|
cp .pio/build/tbeam/spiffs.bin $OUTDIR/spiffs-$VERSION.bin
|
||||||
|
cp images/system-info.bin $OUTDIR/system-info.bin
|
||||||
|
|
||||||
cp bin/device-install.* $OUTDIR
|
cp bin/device-install.* $OUTDIR
|
||||||
cp bin/device-update.* $OUTDIR
|
cp bin/device-update.* $OUTDIR
|
||||||
|
|||||||
@@ -12,8 +12,11 @@ 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
|
platformio lib update
|
||||||
|
|
||||||
pio run --environment native
|
pio run --environment native
|
||||||
cp .pio/build/native/program $OUTDIR/meshtasticd_linux_amd64
|
cp .pio/build/native/program $OUTDIR/meshtasticd_linux_amd64
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -13,7 +13,7 @@ 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-v1 heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 rak4631 rak4631_eink rak11200 t-echo 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}"
|
||||||
|
|||||||
@@ -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 pca10059_diy_eink pico 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 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
|
|
||||||
17
bin/device-install.bat
Executable file → Normal file
17
bin/device-install.bat
Executable file → Normal file
@@ -26,20 +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
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota.bin
|
for %%f in (spiffs-*.bin) do (
|
||||||
for %%f in (littlefs-*.bin) do (
|
%PYTHON% -m esptool --baud 921600 write_flash 0x00390000 %%f
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x300000 %%f
|
|
||||||
)
|
)
|
||||||
) else (
|
%PYTHON% -m esptool --baud 921600 write_flash 0x10000 %FILENAME%
|
||||||
echo "Invalid file: %FILENAME%"
|
|
||||||
goto HELP
|
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
|
|
||||||
:EOF
|
:EOF
|
||||||
@@ -14,7 +14,6 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,16 +44,15 @@ shift "$((OPTIND-1))"
|
|||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f "${FILENAME}" ] && [ ! -z "${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
|
||||||
"$PYTHON" -m esptool write_flash 0x260000 bleota.bin
|
"$PYTHON" -m esptool write_flash 0x00390000 spiffs-*.bin
|
||||||
"$PYTHON" -m esptool write_flash 0x300000 littlefs-*.bin
|
"$PYTHON" -m esptool write_flash 0x10000 ${FILENAME}
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
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
|
||||||
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]
|
||||||
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
|
||||||
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
|
||||||
|
|||||||
@@ -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,5 +1 @@
|
|||||||
cd protobufs && ..\nanopb-0.4.7\generator-bin\protoc.exe --nanopb_out=-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
|
||||||
|
|
||||||
@REM cd ../src/mesh/generated/meshtastic
|
|
||||||
@REM sed -i 's/#include "meshtastic/#include "./g' *
|
|
||||||
@REM sed -i 's/meshtastic_//g' *
|
|
||||||
|
|||||||
@@ -2,18 +2,13 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.7 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.7"
|
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.7/generator-bin/protoc --nanopb_out=-v:../src/mesh/generated/ -I=../protobufs meshtastic/*.proto
|
../nanopb-0.4.4/generator-bin/protoc --nanopb_out=-v:../src/mesh/generated -I=../proto *.proto
|
||||||
|
|
||||||
# cd ../src/mesh/generated/meshtastic
|
|
||||||
# sed -i 's/#include "meshtastic/#include "./g' -- *
|
|
||||||
|
|
||||||
# sed -i 's/meshtastic_//g' -- *
|
|
||||||
|
|
||||||
#echo "Regenerating protobuf documentation - if you see an error message"
|
#echo "Regenerating protobuf documentation - if you see an error message"
|
||||||
#echo "you can ignore it unless doing a new protobuf release to github."
|
#echo "you can ignore it unless doing a new protobuf release to github."
|
||||||
|
|||||||
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
|
||||||
9
bin/run-both-monitor.sh
Executable file
9
bin/run-both-monitor.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo uploading to usb1
|
||||||
|
pio run --upload-port /dev/ttyUSB1 -t upload
|
||||||
|
|
||||||
|
echo uploading to usb0
|
||||||
|
pio run --upload-port /dev/ttyUSB0 -t upload -t monitor
|
||||||
15
bin/run-both.sh
Executable file
15
bin/run-both.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
TARG=tbeam
|
||||||
|
|
||||||
|
pio run -e $TARG
|
||||||
|
|
||||||
|
echo uploading to usb1
|
||||||
|
pio run --upload-port /dev/ttyUSB1 -t upload -e $TARG &
|
||||||
|
|
||||||
|
echo uploading to usb0
|
||||||
|
pio run --upload-port /dev/ttyUSB0 -t upload -e $TARG &
|
||||||
|
|
||||||
|
wait
|
||||||
5
bin/run-openocd.sh
Executable file
5
bin/run-openocd.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# /home/kevinh/.platformio/packages/tool-openocd-esp32/bin/openocd -s /home/kevinh/.platformio/packages/tool-openocd-esp32 -c gdb_port pipe; tcl_port disabled; telnet_port disabled -s /home/kevinh/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
|
||||||
|
/home/kevinh/.platformio/packages/tool-openocd-esp32/bin/openocd -s /home/kevinh/.platformio/packages/tool-openocd-esp32 -s /home/kevinh/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/jlink.cfg -f ./lora32-openocd.cfg
|
||||||
|
|
||||||
3
bin/start-terminal0.sh
Executable file
3
bin/start-terminal0.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pio device monitor -b 921600
|
||||||
3
bin/start-terminal1.sh
Executable file
3
bin/start-terminal1.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pio device monitor -p /dev/ttyUSB1 -b 921600
|
||||||
10
bin/upload-to-bootloader.sh
Executable file
10
bin/upload-to-bootloader.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "building for t-echo"
|
||||||
|
pio run --environment t-echo
|
||||||
|
|
||||||
|
echo "Converting to uf2 for NRF52 Adafruit bootloader - double tap on the reset button to force bootloader entry"
|
||||||
|
bin/uf2conv.py .pio/build/t-echo/firmware.hex -f 0xADA52840
|
||||||
|
cp flash.uf2 /media/kevinh/FTH*BOOT/
|
||||||
7
bin/upload-to-rak4631.sh
Executable file
7
bin/upload-to-rak4631.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Converting to uf2 for NRF52 Adafruit bootloader"
|
||||||
|
bin/uf2conv.py .pio/build/rak4631/firmware.hex -f 0xADA52840
|
||||||
|
cp flash.uf2 /media/kevinh/FTH*BOOT/
|
||||||
3
bin/upload-usb1.sh
Executable file
3
bin/upload-usb1.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pio run --upload-port /dev/ttyUSB1 -t upload
|
||||||
@@ -7,7 +7,12 @@
|
|||||||
"cpu": "cortex-m4",
|
"cpu": "cortex-m4",
|
||||||
"extra_flags": "-DARDUINO_NRF52840_TTGO_EINK -DNRF52840_XXAA",
|
"extra_flags": "-DARDUINO_NRF52840_TTGO_EINK -DNRF52840_XXAA",
|
||||||
"f_cpu": "64000000L",
|
"f_cpu": "64000000L",
|
||||||
"hwids": [["0x239A", "0x4405"]],
|
"hwids": [
|
||||||
|
[
|
||||||
|
"0x239A",
|
||||||
|
"0x4405"
|
||||||
|
]
|
||||||
|
],
|
||||||
"usb_product": "TTGO_eink",
|
"usb_product": "TTGO_eink",
|
||||||
"mcu": "nrf52840",
|
"mcu": "nrf52840",
|
||||||
"variant": "eink0.1",
|
"variant": "eink0.1",
|
||||||
@@ -25,13 +30,19 @@
|
|||||||
"settings_addr": "0xFF000"
|
"settings_addr": "0xFF000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"connectivity": ["bluetooth"],
|
"connectivity": [
|
||||||
|
"bluetooth"
|
||||||
|
],
|
||||||
"debug": {
|
"debug": {
|
||||||
"jlink_device": "nRF52840_xxAA",
|
"jlink_device": "nRF52840_xxAA",
|
||||||
"onboard_tools": ["jlink"],
|
"onboard_tools": [
|
||||||
|
"jlink"
|
||||||
|
],
|
||||||
"svd_path": "nrf52840.svd"
|
"svd_path": "nrf52840.svd"
|
||||||
},
|
},
|
||||||
"frameworks": ["arduino"],
|
"frameworks": [
|
||||||
|
"arduino"
|
||||||
|
],
|
||||||
"name": "TTGO eink (Adafruit BSP)",
|
"name": "TTGO eink (Adafruit BSP)",
|
||||||
"upload": {
|
"upload": {
|
||||||
"maximum_ram_size": 248832,
|
"maximum_ram_size": 248832,
|
||||||
@@ -39,8 +50,12 @@
|
|||||||
"require_upload_port": true,
|
"require_upload_port": true,
|
||||||
"speed": 115200,
|
"speed": 115200,
|
||||||
"protocol": "jlink",
|
"protocol": "jlink",
|
||||||
"protocols": ["jlink", "nrfjprog", "stlink"]
|
"protocols": [
|
||||||
|
"jlink",
|
||||||
|
"nrfjprog",
|
||||||
|
"stlink"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"url": "FIXME",
|
"url": "FIXME",
|
||||||
"vendor": "TTGO"
|
"vendor": "TTGO"
|
||||||
}
|
}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"core": "stm32",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DSTM32WLxx -DSTM32WLE5xx -DARDUINO_GENERIC_WLE5CCUX",
|
|
||||||
"f_cpu": "48000000L",
|
|
||||||
"mcu": "stm32wle5ccu",
|
|
||||||
"variant": "STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U",
|
|
||||||
"product_line": "STM32WLE5xx"
|
|
||||||
},
|
|
||||||
"debug": {
|
|
||||||
"default_tools": ["stlink"],
|
|
||||||
"jlink_device": "STM32WLE5CC",
|
|
||||||
"openocd_target": "stm32wlx",
|
|
||||||
"svd_path": "STM32WLE5_CM4.svd"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "BB-STM32WL",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 65536,
|
|
||||||
"maximum_size": 262144,
|
|
||||||
"protocol": "cmsis-dap",
|
|
||||||
"protocols": ["cmsis-dap"]
|
|
||||||
},
|
|
||||||
"url": "https://www.st.com/en/microcontrollers-microprocessors/stm32wl-series.html",
|
|
||||||
"vendor": "ST"
|
|
||||||
}
|
|
||||||
@@ -19,12 +19,16 @@
|
|||||||
"sd_fwid": "0x00B7"
|
"sd_fwid": "0x00B7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"connectivity": ["bluetooth"],
|
"connectivity": [
|
||||||
|
"bluetooth"
|
||||||
|
],
|
||||||
"debug": {
|
"debug": {
|
||||||
"jlink_device": "nRF52832_xxAA",
|
"jlink_device": "nRF52832_xxAA",
|
||||||
"svd_path": "nrf52.svd"
|
"svd_path": "nrf52.svd"
|
||||||
},
|
},
|
||||||
"frameworks": ["arduino"],
|
"frameworks": [
|
||||||
|
"arduino"
|
||||||
|
],
|
||||||
"name": "lora ISP4520",
|
"name": "lora ISP4520",
|
||||||
"upload": {
|
"upload": {
|
||||||
"maximum_ram_size": 65536,
|
"maximum_ram_size": 65536,
|
||||||
@@ -32,8 +36,13 @@
|
|||||||
"require_upload_port": true,
|
"require_upload_port": true,
|
||||||
"speed": 115200,
|
"speed": 115200,
|
||||||
"protocol": "nrfutil",
|
"protocol": "nrfutil",
|
||||||
"protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"]
|
"protocols": [
|
||||||
|
"jlink",
|
||||||
|
"nrfjprog",
|
||||||
|
"nrfutil",
|
||||||
|
"stlink"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"url": "",
|
"url": "",
|
||||||
"vendor": "PsiSoft"
|
"vendor": "PsiSoft"
|
||||||
}
|
}
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s140_v6.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [
|
|
||||||
["0x239A", "0x8029"],
|
|
||||||
["0x239A", "0x0029"],
|
|
||||||
["0x239A", "0x002A"],
|
|
||||||
["0x239A", "0x802A"]
|
|
||||||
],
|
|
||||||
"usb_product": "PCA10059",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "nRF52840 Dongle",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "6.1.1",
|
|
||||||
"sd_fwid": "0x00B6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"svd_path": "nrf52840.svd"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "nRF52840 Dongle",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "nrfutil",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"],
|
|
||||||
"use_1200bps_touch": true,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"wait_for_upload_port": true
|
|
||||||
},
|
|
||||||
"url": "https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle",
|
|
||||||
"vendor": "Nordic Semiconductor"
|
|
||||||
}
|
|
||||||
@@ -1,46 +1,47 @@
|
|||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"arduino": {
|
"arduino": {
|
||||||
"ldscript": "nrf52840_s140_v6.ld"
|
"ldscript": "nrf52840_s140_v6.ld"
|
||||||
|
},
|
||||||
|
"core": "nRF5",
|
||||||
|
"cpu": "cortex-m4",
|
||||||
|
"extra_flags": "-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAA",
|
||||||
|
"f_cpu": "64000000L",
|
||||||
|
"hwids": [["0x239A", "0x4404"]],
|
||||||
|
"usb_product": "nrf52840dk",
|
||||||
|
"mcu": "nrf52840",
|
||||||
|
"variant": "pca10056",
|
||||||
|
"variants_dir": "variants",
|
||||||
|
"bsp": {
|
||||||
|
"name": "adafruit"
|
||||||
|
},
|
||||||
|
"softdevice": {
|
||||||
|
"sd_flags": "-DS140",
|
||||||
|
"sd_name": "s140",
|
||||||
|
"sd_version": "6.1.1",
|
||||||
|
"sd_fwid": "0x00B6"
|
||||||
|
},
|
||||||
|
"bootloader": {
|
||||||
|
"settings_addr": "0xFF000"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"core": "nRF5",
|
"connectivity": ["bluetooth"],
|
||||||
"cpu": "cortex-m4",
|
"debug": {
|
||||||
"extra_flags": "-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAA",
|
"jlink_device": "nRF52840_xxAA",
|
||||||
"f_cpu": "64000000L",
|
"onboard_tools": ["jlink"],
|
||||||
"hwids": [["0x239A", "0x4404"]],
|
"svd_path": "nrf52840.svd"
|
||||||
"usb_product": "nrf52840dk",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "pca10056",
|
|
||||||
"variants_dir": "variants",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
},
|
||||||
"softdevice": {
|
"frameworks": ["arduino"],
|
||||||
"sd_flags": "-DS140",
|
"name": "A modified NRF52840-DK devboard (Adafruit BSP)",
|
||||||
"sd_name": "s140",
|
"upload": {
|
||||||
"sd_version": "6.1.1",
|
"maximum_ram_size": 248832,
|
||||||
"sd_fwid": "0x00B6"
|
"maximum_size": 815104,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 115200,
|
||||||
|
"protocol": "jlink",
|
||||||
|
"protocols": ["jlink", "nrfjprog", "stlink"]
|
||||||
},
|
},
|
||||||
"bootloader": {
|
"url": "https://meshtastic.org/",
|
||||||
"settings_addr": "0xFF000"
|
"vendor": "Nordic Semi"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"onboard_tools": ["jlink"],
|
|
||||||
"svd_path": "nrf52840.svd"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "A modified NRF52840-DK devboard (Adafruit BSP)",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "jlink",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "stlink"]
|
|
||||||
},
|
|
||||||
"url": "https://meshtastic.org/",
|
|
||||||
"vendor": "Nordic Semi"
|
|
||||||
}
|
|
||||||
55
boards/rak815.json
Normal file
55
boards/rak815.json
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino":{
|
||||||
|
"ldscript": "nrf52832_s132_v6.ld"
|
||||||
|
},
|
||||||
|
"core": "nRF5",
|
||||||
|
"cpu": "cortex-m4",
|
||||||
|
"extra_flags": "-DNRF52832_XXAA -DNRF52",
|
||||||
|
"f_cpu": "64000000L",
|
||||||
|
"hwids": [
|
||||||
|
[
|
||||||
|
"0x10c4",
|
||||||
|
"0xea60"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"usb_product": "RAK815",
|
||||||
|
"mcu": "nrf52832",
|
||||||
|
"variant": "rak815",
|
||||||
|
"bsp": {
|
||||||
|
"name": "adafruit"
|
||||||
|
},
|
||||||
|
"softdevice": {
|
||||||
|
"sd_flags": "-DS132",
|
||||||
|
"sd_name": "s132",
|
||||||
|
"sd_version": "6.1.1",
|
||||||
|
"sd_fwid": "0x00B7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"connectivity": [
|
||||||
|
"bluetooth"
|
||||||
|
],
|
||||||
|
"debug": {
|
||||||
|
"jlink_device": "nRF52832_xxAA",
|
||||||
|
"svd_path": "nrf52.svd"
|
||||||
|
},
|
||||||
|
"frameworks": [
|
||||||
|
"arduino"
|
||||||
|
],
|
||||||
|
"name": "RAK RAK815",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 65536,
|
||||||
|
"maximum_size": 524288,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 115200,
|
||||||
|
"protocol": "nrfutil",
|
||||||
|
"protocols": [
|
||||||
|
"jlink",
|
||||||
|
"nrfjprog",
|
||||||
|
"nrfutil",
|
||||||
|
"stlink"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"url": "https://store.rakwireless.com/products/rak815-hybrid-location-tracker",
|
||||||
|
"vendor": "RAK"
|
||||||
|
}
|
||||||
@@ -7,7 +7,12 @@
|
|||||||
"cpu": "cortex-m4",
|
"cpu": "cortex-m4",
|
||||||
"extra_flags": "-DARDUINO_NRF52840_TTGO_EINK -DNRF52840_XXAA",
|
"extra_flags": "-DARDUINO_NRF52840_TTGO_EINK -DNRF52840_XXAA",
|
||||||
"f_cpu": "64000000L",
|
"f_cpu": "64000000L",
|
||||||
"hwids": [["0x239A", "0x4405"]],
|
"hwids": [
|
||||||
|
[
|
||||||
|
"0x239A",
|
||||||
|
"0x4405"
|
||||||
|
]
|
||||||
|
],
|
||||||
"usb_product": "TTGO_eink",
|
"usb_product": "TTGO_eink",
|
||||||
"mcu": "nrf52840",
|
"mcu": "nrf52840",
|
||||||
"variant": "t-echo",
|
"variant": "t-echo",
|
||||||
@@ -25,24 +30,35 @@
|
|||||||
"settings_addr": "0xFF000"
|
"settings_addr": "0xFF000"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"connectivity": ["bluetooth"],
|
"connectivity": [
|
||||||
|
"bluetooth"
|
||||||
|
],
|
||||||
"debug": {
|
"debug": {
|
||||||
"jlink_device": "nRF52840_xxAA",
|
"jlink_device": "nRF52840_xxAA",
|
||||||
"onboard_tools": ["jlink"],
|
"onboard_tools": [
|
||||||
|
"jlink"
|
||||||
|
],
|
||||||
"svd_path": "nrf52840.svd"
|
"svd_path": "nrf52840.svd"
|
||||||
},
|
},
|
||||||
"frameworks": ["arduino"],
|
"frameworks": [
|
||||||
|
"arduino"
|
||||||
|
],
|
||||||
"name": "TTGO eink (Adafruit BSP)",
|
"name": "TTGO eink (Adafruit BSP)",
|
||||||
"upload": {
|
"upload": {
|
||||||
"maximum_ram_size": 248832,
|
"maximum_ram_size": 248832,
|
||||||
"maximum_size": 815104,
|
"maximum_size": 815104,
|
||||||
"speed": 115200,
|
"speed": 115200,
|
||||||
"protocol": "nrfutil",
|
"protocol": "nrfutil",
|
||||||
"protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"],
|
"protocols": [
|
||||||
"use_1200bps_touch": true,
|
"jlink",
|
||||||
"require_upload_port": true,
|
"nrfjprog",
|
||||||
"wait_for_upload_port": true
|
"nrfutil",
|
||||||
|
"stlink"
|
||||||
|
],
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"wait_for_upload_port": true
|
||||||
},
|
},
|
||||||
"url": "FIXME",
|
"url": "FIXME",
|
||||||
"vendor": "TTGO"
|
"vendor": "TTGO"
|
||||||
}
|
}
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "esp32s3_out.ld"
|
|
||||||
},
|
|
||||||
"core": "esp32",
|
|
||||||
"extra_flags": [
|
|
||||||
"-DBOARD_HAS_PSRAM",
|
|
||||||
"-DLILYGO_TBEAM_S3_CORE",
|
|
||||||
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
|
||||||
"-DARDUINO_USB_MODE=0",
|
|
||||||
"-DARDUINO_RUNNING_CORE=1",
|
|
||||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
|
||||||
],
|
|
||||||
"f_cpu": "240000000L",
|
|
||||||
"f_flash": "80000000L",
|
|
||||||
"flash_mode": "dio",
|
|
||||||
"hwids": [["0X303A", "0x1001"]],
|
|
||||||
"mcu": "esp32s3",
|
|
||||||
"variant": "tbeam-s3-core"
|
|
||||||
},
|
|
||||||
"connectivity": ["wifi"],
|
|
||||||
"debug": {
|
|
||||||
"openocd_target": "esp32s3.cfg"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "LilyGo TBeam-S3-Core",
|
|
||||||
"upload": {
|
|
||||||
"flash_size": "8MB",
|
|
||||||
"maximum_ram_size": 327680,
|
|
||||||
"maximum_size": 8388608,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 921600
|
|
||||||
},
|
|
||||||
"url": "http://www.lilygo.cn/",
|
|
||||||
"vendor": "LilyGo"
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "esp32s3_out.ld"
|
|
||||||
},
|
|
||||||
"core": "esp32",
|
|
||||||
"extra_flags": [
|
|
||||||
"-DLILYGO_T3S3_V1",
|
|
||||||
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
|
||||||
"-DARDUINO_USB_MODE=0",
|
|
||||||
"-DARDUINO_RUNNING_CORE=1",
|
|
||||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
|
||||||
],
|
|
||||||
"f_cpu": "240000000L",
|
|
||||||
"f_flash": "80000000L",
|
|
||||||
"flash_mode": "dio",
|
|
||||||
"hwids": [["0X303A", "0x1001"]],
|
|
||||||
"mcu": "esp32s3",
|
|
||||||
"variant": "tlora-t3s3-v1"
|
|
||||||
},
|
|
||||||
"connectivity": ["wifi"],
|
|
||||||
"debug": {
|
|
||||||
"openocd_target": "esp32s3.cfg"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino", "espidf"],
|
|
||||||
"name": "LilyGo TLora-T3S3-V1",
|
|
||||||
"upload": {
|
|
||||||
"flash_size": "4MB",
|
|
||||||
"maximum_ram_size": 327680,
|
|
||||||
"maximum_size": 4194304,
|
|
||||||
"wait_for_upload_port": true,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 921600
|
|
||||||
},
|
|
||||||
"url": "http://www.lilygo.cn/",
|
|
||||||
"vendor": "LilyGo"
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"arduino": {
|
"arduino":{
|
||||||
"ldscript": "esp32_out.ld"
|
"ldscript": "esp32_out.ld"
|
||||||
},
|
},
|
||||||
"core": "esp32",
|
"core": "esp32",
|
||||||
@@ -11,14 +11,26 @@
|
|||||||
"mcu": "esp32",
|
"mcu": "esp32",
|
||||||
"variant": "WisCore_RAK11200_Board"
|
"variant": "WisCore_RAK11200_Board"
|
||||||
},
|
},
|
||||||
"connectivity": ["wifi", "bluetooth", "ethernet", "can"],
|
"connectivity": [
|
||||||
"frameworks": ["arduino", "espidf"],
|
"wifi",
|
||||||
|
"bluetooth",
|
||||||
|
"ethernet",
|
||||||
|
"can"
|
||||||
|
],
|
||||||
|
"frameworks": [
|
||||||
|
"arduino",
|
||||||
|
"espidf"
|
||||||
|
],
|
||||||
"name": "WisCore RAK11200 Board",
|
"name": "WisCore RAK11200 Board",
|
||||||
"upload": {
|
"upload": {
|
||||||
"flash_size": "4MB",
|
"flash_size": "4MB",
|
||||||
"maximum_ram_size": 327680,
|
"maximum_ram_size": 327680,
|
||||||
"maximum_size": 4194304,
|
"maximum_size": 4194304,
|
||||||
"protocols": ["esptool", "espota", "ftdi"],
|
"protocols": [
|
||||||
|
"esptool",
|
||||||
|
"espota",
|
||||||
|
"ftdi"
|
||||||
|
],
|
||||||
"require_upload_port": true,
|
"require_upload_port": true,
|
||||||
"speed": 460800
|
"speed": 460800
|
||||||
},
|
},
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user