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

Push latest Dev changes into Release/v1.20 #473

Merged
merged 180 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
54b8e88
BLE: Allow static passwords, remove bonded when pin changes
oligauc Oct 8, 2019
0b8c8a8
Merge pull request #64 from pycom/sec_ble
Oct 8, 2019
90eb9de
Update Jenkins File
Oct 7, 2019
6638953
mods/pyblte.c: Fix the lenght field for AT commands
robert-hh Oct 7, 2019
415af4d
mods/pybadc.c: Fix the argument handling of bits=x for adc.init()
robert-hh Oct 7, 2019
aae6c26
Restore previous wifi_on_boot behaviour.
Xykon Oct 8, 2019
3024c89
Bugfixes
Xykon Oct 8, 2019
b16e92d
Update Jenkinsfile and pycom_version.h
Xykon Oct 8, 2019
881be0e
Merge branch 'Dev' of https://github.com/pycom/pycom-micropython-sigfox
Oct 14, 2019
42847bc
feat: Pybytes library release 1.2.0
jirkadev Oct 22, 2019
57b1110
Update Pybytes to 1.2.0 for new release 1.20.1.r2
Xykon Oct 30, 2019
69dd8b5
Merge pull request #352 from pycom/release-pybytes-library-1.2.0
Oct 30, 2019
8bc1f0c
Changes needed for idf 3.3.
geza-pycom Nov 13, 2019
36763fa
refactor: updated pybytes-devices to 1.3.0
jirkadev Nov 19, 2019
a57ae0c
chore: updated .gitignore file
jirkadev Nov 19, 2019
aca4712
Merge pull request #65 from husigeza/idf_3.3_support
geza-pycom Nov 19, 2019
5ecc3d0
Revert "Merge pull request #65 from husigeza/idf_3.3_support" (#67)
geza-pycom Nov 22, 2019
2c2c229
Update _pybytes_connection.py
Xykon Nov 25, 2019
9f1479a
Support Sigfox registration for Pybytes
Xykon Nov 30, 2019
8ad73f9
Update _pybytes_constants.py
Xykon Nov 30, 2019
3697c2a
Update pycom_version.h
Xykon Nov 30, 2019
3c65d90
PYFW-390: Update .gitignore to allow esp32/lib libraries to be updated
geza-pycom Nov 30, 2019
c5d4973
Merge pull request #69 from husigeza/PYFW-390
geza-pycom Nov 30, 2019
188ffd2
MDNS advertisement works
geza-pycom Nov 17, 2019
0ac25ff
Adding text to advertisement works
geza-pycom Nov 17, 2019
c79bb20
Query works
Nov 22, 2019
f65490d
Free up internal query results
Nov 26, 2019
1902f34
Change host_name to hostname
Nov 29, 2019
996f300
Rename text to txt
Nov 29, 2019
c2c64b5
Adding libmdns.a to esp32/lib
geza-pycom Nov 30, 2019
c40694a
Merge branch 'master' into pybytes-devices-v1.3.0
Xykon Nov 30, 2019
2071a1f
Update modpycom.c
Xykon Nov 30, 2019
004c97a
Release updates & bugfixes
Xykon Nov 30, 2019
2b017e1
Update sqnsupgrade.py
Xykon Nov 30, 2019
ade08b6
Update pycom_version.h
Xykon Nov 30, 2019
9978dfd
Update _pybytes_config.py
Xykon Nov 30, 2019
78777bd
Merge branch 'Release/v1.20' into Dev
Xykon Nov 30, 2019
9d29de9
Merge pull request #68 from husigeza/mdns
geza-pycom Dec 3, 2019
d19e340
Adding gdbinit
geza-pycom Dec 18, 2019
7166cc0
Adding scripts for PyJTAG and short Readme
geza-pycom Jan 7, 2020
6f1451e
Update readme, move gdbinit
geza-pycom Jan 7, 2020
284cd01
Merge pull request #72 from husigeza/PyJTAG
geza-pycom Jan 11, 2020
0373d7e
re-integrate sigfox sources
peter-pycom Jan 13, 2020
34408c7
Merge pull request #66 from pycom/pybytes-devices-v1.3.0
Jan 14, 2020
e1df781
Merge pull request #73 from doniks/sigfox_reintegrate
doniks Jan 16, 2020
9a2d6c1
typo
peter-pycom Dec 6, 2019
ae96346
pyjtag clarifications
doniks Jan 20, 2020
c39484b
clarification
peter-pycom Jan 20, 2020
05c58d5
Merge pull request #75 from doniks/sigfox-readme-fix
doniks Jan 21, 2020
a87cdd9
update sigfox libraries - prep for LoPy4 certification in Regions 1,2…
peter-pycom Jan 21, 2020
f63954f
Merge pull request #74 from pycom/doniks-pyjtag-docs-improvements
doniks Jan 22, 2020
9493536
Replace xQueueSendFromISR call with xQueueSend when called from BLE e…
geza-pycom Jan 24, 2020
d6c1ccb
Merge pull request #80 from husigeza/Minor_fixes_BLE_Lora
geza-pycom Jan 28, 2020
e6bc45f
Replacing "switch-case" with "if-else if" in Region.c to avoid genera…
geza-pycom Jan 28, 2020
e87e98f
Merge pull request #81 from husigeza/Fix_LoraRegion
geza-pycom Jan 28, 2020
33ffef7
Merge pull request #76 from doniks/sigfox-ready-for-cert
doniks Jan 29, 2020
6756537
BLE characteristic update messages are lost if they sent too frequently
geza-pycom Jan 28, 2020
b410946
Merge pull request #82 from husigeza/PYFW-395
geza-pycom Jan 30, 2020
013147c
PYFW-394: mod_ssl_setup_socket() allocates memory while GIL is not lo…
geza-pycom Jan 28, 2020
d04991c
PYFW-401: Mutex of LFS can be locked in wlan_read_file or mod_ssl_rea…
geza-pycom Jan 28, 2020
fbdb44d
PYFW-402: wlan_do_connect() allocates memory while GIL is not locked
geza-pycom Jan 28, 2020
e51543b
PYFW-404: bt_connect_helper() uses MicroPython functions outside of GIL
geza-pycom Jan 28, 2020
492ffd9
PYFW-405: lte_send_at_cmd() uses MicroPython functions outside of GIL
geza-pycom Jan 28, 2020
beebc21
refactor lte_add_band() out of lte_attach()
peter-pycom Feb 4, 2020
150611f
add bands=() parameter to lte.attach()
peter-pycom Feb 4, 2020
01de258
Merge pull request #83 from husigeza/GIL_fixes
geza-pycom Feb 4, 2020
35d737f
PYFW-391: ESP-IDF 3.3.1 support (#86)
geza-pycom Feb 4, 2020
66d7dcd
Add pybytes_on_boot functionality (#87)
Xykon Feb 4, 2020
16ce927
Merge pull request #84 from doniks/lte-multiple-bands-again
Xykon Feb 4, 2020
a356ce7
Update pycom_version.h
Xykon Feb 4, 2020
e5f77ab
MicroPython release 1.20.2.rc2 based on Espressif IDF 3.3.1 (#394)
Xykon Feb 4, 2020
605f40f
Update Copyright to 2020
Xykon Feb 4, 2020
24b1585
Create _main_pybytes.py
Xykon Feb 5, 2020
2a5b469
Update mptask.c
Xykon Feb 5, 2020
2037465
Update pycom_version.h
Xykon Feb 5, 2020
45c4822
Merge branch 'master' into Dev
Xykon Feb 6, 2020
b3d3ea5
Merge pull request #88 from pycom/Dev
doniks Feb 6, 2020
09d3ee1
Update pycom_version.h
Xykon Feb 9, 2020
ef3384e
Added interface to save and resume SSL sessions
DvdGiessen Jan 28, 2020
3bcb37d
Added typechecks, copyright updated to 2020
knagymate Feb 10, 2020
6b9c880
Merge pull request #89 from husigeza/PR390
geza-pycom Feb 14, 2020
1d3ad0e
Implemented configuration options for BLE security
geza-pycom Feb 14, 2020
1de0f9b
Sigfox: finalizing certification RCZ1, 2, 4
peter-pycom Feb 19, 2020
84b9fd1
Merge pull request #93 from pycom/sigfox_cert_ready
doniks Feb 20, 2020
f2db523
protect sigfox private key
peter-pycom Feb 21, 2020
68c3374
raise exception if NV writing failed
peter-pycom Feb 24, 2020
ac40811
Ignore Visual Studio Code project files
peter-pycom Feb 24, 2020
cfe72ee
add Troubleshooting (#91)
doniks Feb 24, 2020
bc2d085
Merge pull request #94 from pycom/sigfox_private_key
peter-pycom Feb 24, 2020
5df479c
IDF 3.3.1 compiler update
Xykon Feb 26, 2020
b8f24a8
Update sqnsupgrade.py
Xykon Feb 26, 2020
68d2608
Update _pybytes_config.py
Xykon Feb 26, 2020
987adcf
Merge pull request #98 from pycom/1.22.0-98-g4638c4f-IDF-libs-libgcc.…
peter-pycom Feb 26, 2020
d38988a
Update pycom_version.h
Xykon Feb 26, 2020
a25a686
Merge pull request #99 from pycom/update_sqnsupgrade_for_release
peter-pycom Feb 26, 2020
bc41407
Merge pull request #100 from pycom/update_pybytes_for_release
peter-pycom Feb 26, 2020
3e69677
Merge pull request #101 from pycom/update_version
peter-pycom Feb 26, 2020
8d9faa6
Update IDF libraries
Xykon Feb 26, 2020
dddee59
Merge pull request #95 from pycom/ignore_vscode
peter-pycom Feb 27, 2020
77d25aa
Merge pull request #103 from pycom/update-idf-libs
Xykon Feb 27, 2020
237a8fe
sleep in main thread to yield
peter-pycom Feb 27, 2020
a7c6e2c
Update pyexec.c
Xykon Feb 27, 2020
bbf355d
Merge pull request #105 from pycom/fix_thread_tests
Xykon Feb 27, 2020
5c818cb
Fix double build frozen (#102)
peter-pycom Feb 27, 2020
9fb2548
default path and make executable (#104)
peter-pycom Feb 27, 2020
a0e3edd
Merge pull request #106 from pycom/allow_ctrl-d_when_pybytes_on_boot_…
peter-pycom Feb 28, 2020
88afbf5
update fw_updater to 6e96ea3
peter-pycom Feb 28, 2020
3e7e176
Merge pull request #108 from pycom/update_fwup
Xykon Feb 28, 2020
77b511a
Update updater.py and disable pybytes in Jenkins
peter-pycom Feb 28, 2020
a53e651
fix
peter-pycom Feb 28, 2020
07cde9e
Merge pull request #109 from pycom/update_fwup_and_Jenkins
peter-pycom Feb 28, 2020
867d922
1.20.2.rc6
peter-pycom Feb 28, 2020
e7f173a
Merge pull request #110 from pycom/rc6
peter-pycom Feb 28, 2020
01f49f7
Merge pull request #416 from pycom/rc6
Xykon Feb 28, 2020
1a12aed
Update pyexec.c
Xykon Mar 2, 2020
e4be1c6
Merge pull request #111 from pycom/forum_topic_5740
Xykon Mar 2, 2020
e264b4c
Update pyexec.c (#417)
Xykon Mar 3, 2020
618f71d
Fix core panics: Don't use m_malloc and gc_malloc unintended
amotl Nov 14, 2019
f92bba0
LTE: add debug flag
peter-pycom Mar 16, 2020
69ac2af
Merge pull request #112 from pycom/lte_debug
peter-pycom Mar 17, 2020
ff53818
Update get_idf_libs.py
Xykon Mar 17, 2020
20cc45c
Merge pull request #113 from pycom/secure_boot_fix_sdkconfig_copy
Xykon Mar 17, 2020
454c76a
add strlen_const() and sprint_binary_u8()
peter-pycom Mar 20, 2020
85007f9
LTE: add PSM Power Saving Mode
peter-pycom Mar 20, 2020
82c17cb
LTE: init() more expressive exceptions
peter-pycom Mar 20, 2020
d85d1f2
LTE: allow lte_debug to be toggled
peter-pycom Mar 20, 2020
0cdc8e8
LTE: psm not possible inppp
peter-pycom Mar 20, 2020
684d948
Merge pull request #114 from pycom/lte_psm_three
peter-pycom Mar 25, 2020
97620ae
assert the layout of the config block
peter-pycom Mar 20, 2020
873040c
document the pycom_config_block_t layout
peter-pycom Mar 20, 2020
92ffa59
LTE debug: print milliseconds spent
peter-pycom Mar 26, 2020
3764541
lte_disconnect(): give ATH time to complete
peter-pycom Mar 26, 2020
89b5292
lte_disconnect(): wait less
peter-pycom Mar 26, 2020
5b5b0d9
check IDF git hash
peter-pycom Apr 6, 2020
36d934d
make: improve instructions for IDF_HASH mismatch
peter-pycom Apr 8, 2020
0d6c8bb
Merge pull request #117 from pycom/idf_ver_check
peter-pycom Apr 8, 2020
435d6f2
Merge pull request #116 from pycom/lte_misc
peter-pycom Apr 22, 2020
6621135
[pybytes] updated to v1.4.0 (pymesh integration and coap client)
May 4, 2020
9283f1d
Update version number to 1.20.2.rc7
peter-pycom May 4, 2020
f928e5f
Merge pull request #120 from pycom/pyb_1.4.0
peter-pycom May 4, 2020
64cdc1a
Merge pull request #121 from pycom/v1.20.2.rc7
peter-pycom May 4, 2020
325f89c
Merge pull request #122 from pycom/Dev
peter-pycom May 4, 2020
c4948da
Merge pull request #441 from pycom/release_rc7_again
Xykon May 4, 2020
766b304
Update _pybytes.py
Xykon May 4, 2020
6d01270
Merge pull request #442 from pycom/release_hotfix_for_PR441
Xykon May 4, 2020
8495c7d
Fixed memory allocations in LittleFS files.
salal-m May 6, 2020
669dfe2
Updated mem free in socketfifo.c required for last commit's changes i…
salal-m May 7, 2020
6cb700a
Fixed memory allocations in Pycom Modules files
salal-m May 7, 2020
25183fb
Re-added the indentations to signify the code blocks under mutex lock.
salal-m May 8, 2020
a106cb4
Added a check before accessing the IP Address in the MDNS query respo…
salal-m May 8, 2020
8e08fab
Replaced heap_caps_malloc/free with malloc/free.
salal-m May 8, 2020
f58301e
Merge pull request #123 from pycom/pr418
May 18, 2020
5a6aa0a
PyJTAG: LTE uart 1
peter-pycom May 19, 2020
71354b9
Merge pull request #124 from pycom/pyjtag_lte
peter-pycom May 19, 2020
ba5b4f1
sigfox: fix commit hash (#125)
peter-pycom May 25, 2020
79ee9bf
Merge pull request #115 from pycom/pybytes_config_block
peter-pycom May 25, 2020
6cc3aff
Fix an issue in wrap_socket() results exception when no certificate v…
geza-pycom May 31, 2020
36b44d3
Merge pull request #126 from geza-pycom/SSL_no_verification
Jun 2, 2020
b74db42
Fix integer overflow in filesystem stat implementation. Resolve #409.…
geza-pycom Jun 10, 2020
669d1e3
add wlan_ap_tcpip_sta_list function that lists the connected devices …
geza-pycom Jun 10, 2020
73f0021
HTTP/S Server/Client Module (#118)
mate-pycom Jun 10, 2020
c9b534a
update idf hash (#130)
peter-pycom Jun 10, 2020
29d8021
Revert "update idf hash (#130)"
peter-pycom Jun 10, 2020
7f84b9c
Revert "HTTP/S Server/Client Module (#118)"
peter-pycom Jun 10, 2020
2186b33
idf 6ec081c (#132)
peter-pycom Jun 10, 2020
9f6e28e
Update pybytes to 1.5.0 (#133)
Xykon Jun 10, 2020
63d7be9
v1.20.2.rc9 (#135)
peter-pycom Jun 10, 2020
38d9cc7
Merge remote-tracking branch 'pycom-public/Dev'
peter-pycom Jun 10, 2020
1a257d8
Merge pull request #456 from pycom/v1.20.2.rc9_Dev_againagain
Xykon Jun 10, 2020
d14a92c
Jenkins: remove --depth=1
peter-pycom Jun 23, 2020
57b8aab
Jenkins: use IDF_HASH
peter-pycom Jun 23, 2020
3c72da7
Add support for EU433 region
Xykon Jun 25, 2020
221fdfa
pybytes 1.5.1
peter-pycom Jun 26, 2020
a159dee
rc10
peter-pycom Jun 26, 2020
5fade12
Update updater.py (#466)
Xykon Aug 4, 2020
a2a47c8
Update updater.py
Xykon Aug 4, 2020
8712a04
Merge pull request #469 from pycom/updater_update2
Xykon Aug 4, 2020
692f194
update version to 1.20.2.r0
peter-pycom Aug 6, 2020
f2e04fb
Merge pull request #472 from pycom/release_v1.20.2.r0
Xykon Aug 6, 2020
783192e
Merge branch 'Release/v1.20' into Dev
Xykon Aug 6, 2020
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ user.props
.pydevproject
.settings
.launch
.vscode

# Key files (for Flash Encryption and Secure Boot)
secure_boot_signing_key.pem
Expand Down
17 changes: 14 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,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 Down Expand Up @@ -85,7 +90,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 +120,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
15 changes: 15 additions & 0 deletions docs/library/ussl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ network sockets, both client-side and server-side.

SSL sockets inherit all methods and from the standard sockets, see the :mod:`usocket` module.

.. function:: ssl.save_session(sock)

Takes an instance sock of ssl.SSLSocket, and returns an instance of ssl.SSLSession representing saved session data from the socket, which can be used to resume a SSL session later. Example::

import socket
import ssl
addr = socket.getaddrinfo('www.google.com', 443)[0][-1]
sock_one = ssl.wrap_socket(socket.socket())
sock_one.connect(addr) # performs a full ssl handshake
session = ssl.save_session(sock_one)
sock_one.close()
sock_one = None
sock_two = ssl.wrap_socket(socket.socket(), saved_session=session)
sock_two.connect(addr) # resumes using saved session, resulting in a faster handshake

Exceptions
----------

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) 2019, Pycom Limited.
Copyright (c) 2020, 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 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) 2019, Pycom Limited and its licensors.
* Copyright (c) 2020, 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 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) 2019, Pycom Limited and its licensors.
* Copyright (c) 2020, 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
21 changes: 7 additions & 14 deletions esp32/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright © 2019, Pycom Limited.
# Copyright © 2020, Pycom Limited.
#
# This software is licensed under the GNU GPL version 3 or any
# later version, with permitted additional terms. For more information
Expand All @@ -14,7 +14,7 @@ ifeq ($(wildcard boards/$(BOARD)/.),)
$(error Invalid BOARD specified)
endif

IDF_VERSION=3.2
IDF_HASH=6ec081c

TARGET ?= boot_app

Expand Down Expand Up @@ -103,17 +103,10 @@ LIBS = -L$(ESP_IDF_COMP_PATH)/esp32/lib -L$(ESP_IDF_COMP_PATH)/esp32/ld -L$(ESP_
$(ESP_IDF_COMP_PATH)/newlib/lib/libc-psram-workaround.a \
-lfreertos -ljson -ljsmn -llwip -lnewlib -lvfs -lopenssl -lmbedtls -lwpa_supplicant \
-lxtensa-debug-module -lbt -lsdmmc -lsoc -lheap -lbootloader_support -lmicro-ecc \
-u ld_include_panic_highint_hdl -lsmartconfig_ack -lmesh -lesp_ringbuf -lcoap -lmdns
ifeq ($(BOARD), $(filter $(BOARD), FIPY))
LIBS += sigfox/modsigfox_fipy.a
endif

ifeq ($(BOARD), $(filter $(BOARD), LOPY4))
LIBS += sigfox/modsigfox_lopy4.a
endif

ifeq ($(BOARD), $(filter $(BOARD), SIPY))
LIBS += sigfox/modsigfox_sipy.a
-u ld_include_panic_highint_hdl -lsmartconfig_ack -lmesh -lesp_ringbuf -lcoap -lmdns -lefuse -lespcoredump -lapp_update
ifeq ($(BOARD), $(filter $(BOARD), SIPY LOPY4 FIPY))
LIBS += sigfox/modsigfox_$(BOARD).a
$(BUILD)/application.elf: sigfox/modsigfox_$(BOARD).a
endif

ifeq ($(OPENTHREAD), on)
Expand All @@ -134,7 +127,7 @@ endif #ifeq ($(LTE_LOG_BUFF),1)

B_LIBS = -Lbootloader/lib -Lbootloader -L$(BUILD)/bootloader -L$(ESP_IDF_COMP_PATH)/esp32/ld \
-L$(ESP_IDF_COMP_PATH)/esp32/lib -llog -lcore -lbootloader_support \
-lspi_flash -lsoc -lmicro-ecc -lgcc -lstdc++ -lgcov
-lspi_flash -lsoc -lmicro-ecc -lgcc -lstdc++ -lgcov -lefuse

# objcopy paramters, to transform a binary file into an object file
OBJCOPY_EMBED_ARGS = --input-target binary --output-target elf32-xtensa-le --binary-architecture xtensa --rename-section .data=.rodata.embedded
Expand Down
96 changes: 96 additions & 0 deletions esp32/PyJTAG/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Short readme for how to use the PyJTAG

## Setup
Generally follow these rules to setup JTAG debugging on your OS: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html

Download link for OpenOCD for ESP32 from Espressif: https://github.com/espressif/openocd-esp32/releases


## Build the firmware
Create the firmware with `BTYPE=debug` flag.

Note: Do not use the default pins assigned to UART, SPI, CAN because they are used by the JTAG. Pins not to be used: P4, P9, P10, P23.

## Setup the PyJTAG board

PyJTAG's switches:
* ESP32 JTAG: all turned ON
* ESP32 B.LOADER: all turned ON except SAFE_BOOT_SW which is OFF
* TO LTE UART 1/2: does not matter
* CURRENT SHUNTS: connected

Place the Pycom board with the reset button towards the Current Shunts. Now connect the PyJTAG via usb. You will see four new USB devices. On Linux this will look like this:
```
$ lsusb -d 0403:
Bus 001 Device 010: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
$ ls /dev/ttyUSB?
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
```

## Start OCD

Go to `esp32` folder in Firmware-Development repository and run:
```
PATH_TO_OPENOCD/bin/openocd -s PATH_TO_OPENOCD/share/openocd/scripts -s PyJTAG -f PyJTAG/interface/ftdi/esp32-pycom.cfg -f PyJTAG/board/esp32-pycom.cfg
```

Output should be like:
```
Open On-Chip Debugger v0.10.0-esp32-20191114 (2019-11-14-14:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: type 'esp32' is missing virt2phys
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : Listening on port 3333 for gdb connections
```

## Start GDB

When OpenOCD is running, start GDB from `esp32` folder. Assuming you have a FIPY:
```
xtensa-esp32-elf-gdb -x PyJTAG/gdbinit build/FIPY/debug/application.elf
```

In `PyJTAG/gdbinit` a breakpoint is configured at `TASK_Micropython`, so execution should stop there first:

```
Thread 1 hit Temporary breakpoint 1, TASK_Micropython (pvParameters=0x0) at mptask.c:136
```


## REPL

Connect to `/dev/ttyUSB2` to reach the REPL terminal over usb serial. E.g. using pymakr in Atom.

## Troubleshooting
If openocd says "Error: Connect failed", try to close gdb and openocd and start over.

If `/dev/ttyUSB0` doesn't show up or disappears, disconnect the PyJTAG board, reconnect and start over.

It can be advisable to use the `gdb` from the latest xtensa toolchain, even if an earlier version is used to build the firmware.

If `gdb` does not reach the `Thread 1 hit Temporary breakpoint ...` line, close and reopen `gdb`.


## Versions
There are two generations of PyJTAG boards:

1) First generation with green PCB has three blocks of switches. (Make sure SAFE_BOOT_SW is off.)
2) Second generation with black PCB and two blocks of switches.

Both generation boards can be equipped with pogo pins that connect to the bottom of the development board and allow LTE debugging. There can either be pins that connect to a GPy or pins that conenct to a FiPy.

To reach the modem UART connect to `/dev/ttyUSB1`.

## Extra
A few more details are here: https://pycomiot.atlassian.net/wiki/spaces/FIR/pages/966295564/Usage+of+PyJTAG

2 changes: 2 additions & 0 deletions esp32/PyJTAG/board/esp32-pycom.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set ESP32_FLASH_VOLTAGE 3.3
source [find target/esp32-pycom.cfg]
5 changes: 5 additions & 0 deletions esp32/PyJTAG/gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target remote :3333
mon reset halt
flushregs
thb TASK_Micropython
c
35 changes: 35 additions & 0 deletions esp32/PyJTAG/interface/ftdi/esp32-pycom.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Driver for the FT4232HL JTAG chip on the Pycom's PyJTAG board
#


interface ftdi
ftdi_vid_pid 0x0403 0x6011

# interface 1 is the uart
ftdi_channel 0

# TCK, TDI, TDO, TMS: ADBUS0-3
# LEDs: ACBUS4-7

ftdi_layout_init 0x0008 0xf00b
#ftdi_layout_signal LED -data 0x1000
#ftdi_layout_signal LED2 -data 0x2000
#ftdi_layout_signal LED3 -data 0x4000
#ftdi_layout_signal LED4 -data 0x8000

# ESP32 series chips do not have a TRST input, and the SRST line is connected
# to the EN pin.
# The target code doesn't handle SRST reset properly yet, so this is
# commented out:
# ftdi_layout_signal nSRST -oe 0x0020

reset_config none

# 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
69 changes: 69 additions & 0 deletions esp32/PyJTAG/target/esp32-pycom.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# The ESP32 only supports JTAG.
transport select jtag

# Source the ESP common configuration file
source [find target/esp_common.cfg]

if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME esp32
}

if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x120034e5
}

if { [info exists ESP32_ONLYCPU] } {
set _ONLYCPU $ESP32_ONLYCPU
} else {
set _ONLYCPU 3
}

if { [info exists ESP32_FLASH_VOLTAGE] } {
set _FLASH_VOLTAGE $ESP32_FLASH_VOLTAGE
} else {
set _FLASH_VOLTAGE 3.3
}

set _TARGETNAME $_CHIPNAME
set _CPU0NAME cpu0
set _CPU1NAME cpu1
set _TAPNAME $_CHIPNAME.$_CPU0NAME

jtag newtap $_CHIPNAME $_CPU0NAME -irlen 5 -expected-id $_CPUTAPID
if { $_ONLYCPU != 1 } {
jtag newtap $_CHIPNAME $_CPU1NAME -irlen 5 -expected-id $_CPUTAPID
} else {
jtag newtap $_CHIPNAME $_CPU1NAME -irlen 5 -disable -expected-id $_CPUTAPID
}

if { $_RTOS == "none" } {
target create $_TARGETNAME esp32 -endian little -chain-position $_TAPNAME
} else {
target create $_TARGETNAME esp32 -endian little -chain-position $_TAPNAME -rtos $_RTOS
}

configure_esp_workarea $_TARGETNAME 0x40090000 0x3400 0x3FFC0000 0x6000
configure_esp_flash_bank $_TARGETNAME $_TARGETNAME $_FLASH_SIZE

esp32 flashbootstrap $_FLASH_VOLTAGE
esp32 maskisr on
if { $_SEMIHOST_BASEDIR != "" } {
esp32 semihost_basedir $_SEMIHOST_BASEDIR
}
if { $_FLASH_SIZE == 0 } {
gdb_breakpoint_override hard
}

# special function to program ESP32, it differs from the original 'program' that
# it verifies written image by reading flash directly, instead of reading memory mapped flash regions
proc program_esp32 {filename args} {
program_esp $filename $args
}

add_help_text program_esp32 "write an image to flash, address is only required for binary images. verify, reset, exit are optional"
add_usage_text program_esp32 "<filename> \[address\] \[verify\] \[reset\] \[exit\]"

Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy