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

Avram add speedup lora flashlora bug fix timeralarm sleep rgb persistent #587

Open
wants to merge 255 commits into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
255 commits
Select commit Hold shift + click to select a range
b425cde
Bootloader being built - not verified from functional point of view
geza-pycom Feb 19, 2020
6347305
Copy compilation issues in application. SMART CONFIG and Coap is disa…
geza-pycom Mar 1, 2020
e3e2a87
Update old libraries, secured boot turned OFF, legacy include turned off
geza-pycom Mar 1, 2020
f55ff96
Add necessary libraries, there is still 1 linking issue
geza-pycom Mar 1, 2020
38a836c
Still the same linking issue...
geza-pycom Mar 3, 2020
338762c
It builds and links, but does not boot when flashed...
geza-pycom Mar 4, 2020
55d8108
Using ESP-IDF Bootloader boots, but drops an error (invalid magic byt…
geza-pycom Mar 7, 2020
13051dc
Make it work when built with DEBUG mode
geza-pycom Mar 25, 2020
158184b
Espressif bootloader modified with Pycom bootloader, it works
geza-pycom Mar 25, 2020
fb3d1a0
Added bootmgr and mperror also to esp-idf
geza-pycom Mar 27, 2020
71f57f9
Remove bootloader.h, using pycom_bootloader.h from pycom-esp-idf
geza-pycom Mar 29, 2020
66b18c7
Update get_idf_libs.py and Makefile to copy libc and libm from xtensa…
geza-pycom Mar 29, 2020
c932c55
Add xtensa version checker
geza-pycom Mar 29, 2020
bcfb57f
Use the local esp32_out and esp32.project linker scripts, not from idf
geza-pycom Mar 29, 2020
5898b32
Link gcc, stdc++ also from the Toolchain
geza-pycom Mar 29, 2020
fb42661
Fix when building firmware for WIPY
geza-pycom Apr 2, 2020
e81fee6
Change to toolchain 2020r1 and update libraries as per pycom-esp-idf …
geza-pycom Apr 21, 2020
d3a1e75
Update libraries as per pycom-esp-idf commit: "Generate partition tab…
geza-pycom Apr 22, 2020
5d0e92c
Revert back modification in partitions_8MB.csv in size of otadata
geza-pycom Apr 30, 2020
ee1aa71
Make modcoap work with esp-idf 4.0
geza-pycom Apr 26, 2020
491b2f5
Temporary replacing spi_flash_read_encrypted() with simple spi_flash_…
geza-pycom May 13, 2020
bf69009
Change Makefile to support PYBYTES build
geza-pycom May 23, 2020
b250369
Fix an issue with the socket settimeout function appeared on 2019r2 a…
geza-pycom May 23, 2020
45f913a
Make SmartConfig related functionalities work with ESP-IDF 4.0
geza-pycom May 23, 2020
a074e87
Replace spi_flash_read/write_encrypted to spi_flash_read/write at all…
geza-pycom May 26, 2020
f2c0efa
Fixing compilation issue when compiling for WIPY, GPY and LOPY
geza-pycom Jun 3, 2020
67808c2
Remove leftover comment and printf from modcoap
geza-pycom Jun 3, 2020
47e7683
Update libraries after pycom-esp-idf commit: "Turn on CONFIG_SPI_FLAS…
geza-pycom Jun 14, 2020
24c4d0e
Disable calling mperror_init0() because it causes lockup due to inter…
geza-pycom Jun 14, 2020
b7738be
Updated libraries when BLE_Mesh is enabled with default parameters
geza-pycom Mar 29, 2020
067f3d9
Adding BLE_Mesh module in a new file, submodule of Bluetooth
geza-pycom Mar 31, 2020
6775c3b
Update libraries after BLE Mesh Node and Provision is enabled in esp-idf
geza-pycom Apr 1, 2020
948223d
Add first piece of code - not tested, not executed
geza-pycom Apr 1, 2020
bc88cdd
Start adding APIs for creating new models
geza-pycom Apr 2, 2020
996f885
Removing compiler flag -Wpointer_arith, adding mod_ble_mesh_add_model…
geza-pycom Apr 2, 2020
f1b064c
Separating Elements and Models into different classes, adding callbac…
geza-pycom Apr 4, 2020
2d8d4c1
BLE Mesh app provision required modifications - sdkconfig
mate-pycom Apr 4, 2020
b07dd2b
Added node_prov, and nRF Mesh support
mate-pycom Apr 5, 2020
039c092
removed unused includes
mate-pycom Apr 5, 2020
6b861b9
Correct some piece of code which have been incorrectly changed and ap…
geza-pycom Apr 5, 2020
274ff5a
Update libraries after Provisioner mode is disabled in esp-idf
geza-pycom Apr 5, 2020
0f5d946
upgrade create_element
mate-pycom Apr 5, 2020
7032a20
composition_ptr restored + rename MOD_PROV constants
mate-pycom Apr 5, 2020
8076027
Correct that new element was not appended to Models list
geza-pycom Apr 5, 2020
85f2675
Prototype for handling Generic ON OFF Server
geza-pycom Apr 5, 2020
732f341
OOB authentication feature + node prov bugfix
mate-pycom Apr 6, 2020
36192cf
Added Generic Level Server Model
mate-pycom Apr 6, 2020
10662ff
fixed wrong function name
mate-pycom Apr 6, 2020
c4b5ea0
Node provision info delete and Node name API's are added
mate-pycom Apr 7, 2020
23dc630
Modify STATE, SET and GET event handling to be generic to avoid code …
geza-pycom Apr 7, 2020
df6cf0e
Small cosmetic change
geza-pycom Apr 7, 2020
48cd5d8
Correct entry of DELTA in generic_type_and_size_table
geza-pycom Apr 7, 2020
e3a3994
Input OOB support + heap_caps_free + PROV defines refactor
mate-pycom Apr 8, 2020
95c1fd3
Rename default BLE Mesh device name
geza-pycom Apr 10, 2020
271438f
Correct crash after Client Model is added, added basics of Client's c…
geza-pycom Apr 10, 2020
c80f08a
Add set_state() to Model
geza-pycom Apr 10, 2020
c8788b7
Client publish feature
mate-pycom Apr 11, 2020
303cb53
Add value() to Models
geza-pycom Apr 12, 2020
aea6690
Add basics of get_state, does not work
geza-pycom Apr 14, 2020
2e5e9b2
Turn off support for Friend and LowPower features
mate-pycom Apr 14, 2020
a6ea015
Quick fix for Client crash issue
mate-pycom Apr 16, 2020
e04d8b9
Correct memory allocation in add_model() to correct the crash and rev…
geza-pycom Apr 16, 2020
ed9e794
Correct helper table, remove not needed comments
geza-pycom Apr 15, 2020
5b1478a
Fix for sending 2 publication message for the same change and fix for…
geza-pycom Apr 19, 2020
bc3c3b8
Added Basic Sensor Models + Provision stage callback
mate-pycom May 6, 2020
ff7142b
Rebase to correct 4.0 Firmware-Development
mate-pycom May 6, 2020
0a160dd
Fixed "not defined callback" crash issue
mate-pycom May 7, 2020
f28f536
Added multiple sensor support
mate-pycom May 27, 2020
33aa5b1
Sensor State Class + rename + nvs_flash_init()
mate-pycom Jun 1, 2020
d863384
new_state, addr, typ, prop_id callback args + bugfixes
mate-pycom Jun 2, 2020
c83737d
Update libraries after pycom-esp-idf commit: "Merge branch 'idf_v4.0_…
geza-pycom Jun 14, 2020
c0d8cb1
Update libraries after rebase and set correct pycom-esp-idf hash
geza-pycom Jun 14, 2020
926970e
Correct the modified modcoap's memory allocation functions
geza-pycom Jun 14, 2020
b732e85
Update Makefile to use correct pycom-esp-idf hash
geza-pycom Jun 14, 2020
0698e11
LoRaMac version update.
salal-m Jun 15, 2020
2e9e7ef
Added the additional region files in makefile.
salal-m Jun 15, 2020
77e82b3
Eliminated warnings
mate-pycom Jun 16, 2020
7df7ddb
Re-enable mperror_init0() as it no longer causes issue after OTA
geza-pycom Jun 17, 2020
10a9a2d
Update to toolchain version 2020r2
geza-pycom Jun 17, 2020
3b46f29
Modify Makefile to use some libraries from the Toolchain and not from…
geza-pycom Jun 17, 2020
78626a2
LoRa init parameters updated.
salal-m Jun 18, 2020
d4f2680
Updated IDF_HASH in Makefile
salal-m Jun 18, 2020
43f918a
Removed the unused RtcOverflowIrq handler
salal-m Jun 22, 2020
3725989
Merge branch 'support_idf_v4.0' into lora_version_update_idfv4
salal-m Jun 23, 2020
cf9539f
Added support for regions: EU433, CN779, RU864 and KR920.
salal-m Jun 29, 2020
acd57ee
Merge pull request #149 from pycom/lora_version_update_idfv4
Jun 29, 2020
6be24e8
Jenkins: remove --depth=1
peter-pycom Jun 23, 2020
ada2773
Jenkins: use IDF_HASH
peter-pycom Jun 23, 2020
12e87db
Jenkins: use xtensa 2020r2 toolchain
peter-pycom Jun 29, 2020
08407cc
build: more verbose xtensa check
peter-pycom Jun 29, 2020
dfea1e2
Build fix for LOPY and FIPY (#152)
salal-m Jun 29, 2020
e56554a
build: deprecate LoPy1 SiPy and WiPy2
peter-pycom Jun 29, 2020
0fb6444
make: be more verbose about size check
peter-pycom Jun 30, 2020
f3b0f79
Remove libraries not needed by anyone
peter-pycom Jun 30, 2020
d5da935
remove Sequans upgrade
peter-pycom Jun 30, 2020
588f197
Added build flag for MDNS module
mate-pycom Jun 18, 2020
216fd96
IDF: 05cbe2ba2
peter-pycom Jun 30, 2020
f048d92
build: git clean submodules after checking out idf
peter-pycom Jul 1, 2020
77af492
update fw_updater: 1.16.4 23bb839
peter-pycom Jul 1, 2020
d0db153
version alpha 1
peter-pycom Jun 30, 2020
db33be7
fix version number: 1.20.3.b0
peter-pycom Jul 1, 2020
64f2a7a
Update sigfox libraries to be compliant with esp-idf 4.0 and recompil…
geza-pycom Jul 28, 2020
e66d090
Force link dport_panic_panic_highint_hdl.S file to solve the DPORT co…
geza-pycom Sep 15, 2020
1b9b37a
Update to support esp-idf v4.1
geza-pycom Aug 30, 2020
66f2f86
Update lteppp.c and modlte.c to eliminate compilation warnings
geza-pycom Sep 19, 2020
9056c71
Update modwlan.c to use the new event loop functions from esp-idf 4.1
geza-pycom Sep 19, 2020
7a452ef
Update modwlan to use the esp_netif interface
geza-pycom Sep 19, 2020
72dea8c
Update to MicroPython 1.12
geza-pycom Sep 22, 2020
3f56388
Fix a crash when wlan.ifconfig() is called with an ID belongs to an i…
geza-pycom Sep 22, 2020
38454ae
Switch to Toolchain 2020r3 and update esp-idf libraries compiled with…
geza-pycom Sep 22, 2020
c7e9c1a
Recompile sigfox libraries with Toolchain 2020r3
geza-pycom Sep 22, 2020
469df67
Merge branch 'master' into master_idf_v4.1_merge_master
geza-pycom Sep 27, 2020
019facb
Update libraries to be sure they are correct
geza-pycom Sep 27, 2020
87ca0c4
Update bootloader for the "differential OTA update" feature
geza-pycom Sep 27, 2020
b9d5dcd
Extra changes needed after the merge
geza-pycom Sep 27, 2020
c2d5cd3
Make modeth.c compilable and update libraries because support for leg…
geza-pycom Sep 27, 2020
a2c9dc2
Remove remaining files from docs folder (except README.md)
geza-pycom Sep 27, 2020
8e0bfca
Remove LTE folder from Frozen module builder script
geza-pycom Sep 27, 2020
c5d59c7
Cosmetic changes in the Makefile and application.mk
geza-pycom Sep 27, 2020
c47c34a
Correct Makefile for Differential Update feature
geza-pycom Sep 27, 2020
d4b47f6
Fixing crash which happens when FW is built in DEBUG mode as in DEBUG…
geza-pycom Sep 29, 2020
fe4ce76
Sync the non Pycom specific drivers
geza-pycom Sep 30, 2020
0d023cb
Sync examples folder, not used by Pycom
geza-pycom Sep 30, 2020
557cadd
Sync mpy-cross folder
geza-pycom Sep 30, 2020
96a1269
Sync ports folder, not used by Pycom
geza-pycom Sep 30, 2020
4340ed3
Update py folder - Pycom changes need to be added back
geza-pycom Sep 30, 2020
5587036
Update test folder, except esp32 tests - Pycom tests to be added back…
geza-pycom Sep 30, 2020
585c647
Sync tools folder
geza-pycom Sep 30, 2020
365eaa1
Update extmod - Pycom specific changes to be added back
geza-pycom Sep 30, 2020
123fbde
Update all submodules in lib folder
geza-pycom Sep 30, 2020
a6f7d6d
Update non submodules libs
geza-pycom Sep 30, 2020
eab18a9
Add back Pycom modifications
geza-pycom Sep 30, 2020
bbd431e
Update other files to be compatible with MP 1.13
geza-pycom Sep 30, 2020
dfab136
Recompile and update sigfox libraries to use updated MP objects (no c…
geza-pycom Oct 3, 2020
bd05100
Merge branch 'FD_pycom/PYFW-423_idf_v4.1_MP_1.13' into master_idf_v4.1
geza-pycom Oct 3, 2020
251df1a
Update libraries and Makefile to support the CONFIG_SPIRAM_ALLOW_BSS_…
geza-pycom Oct 4, 2020
9401b3f
Fix a problem causing SmartConfig not work - still after reboot it do…
geza-pycom Oct 6, 2020
5739917
Move the esp_netif_init() call to a common location
geza-pycom Oct 7, 2020
bafa49b
Modify wlan_deinit to solve wifi on boot problem
geza-pycom Oct 13, 2020
930206b
Merge branch 'master' into master_idf_v4.1
geza-pycom Nov 3, 2020
10722c7
Update libraries as per "Disable CONFIG_GATTC_CACHE_NVS_FLASH because…
geza-pycom Nov 3, 2020
e3fb30a
Add modifications needed by esp_netif after machine.sleep() is called
geza-pycom Nov 3, 2020
d3bc38f
Add modification to modbt to solve problem during resume operation ap…
geza-pycom Nov 3, 2020
f943d71
Fix a crash when wlan_deinit() is called with NULL
geza-pycom Nov 10, 2020
4261c6e
[tfm] added tfmicro library from IDF
Jul 24, 2020
fa2c9a1
Add PybytesML
bogdan-XT Jul 29, 2020
0281787
[ml] updated tfmicro library and idf commit hash
Jul 29, 2020
85fca44
Update version of idf commit.
bogdan-XT Jul 30, 2020
668cd53
beta_release
Xykon Sep 28, 2020
46d8956
Enabled WDT bootloader and interrupt and BOD
Dec 21, 2020
97d2be4
Update libraries as per "Disable CONFIG_BOOTLOADER_WDT_DISABLE_IN_USE…
geza-pycom Dec 28, 2020
8382ce6
Code from the original PR - PR483 (extended with Pycom copyright info)
geza-pycom Dec 9, 2020
c572ee2
Modify implementation of the espnow module
geza-pycom Dec 28, 2020
c10aac7
Merge pull request #200 from geza-pycom/espnow
geza-pycom Dec 28, 2020
69e4b2a
Merge pull request #207 from pycom/master_idf_v4.1_ml_otalib
Xykon Dec 29, 2020
70fef9c
build: fix esp now path
peter-pycom Dec 30, 2020
7a0d209
build: terminate make when get_idf_libs fails
peter-pycom Dec 30, 2020
25a638a
Update _terminal.py
Xykon Nov 12, 2020
17ea79c
lorapf: add pygate_reset() to power cycle the module
peter-pycom Aug 27, 2020
dec5d5b
LTE: check for SIM card before attaching
peter-pycom Aug 26, 2020
399d12f
lorapf: fix warnings
peter-pycom Nov 6, 2020
58e7230
str_utils: add hexdump()
peter-pycom Nov 9, 2020
3539ac8
lte: debug MSG and state
peter-pycom Nov 9, 2020
413f883
lte: callback LTE_EVENT_BREAK
peter-pycom Nov 10, 2020
06c1930
modlte: improve exception texts
peter-pycom Nov 10, 2020
7f554d0
lte: reduce AT+CEREG from 2 to 1
peter-pycom Nov 11, 2020
a1bcd16
BLE update
Xykon Nov 6, 2020
84a3749
added micropython constant for manual antenna selection
gijsio Nov 27, 2020
edcea09
lte: fix core dump during machine.deepsleep()
peter-pycom Oct 22, 2020
558f842
build: cleanup sigfox flags
peter-pycom Dec 21, 2020
45cd580
lora buildflag and disable cleanly with pyeth
peter-pycom Dec 21, 2020
f2ca37f
lte: refactor lteppp_get_modem_conn_state()
peter-pycom Aug 28, 2020
d482f81
lte: detect modem in ffh/recovery mode
peter-pycom Aug 28, 2020
d28fb06
make pycom.rgbled() return the current color value
gijsio Sep 4, 2020
ddf3d87
Update Pybytes to version 1.6.1
Xykon Nov 23, 2020
bacb9f5
Update _pybytes_protocol.py
Xykon Nov 23, 2020
3f6d9a6
Fix an issue that Bluetooth init() failed after deinit()
geza-pycom Dec 28, 2020
c2cf09e
Add API create_128bit_le_uuid_from_string()
geza-pycom Oct 20, 2020
61606f0
build: MICROPY_FLOAT_IMPL
peter-pycom Dec 30, 2020
747ce2f
User C modules : enable in Makefile and application.mk
peter-pycom Dec 30, 2020
46b11da
update IDF 80e3a8e8a
peter-pycom Dec 30, 2020
31d44c3
Merge remote-tracking branch 'pycom/master' into master_idf_v4.1_merg…
peter-pycom Dec 30, 2020
1cb5892
Merge pull request #210 from pycom/master_idf_v4.1_merge_again2
peter-pycom Jan 4, 2021
e499f58
Adjust the maximum BLE GATT MTU size to a value allowed by ESP-IDF
geza-pycom Jan 7, 2021
516c094
Extend PUT handler to accept new resource creation requests
geza-pycom Jan 17, 2021
e899514
Add callback to be called when new resource is created via PUT, add r…
geza-pycom Jan 19, 2021
8bfbf1f
Correct types of mediatype and max_age, correct default value of medi…
geza-pycom Jan 19, 2021
4c43cc5
Fix problem in mod_coap_resource_callback_enable() which forbid to di…
geza-pycom Jan 19, 2021
e7f83a7
Add option to Coap.Init() to enable/disable dynamic memory allocation
geza-pycom Jan 20, 2021
e805c01
Fix an issue which results that ESP_ERR_ESPNOW_IF is dropped if WIFI …
geza-pycom Jan 27, 2021
63d9473
Fix a crash what happens when espnow.init() is called without previou…
geza-pycom Jan 27, 2021
f0ea30d
Revert "Remove LTE folder from Frozen module builder script"
peter-pycom Feb 3, 2021
dcb1a4e
Update libraries as per pycom-esp-idf commit: Enable DTSL support
geza-pycom Jan 24, 2021
61ffdba
Implement DTLS support in server mode with PSK
geza-pycom Jan 24, 2021
4c77653
Implement DTLS support in client mode with PSK
geza-pycom Jan 24, 2021
6f78fc3
Update libraries as per pycom-esp-idf commit: "Merge pull request #4 …
geza-pycom Feb 11, 2021
920d1c5
Update libraries as per pycom-esp-idf commit: "Enable Bluetooth modem…
geza-pycom Feb 11, 2021
bda8e5f
Update Makefile as per pycom-esp-idf commit: "Enable Bluetooth modem …
geza-pycom Feb 14, 2021
c96f427
Create separate partition csvs
geza-pycom Feb 14, 2021
1b57396
Update makefiles
geza-pycom Feb 14, 2021
cbff15d
Update makefiles and scripts
geza-pycom Feb 14, 2021
511c15f
Update libraries as per pycom-esp-idf commit: "Move some bootloader m…
geza-pycom Feb 14, 2021
d291019
Update scripts and makefile again
geza-pycom Feb 14, 2021
cb10f39
Adding TASK_MODCOAP as a replace for coap_read
geza-pycom Jan 31, 2021
0db5db8
Merge pull request #227 from geza-pycom/switchable_small_factory_fw
Xykon Feb 23, 2021
1de0363
Update Jenkinsfile and Makefile
Xykon Mar 2, 2021
fadeb36
Update Jenkinsfile
Xykon Mar 2, 2021
91f1e0e
fixed firmware image for L01 (as Lopy1 is not supported)
catalinio Mar 4, 2021
b719e70
4MB Flash boards are deprecated
catalinio Mar 4, 2021
6904824
Updated README.md for IDF v4.1
catalinio Mar 4, 2021
77446b8
Changed idf branch to /pycom-esp-idf/idf_v4.1_ml_ota
catalinio Mar 4, 2021
ea696eb
vfs_littlefs_file.c: Prevent double close of a file
robert-hh Jan 31, 2021
8455e6b
vfs_littlefs_file.c: Move tagging files as closed.
robert-hh Mar 4, 2021
5b04a5e
Adjust the fix so calling other file operations (e.g. write, read etc…
geza-pycom Mar 7, 2021
bd5d405
Adjust to be the same as FatFs
geza-pycom Mar 7, 2021
933b370
Add the modified functionality to the regression tests
geza-pycom Mar 7, 2021
9fd8921
Put RtcStopAlarm into IRAM to avoid crash when FS is being read/writt…
geza-pycom Mar 21, 2021
4166ff1
sflash_diskio_littlefs.c: Enable block level wear-leveling
robert-hh Jan 14, 2021
3825b84
sflash_diskio_littlefs.c: change block_cycles to 100
geza-pycom Mar 21, 2021
271d709
Put script file with name script_8MB into package regardless of small…
geza-pycom Apr 10, 2021
e6f4eb6
Correction for flashing via "make flash"
geza-pycom Apr 10, 2021
da8c822
mperror.c: Move noticing of the next heartbeat transition (#236)
geza-pycom Apr 10, 2021
9288a72
1.20.3.b3
peter-pycom Apr 12, 2021
92f2b22
Merge pull request #542 from pycom/master_idf_v4.1_b3
peter-pycom Apr 19, 2021
e6d9bd6
align to <latest> idf_v4.1
Jan 28, 2022
9c9dc8c
libs of <latest> idf_v4.1
Jan 28, 2022
d96b249
bug fix log in flash - int disabled during flash write
avram-pycom Jan 27, 2022
3d23c79
added rgbled_on_boot function to set persistent led color for heartbeat
May 11, 2021
1cdb9fa
typo fix
May 11, 2021
ed6dda7
added user message for failing set of heartbeat_on_boot
May 11, 2021
8ab71ac
code cleanup after review
May 11, 2021
f9fe634
machine.Timer.Alarm working over sleep periods
avram-pycom Dec 2, 2021
6379968
added function to config gpios to wake the core from light sleep
avram-pycom Dec 10, 2021
b0000d9
sleep_overlora added to machine - in devel version
avram-pycom Jan 3, 2022
6c89aea
code cleanup
avram-pycom Jan 4, 2022
a07d528
ifdef added to split for SX1272 and SX1276
avram-pycom Jan 4, 2022
dbb4ef0
tx + rx acceleration
avram-pycom Jan 6, 2022
f5e9c06
impossible mission
avram-pycom Jan 6, 2022
ac3940a
write 16 bits once
avram-pycom Jan 7, 2022
97b38a8
changes ported to 1272
avram-pycom Jan 7, 2022
12ad580
seems to work on LoPY4
avram-pycom Jan 11, 2022
88e34bf
bug fix
avram-pycom Jan 11, 2022
f89880c
spi msg len bug fixed by slower spi transfer
avram-pycom Jan 14, 2022
00b4055
speed optimizations
avram-pycom Jan 17, 2022
5fb9261
lora join fipy bug fix
avram-pycom Jan 19, 2022
4c5210e
sleep_overlora . order of operations for sleep was modified
avram-pycom Jan 24, 2022
f1ce7d4
bug fix soft timer
avram-pycom Jan 24, 2022
54f2c79
timer alarm compensation for sleep time
avram-pycom Jan 25, 2022
95b407c
sleep_overlora time limited by alarm + bug fix in rtc-board.c
avram-pycom Jan 25, 2022
3129aaf
code cleanup
Feb 1, 2022
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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
######################
esp32/build/
esp32/build-*/
esp32/factory_fw/binary/
mpy-cross/build/*
# This map file is generated here instead of the build folder...
mpy-cross/*.map
Expand Down
32 changes: 24 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
[submodule "lib/asf4"]
path = lib/asf4
url = https://github.com/adafruit/asf4
[submodule "lib/axtls"]
path = lib/axtls
url = https://github.com/pfalcon/axtls
branch = micropython
[submodule "lib/berkeley-db-1.xx"]
path = lib/berkeley-db-1.xx
url = https://github.com/pfalcon/berkeley-db-1.xx
[submodule "lib/btstack"]
path = lib/btstack
url = https://github.com/bluekitchen/btstack.git
[submodule "lib/libffi"]
path = lib/libffi
url = https://github.com/atgreen/libffi
[submodule "lib/lwip"]
path = lib/lwip
url = https://git.savannah.gnu.org/r/lwip.git
[submodule "lib/berkeley-db-1.xx"]
path = lib/berkeley-db-1.xx
url = https://github.com/pfalcon/berkeley-db-1.xx
[submodule "lib/stm32lib"]
path = lib/stm32lib
url = https://github.com/micropython/stm32lib
branch = work-F4-1.13.1+F7-1.5.0+L4-1.3.0
[submodule "lib/mbedtls"]
path = lib/mbedtls
url = https://github.com/ARMmbed/mbedtls.git
[submodule "lib/mynewt-nimble"]
path = lib/mynewt-nimble
url = https://github.com/apache/mynewt-nimble.git
[submodule "lib/nrfx"]
path = lib/nrfx
url = https://github.com/NordicSemiconductor/nrfx.git
[submodule "lib/nxp_driver"]
path = lib/nxp_driver
url = https://github.com/hathach/nxp_driver.git
[submodule "lib/stm32lib"]
path = lib/stm32lib
url = https://github.com/micropython/stm32lib
[submodule "lib/tinyusb"]
path = lib/tinyusb
url = https://github.com/hathach/tinyusb
11 changes: 6 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def buildVersion
def boards_to_build = ["WiPy", "LoPy", "SiPy", "GPy", "FiPy", "LoPy4"]
def boards_to_build = ["WiPy", "LoPy", "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"]
Expand All @@ -12,11 +12,12 @@ node {
stage('Checkout') {
checkout scm
sh 'rm -rf esp-idf'
sh 'git clone --recursive -b idf_v3.3.1 https://github.com/pycom/pycom-esp-idf.git esp-idf'
sh 'git clone --recursive -b idf_v4.1 git@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'
sh 'git clean -d -f -f'
}
}

Expand Down Expand Up @@ -84,13 +85,13 @@ for (variant in variants_to_build) {
def boardBuild(name, variant, open_thread) {
return {
release_dir = "${JENKINS_HOME}/release/${JOB_NAME}/" + PYCOM_VERSION + "/" + GIT_TAG + "/"
sh '''export PATH=$PATH:/opt/xtensa-esp32-elf/bin;
sh '''export PATH=$PATH:/opt/2020r3/xtensa-esp32-elf/bin/;
export IDF_PATH=${WORKSPACE}/esp-idf;
make -C esp32 clean BOARD=''' + name.toUpperCase() + ' VARIANT=' + variant
sh '''export PATH=$PATH:/opt/xtensa-esp32-elf/bin;
sh '''export PATH=$PATH:/opt/2020r3/xtensa-esp32-elf/bin/;
export IDF_PATH=${WORKSPACE}/esp-idf;
make -C esp32 -j2 release BOARD=''' + name.toUpperCase() + ' VARIANT=' + variant + ' OPENTHREAD=' + open_thread
sh 'mkdir -p ' + release_dir + variant + '/'
sh 'mkdir -p ' + release_dir + variant + '/'
sh 'cp esp32/build-' + variant + '/' + name + '-' + PYCOM_VERSION + '.tar.gz ' + release_dir + variant + '/'
sh 'mv esp32/build-' + variant + '/' + name.toUpperCase() + '/release/application.elf ' + release_dir + variant + '/' + name + "-" + PYCOM_VERSION + '-application.elf'
}
Expand Down
103 changes: 13 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MicroPython project
=======================
<p align="center">
<img src="https://raw.githubusercontent.com/pycom/LoPy/master/images/LopySide.jpg" alt="The LoPy"/>
<img src="https://pycom.io/wp-content/uploads/2018/08/fipySide.png" alt="The FiPy"/>
</p>

This is the MicroPython project, which aims to put an implementation
Expand Down Expand Up @@ -41,7 +41,7 @@ Additional components:
The subdirectories above may include READMEs with additional info.

"make" is used to build the components, or "gmake" on BSD-based systems.
You will also need bash and Python (at least 2.7 or 3.3).
You will also need bash and Python 3.

The ESP32 version
-----------------
Expand All @@ -51,15 +51,16 @@ the Espressif website:

- for 64-bit Linux::

https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz

- for 32-bit Linux::

https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-80-g6c4433a-5.2.0.tar.gz
https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-i686.tar.gz

- for Mac OS:

https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz
https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-macos.tar.gz


To use it, you will need to update your ``PATH`` environment variable in ``~/.bash_profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.bash_profile`` file::

Expand All @@ -74,7 +75,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.3.1 https://github.com/pycom/pycom-esp-idf.git
$ git clone --recursive -b idf_v4.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 Expand Up @@ -128,8 +129,7 @@ By default, both bootloader and application are built. To build them separately:

$ cd esp32
$ make clean
$ make TARGET=boot
$ make TARGET=app
$ make release
$ make flash

You can change the board type by using the BOARD variable:
Expand All @@ -141,7 +141,7 @@ You can change the board type by using the BOARD variable:

We currently support the following BOARD types:

WIPY LOPY SIPY GPY FIPY LOPY4
WIPY LOPY GPY FIPY LOPY4

For OEM modules, please use the following BOARD type:

Expand All @@ -155,7 +155,7 @@ G01: GPY
To specify a serial port other than /dev/ttyUSB0, use ESPPORT variable:

$ # On MacOS
$ make ESPPORT=/dev/tty.usbserial-DQ008HQY flash
$ make ESPPORT=/dev/tty.usbmodemPy8eaa911 flash
$ # On Windows
$ make ESPPORT=COM3 flash
$ # On linux
Expand All @@ -179,7 +179,7 @@ To create a release package that can be flashed with the Pycom firmware tool:
To create a release package for all currently supported Pycom boards:

$ cd esp32
$ for BOARD in WIPY LOPY SIPY GPY FIPY LOPY4; do make BOARD=$BOARD clean && make BOARD=$BOARD release; done
$ for BOARD in WIPY LOPY GPY FIPY LOPY4; do make BOARD=$BOARD clean && make BOARD=$BOARD release; done

To specify a directory other than the default build/ directory:

Expand All @@ -190,7 +190,7 @@ To specify a directory other than the default build/ directory:
To create a release package for all currently supported Pycom boards in a directory other than the default build/ directory:

$ cd esp32
$ for BOARD in WIPY LOPY SIPY GPY FIPY LOPY4; do make BOARD=$BOARD clean && make BOARD=$BOARD RELEASE_DIR=~/pycom-packages release; done
$ for BOARD in WIPY LOPY GPY FIPY LOPY4; do make BOARD=$BOARD clean && make BOARD=$BOARD RELEASE_DIR=~/pycom-packages release; done

To inclue a step for copying IDF libs from IDF_PATH specify the following variable in the make command

Expand All @@ -206,81 +206,4 @@ To Disable RGB Led control use the following make variable

## Steps for using Secure Boot and Flash Encryption

### Summary

1. Obtain keys (for Secure Boot and Flash Encryption)
2. Flash keys and parameters in efuses
3. Compile bootloader and application with `make SECURE=on`
4. Flash: bootloader-digest at address 0x0 and encrypted; all the others (partitions and application) encrypted, too.

### Prerequisites

$ 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:

python $IDF_PATH/components/esptool_py/esptool/espsecure.py generate_flash_encryption_key flash_encryption_key.bin
python $IDF_PATH/components/esptool_py/esptool/espsecure.py generate_signing_key secure_boot_signing_key.pem

The Secure Boot key `secure_boot_signing_key.pem` has to be transformed into `secure-bootloader-key.bin`, to be burnt into efuses. This can be done in 2 ways:

python $IDF_PATH/components/esptool_py/esptool/espefuse.py extract_public_key --keyfile secure_boot_signing_key.pem signature_verification_key.bin

# or, as an artifact of the make build process, on the same directory level as Makefile
make BOARD=GPY SECURE=on TARGET=boot

Flash keys (`flash_encryption_key.bin` and `secure-bootloader-key.bin`) into the efuses (write and read protected):

**_Note: Irreversible operations_**

# Burning Encryption Key
python $IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyUSB0 burn_key flash_encryption flash_encryption_key.bin
# Burning Secure Boot Key
python $IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyUSB0 burn_key secure_boot secure-bootloader-key.bin
# Enabling Flash Encryption mechanism
python $IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyUSB0 burn_efuse FLASH_CRYPT_CNT
# Configuring Flash Encryption to use all address bits togheter with Encryption key (max value 0x0F)
python $IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyUSB0 burn_efuse FLASH_CRYPT_CONFIG 0x0F
# Enabling Secure Boot mechanism
python $IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyUSB0 burn_efuse ABS_DONE_0

**_If the keys are not written in efuse, before flashing the bootloader, then random keys will be generated by the ESP32, they can never be read nor re-written, so bootloader can never be updated. Even more, the application can be re-flashed (by USB) just 3 more times._**

### Makefile options:

make BOARD=GPY SECURE=on SECURE_KEY=secure_boot_signing_key.pem ENCRYPT_KEY=flash_encryption_key.bin

- `SECURE=on` is the main flag; it's not optional
- if `SECURE=on` by default:
- encryption is enabled
- secure_boot_signing_key.pem is the secure boot key, located relatively to Makefile
- flash_encryption_key.bin is the flash encryption key, located relatively to Makefile

For flashing the bootloader digest and the encrypted versions of all binaries:

make BOARD=GPY SECURE=on flash

### Flashing

For flashing the bootloader-reflash-digest.bin has to be written at address 0x0, instead of the bootloader.bin (at address 0x1000).

Build is done using `SECURE=on` option; additionally, all the binaries are pre-encrypted.

make BOARD=GPY clean
make BOARD=GPY SECURE=on
make BOARD=GPY SECURE=on flash

Manual flash command:

python $IDF_PATH/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before no_reset --after no_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x0 build/GPY/release/bootloader/bootloader-reflash-digest.bin_enc 0x8000 build/GPY/release/lib/partitions.bin_enc 0x10000 build/GPY/release/gpy.bin_enc_0x10000

### OTA update

The OTA should be done using the pre-encrypted application image.

Because the encryption is done based on the physical flash address, there are 2 application binaries generated:
- gpy.bin_enc_0x10000 which has to be written at default factory address: 0x10000
- gpy.bin_enc_0x1A0000 which has to be written at the ota_0 partition address (0x1A0000)

*__Hint:__ on micropython interface, the method `pycom.ota_slot()` responds with the address of the next OTA partition available (either 0x10000 or 0x1A0000).*
For Secure Boot and Flash Encryption please check: https://docs.pycom.io/advance/encryption/
17 changes: 17 additions & 0 deletions drivers/bus/qspi.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#include "py/mphal.h"

#define MP_SPI_ADDR_IS_32B(addr) (addr & 0xff000000)

enum {
MP_QSPI_IOCTL_INIT,
MP_QSPI_IOCTL_DEINIT,
Expand All @@ -54,4 +56,19 @@ typedef struct _mp_soft_qspi_obj_t {

extern const mp_qspi_proto_t mp_soft_qspi_proto;

static inline uint8_t mp_spi_set_addr_buff(uint8_t *buf, uint32_t addr) {
if (MP_SPI_ADDR_IS_32B(addr)) {
buf[0] = addr >> 24;
buf[1] = addr >> 16;
buf[2] = addr >> 8;
buf[3] = addr;
return 4;
} else {
buf[0] = addr >> 16;
buf[1] = addr >> 8;
buf[2] = addr;
return 3;
}
}

#endif // MICROPY_INCLUDED_DRIVERS_BUS_QSPI_H
10 changes: 6 additions & 4 deletions drivers/bus/softqspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ STATIC void mp_soft_qspi_write_cmd_data(void *self_in, uint8_t cmd, size_t len,

STATIC void mp_soft_qspi_write_cmd_addr_data(void *self_in, uint8_t cmd, uint32_t addr, size_t len, const uint8_t *src) {
mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t*)self_in;
uint8_t cmd_buf[4] = {cmd, addr >> 16, addr >> 8, addr};
uint8_t cmd_buf[5] = {cmd};
uint8_t addr_len = mp_spi_set_addr_buff(&cmd_buf[1], addr);
CS_LOW(self);
mp_soft_qspi_transfer(self, 4, cmd_buf, NULL);
mp_soft_qspi_transfer(self, addr_len + 1, cmd_buf, NULL);
mp_soft_qspi_transfer(self, len, src, NULL);
CS_HIGH(self);
}
Expand All @@ -186,10 +187,11 @@ STATIC uint32_t mp_soft_qspi_read_cmd(void *self_in, uint8_t cmd, size_t len) {

STATIC void mp_soft_qspi_read_cmd_qaddr_qdata(void *self_in, uint8_t cmd, uint32_t addr, size_t len, uint8_t *dest) {
mp_soft_qspi_obj_t *self = (mp_soft_qspi_obj_t*)self_in;
uint8_t cmd_buf[7] = {cmd, addr >> 16, addr >> 8, addr};
uint8_t cmd_buf[7] = {cmd};
uint8_t addr_len = mp_spi_set_addr_buff(&cmd_buf[1], addr);
CS_LOW(self);
mp_soft_qspi_transfer(self, 1, cmd_buf, NULL);
mp_soft_qspi_qwrite(self, 6, &cmd_buf[1]); // 3 addr bytes, 1 extra byte (0), 2 dummy bytes (4 dummy cycles)
mp_soft_qspi_qwrite(self, addr_len + 3, &cmd_buf[1]); // 3/4 addr bytes, 1 extra byte (0), 2 dummy bytes (4 dummy cycles)
mp_soft_qspi_qread(self, len, dest);
CS_HIGH(self);
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/cc3000/inc/cc3000_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ extern int CC3000_EXPORT(errno);
//*****************************************************************************
// Compound Types
//*****************************************************************************
typedef INT32 time_t;
typedef INT32 cc3000_time_t;
typedef UINT32 clock_t;
typedef INT32 suseconds_t;

typedef struct cc3000_timeval cc3000_timeval;

struct cc3000_timeval
{
time_t tv_sec; /* seconds */
cc3000_time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};

Expand Down
17 changes: 17 additions & 0 deletions drivers/cyw43/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CYW43xx WiFi SoC driver
=======================

This is a driver for the CYW43xx WiFi SoC.

There are four layers to the driver:

1. SDIO bus interface, provided by the host device/system.

2. Low-level CYW43xx interface, managing the bus, control messages, Ethernet
frames and asynchronous events. Includes download of SoC firmware. The
header file `cyw43_ll.h` defines the interface to this layer.

3. Mid-level CYW43xx control, to control and set WiFi parameters and manage
events. See `cyw43_ctrl.c`.

4. TCP/IP bindings to lwIP. See `cyw43_lwip.c`.
Loading