IDF veteran need some help with custom mp firmware under WSL Ubuntu
Posted: Wed May 04, 2022 3:09 am
I've been thinking about compiling my mp firmware for a while but only got started yesterday. I've just installed WSL Ubuntu and the toolchains for building the micropython firmware for ESP32. Compiling generic and generic_spiram both completed but I have a few issues:
1) I see no /dev/ttyUSB0 under WSL Ubuntu prompt. I have confirmed that the dev board is working. I flashed it with mp 1.18 using thonny and closed thonny before listing /dev/tty* and there are some ttyS0 ttyS1 etc but I tried opening them with screen command and couldn't open them.
2) I don't know how to locate the compiled firmware from windows and copy it to my windows folders. I think it is here:
C:\Users\user\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState but it is named ext4.vhdx. I don't want to mess with this virtual volume in case I corrupt it. So how do I get the compiled firmware out of WSL Ubuntu?
3) I wanted to add wiznet W5100 support. I saw some lengthy discussions of a pull request but I don't know how to include it in the build. I read through the configs of GENERIC and GENERIC_SPIRAM. There are a few large chunks of features in the .cmake file in the boards folder:
This is IDF stuff. I bet micropython has some specific IDF switches in the .ble and .spiram files. I was looking for wiznet support and how to add it to the firmware.
4) Last one. I want to have a larger file system since I'm using either 8MB or 16MB FLASH modules on my board. I see in sdkconfig.base that these options are defined:
I used to use IDF 3 and then 4 a lot so I know where these are coming from. I see there's a partitions-8MiB.csv that has a 6MB file system. I know that I can just change the CONFIG_PARTITION_TABLE_CUSTOM_FILENAME line of the .base but is there a micropythonic way to use this 8MB partition file? Also if I do use it, what about the initial content of this partition? Is it empty or does it have an empty boot.py in it?
1) I see no /dev/ttyUSB0 under WSL Ubuntu prompt. I have confirmed that the dev board is working. I flashed it with mp 1.18 using thonny and closed thonny before listing /dev/tty* and there are some ttyS0 ttyS1 etc but I tried opening them with screen command and couldn't open them.
2) I don't know how to locate the compiled firmware from windows and copy it to my windows folders. I think it is here:
C:\Users\user\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState but it is named ext4.vhdx. I don't want to mess with this virtual volume in case I corrupt it. So how do I get the compiled firmware out of WSL Ubuntu?
3) I wanted to add wiznet W5100 support. I saw some lengthy discussions of a pull request but I don't know how to include it in the build. I read through the configs of GENERIC and GENERIC_SPIRAM. There are a few large chunks of features in the .cmake file in the boards folder:
Code: Select all
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
boards/sdkconfig.spiram
boards/GENERIC_SPIRAM/sdkconfig.board
)
4) Last one. I want to have a larger file system since I'm using either 8MB or 16MB FLASH modules on my board. I see in sdkconfig.base that these options are defined:
Code: Select all
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"