[how to]: BPI: bit Webduino Firmware Burning


(Hao Wang) #1

BPI:bit can be perfectly adapted to Webduino. Of course, before using it, we need to burn the Webduino firmware first.

Firmware download address:https://github.com/yelvlab/BPI-BIT/tree/master/Webduino_bin

Burning method:

There are two kinds of burning methods to choose from, we can use ESP Flash Download Tool to burn, we can also use the built-in Python script inside the PlatformIO to achieve burn.

One, ESP Flash Download Tool

Tool download address: ESP Flash Download Tool

After downloading, unzip the archive and you will see an ESPFlashDownloadTool_v3.6.2.exe inside the folder. Open this shortcut and open an interface selection mode.

image

Select ESP DownloadTool

image

Under Download Path Config, we need to select the four bin files that need to be burned and fill in the corresponding burn locations.

  • File and burn position corresponding to::
bootloader_dio_40m.bin 0x1000
partitions.bin 0x8000
boot_app0.bin 0xe000
bit_default.bin 0x10000
  • SpiFlashConfig:
SPI SPEED 40NHz
SPI MODE DIO
FLASH SIZE 32Mbit
COM COMx(Fill in the port number assigned by the computer)
BAUD 1152000

Normally, you do not need to burn two boot boot files. You can directly burn the firmware (bit_default.bin) and partitions (partitions.bin). If the bootloader is damaged, you can choose to burn along with bootloader_dio_40m.bin and boot_app0.bin. But be sure to pay attention to the settings below

SpiFlashConfig Please configure according to the software screenshot, and then select the port in the COM. Porter 115200 does not need to be changed. Select “START” to start recording.

During the burning process:

image

Finished:

image

After the burn is completed, you must reset or re-energize, and then you find the LED red light flashing, indicating that the burn is successful.

Burn time is about 20s

then you can use webduino all function on BPI:bit. Please see the webduino teaching documents

Other related introductions can see github:

https://github.com/yelvlab/BPI-BIT/tree/master/programming/ESP_Flash_Download_Tool

Second, PlatformIO comes with a script

This method needs to install PlatformIO in advance. Of course, if you are not using PlatformIO for development, you are advised to use the first method. This method is to disassemble the PlatformIO burning procedure.

First of all, you need to find the installation location of PlatformIO on your computer. For example, my installation location is as follows

image

Of course, your installation location is not necessarily the same as mine, you need to find it yourself.

Then, we can find a script file .platformio\packages\tool-esptoolpy\esptool.py according to the following path. This file is the script we need to burn. Then, we open the terminal of PlatformIO, or open the computer. Command line tool, enter the following code

   `Python ~\.platformio\packages\tool-esptoolpy\esptool.py --port COM19 --baud 115200 write_flash -fm dio -fs 4MB 0x010000 ~\BIT\bit_default.bin`

The ~ in the above code needs to be replaced with your actual path, and then fill in the corresponding burning position in order, select the corresponding file path, and then execute this code. This method may be very specific for certain situations. Help, usually used at the time, it is recommended to use the first method of burning.

Normally, you do not need to burn two boot boot files. You can directly burn the firmware (bit_default.bin) and partitions (partitions.bin). If the bootloader is damaged, you can choose to burn along with bootloader_dio_40m.bin and boot_app0.bin. But be sure to pay attention to the settings below


BPI:bit for webduino development progress,keep update
(Thierry Grillon) #2

Hi I have burn the firmware and used webduino bit(online trial) to change matrix color, it’s nice but that’s all I can do. I mean I could not use buzzer, button, write string etc… All I Can do is change matrix color. Is it normal?

I also would like to know if firmware source are available? Did you make it?

Regards,

Thierry


(Hao Wang) #3

Hi,Thierry Can’t you use other features than LED lights? This is very unusual, at present, our firmware has already added the support of these hardwares, perhaps you can use newer firmware to burn?(Firmware update on github


(Thierry Grillon) #4

Hi yelvlab, thank you for reply. that’s exactly what I did and I did it again. I thought it was the same but I discovered the check device status button in webduino blocky and I have seen that the bpi bit hang very fast. may be too fast to download the whole program. then I have tried many times and sometimes I could upload something else than led matrix but generally the device status become red before. Here how I have flashed it on the begining : esptool.py --before default_reset --port /dev/ttyUSB0 --baud 115200 write_flash -fm dio -fs 4MB 0x1000 bootloader_dio_40m.bin 0xe000 boot_app0.bin 0x8000 partitions.bin 0x10000 bit_default.bin Your platformIO C examples works fine. Any idea?

Regards,

Thierry


(Thierry Grillon) #5

Hi, to be clear. I have last firmware, more than led works but generally the bpi bit hangs before the whole program is downloaded. I guess led programs are faster to download so it’s always starting. I have two bpi bit and both are doing the same. Only C programs are running fine, webduino is useless.


(Hao Wang) #6

If your platformIO C examples works fine,May be your Blockly building block usage error


(Hao Wang) #7

There are two points to confirm

  • Update the latest firmware from github and burn it into the bit board. (The latest version of webduino will scroll from right to left after the power is turned on. Bit XXXX 4-digit ID)

  • Make sure Blockly blocks are used correctly, including initializing and controlling blocks


(Tim) #8

Hi Thierry,

It seems that you do not yet understand Webduino well. I will give you a brief description here. For details, you can read the info on the official website.

The Webduino working model is actually quit different from that of Arduino. The normal Arduino model is using a development IDE, programming with simple C language and then compiling it into firmware. We can burn the firmware into the target board to run. Every time we power on the board, we re-run the burned firmware. I think you know this model quit well and bpi:bit board is also support Arduino programming environment.

You can imagine that Webduino firmware just a normal Arduino-built firmware and in fact, it is. So every time you power on the built-in Webduino bpi:bit board. The board runs as a Webduino node. To run a “program” generated by the Webduino Blockly, we don’t need to burn that “program” or firmware to the node again.

Webduino Blockly generates javascript code from blocks. We can run this javascript code every where on the internet. So when you click “run icon” on the Webduino Blockly UI, it indeed runs that javascript code on your browser. It means it can be run on a frontend. If you study more, then you are able to move and run this javascript code to a backend, such as in node.js .

The HW sensors or components in a node are “web” components as well. The software services (ex. Google AI) also can be prepared as web compoments. With these features, it is very easy to integrate with existing web technology. To program IoT applications is just similar to program webpages. This is the main goal of Webduino system.

Although there are thousands of Webduino videos on Youtube, but mostly in Chinese. We are still working on preparing more contents in English in the near future.

Hope it helps,

-tim