nuttx-apps/tools
Lucas Saavedra Vaz eb36c15171 testing: Add application to gather debug information (nxdiag)
This commit aims to add an application to gather debug information about the host and target systems. It can also perform some diagnostic checks on the host and target systems.
This will facilitate the process of users seeking assistance for solving some problem.

Current capabilities:
- Get host OS version;
- Get host python modules;
- Get host system packages;
- Get host PATH;
- Get host compilation flags for the target;
- Get target NuttX configuration;
- Get target OS version, hostname, build and architecture;
- Capable of adding custom, vendor specific, information. Currently gathering only Espressif related info:
  - Get the bootloader version of detected image files;
  - Get the version of different toolchains used by Espressif chips;
  - Get Esptool version.
2023-05-25 11:04:39 -03:00
..
bitmap_converter.py Remove unneeded semicolons and parentheses from Python files 2020-12-12 19:20:38 +01:00
check-hash.sh Fix the minor style issue 2022-10-16 19:07:16 +02:00
host_sysinfo.py testing: Add application to gather debug information (nxdiag) 2023-05-25 11:04:39 -03:00
mkimport.sh tools: mkimport.sh: Add support relative file path 2022-01-30 17:20:10 +01:00
mkkconfig.bat tools: update licenses to Apache 2021-06-10 08:49:24 -05:00
mkkconfig.sh tools: update licenses to Apache 2021-06-10 08:49:24 -05:00
mkromfsimg.sh romfsimg: add attribute to set minimum 4 bytes aignment for romfs image data 2022-01-28 00:02:45 +08:00
mksymtab.sh nshlib: Rename CONFIG_SYSTEM_NSH_SYMTAB to CONFIG_NSH_SYMTAB 2022-10-18 22:18:38 +02:00
pre-commit tools: add git pre-commit hook for apps 2022-08-14 14:06:10 +03:00
README.md tools/README.md: Fix typo and reflow paragraph 2022-09-09 01:08:33 +08:00
Wasm.mk tools/Wasm: Decouple the wasm compilation and runtime specific AOT compilation 2023-05-13 10:15:40 -03:00

Tools

NxWidgets bitmap_converter.py

This script converts from any image type supported by Python imaging library to the RLE-encoded format used by NxWidgets.

RLE (Run Length Encoding) is a very simply encoding that compress quite well with certain kinds of images: Images that that have many pixels of the same color adjacent on a row (like simple graphics). It does not work well with photographic images.

But even simple graphics may not encode compactly if, for example, they have been resized. Resizing an image can create hundreds of unique colors that may differ by only a bit or two in the RGB representation. This color smear is the result of pixel interpolation (and might be eliminated if your graphics software supports resizing via pixel replication instead of interpolation).

When a simple graphics image does not encode well, the symptom is that the resulting RLE data structures are quite large. The palette structure, in particular, may have hundreds of colors in it. There is a way to fix the graphic image in this case. Here is what I do (in fact, I do this on all images prior to conversion just to be certain):

  • Open the original image in GIMP.
  • Select the option to select the number of colors in the image.
  • Pick the smallest number of colors that will represent the image faithfully. For most simple graphic images this might be as few as 6 or 8 colors.
  • Save the image as PNG or other lossless format (NOT jpeg).
  • Then generate the image.