How to build my mikroPhone
Follow these instructions to build and assemble the device and to build and upload both FE310 and ESP32 firmware.
1 Build a device
You need to make and assemble two PCBs — main board and display adapter
- Schematic: main board, display adapter
- PCB fabrication files: main board, display adapter
- Board view: main board, display adapter
- Bill of Materials: main board (PDF — ODS), display adapter (PDF — ODS)
Original KiCad design files can be found in source code repository (see below, step 5)
2 Assemble
To assemble the phone you will need:
- main and display adapter boards already built in step 1
- E50RG84885LWAM520-CA display
- SIMCom SIM7600X-H or Quectel EC-25 mini PCIe module
- Any Li-Ion or Li-Po 3.6/3.7V battery
Locate DISPLAY connector at the bootom side of the board and connect display adapter board to it:
Connect display panel to J2 and J3 connectors on display adapter board:
Insert cellular modem into mini PCIe connector:
Locate BAT connector at the bootom side of the board and connect battery to it:
3 Connect JTAG/UART programmer
This device supports FT2232H-56Q Mini Module for flashing both FE310 and ESP32 firmware. Connect FT2232H-56Q to J205 connector using 12 pin FFC breakout board according to folowing table:
J205 Pin | FT2232H-56Q Pin |
---|---|
1. ESP32.UART0.RXD |
BD0 |
2. ESP32.UART0.TXD |
BD1 |
3. GND |
GND |
4. JTAG_TCK |
AD0 |
5. JTAG_TDO |
AD2 |
6. JTAG_TMS |
AD3 |
7. JTAG_TDI |
AD1 |
8. JTAG_TRST_N |
AD5 |
9. GND |
GND |
Leave other pins unconnected.
Alternatively, you can make FT2232H-56Q adapter board from hw/prog
KiCad project directory and connect it using 12 conductor 0.5mm pitch FFC jumper cable.
4 Install software prerequisites
You will need the following software:
- git
- GNU Make
- RISC-V GNU Toolchain
- RISC-V OpenOCD
- ESP-IDF from Espressif
Binary RISC-V GNU Toolchain and OpenOCD are available from SiFive at https://github.com/sifive/freedom-tools/releases
Download and unpack the archives for your platform and export RISCV_PATH
and RISCV_OPENOCD_PATH
variables:
export RISCV_PATH=/path/to/riscv64-gcc
export RISCV_OPENOCD_PATH=/path/to/riscv-openocd
To install ESP-IDF follow instructions from ESP-IDF Programming Guide. Install version 4.2 or later.
5 Compile and upload firmware
Clone git repository:
git clone https://git.majstor.org/mikroPhone
To build firmware for FE310 run follwing commands:
cd <path to repository>/fw/fe310
make
cd phone
make upload_ftdi
To build firmware for ESP32 run following commands:
cd <path to repository>/fw/esp32
make menuconfig
make
make flash
In make menuconfig
, please make sure that Enable PPP support
is selected under Component config -> LWIP
menu and that Notify Phase Callback
, PAP Support
and CHAP Support
are selected under PPP menu.
Before flashing ESP32 device you must put it into programming mode:
- press and hold WAKE button (SW2 - on the left side of the board)
- push ESP32 reset switch (SW201 - bottom right)