8000 Stable update by Xykon · Pull Request #237 · pycom/pycom-micropython-sigfox · GitHub
[go: up one dir, main page]

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

Stable update #237

Merged
merged 17 commits into from
Dec 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# Build directory
######################
build/
build-*/

# Test failure outputs
######################
Expand Down Expand Up @@ -50,3 +51,6 @@ secure-bootloader-key.bin
flash_encryption_key.bin

.DS_Store
org.eclipse.cdt.ui.prefs
org.eclipse.cdt.core.prefs
language.settings.xml
17 changes: 8 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
def buildVersion
def boards_to_build = ["WiPy", "LoPy", "SiPy", "GPy", "FiPy", "LoPy4"]
def boards_to_test = ["Pycom_Expansion3_Py00ec5f", "Pycom_Expansion3_Py9f8bf5"]
def boards_to_test = ["1b6fa1", "00ec51"]

node {
// get pycom-esp-idf source
stage('Checkout') {
checkout scm
sh 'rm -rf esp-idf'
sh 'git clone --recursive -b master https://github.com/pycom/pycom-esp-idf.git esp-idf'
sh 'git -C esp-idf checkout 4eab4e1b0e47c73b858c6b29d357f3d30a69c074'
sh 'git -C esp-idf submodule update'
sh 'git clone --depth=1 --recursive -b master https://github.com/pycom/pycom-esp-idf.git esp-idf'
}

PYCOM_VERSION=get_version()
Expand Down Expand Up @@ -119,11 +117,12 @@ def testBuild(short_name) {
dir('tests') {
timeout(30) {
// As some tests are randomly failing... enforce script always returns 0 (OK)
sh './run-tests --target=esp32-' + board_name_u + ' --device ' + device_name + ' || exit 0'
}
sh '''export PATH=$PATH:/usr/local/bin;
./run-tests --target=esp32-''' + board_name_u + ' --device ' + device_name + ' || exit 0'
}
sh 'python esp32/tools/pypic.py --port ' + device_name +' --enter'
sh 'python esp32/tools/pypic.py --port ' + device_name +' --exit'
}
sh 'python esp32/tools/pypic.py --port ' + device_name +' --enter'
sh 'python esp32/tools/pypic.py --port ' + device_name +' --exit'
}
}
}
Expand All @@ -150,6 +149,6 @@ def get_remote_name(short_name) {
}

def get_device_name(short_name) {
return "/dev/serial/by-id/usb-" + short_name + "-if00"
return "/dev/tty.usbmodemPy" + short_name + " "
}

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Expansion Board 2.0 users, please connect ``P2`` to ``GND`` and then reset the b

### Prerequisites

$ export $IDF_PATH=<pycom-esp-idf_PATH>
$ export IDF_PATH=<pycom-esp-idf_PATH>
$ cd esp32

Hold valid keys for Flash Encryption and Secure Boot; they can be generated randomly with the following commands:
Expand Down
2 changes: 1 addition & 1 deletion docs/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Copyright (c) 2016, Pycom Limited.
Copyright (c) 2018, Pycom Limited.

