Skip to content

Commit

Permalink
add build_firmware.md
Browse files Browse the repository at this point in the history
  • Loading branch information
solosky committed Nov 19, 2023
1 parent 04ac2d8 commit c9cc109
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 11 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ hw/RevC为最新PCB版本,使用[Kicad 6](https://www.kicad.org/download/)打
* [RevC InteractiveHtmlBom](docs/RevC-ibom.html)
* [RevC 物料清单购买指南](docs/RevC-bom.md)

## 衍生版本

[docs/boards-thirdparty.md](docs/boards-thirdparty.md)

## OLED版本

OLED版本由网友 @xiaohail 贡献,可以点[这里](https://gitlab.com/xiaohai/pixl.js)下载PCB。
Expand Down
7 changes: 0 additions & 7 deletions docs/boards-thirdparty.md

This file was deleted.

63 changes: 63 additions & 0 deletions fw/docs/build_firmware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

# Build

## Build with Github Actions

TODO

## Build with customized Docker image



# Flash

## Flash firmware wired mode

TODO

## Flash firmware with DFU

TODO

# FAQ


## How to fix if flashing wrong firmware

you could try to move (blind) by the menus and put the device on the DFU mode, or use the wired mode to reprogram the device.

From the Main Menu you can put the device in DFU mode pressing:

_press any button to wake up the device, then press:_

- LEFT
- MIDDLE
- LEFT X 3
- MIDDLE

(Also to be sure you are on the MAIN MENU, you can remove and put the battery, then start the process above)

Open the page https://thegecko.github.io/web-bluetooth-dfu/examples/web.html load the `pixjs_ota_vXXX.zip` file for the LCD and open it, then press the `SELECT DEVICE` button and if your device is on DFU mode you should see a device called `pixl dfu` connect to it and the process should be finish well.


Also, from main menu you can press:

- LEFT x 2
- MIDDLE
then you are en BLE uplad mode then in https://pixl.amiibo.xyz/ page, you can connect and use the button `DFU` to put the device in DFU mode and programming again.




**For wire programming:**
This method requires the additional purchase of a CMASS-DAP compatible downloader. We recommend pwlink2 lite for 9.9 yuan.
Purchase address: https://item.taobao.com/item.htm?spm=a1z09.2.0.0.4b942e8deXyaQO&id=675067753017&_u=d2p75qfn774a

- Download the latest version of the firmware zip package and use JLink or DAPLink to program pixjs_all.hex.
- After connecting the cable, double-click `fw_update.bat` to program the firmware.
- After programming is completed, subsequent firmware updates can be updated via OTA.
- You can also use OpenOCD to program.
```
openocd -f interface/cmsis-dap.cfg -c "transport select swd" -f target/nrf52.cfg -d2 -c init -c "reset init" -c halt -c "nrf5 mass_erase" -c "program pixjs_all. hex verify" -c "program nrf52832_xxaa.hex verify" -c exit
```

0 comments on commit c9cc109

Please sign in to comment.