Setting up the uPyEasy build environment
Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM
Setting up the uPyEasy build environment
This document can be found here: https://github.com/letscontrolit/uPyEas ... onment.pdf
So far, it's for the ESP32 (the others will be added) and only on Linux.
So far, it's for the ESP32 (the others will be added) and only on Linux.
Re: Setting up the uPyEasy build enviroment
The other ports will be added shortly...
Re: Setting up the uPyEasy build environment
Version 0.2 of the uPyEasy has been completed, a generic section was added. The unix, stm32,esp8266 and armbian dev environments are added as well. I'm happy the way it looks like, however feedback is welcome!
Re: Setting up the uPyEasy build environment
Great work, Lisa - thanks
I'll try out the ESP32, and also the STM32 section in the next couple of days.
Andrew
![Lach :)](./images/smilies/icon_e_smile.gif)
I'll try out the ESP32, and also the STM32 section in the next couple of days.
Andrew
Re: Setting up the uPyEasy build environment
Hello, Lisa
Great work- Thanks ![Lach :)](./images/smilies/icon_e_smile.gif)
I need a little help. I'm trying to build firmware for esp32, following every step from instructions, but the following error occurred:
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_clock.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_flash.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_random.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_sha.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.c
/home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.c:22:18: fatal error: uECC.h: No such file or directory
compilation terminated.
Makefile:725: recipe for target 'build/bootloader//home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.o' failed
make: *** [build/bootloader//home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.o] Error 1
Also when I'm trying to copy modules from upyeasy source to ports/esp32/modules it tells me that urequests.py is broken and can't be replaced. I'm using Ubuntu 16.04 LTS.
Thanks in advance![Lach :)](./images/smilies/icon_e_smile.gif)
![Lach :)](./images/smilies/icon_e_smile.gif)
![Lach :)](./images/smilies/icon_e_smile.gif)
I need a little help. I'm trying to build firmware for esp32, following every step from instructions, but the following error occurred:
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_clock.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_flash.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_random.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/bootloader_sha.c
CC /home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.c
/home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.c:22:18: fatal error: uECC.h: No such file or directory
compilation terminated.
Makefile:725: recipe for target 'build/bootloader//home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.o' failed
make: *** [build/bootloader//home/ivanov/esp-idf/components/bootloader_support/src/secure_boot_signatures.o] Error 1
Also when I'm trying to copy modules from upyeasy source to ports/esp32/modules it tells me that urequests.py is broken and can't be replaced. I'm using Ubuntu 16.04 LTS.
Thanks in advance
![Lach :)](./images/smilies/icon_e_smile.gif)
Regards from Bulgaria.
raptor
raptor
Re: Setting up the uPyEasy build environment
A quick update on my experience with the build environment setup.
I'm working on a Linux PC (Linux Mint) and I've now used @LisaM's instructions to set up environment(s) for ESP32 and STM32. I've now succeeded in building and flashing uPyEasy for both - Yay!
The ESP32 version runs ok on my Lolin32 Lite board, although the free space seems rather low - in the log, the GC lines are reporting free space as low as 8000 at times. But the free space on the main page is higher. (I don't understand why they are different.) I know Lisa is working on optimising things for ESP32.
The STM32 version "sort-of" works on my Chinese Pyboard-clone (same as Lisa's from the photos). It starts up but I can't yet connect to it from my browser on the Linux PC or ping it.
Has anyone else given the build setup a try?
Andrew
I'm working on a Linux PC (Linux Mint) and I've now used @LisaM's instructions to set up environment(s) for ESP32 and STM32. I've now succeeded in building and flashing uPyEasy for both - Yay!
![Lach :)](./images/smilies/icon_e_smile.gif)
The ESP32 version runs ok on my Lolin32 Lite board, although the free space seems rather low - in the log, the GC lines are reporting free space as low as 8000 at times. But the free space on the main page is higher. (I don't understand why they are different.) I know Lisa is working on optimising things for ESP32.
The STM32 version "sort-of" works on my Chinese Pyboard-clone (same as Lisa's from the photos). It starts up but I can't yet connect to it from my browser on the Linux PC or ping it.
Has anyone else given the build setup a try?
Andrew
Re: Setting up the uPyEasy build environment
Hello, again! I've now succeeded in building and flashing uPyEasy on ESP32 WROOM. The problem was in description of how to fetch esp-idf:
$ git clone https://github.com/espressif/esp-idf.git
$ git checkout <Current supported ESP-IDF commit hash>
$ git submodule update –recursive
The right commands according to http://esp-idf.readthedocs.io/en/latest ... et-esp-idf is:
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf/
git checkout <Current supported ESP-IDF commit hash>
git submodule update --recursive
Current supported ESP-IDF commit hash can be seen in /home/ivanov/micropython/ports/esp32/Makefile. In this case is 3ede9f011b50999b0560683f9419538c066dd09e.
My makefile in /home/ivanov/micropython/ports/esp32/ is:
ESPIDF = $(HOME)/esp-idf
PORT = /dev/ttyUSB0
BAUD = 115200
FLASH_MODE = dio
FLASH_SIZE = 4MB
CROSS_COMPILE = xtensa-esp32-elf-
include Makefile
After successful building and deploying I get
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-473-g22c693a-dirty on 2018-03-21; ESP32 module with ESP32
Type "help()" for more information.
>>> help()
This mean that main.py is missing and I must to create it manually like here: https://github.com/micropython/micropyt ... /issues/90
>>> f = open("main.py", "w")
>>> f.write("print(\"main.py: Hello\")\n")
24
>>> f.close()
Then restart and voila:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4416
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:11816
entry 0x4007a9fc
I (265) cpu_start: Pro cpu up.
I (265) cpu_start: Single core mode
I (265) heap_init: Initializing. RAM available for dynamic allocation:
I (269) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (275) heap_init: At 3FFC4E80 len 0001B180 (108 KiB): DRAM
I (281) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (287) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (294) heap_init: At 4008DE34 len 000121CC (72 KiB): IRAM
I (300) cpu_start: Pro cpu start user code
I (20) cpu_start: Starting scheduler on PRO CPU.
main.py: Hello
MicroPython v1.9.3-473-g22c693a-dirty on 2018-03-21; ESP32 module with ESP32
Type "help()" for more information.
>>>
$ git clone https://github.com/espressif/esp-idf.git
$ git checkout <Current supported ESP-IDF commit hash>
$ git submodule update –recursive
The right commands according to http://esp-idf.readthedocs.io/en/latest ... et-esp-idf is:
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf/
git checkout <Current supported ESP-IDF commit hash>
git submodule update --recursive
Current supported ESP-IDF commit hash can be seen in /home/ivanov/micropython/ports/esp32/Makefile. In this case is 3ede9f011b50999b0560683f9419538c066dd09e.
My makefile in /home/ivanov/micropython/ports/esp32/ is:
ESPIDF = $(HOME)/esp-idf
PORT = /dev/ttyUSB0
BAUD = 115200
FLASH_MODE = dio
FLASH_SIZE = 4MB
CROSS_COMPILE = xtensa-esp32-elf-
include Makefile
After successful building and deploying I get
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-473-g22c693a-dirty on 2018-03-21; ESP32 module with ESP32
Type "help()" for more information.
>>> help()
This mean that main.py is missing and I must to create it manually like here: https://github.com/micropython/micropyt ... /issues/90
>>> f = open("main.py", "w")
>>> f.write("print(\"main.py: Hello\")\n")
24
>>> f.close()
Then restart and voila:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4416
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:11816
entry 0x4007a9fc
I (265) cpu_start: Pro cpu up.
I (265) cpu_start: Single core mode
I (265) heap_init: Initializing. RAM available for dynamic allocation:
I (269) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (275) heap_init: At 3FFC4E80 len 0001B180 (108 KiB): DRAM
I (281) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (287) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (294) heap_init: At 4008DE34 len 000121CC (72 KiB): IRAM
I (300) cpu_start: Pro cpu start user code
I (20) cpu_start: Starting scheduler on PRO CPU.
main.py: Hello
MicroPython v1.9.3-473-g22c693a-dirty on 2018-03-21; ESP32 module with ESP32
Type "help()" for more information.
>>>
Regards from Bulgaria.
raptor
raptor
Re: Setting up the uPyEasy build environment
I need to rewind here.....AndrewJ wrote: ↑20 Mar 2018, 20:10 A quick update on my experience with the build environment setup.
I'm working on a Linux PC (Linux Mint) and I've now used @LisaM's instructions to set up environment(s) for ESP32 and STM32. I've now succeeded in building and flashing uPyEasy for both - Yay!![]()
The ESP32 version runs ok on my Lolin32 Lite board, although the free space seems rather low - in the log, the GC lines are reporting free space as low as 8000 at times. But the free space on the main page is higher. (I don't understand why they are different.) I know Lisa is working on optimising things for ESP32.
The STM32 version "sort-of" works on my Chinese Pyboard-clone (same as Lisa's from the photos). It starts up but I can't yet connect to it from my browser on the Linux PC or ping it.
Has anyone else given the build setup a try?
Andrew
On STM32, I set up the toolchain and got it to build ok. Great, so far so good! Then I left it to work on ESP32 for quite a long time, and obviously mis-remembered where I had got to on STM. In fact now I've checked my notes, I hadn't actually gone the next step and deployed it. So that part of my previous message above was incorrect - sorry!
![Beschaamd :oops:](./images/smilies/icon_redface.gif)
Now I've come back to it, and tried to deploy it, it isn't working for me. I did the following:-
1. Tried "make BOARD=PYBV11 deploy" (and also with sudo) - I got
Code: Select all
No module named usb.core. Makefile: 371 recipe for target 'deploe' failed. make [deploy] Error 1
Code: Select all
sudo dfu-util -a 0 -d 0483:df11 -D build-PYBV11/firmware.dfu
![Lach :)](./images/smilies/icon_e_smile.gif)
However! I was unable to connect to STM with screen, and no ttyASMx or ttyUSBx available.
![Geschokt :shock:](./images/smilies/icon_eek.gif)
Any ideas?? Where might I have gone wrong
![Vraag :?:](./images/smilies/icon_question.gif)
Andrew
Who is online
Users browsing this forum: No registered users and 8 guests