1
0
Fork 0
InfiniTime/.devcontainer
Reinhold Gschweicher 77546c9fe2 lv_img_conv_py: minimal python port of node module
Create a minimal python port of the node.js module `lv_img_conv`. Only
the currently in use color formats `CF_INDEXED_1_BIT` and
`CF_TRUE_COLOR_ALPHA` are implemented.

Output only as binary with format `ARGB8565_RBSWAP`.

This is enough to create the `resources-1.13.0.zip`.

Python3 implements "propper" "banker's rounding" by rounding to the nearest
even number. Javascript rounds to the nearest integer.
To have the same output as the original JavaScript implementation add a custom
rounding function, which does "school" rounding (to the nearest integer)

Update CMake file in `resources` folder to call `lv_img_conf.py` instead of
node module.

For docker-files install `python3-pil` package for `lv_img_conv.py` script.
And remove the `lv_img_conv` node installation.

---

gen_img: special handling for python lv_img_conv script

Not needed on Linux systems, as the shebang of the python script is read
and used. But just to be sure use the python interpreter found by CMake.
Also helps if tried to run on Windows host.

---

doc: buildAndProgram: remove node script lv_img_conv mention

Remove node script `lv_img_conv` mention and replace it for
runtime-depency `python3-pil` of python script `lv_img_conv.py`.
2023-10-26 22:45:01 +02:00
..
build.sh fixing build.sh not returning error in build (#1460) 2022-12-13 08:18:53 +01:00
build_app.sh added extra .sh build files 2021-08-07 17:18:18 +00:00
create_build_openocd.sh Added cmake variants 2021-08-07 18:19:11 +00:00
devcontainer.json Fixed container to use clang-format-12 and format on save 2021-11-28 13:57:02 +01:00
Dockerfile lv_img_conv_py: minimal python port of node module 2023-10-26 22:45:01 +02:00
make_build_dir.sh Added cmake variants 2021-08-07 18:19:11 +00:00
README.md branches: Update files to refer to main instead of develop 2023-03-02 09:45:47 +02:00

VS Code Dev Container

This is a docker-based interactive development environment using VS Code and Docker Dev Containers removing the need to install any tools locally*

Requirements

Using

Code editing, and building.

  1. Clone InfiniTime and update submodules
  2. Launch VS Code
  3. Open InfiniTime directory,
  4. Allow VS Code to open folder with devcontainer.

After this the environment will be built if you do not currently have a container setup, it will install all the necessary tools and extra VSCode extensions.

In order to build InfiniTime we need to run the initial submodule init and CMake commands.

Manually

You can use the VS Code terminal to run the CMake commands as outlined in the build instructions

Script

The dev environment comes with some scripts to make this easier, They are located in /opt/.

There are also VS Code tasks provided should you desire to use those.

The task "update submodules" will update the git submodules

Build

You can use the build.sh script located in /opt/

CMake is also configured and controls for the CMake plugin are available in VS Code

Debugging

Docker on windows does not support passing USB devices to the underlying WSL2 subsystem, To get around this we use OpenOCD in server mode running on the host.

openocd -f <yourinterface> -f <nrf52.cfg target file>

This will launch OpenOCD in server mode and attach it to the MCU.

The default launch.json file expects OpenOCD to be listening on port 3333, edit if needed

Current Issues

Currently WSL2 Has some real performance issues with IO on a windows host. Accessing files on the virtualized filesystem is much faster. Using VS Codes "clone in container" feature of the Remote - Containers will get around this. After the container is built you will need to update the submodules and follow the build instructions like normal