Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Add espnow #483

Open
wants to merge 23 commits into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 9 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# Compiled Sources
###################
*.o
*.a
*.elf
*.bin
*.map
*.hex
*.dis
*.exe

# Packages
############

Expand All @@ -20,10 +9,13 @@
######################
*.swp

# Build directory
# Build directories
######################
build/
build-*/
esp32/build/
esp32/build-*/
mpy-cross/build/*
# This map file is generated here instead of the build folder...
mpy-cross/*.map

# Test failure outputs
######################
Expand All @@ -44,14 +36,16 @@ user.props
.pydevproject
.settings
.launch
.vscode

# Key files (for Flash Encryption and Secure Boot)
secure_boot_signing_key.pem
signature_verification_key.bin
secure-bootloader-key.bin
flash_encryption_key.bin

.DS_Store
org.eclipse.cdt.ui.prefs
org.eclipse.cdt.core.prefs
language.settings.xml
.idea
33 changes: 30 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
def buildVersion
def boards_to_build = ["WiPy", "LoPy", "SiPy", "GPy", "FiPy", "LoPy4"]
def variants_to_build = [ "PYBYTES" ]
// FIXME: there must be a better way of adding PYGATE to Jenkins, but it evades me :(
def pygate_boards_to_build = ["WiPy", "GPy", "LoPy4"]
def pygate_variants_to_build = [ "PYGATE" ]
def boards_to_test = ["00ec51"]
def open_thread

Expand All @@ -9,9 +12,14 @@ node {
stage('Checkout') {
checkout scm
sh 'rm -rf esp-idf'
sh 'git clone --depth=1 --recursive -b idf_v3.2 https://github.com/pycom/pycom-esp-idf.git esp-idf'
sh 'git clone --recursive -b idf_v3.3.1 https://github.com/pycom/pycom-esp-idf.git esp-idf'
IDF_HASH=get_idf_hash()
dir('esp-idf'){
sh 'git checkout ' + IDF_HASH
sh 'git submodule update --init --recursive'
}
}

stage('git-tag') {
PYCOM_VERSION=get_version()
GIT_TAG = sh (script: 'git rev-parse --short HEAD', returnStdout: true).trim()
Expand All @@ -35,6 +43,19 @@ node {
parallel parallelSteps
}
}

for (board in pygate_boards_to_build) {
stage(board) {
def parallelSteps = [:]
for (variant in pygate_variants_to_build) {
board_variant = board + "_" + variant
open_thread = 'off'
parallelSteps[board_variant] = boardBuild(board, variant, open_thread)
}
parallel parallelSteps
}
}

stash includes: '**/*.tar.gz', name: 'binary'
stash includes: 'tests/**', name: 'tests'
stash includes: 'tools/**', name: 'tools'
Expand Down Expand Up @@ -85,7 +106,8 @@ def flashBuild(short_name, version, variant) {
unstash 'esp32Tools'
unstash 'tests'
unstash 'tools'
sh 'python esp32/tools/fw_updater/updater.py --port ' + device_name +' flash -t esp32/build-' + variant + '/' + board_name + '-' + version + '.tar.gz'
sh 'python esp32/tools/fw_updater/updater.py --noexit --port ' + device_name +' flash -t esp32/build-' + variant + '/' + board_name + '-' + version + '.tar.gz'
sh 'python esp32/tools/fw_updater/updater.py --port ' + device_name +' pybytes --auto_start False'
}
}
}
Expand Down Expand Up @@ -114,6 +136,11 @@ def get_version() {
matcher ? matcher[0][1].trim().replace('"','') : null
}

def get_idf_hash() {
def matcher = readFile('esp32/Makefile') =~ 'IDF_HASH=(.+)'
matcher ? matcher[0][1].trim().replace('"','') : null
}

def get_firmware_name(short_name) {
node {
def node_info = sh (script: 'cat ${JENKINS_HOME}/pycom-ic.conf || exit 0', returnStdout: true).trim()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ board (PyBoard), the officially supported reference electronic circuit board.
The following components are actively maintained by Pycom:
- py/ -- the core Python implementation, including compiler, runtime, and
core library.
- exp32/ -- a version of MicroPython that runs on the ESP32 based boards from Pycom.
- esp32/ -- a version of MicroPython that runs on the ESP32 based boards from Pycom.
- tests/ -- test framework and test scripts.

Additional components:
Expand Down Expand Up @@ -74,7 +74,7 @@ Then when you need the toolchain you can type ``get_esp32`` on the command line
You also need the ESP IDF along side this repository in order to build the ESP32 port.
To get it:

$ git clone --recursive -b idf_v3.2 https://github.com/pycom/pycom-esp-idf.git
$ git clone --recursive -b idf_v3.3.1 https://github.com/pycom/pycom-esp-idf.git

After cloning, if you did not specify the --recursive option, make sure to checkout all the submodules:

Expand Down
161 changes: 0 additions & 161 deletions docs/2wipy/general.rst

This file was deleted.

Loading