This software is licensed under the GNU GPL version 3 or any
later version, with permitted additional terms. For more information
Expand Down
11 changes: 5 additions & 6 deletions drivers/sx127x/sx1272/sx1272.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is derived from the MicroPython project, http://micropython.org/
*
* Copyright (c) 2016, Pycom Limited and its licensors.
* Copyright (c) 2018, Pycom Limited and its licensors.
*
* This software is licensed under the GNU GPL version 3 or any later version,
* with permitted additional terms. For more information see the Pycom Licence
Expand Down Expand Up @@ -234,17 +234,14 @@ bool SX1272IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
{
bool status = true;
int16_t rssi = 0;
uint32_t carrierSenseTime = 0;

SX1272SetModem( modem );

SX1272SetChannel( freq );

SX1272SetOpMode( RF_OPMODE_RECEIVER );

DelayMs( 2 );

carrierSenseTime = TimerGetCurrentTime( );
DelayMs( 1 );

// Perform carrier sense for maxCarrierSenseTime
do {
Expand All @@ -254,7 +251,9 @@ bool SX1272IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
status = false;
break;
}
} while( TimerGetElapsedTime( carrierSenseTime ) < maxCarrierSenseTime );
DelayMs( 1 );
maxCarrierSenseTime -= 1;
} while( maxCarrierSenseTime > 0 );
SX1272SetSleep( );
return status;
}
Expand Down
11 changes: 5 additions & 6 deletions drivers/sx127x/sx1276/sx1276.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is derived from the MicroPython project, http://micropython.org/
*
* Copyright (c) 2016, Pycom Limited and its licensors.
* Copyright (c) 2018, Pycom Limited and its licensors.
*
* This software is licensed under the GNU GPL version 3 or any later version,
* with permitted additional terms. For more information see the Pycom Licence
Expand Down Expand Up @@ -255,17 +255,14 @@ bool SX1276IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
{
bool status = true;
int16_t rssi = 0;
uint32_t carrierSenseTime = 0;

SX1276SetModem( modem );

SX1276SetChannel( freq );

SX1276SetOpMode( RF_OPMODE_RECEIVER );

DelayMs( 2 );

carrierSenseTime = TimerGetCurrentTime( );
DelayMs( 1 );

// Perform carrier sense for maxCarrierSenseTime
do {
Expand All @@ -275,7 +272,9 @@ bool SX1276IsChannelFree( RadioModems_t modem, uint32_t freq, int16_t rssiThresh
status = false;
break;
}
} while( TimerGetElapsedTime( carrierSenseTime ) < maxCarrierSenseTime );
DelayMs( 1 );
maxCarrierSenseTime -= 1;
} while( maxCarrierSenseTime > 0 );
SX1276SetSleep( );
return status;
}
Expand Down
2 changes: 1 addition & 1 deletion esp32/application.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, Pycom Limited.
# Copyright (c) 2018, Pycom Limited.
#
# This software is licensed under the GNU GPL version 3 or any
# later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/FIPY/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/GPY/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/LOPY/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/LOPY4/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/SIPY/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
4 changes: 2 additions & 2 deletions esp32/boards/SIPY/pins.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ G16,GPIO12,P9
G17,GPIO13,P10
G22,GPIO22,P11
G28,GPIO21,P12
G5,GPI37,P13
G4,GPI36,P14
G5,GPI36,P13
G4,GPI37,P14
G0,GPI38,P15
G3,GPI39,P16
G31,GPI35,P17
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/WIPY/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/esp32_prefix.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is derived from the MicroPython project, http://micropython.org/
*
* Copyright (c) 2016, Pycom Limited and its licensors.
* Copyright (c) 2018, Pycom Limited and its licensors.
*
* This software is licensed under the GNU GPL version 3 or any later version,
* with permitted additional terms. For more information see the Pycom Licence
Expand Down
2 changes: 1 addition & 1 deletion esp32/boards/make-pins.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This file is derived from the MicroPython project, http://micropython.org/
#
# Copyright (c) 2016, Pycom Limited and its licensors.
# Copyright (c) 2018, Pycom Limited and its licensors.
#
# This software is licensed under the GNU GPL version 3 or any later version,
# with permitted additional terms. For more information see the Pycom Licence
Expand Down
2 changes: 1 addition & 1 deletion esp32/bootloader/bootmgr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/bootloader/bootmgr.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
4 changes: 3 additions & 1 deletion esp32/bootloader/mperror.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down Expand Up @@ -60,6 +60,8 @@ void mperror_init0 (void) {
gpio_config(&gpioconf);

mperror_heart_beat.enabled = true;
//delay introduced to separate last falling edge of signal and next color code
ets_delay_us(300);
mperror_heartbeat_switch_off();
}

Expand Down
2 changes: 1 addition & 1 deletion esp32/fatfs/src/drivers/sd_diskio.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
2 changes: 1 addition & 1 deletion esp32/fatfs/src/drivers/sd_diskio.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Pycom Limited.
* Copyright (c) 2018, Pycom Limited.
*
* This software is licensed under the GNU GPL version 3 or any
* later version, with permitted additional terms. For more information
Expand Down
7 changes: 7 additions & 0 deletions esp32/frozen/LTE/sqnsbr.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) 2018, Pycom Limited.
#
# This software is licensed under the GNU GPL version 3 or any
# later version, with permitted additional terms. For more information
# see the Pycom Licence v1.0 document supplied with this file, or
# available at https://www.pycom.io/opensource/licensing

class bootrom(object):
import binascii

Expand Down
25 changes: 21 additions & 4 deletions esp32/frozen/LTE/sqnstp.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
#!/usr/bin/env python

#################################################################
#
# Copyright (c) 2011 SEQUANS Communications.
# All rights reserved.
#
# This is confidential and proprietary source code of SEQUANS
# Communications. The use of the present source code and all
# its derived forms is exclusively governed by the restricted
# terms and conditions set forth in the SEQUANS
# Communications' EARLY ADOPTER AGREEMENT and/or LICENCE
# AGREEMENT. The present source code and all its derived
# forms can ONLY and EXCLUSIVELY be used with SEQUANS
# Communications' products. The distribution/sale of the
# present source code and all its derived forms is EXCLUSIVELY
# RESERVED to regular LICENCE holder and otherwise STRICTLY
# PROHIBITED.
#
#################################################################
import struct
import time
import os
Expand Down Expand Up @@ -59,9 +76,9 @@ def hexdump(src, length=32):
lines = []
for c in range(0, len(src), length):
chars = src[c:c+length]
hex = ' '.join(['%02x' % x for x in chars])
printable = ''.join(['%s' % ((x <= 127 and FILTER[x]) or '.') for x in chars])
lines.append('%04x %-*s %s\n' % (c, length*3, hex, printable))
hex = ' '.join(["%02x" % ord(x) for x in chars])
printable = ''.join(["%s" % ((ord(x) <= 127 and FILTER[ord(x)]) or '.') for x in chars])
lines.append("%04x %-*s %s\n" % (c, length*3, hex, printable))
print(''.join(lines))


Expand Down
Loading
0