Skip to content

Commit fede6f6

Browse files
committed
Removed option to run REPL in separate thread
the option was introduced to resolve some issues which was fixed later, so it is not needed anymore Refactored I2C slave support much improved i2c slave operation Added 'machine.RFCOMM' module support for Bluetooth classic SPP profile functionality equivalent to that of the UART module Works only on boards with external SPI_RAM Added 'highspeed' option when configuring SDCard in SPI mode Updated 'machine' module fixed bug in 'machine.stdin_disable()' function added 'machine.WDT()' function Updated 'machine.ADC' module arg name '8bit' changed to 'byte' in read_timed() function Updated 'network' module station's rssi is reported in 'status('stations')' function Updated 'curl' module fixed param parsing in curl.post() function Updated 'mdns' module fixed param parsing in addService() function 'esp-idf' updated date: 2018-06-27 version: v3.1-beta1-14-g698d3baf hash: 698d3bafa51a06a89605c6a15f89df514efa21f8 Other minor updates, improvements and bug fixes
1 parent bddacf0 commit fede6f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+5153
-1110
lines changed

MicroPython_BUILD/.cproject

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@
5050
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/ethernet/include&quot;"/>
5151
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/esp_adc_cal/include&quot;"/>
5252
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/nghttp/port/include&quot;"/>
53+
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/bt/include&quot;"/>
54+
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/bt/bluedroid/api/include&quot;"/>
55+
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/bt/bluedroid/api/include/api&quot;"/>
56+
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/mbedtls/mbedtls/include&quot;"/>
57+
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/esp_http_client/include&quot;"/>
5358
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MicroPython_BUILD}&quot;"/>
5459
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MicroPython_BUILD/build/include}&quot;"/>
5560
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MicroPython_BUILD/components/micropython/genhdr}&quot;"/>
5661
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MicroPython_BUILD/build/genhdr}&quot;"/>
57-
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/bt/include&quot;"/>
58-
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/bt/bluedroid/api/include&quot;"/>
5962
<listOptionValue builtIn="false" value="&quot;${PWD}/../Tools/xtensa-esp32-elf/bin&quot;"/>
6063
<listOptionValue builtIn="false" value="&quot;${PWD}/../Tools/xtensa-esp32-elf/xtensa-esp32-elf/include&quot;"/>
61-
<listOptionValue builtIn="false" value="&quot;${IDF_PATH}/components/mbedtls/mbedtls/include&quot;"/>
6264
</option>
6365
<option id="gnu.c.compiler.option.preprocessor.def.symbols.507238637" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
6466
<listOptionValue builtIn="false" value="BUILD_TIME=100000"/>

MicroPython_BUILD/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ sdkconfig.fw_all
3535
sdkconfig.fw_psram_all
3636

3737
make_firmwares.sh
38+
make_firmware_archives.sh
3839
mncfg_exit.txt

MicroPython_BUILD/BUILD.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050

5151

5252
#=======================
53-
TOOLS_VER=ver20180604.id
54-
BUILD_VER=ver20180604.id
53+
TOOLS_VER=ver20180628.id
54+
BUILD_VER=ver20180628.id
5555
#=======================
5656

5757
# -----------------------------
@@ -182,11 +182,21 @@ export CROSS_COMPILE=xtensa-esp32-elf-
182182

183183
for arg in "${POSITIONAL_ARGS[@]}"
184184
do
185+
if [ "${arg}" == "menuconfig" ]; then
186+
check_config
187+
result=$?
188+
if [ $result -eq 1 ]; then
189+
make menuconfig 2>/dev/null
190+
fi
191+
fi
185192
if [ "${arg}" == "all" ] || [ "${arg}" == "flash" ] || [ "${arg}" == "makefs" ] || [ "${arg}" == "flashfs" ] || [ "${arg}" == "makefatfs" ] || [ "${arg}" == "flashfatfs" ] || [ "${arg}" == "makelfsfs" ] || [ "${arg}" == "flashlfsfs" ]; then
186193
set_partitions ${APP_SIZE}
187194
if [ $? -ne 0 ]; then
188195
exit 1
189196
fi
197+
if [ "${arg}" == "all" ] || [ "${arg}" == "flash" ]; then
198+
check_config
199+
fi
190200
fi
191201

192202
if [ "${arg}" == "flash" ]; then
@@ -215,6 +225,7 @@ do
215225
if [ $result -eq 0 ]; then
216226
echo "OK."
217227
if [ "${arg}" == "all" ]; then
228+
set_partitions ${APP_SIZE}
218229
echo "--------------------------------"
219230
echo "Build complete."
220231
echo "You can now run ./BUILD.sh flash"

