Skip to content

Upload fonts to external SPI Flash

The commercial edition allows to use the external 8 Mbits = 1 MBytes x 8 SPI Flash memory, labelled U1 on the EXT3 extension board, to store fonts.

The standard reference of the SPI Flash memory is MX25V2006 . The corresponding chip select pin is numbered 8 on the EXT3 extension board.

Option 1: Segger J-Flash SPI

The Segger J-Link programmer-debugger offers a fast way to upload the fonts to the external SPI Flash of the EXT3. The List of supported SPI flash devices includes the MX25V2006.

Configure

Connect from the J-Link programmer-debugger to the EXT3: the SPI signals CLS, /CS, DI or MOSI, DO or MISO; and power lines VTref and GROUND.

To power the EXT3, either provide an external 3.3V; or connect a 3.3V regulator to the J-Link programmer-debugger 5V-Supply output and turn power on.

Use

Two options: by command line or GUI.

Launch

$
JFlashSPI_CL -open Fonts_511.hex -auto

JFlashSPI_CL loads the Fonts_511.hex file, connects to the SPI Flash, uploads and verifies, then disconnects.

Launch the JFlashSPIExe application.

Call the menu File > Open data file... and select the Fonts_511.hex file; or drag-and-drop the Fonts_511.hex file onto the application.

Call the menu Target > Connect to identify the external SPI Flash automatically and then the menu Target > Program to upload and flash the external SPI Flash automatically.

Call the menu File > Exit to quit the application.

More information is available at the page J-Flash SPI — Direct programming of (Q)SPI flashes on the Segger website.

Option 2: highView Fonts Manager

Configure

Ensure the targeted MCU provides enough memory in Flash to store the fonts.

Open the hV_Fonts_Manager.ino project.

Set the options to write sector 0 and the font and generate the fonts enumeration.

#define WRITE_FLASH_SECTOR_0 1 ///< Write or update sector 0
#define WRITE_FLASH_FONTS 1 ///< Write fonts to Flash

#define SIMULATE_FLASH_SECTOR_0 0 ///< Simulate sector 0

#define READ_FLASH_SECTOR_0 1 ///< Read sector 0
#define READ_FLASH_FONTS 1 ///< Read fonts from Flash

#define GENERATE_FONTS_ENUMERATION 1 ///< Generate code of header file with fonts enumeration

Use

Select the fonts to include under the setup() function.

loadFont(Font_DejaVuMono12);
loadFont(Font_DejaVuMono12b);

Build and link, upload and run.

Copy the generated fonts enumeration into the hV_Font_Flash.h header file for later use with the Fonts from external SPI Flash option.