Post topics, source code that relate to the Arduino Platform

User avatar
By gregBaker
#84757 Image

⚫ Compilation and sketch upload

Executable segment sizes:
IROM : 233056 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27064 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1236 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 1668 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 24960 ) - zeroed variables (global, static) in RAM/HEAP
/Users/gregorybaker/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/xtensa-lx106-elf-size -A /var/folders/h7/wf7nxlvj6jj3r1hw4ghnj0yw0000gn/T/arduino_build_283738/Blink.ino.elf
Sketch uses 263024 bytes (25%) of program storage space. Maximum is 1044464 bytes.
Global variables use 27864 bytes (34%) of dynamic memory, leaving 54056 bytes for local variables. Maximum is 81920 bytes.
/Users/gregorybaker/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 /Users/gregorybaker/Library/Arduino15/packages/esp8266/hardware/esp8266/2.6.1/tools/upload.py --chip esp8266 --port /dev/cu.usbserial-0001 --baud 115200 --before default_reset --after hard_reset /var/folders/h7/wf7nxlvj6jj3r1hw4ghnj0yw0000gn/T/arduino_build_283738/Blink.ino.bin
esptool.py v2.8
Serial port /dev/cu.usbserial-0001
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 60:01:94:75:4d:ba
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 267184 bytes to 194570...

Writing at 0x00000000... (8 %)

Writing at 0x0002c000... (100 %)
Wrote 267184 bytes (194570 compressed) at 0x00000000 in 17.2 seconds (effective 124.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...


⚫ No problems until trying to upload the sketch data directory:

[SPIFFS] data : /Users/gregorybaker/Desktop/new201122/Blink/data
[SPIFFS] size : 1000
[SPIFFS] page : 256
[SPIFFS] block : 8192
/Blink.txt
[SPIFFS] upload : /var/folders/h7/wf7nxlvj6jj3r1hw4ghnj0yw0000gn/T/arduino_build_283738/Blink.spiffs.bin
[SPIFFS] address : 0x300000
[SPIFFS] reset : --before default_reset --after hard_reset
[SPIFFS] port : /dev/cu.usbserial-0001
[SPIFFS] speed : 115200
[SPIFFS] python : python
[SPIFFS] uploader : /Users/gregorybaker/Library/Arduino15/packages/esp8266/hardware/esp8266/2.6.1/tools/upload.py

usage: esptool write_flash [-h] [--erase-all]
[--flash_freq {keep,40m,26m,20m,80m}]
[--flash_mode {keep,qio,qout,dio,dout}]
[--flash_size FLASH_SIZE]
[--spi-connection SPI_CONNECTION] [--no-progress]
[--verify] [--encrypt]
[--ignore-flash-encryption-efuse-setting]
[--compress | --no-compress]
<address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: Must be pairs of an address and the binary filename to write there
SPIFFS Upload failed!


⚫ I do not understand the issues here well enough to fix them and need some help.

PORT::
Last login: Wed Nov 27 12:33:21 on ttys000
gregorybaker@Gregorys-MBP-4 ~ % ls /dev/tty.*
/dev/tty.Bluetooth-Incoming-Port /dev/tty.usbserial-0001
gregorybaker@Gregorys-MBP-4 ~ %

PYTHON::
gregorybaker@Gregorys-MBP-4 ~ % python
Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:24:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D

ESPTOOL::
gregorybaker@Gregorys-MBP-4 ~ % pip install esptool
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/developme ... -2-support
Requirement already satisfied: esptool in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/esptool-2.8.dev0-py2.7.egg (2.8.dev0)
Requirement already satisfied: pyserial>=3.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyserial-3.4-py2.7.egg (from esptool) (3.4)
Requirement already satisfied: pyaes in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyaes-1.6.1-py2.7.egg (from esptool) (1.6.1)
Requirement already satisfied: ecdsa in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ecdsa-0.14.1-py2.7.egg (from esptool) (0.14.1)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/six-1.13.0-py2.7.egg (from ecdsa->esptool) (1.13.0)


⚫ Thank you for your time in just looking; hopefully, you can understand and help me.

Greg
User avatar
By gregBaker
#84760 Thank you Pablo for the links. Both threads are closed however and I still cannot figure this out.
Can I simply change Mac OS Catalina's default Python (2.7.17) to V3 ??
If so, how ... I am unsure what such does to everything else Catalina, argh!

But thanks.

greg
User avatar
By Pablo2048
#84765 There are two things:
1. unable to upload spiffs image due to errors in uploadtool configurations (links to github issues). This has now been solved with release 2.6.2 which was released yesterday (please try to update your core version).
2. warning about python 2.7 obsolency - I don't have any Mac so I can't tell you exact steps, but try to update your python to version 3.