MicroPython_BUILD/build_func.sh

+35-5
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,26 @@ get_config_flash_sz() {
130130
fi
131131
}
132132

133+
#---------------
134+
check_config() {
135+
# If BT is enabled, check and modify, if needed, some configuration
136+
local TMPVAR1=""
137+
local USE_RFCOMM=$(grep -e CONFIG_MICROPY_USE_RFCOMM=y sdkconfig)
138+
local USE_BT=$(grep -e CONFIG_MICROPY_USE_BLUETOOTH=y sdkconfig)
139+
140+
if [ "${USE_RFCOMM}" == "CONFIG_MICROPY_USE_RFCOMM=y" ] || [ "${USE_BT}" == "CONFIG_MICROPY_USE_BLUETOOTH=y" ]; then
141+
# change to RELEASE optimization level to decrease IRAM usage
142+
TMPVAR1=$(grep -e CONFIG_OPTIMIZATION_LEVEL_DEBUG=y sdkconfig)
143+
if [ "${TMPVAR1}" == "CONFIG_OPTIMIZATION_LEVEL_DEBUG=y" ]; then
144+
sed --in-place='.bak1' 's/CONFIG_OPTIMIZATION_LEVEL_DEBUG=y/CONFIG_OPTIMIZATION_LEVEL_DEBUG=/g' sdkconfig
145+
sed --in-place='.bak2' 's/CONFIG_OPTIMIZATION_LEVEL_RELEASE=/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/g' sdkconfig
146+
rm -f sdkconfig.bak1 > /dev/null 2>&1
147+
rm -f sdkconfig.bak2 > /dev/null 2>&1
148+
return 1
149+
fi
150+
fi
151+
return 0
152+
}
133153

134154
#-----------------
135155
set_partitions() {
@@ -678,6 +698,11 @@ executeCommand() {
678698
echo "** Restored 'sdkconfig' **'"
679699
fi
680700
make menuconfig 2>/dev/null
701+
check_config
702+
result=$?
703+
if [ $result -eq 1 ]; then
704+
make menuconfig 2>/dev/null
705+
fi
681706

682707
# ---------------------------------
683708
elif [ "${arg}" == "makefs" ]; then
@@ -780,8 +805,8 @@ executeCommand() {
780805
echo "========================================="
781806
make ${arg} 2>/dev/null
782807

783-
# -----------------------------------
784-
elif [ "${arg}" == "firmware" ] || [ "${arg}" == "firmwareall" ]; then
808+
# -------------------------------------------------------------------------------------------------------
809+
elif [ "${arg}" == "firmware" ] || [ "${arg}" == "firmwareall" ] || [ "${arg}" == "firmwareallbt" ]; then
785810
echo "======================="
786811
echo "Saving the firmware ..."
787812
echo "======================="
@@ -796,6 +821,13 @@ executeCommand() {
796821
esp32dir="esp32_all"
797822
fi
798823
fi
824+
if [ "${arg}" == "firmwareallbt" ]; then
825+
if [ "${BUILD_TYPE}" != "" ]; then
826+
esp32dir="esp32_psram_all_bt"
827+
else
828+
esp32dir="esp32_all_bt"
829+
fi
830+
fi
799831
local useota=$(grep -e CONFIG_MICROPY_USE_OTA=y sdkconfig)
800832
if [ "${useota}" == "CONFIG_MICROPY_USE_OTA=y" ]; then
801833
esp32dir="${esp32dir}_ota"
@@ -806,9 +838,7 @@ executeCommand() {
806838
cp -f partitions_mpy.csv firmware/${esp32dir} > /dev/null 2>&1
807839
cp -f build/phy_init_data.bin firmware/${esp32dir} > /dev/null 2>&1
808840
cp -f sdkconfig firmware/${esp32dir} > /dev/null 2>&1
809-
echo "#!/bin/bash" > firmware/${esp32dir}/flash.sh
810-
make echo_flash_cmd >> firmware/${esp32dir}/flash.sh 2>/dev/null
811-
chmod +x firmware/${esp32dir}/flash.sh > /dev/null 2>&1
841+
rm -f firmware/${esp32dir}/flash.sh > /dev/null 2>&1
812842
return 0
813843

814844
# -------------------------------

0 commit comments

Comments
 (0)