Jump to content

STM32F103C8T6 + ILI9341 compiling fine TFT not working


Dolence

Recommended Posts

Hey! How are you guys? Please, anyone can give me some directions?

I'm a hobbist used to work with Atmel AVR family. I'm trying to learn something new here: I had an STM32F103 board laying around, so I made the decision to try it out. After some reading and experimentation I got it working as expected in eclipse. Really basic things, like the classic led blinking. The next step was to choose some nice RTOS and chibios was the winner! I managed to have chibios working on my board after I made my board configuration using another similar board as template.

Actually, I'm trying to have my ILI9341 TFT display working using chibios and ugfx together. I don't know whats wrong, code is compiling fine but nothing is showed on display. I suspect it's something related to SPI setup. I made the test using stm32duino and the display is working.

bEYJzXr.jpg

The example I'm trying to run is the one named "circles".

Warnings:


Description Resource Path Location Type
"GDISP_PIXELFORMAT_CUSTOM" is not defined [-Wundef] gdisp_driver.h /WDR-STM32F1xx-UART/ugfx/src/gdisp line 293 C/C++ Problem
"GFX_EMULATE_MALLOC" is not defined [-Wundef] gos_rules.h /WDR-STM32F1xx-UART/ugfx/src/gos line 31 C/C++ Problem
"GFX_EMULATE_MALLOC" is not defined [-Wundef] gos_x_heap.c /WDR-STM32F1xx-UART/ugfx/src/gos line 198 C/C++ Problem
"GFX_USE_GAUDIN" is not defined [-Wundef] gfx.c /WDR-STM32F1xx-UART/ugfx/src line 138 C/C++ Problem
"GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef] gmisc.h /WDR-STM32F1xx-UART/ugfx/src/gmisc line 347 C/C++ Problem
"GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef] gmisc_matrix2d.c /WDR-STM32F1xx-UART/ugfx/src/gmisc line 106 C/C++ Problem
"GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef] gmisc.h /WDR-STM32F1xx-UART/ugfx/src/gmisc line 229 C/C++ Problem
"GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef] gmisc_matrix2d.c /WDR-STM32F1xx-UART/ugfx/src/gmisc line 12 C/C++ Problem
"GOS_NEED_X_HEAP" is not defined [-Wundef] gos_x_heap.c /WDR-STM32F1xx-UART/ugfx/src/gos line 10 C/C++ Problem
"GOS_NEED_X_THREADS" is not defined [-Wundef] gos_x_threads.c /WDR-STM32F1xx-UART/ugfx/src/gos line 10 C/C++ Problem

chibios makefile:


##############################################################################
# Build global options
# NOTE: Can be overridden externally.
#

# Compiler options here.
ifeq ($(USE_OPT),)
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif

# C specific options here (added to USE_OPT).
ifeq ($(USE_COPT),)
USE_COPT =
endif

# C++ specific options here (added to USE_OPT).
ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif

# Enable this if you want the linker to remove unused code and data
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif

# Linker extra options here.
ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif

# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = yes
endif

# If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),)
USE_THUMB = yes
endif

# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
endif

# If enabled, this option makes the build process faster by not compiling
# modules not used in the current configuration.
ifeq ($(USE_SMART_BUILD),)
USE_SMART_BUILD = yes
endif

#
# Build global options
##############################################################################

##############################################################################
# Architecture or project specific options
#

# Stack size to be allocated to the Cortex-M process stack. This stack is
# the stack used by the main() thread.
ifeq ($(USE_PROCESS_STACKSIZE),)
USE_PROCESS_STACKSIZE = 0x400
endif

# Stack size to the allocated to the Cortex-M main/exceptions stack. This
# stack is used for processing interrupts and exceptions.
ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif

# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
USE_FPU = no
endif

#
# Architecture or project specific options
##############################################################################

##############################################################################
# Project, sources and paths
#

# Define project name here
PROJECT = ch

# Imported source files and paths
CHIBIOS = ../../chibios161
# Startup files.
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/boards/WDR_STM32F103C8/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
#include $(CHIBIOS)/test/rt/test.mk
GFXDEMO = modules/gdisp/circles
GFXLIB = ./ugfx
include $(GFXLIB)/gfx.mk
include $(GFXLIB)/boards/base/WDR_STM32F103C8/board.mk # board
#include $(GFXLIB)/drivers/gaudio/vs1053/driver.mk # additional driver


# Define linker script file here
LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld

# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(STARTUPSRC) \
$(KERNSRC) \
$(PORTSRC) \
$(OSALSRC) \
$(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(TESTSRC) \
$(GFXSRC)
#main.c

# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CPPSRC =

# C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
ACSRC =

# C++ sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
ACPPSRC =

# C sources to be compiled in THUMB mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
TCSRC =

# C sources to be compiled in THUMB mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
TCPPSRC =

# List ASM source files here
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)

INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(GFXINC) \
$(CHIBIOS)/os/various



#
# Project, sources and paths
##############################################################################

##############################################################################
# Compiler settings
#

MCU = cortex-m3

#TRGT = arm-elf-
TRGT = arm-none-eabi-
CC = $(TRGT)gcc
CPPC = $(TRGT)g++
# Enable loading with g++ only if you need C++ runtime support.
# NOTE: You can use C++ even without C++ support if you are careful. C++
# runtime support makes code size explode.
LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
AR = $(TRGT)ar
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary

# ARM-specific options here
AOPT =

# THUMB-specific options here
TOPT = -mthumb -DTHUMB

# Define C warning options here
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes

# Define C++ warning options here
CPPWARN = -Wall -Wextra -Wundef

#
# Compiler settings
##############################################################################

##############################################################################
# Start of user section
#

# List all user C define here, like -D_DEBUG=1
UDEFS =

# Define ASM defines here
UADEFS =

# List all user directories here
UINCDIR =

# List the user directory to look for the libraries here
ULIBDIR =

# List all user libraries here
ULIBS =

#
# End of user defines
##############################################################################

RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk

board_ILI9341_spi.h:


/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
* http://ugfx.org/license.html
*/

/**
* @file boards/addons/gdisp/board_ILI9341_spi.h
* @brief GDISP Graphic Driver subsystem board interface for the ILI9341 display.
*
* @note This file contains a mix of hardware specific and operating system specific
* code. You will need to change it for your CPU and/or operating system.
*/

#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H

#define LCD_PORT GPIOA
#define LCD_MOSI 7
#define LCD_MISO 6
#define LCD_SCK 5
#define LCD_CS 4
#define LCD_DC 2
#define LCD_RES 3

#define LCD_DC_CMD palClearPad(LCD_PORT, LCD_DC)
#define LCD_DC_DATA palSetPad(LCD_PORT, LCD_DC)
#define LCD_SCK_SET palSetPad(LCD_PORT, LCD_SCK)
#define LCD_SCK_RES palClearPad(LCD_PORT, LCD_SCK)
#define LCD_CS_RES palSetPad(LCD_PORT, LCD_CS)
#define LCD_CS_SET palClearPad(LCD_PORT, LCD_CS)



/**
* SPI configuration structure.
* Speed 12 MHz, CPHA=0, CPOL=0, 8bits frames, MSb transmitted first.
* Soft slave select.
*/
static const SPIConfig spi1cfg = {
NULL,
LCD_PORT,
LCD_CS,
//(SPI_CR1_MSTR | SPI_CR1_SPE | SPI_CR1_SSM | SPI_CR1_SSI)
(SPI_CR1_MSTR | SPI_CR1_SPE | SPI_CR1_SSM | SPI_CR1_SSI | SPI_CR1_BR_2 | SPI_CR1_BR_1)
};

static void send_data(uint16_t data);

/**
* @brief Initialise the board for the display.
*
* @param[in] g The GDisplay structure
*
* @note Set the g->board member to whatever is appropriate. For multiple
* displays this might be a pointer to the appropriate register set.
*
* @notapi
*/
static GFXINLINE void init_board(GDisplay *g) {

// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;

palSetPadMode(LCD_PORT, LCD_CS, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(LCD_PORT, LCD_DC, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(LCD_PORT, LCD_RES, PAL_MODE_OUTPUT_PUSHPULL);

spiStart(&SPID1, &spi1cfg);
spiSelectI(&SPID1);
}

/**
* @brief After the initialisation.
*
* @param[in] g The GDisplay structure
*
* @notapi
*/
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}

/**
* @brief Set or clear the lcd reset pin.
*
* @param[in] g The GDisplay structure
* @param[in] state TRUE = lcd in reset, FALSE = normal operation
*
* @notapi
*/
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;

if (state == TRUE) {
palClearPad(LCD_PORT, LCD_RES);
} else {
palSetPad(LCD_PORT, LCD_RES);
}
}

/**
* @brief Set the lcd back-light level.
*
* @param[in] g The GDisplay structure
* @param[in] percent 0 to 100%
*
* @notapi
*/
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
(void) percent;
}

/**
* @brief Take exclusive control of the bus
*
* @param[in] g The GDisplay structure
*
* @notapi
*/
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}

/**
* @brief Release exclusive control of the bus
*
* @param[in] g The GDisplay structure
*
* @notapi
*/
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}

/**
* @brief Send data to the lcd.
*
* @param[in] data The data to send
*
* @notapi
*/
static GFXINLINE void send_data(uint16_t data) {
// http://forum.easyelectronics.ru/viewtopic.php?p=262122#p262122
while (!(SPI1->SR & SPI_SR_TXE)); // ïðè âõîäå íà îòïðàâêó ïðîâåðÿåì - à ïóñòîé ëè SPI_DR
SPI1->DR = data; // çàãðóçèëè â SPI_DR êîä êîìàíäû

}

/**
* @brief Send data to the index register.
*
* @param[in] g The GDisplay structure
* @param[in] index The index register to set
*
* @notapi
*/
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;

while (SPI1->SR & SPI_SR_BSY);
LCD_CS_RES;
LCD_DC_CMD; // ïåðåâîäèì äèñïëåé â ðåæèì êîìàíä
LCD_CS_SET;
send_data(index);
while (SPI1->SR & SPI_SR_BSY); // ïîêà ôëàã óñòàíîâëåí (==1) -- ìîäóëü SPI çàíÿò
/* ëèøíèé öèêë îæèäàíèÿ îêîí÷àíèÿ ïåðåäà÷è êîìàíäû ïîçâîëÿåò â äàëüíåéøåì ñëàòü
* áàéòû äàííûõ áåç íåíóæíûõ îæèäàíèé è çàäåðæåê.
*/
LCD_DC_DATA; // ïåðåâîäèì äèñïëåé â ðåæèì äàííûõ
}

/**
* @brief Send data to the lcd with DC control.
*
* @param[in] g The GDisplay structure
* @param[in] data The data to send
*
* @notapi
*/
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;

send_data(data);
}

/**
* @brief Set the bus in read mode
*
* @param[in] g The GDisplay structure
*
* @notapi
*/
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
}

/**
* @brief Set the bus back into write mode
*
* @param[in] g The GDisplay structure
*
* @notapi
*/
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}

/**
* @brief Read data from the lcd.
* @return The data from the lcd
*
* @param[in] g The GDisplay structure
*
* @notapi
*/
static GFXINLINE uint16_t read_data(GDisplay *g) {
(void) g;
return 0;
}

#endif /* _GDISP_LLD_BOARD_H */

chibios_board/board.h


/*
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#ifndef _BOARD_H_
#define _BOARD_H_

/*
* Setup for the Olimex STM32-P103 proto board.
*/

/*
* Board identifier.
*/
#define BOARD_OLIMEX_STM32_P103
#define BOARD_NAME "Olimex STM32-P103"

/*
* Board frequencies.
*/
#define STM32_LSECLK 32768
#define STM32_HSECLK 8000000

/*
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
*/
#define STM32F103xB

/*
* IO pins assignments.
*/
#define GPIOA_SPI1_NSS 4 // pin 12
#define GPIOA_SPI1_SCK 5 // pin 13
#define GPIOA_SPI1_MISO 6 // pin 14
#define GPIOA_SPI1_MOSI 7 // pin 15

#define GPIOB_SPI2_NSS 12 // pin 1
#define GPIOB_SPI2_SCK 13 // pin 2
#define GPIOB_SPI2_MISO 14 // pin 3
#define GPIOB_SPI2_MOSI 15 // pin 4



/*
* I/O ports initial setup, this configuration is established soon after reset
* in the initialization code.
*
* The digits have the following meaning:
* 0 - Analog input.
* 1 - Push Pull output 10MHz.
* 2 - Push Pull output 2MHz.
* 3 - Push Pull output 50MHz.
* 4 - Digital input.
* 5 - Open Drain output 10MHz.
* 6 - Open Drain output 2MHz.
* 7 - Open Drain output 50MHz.
* 8 - Digital input with PullUp or PullDown resistor depending on ODR.
* 9 - Alternate Push Pull output 10MHz.
* A - Alternate Push Pull output 2MHz.
* B - Alternate Push Pull output 50MHz.
* C - Reserved.
* D - Alternate Open Drain output 10MHz.
* E - Alternate Open Drain output 2MHz.
* F - Alternate Open Drain output 50MHz.
* Please refer to the STM32 Reference Manual for details.
*/

/*
* Port A setup.
* Everything input with pull-up except:
* PA0 - Normal input (BUTTON).
* PA2 - Alternate output (USART2 TX).
* PA3 - Normal input (USART2 RX).
* PA11 - Normal input (USB DM).
* PA12 - Normal input (USB DP).
*/

/* #define VAL_GPIOACRL 0x88884B84 PA7...PA0 */
/* #define VAL_GPIOACRH 0x88844888 PA15...PA8 */
/* #define VAL_GPIOAODR 0xFFFFFFFF */

#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */
#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */
#define VAL_GPIOAODR 0xFFFFFFFF

/*
* Port B setup.
* Everything input with pull-up except:
* PB13 - Alternate output (MMC SPI2 SCK).
* PB14 - Normal input (MMC SPI2 MISO).
* PB15 - Alternate output (MMC SPI2 MOSI).
*/
#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
#define VAL_GPIOBCRH 0xB4B88888 /* PB15...PB8 */
#define VAL_GPIOBODR 0xFFFFFFFF

/*
* Port C setup.
* Everything input with pull-up except:
* PC4 - Normal input because there is an external resistor.
* PC6 - Normal input because there is an external resistor.
* PC7 - Normal input because there is an external resistor.
* PC10 - Push Pull output (CAN CNTRL).
* PC11 - Push Pull output (USB DISC).
* PC12 - Push Pull output (LED).
*/
#define VAL_GPIOCCRL 0x44848888 /* PC7...PC0 */
#define VAL_GPIOCCRH 0x88833388 /* PC15...PC8 */
#define VAL_GPIOCODR 0xFFFFFFFF

/*
* Port D setup.
* Everything input with pull-up except:
* PD0 - Normal input (XTAL).
* PD1 - Normal input (XTAL).
*/
#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */
#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */
#define VAL_GPIODODR 0xFFFFFFFF

/*
* Port E setup.
* Everything input with pull-up except:
*/
#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */
#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
#define VAL_GPIOEODR 0xFFFFFFFF

/*
* USB bus activation macro, required by the USB driver.
*/
#define usb_lld_connect_bus(usbp) palClearPad(GPIOC, GPIOC_USB_DISC)

/*
* USB bus de-activation macro, required by the USB driver.
*/
#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOC, GPIOC_USB_DISC)

#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
void boardInit(void);
#ifdef __cplusplus
}
#endif
#endif /* _FROM_ASM_ */

#endif /* _BOARD_H_ */

circles/gfxconf.h

/*
* Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu
* Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef _GFXCONF_H
#define _GFXCONF_H

/* The operating system to use. One of these must be defined - preferably in your Makefile */
#define GFX_USE_OS_CHIBIOS TRUE
//#define GFX_USE_OS_WIN32 FALSE
//#define GFX_USE_OS_LINUX FALSE
//#define GFX_USE_OS_OSX FALSE

/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
#define GFX_USE_GMISC TRUE

/* Features for the GDISP subsystem. */
#define GDISP_NEED_VALIDATION TRUE
#define GDISP_NEED_CLIP TRUE
#define GDISP_NEED_CIRCLE TRUE
#define GDISP_NEED_ELLIPSE TRUE
#define GDISP_NEED_ARC TRUE

/* Features for the GMISC subsystem */
#define GMISC_NEED_FIXEDTRIG TRUE
#define GMISC_NEED_FASTTRIG TRUE

#endif /* _GFXCONF_H */

Link to comment
Share on other sites

Here is the complete source: https://mega.nz/#!IM9SyYbD

Complete build console output:

In file included from ./ugfx/src/gwin/../../gfx.h:186:0,
from ./ugfx/src/gwin/gwin_keyboard.c:13:
./ugfx/src/gwin/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gwin/../../gfx.h:194:0,
from ./ugfx/src/gwin/gwin_gl3d.c:13:
./ugfx/src/gwin/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gwin/../../gfx.h:194:0,
from ./ugfx/src/gwin/gwin_tabset.c:13:
./ugfx/src/gwin/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gwin/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
./ugfx/src/gwin/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gwin/../../gfx.h:194:0,
from ./ugfx/src/gwin/gwin_keyboard.c:13:
./ugfx/src/gwin/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gwin/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gwin/../../gfx.h:186:0,
from ./ugfx/src/gwin/gwin_keyboard_layout.c:8:
./ugfx/src/gwin/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling gwin_textedit.c
Compiling ginput.c
In file included from ./ugfx/src/gwin/../../gfx.h:194:0,
from ./ugfx/src/gwin/gwin_keyboard_layout.c:8:
./ugfx/src/gwin/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gwin/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling ginput_mouse.c
Compiling ginput_keyboard.c
Compiling ginput_keyboard_microcode.c
In file included from ./ugfx/src/gwin/../../gfx.h:186:0,
from ./ugfx/src/gwin/gwin_textedit.c:13:
./ugfx/src/gwin/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/ginput/../../gfx.h:186:0,
from ./ugfx/src/ginput/ginput.c:15:
./ugfx/src/ginput/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
Compiling ginput_toggle.c
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/ginput/../../gfx.h:186:0,
from ./ugfx/src/ginput/ginput_mouse.c:12:
./ugfx/src/ginput/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/ginput/../../gfx.h:186:0,
from ./ugfx/src/ginput/ginput_keyboard_microcode.c:13:
./ugfx/src/ginput/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/ginput/../../gfx.h:186:0,
from ./ugfx/src/ginput/ginput_keyboard.c:16:
./ugfx/src/ginput/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gwin/../../gfx.h:194:0,
from ./ugfx/src/gwin/gwin_textedit.c:13:
./ugfx/src/gwin/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gwin/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/ginput/../../gfx.h:194:0,
from ./ugfx/src/ginput/ginput_mouse.c:12:
./ugfx/src/ginput/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/ginput/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/ginput/../../gfx.h:194:0,
from ./ugfx/src/ginput/ginput.c:15:
./ugfx/src/ginput/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/ginput/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/ginput/../../gfx.h:194:0,
from ./ugfx/src/ginput/ginput_keyboard_microcode.c:13:
./ugfx/src/ginput/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/ginput/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/ginput/../../gfx.h:194:0,
from ./ugfx/src/ginput/ginput_keyboard.c:16:
./ugfx/src/ginput/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/ginput/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/ginput/../../gfx.h:186:0,
from ./ugfx/src/ginput/ginput_toggle.c:16:
./ugfx/src/ginput/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling gadc.c
Compiling gaudio.c
Compiling ginput_dial.c
Compiling gmisc.c
In file included from ./ugfx/src/ginput/../../gfx.h:194:0,
from ./ugfx/src/ginput/ginput_toggle.c:16:
./ugfx/src/ginput/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/ginput/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling gmisc_arrayops.c
In file included from ./ugfx/src/gadc/../../gfx.h:186:0,
from ./ugfx/src/gadc/gadc.c:8:
./ugfx/src/gadc/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gaudio/../../gfx.h:186:0,
from ./ugfx/src/gaudio/gaudio.c:8:
./ugfx/src/gaudio/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/ginput/../../gfx.h:186:0,
from ./ugfx/src/ginput/ginput_dial.c:16:
./ugfx/src/ginput/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gmisc/../../gfx.h:186:0,
from ./ugfx/src/gmisc/gmisc.c:8:
./ugfx/src/gmisc/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gmisc/../../gfx.h:186:0,
from ./ugfx/src/gmisc/gmisc_arrayops.c:8:
./ugfx/src/gmisc/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gadc/../../gfx.h:194:0,
from ./ugfx/src/gadc/gadc.c:8:
./ugfx/src/gadc/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gadc/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/ginput/../../gfx.h:194:0,
from ./ugfx/src/ginput/ginput_dial.c:16:
./ugfx/src/ginput/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/ginput/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gaudio/../../gfx.h:194:0,
from ./ugfx/src/gaudio/gaudio.c:8:
./ugfx/src/gaudio/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gaudio/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling gmisc_matrix2d.c
In file included from ./ugfx/src/gmisc/../../gfx.h:194:0,
from ./ugfx/src/gmisc/gmisc.c:8:
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gmisc/../../gfx.h:194:0,
from ./ugfx/src/gmisc/gmisc_arrayops.c:8:
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling gmisc_trig.c
Compiling gfile_fs_native.c
Compiling gfile.c
In file included from ./ugfx/src/gmisc/../../gfx.h:186:0,
from ./ugfx/src/gmisc/gmisc_matrix2d.c:8:
./ugfx/src/gmisc/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling gfile_fs_ram.c
Compiling gfile_fs_rom.c
In file included from ./ugfx/src/gmisc/../../gfx.h:186:0,
from ./ugfx/src/gmisc/gmisc_trig.c:8:
./ugfx/src/gmisc/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gmisc/../../gfx.h:194:0,
from ./ugfx/src/gmisc/gmisc_matrix2d.c:8:
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile.c:8:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_native.c:15:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
./ugfx/src/gmisc/gmisc_matrix2d.c:12:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D
^
./ugfx/src/gmisc/gmisc_matrix2d.c:106:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_ram.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gmisc/../../gfx.h:194:0,
from ./ugfx/src/gmisc/gmisc_trig.c:8:
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gmisc/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_native.c:15:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile.c:8:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_rom.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_ram.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling gfile_fs_fatfs.c
Compiling gfile_fs_petitfs.c
Compiling gfile_fs_mem.c
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_rom.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling gfile_fs_chibios.c
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_fatfs.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling gfile_fs_strings.c
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_mem.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_petitfs.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling gfile_printg.c
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_chibios.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_fatfs.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_petitfs.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_mem.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fs_strings.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_chibios.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_printg.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling gfile_scang.c
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fs_strings.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling gfile_stdio.c
Compiling gfile_fatfs_wrapper.c
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_printg.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
Compiling gfile_fatfs_diskio_chibios.c
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_scang.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fatfs_wrapper.c:8:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_stdio.c:12:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling gfile_petitfs_wrapper.c
Compiling gfile_petitfs_diskio_chibios.c
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_scang.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fatfs_wrapper.c:8:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_stdio.c:12:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_fatfs_diskio_chibios.c:8:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_petitfs_wrapper.c:8:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_fatfs_diskio_chibios.c:8:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:186:0,
from ./ugfx/src/gfile/gfile_petitfs_diskio_chibios.c:8:
./ugfx/src/gfile/../../src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
Compiling main.c
Compiling gdisp_lld_ILI9341.c
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_petitfs_wrapper.c:8:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/src/gfile/../../gfx.h:194:0,
from ./ugfx/src/gfile/gfile_petitfs_diskio_chibios.c:8:
./ugfx/src/gfile/../../src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gfile/../../src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/gfx.h:186:0,
from ./ugfx/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c:8:
./ugfx/src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/gfx.h:186:0,
from ./ugfx/demos/modules/gdisp/circles/main.c:30:
./ugfx/src/gos/gos_rules.h:31:5: warning: "GFX_EMULATE_MALLOC" is not defined [-Wundef]
#if GFX_EMULATE_MALLOC
^
In file included from ./ugfx/gfx.h:194:0,
from ./ugfx/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c:8:
./ugfx/src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/gfx.h:194:0,
from ./ugfx/demos/modules/gdisp/circles/main.c:30:
./ugfx/src/gmisc/gmisc.h:229:5: warning: "GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFLOAT2D || defined(__DOXYGEN__)
^
./ugfx/src/gmisc/gmisc.h:347:5: warning: "GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef]
#if GMISC_NEED_MATRIXFIXED2D || defined(__DOXYGEN__)
^
In file included from ./ugfx/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c:23:0:
./ugfx/drivers/gdisp/ILI9341/../../../src/gdisp/gdisp_driver.h:293:27: warning: "GDISP_PIXELFORMAT_CUSTOM" is not defined [-Wundef]
&& GDISP_PIXELFORMAT != GDISP_PIXELFORMAT_CUSTOM
^
Linking build/ch.elf
Creating build/ch.hex
Creating build/ch.dmp
Creating build/ch.bin
Creating build/ch.list

text data bss dec hex filename
21154 352 20486 41992 a408 build/ch.elf

Done

16:08:17 Build Finished (took 17s.543ms)

Thanks in advance :)

Link to comment
Share on other sites

Hello Dolence and welcome to the community!

There are many things that can go wrong here so let's go through a short list:

  • Make sure that your SPI pins are initialized properly. It's a good manner to initialize ALL pins in the board_init() function. So do the same as you did for the Reset, CS and DS pins for the MOSI, MISO and SCK pins.
  • Use the ChibiOS/HAL API for handling the SPI. Currently you are manually accessing some of the SPI registers which is NOT recommended when working with ChibiOS. You can find plenty of examples on how to use the ChibiOS/HAL API to interface an SPI client in the various ChibiOS examples, demos and testhal as well as for some other displays and touchscreens in the uGFX boards directory. Make sure that you use spiSelect() as well as spiUnselect() inside the acquire_bus() and release_bus() functions. Use the synchronous API (spiSend() if I remember correctly) to send the actual data.
  • Check your SPI modes. Make sure that the clock polarity etc. is set properly. Your ChibiOS/HAL SPI config struct seems a bit odd. Usually the ILI9341 should work with all default settings. Just limit the clock speed but don't touch the SSE, SSI and so on (I might be wrong here).
  • Check the SPI signals with an oscilloscope or a logic analyzer.
  • Lastly: We have had multiple issues with the ILI93xx drivers where a supplier claimed that it's one display but in fact it was another one. While commonly this usually happens with the ILI9325 vs. ILI9320 we have seen the same with the ILI9341. If none of the above fixed your issue I'd recommend trying all the other ILI93xx drivers. This should be very straight forward as the board files for all those drivers are exactly the same.

I hope that helps to resolve your issue.

~ Tectu

Link to comment
Share on other sites

I just realize that this board file can be found in the uGFX directory. I have no idea who put it there. But that board file is definitely NOT a good example. We'll either clean it up get rid of it. Sorry for the inconvenience!

As an example on how to talk to a display controller via SPI using ChibiOS/HAL you might want to look at this: /boards/addon/gdisp/board_SSD1306_spi.h

~ Tectu

Link to comment
Share on other sites

Hi Tectu! Thanks for your valuable support!

I spent some time following your advices but still no joy. What I did so far was test board file following board_SSD1306_spi.h as base template and lastly this one http://forum.ugfx.org/viewtopic.php?f=23&t=175&start=30#p1411

Actually my board file looks like this:

/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
* http://ugfx.org/license.html
*/

/**
* @file boards/addons/gdisp/board_ILI9341_spi.h
* @brief GDISP Graphic Driver subsystem board interface for the ILI9341 display.
*
* @note This file contains a mix of hardware specific and operating system specific
* code. You will need to change it for your CPU and/or operating system.
*/

#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H
#include "ch.h"

#define SPI_METHOD_IRQ 1
#define SPI_METHOD_POLLING 2
#define SPI_METHOD SPI_METHOD_POLLING

#define SPI_PORT (&SPID1)
#define LCD_PORT GPIOA
#define LCD_MOSI 7
#define LCD_MISO 6
#define LCD_SCK 5
#define LCD_CS 4
#define LCD_DC 2
#define LCD_RES 3




/**
* SPI configuration structure.
* Speed 12 MHz, CPHA=0, CPOL=0, 8bits frames, MSb transmitted first.
* Soft slave select.
*/
static const SPIConfig spi1cfg = {
NULL,
LCD_PORT,
LCD_CS,
//0
SPI_CR1_BR_2 | SPI_CR1_BR_1
};



static __inline void init_board(GDisplay *g) {
(void) g;

// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;

//setup pins
palSetPadMode(LCD_PORT, LCD_CS, PAL_MODE_OUTPUT_PUSHPULL); // CS
palSetPadMode(LCD_PORT, LCD_SCK, PAL_MODE_STM32_ALTERNATE_PUSHPULL); // SCK
palSetPadMode(LCD_PORT, LCD_MISO, PAL_MODE_STM32_ALTERNATE_PUSHPULL); // MISO
palSetPadMode(LCD_PORT, LCD_MOSI, PAL_MODE_STM32_ALTERNATE_PUSHPULL); // MOSI

palSetPadMode(LCD_PORT, LCD_RES, PAL_MODE_OUTPUT_PUSHPULL); // RESET
palSetPadMode(LCD_PORT, LCD_DC, PAL_MODE_OUTPUT_PUSHPULL); // DC

//set pins
palSetPad(LCD_PORT, LCD_CS);
palSetPad(LCD_PORT, LCD_RES);
palClearPad(LCD_PORT, LCD_DC);

//spiInit();
spiStart(SPI_PORT, &spi1cfg);
spiSelect(SPI_PORT);
}


static __inline void post_init_board(GDisplay *g) {
(void) g;
}

static __inline void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
palWritePad(LCD_PORT, LCD_RES, !state);
}

static __inline void acquire_bus(GDisplay *g) {
(void) g;
spiSelect(SPI_PORT);
}


static __inline void release_bus(GDisplay *g) {
(void) g;
spiUnselect(SPI_PORT);
}

static __inline void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
(void) percent;
}


static __inline void write_index(GDisplay *g, uint8_t index) {
(void) g;
palClearPad(LCD_PORT, LCD_DC);
#if SPI_METHOD == SPI_METHOD_IRQ
spiSend(SPI_PORT, 1, &index);
#elif SPI_METHOD == SPI_METHOD_POLLING
spiPolledExchange(SPI_PORT, index);
#endif
palSetPad(LCD_PORT, LCD_DC);
}

//static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
static __inline void write_data(GDisplay *g, uint8_t data) {
(void) g;
#if SPI_METHOD == SPI_METHOD_IRQ
spiSend(SPI_PORT, 1, &data);
#elif SPI_METHOD == SPI_METHOD_POLLING
spiPolledExchange(SPI_PORT, data);
#endif
}


static __inline void setreadmode(GDisplay *g) {
(void) g;
}

static __inline void setwritemode(GDisplay *g) {
(void) g;
}

static __inline uint16_t read_data(GDisplay *g) {
(void) g;
return 0;
}

#endif /* _GDISP_LLD_BOARD_H */

No errors during compiling, but 4 warnings are listed:


"GDISP_PIXELFORMAT_CUSTOM" is not defined [-Wundef] gdisp_driver.h /WDR-STM32F1xx-SPI/ugfx/src/gdisp line 293 C/C++ Problem
"GFX_EMULATE_MALLOC" is not defined [-Wundef] gos_rules.h /WDR-STM32F1xx-SPI/ugfx/src/gos line 31 C/C++ Problem
"GMISC_NEED_MATRIXFIXED2D" is not defined [-Wundef] gmisc.h /WDR-STM32F1xx-SPI/ugfx/src/gmisc line 347 C/C++ Problem
"GMISC_NEED_MATRIXFLOAT2D" is not defined [-Wundef] gmisc.h /WDR-STM32F1xx-SPI/ugfx/src/gmisc line 229 C/C++ Problem

Make sure that your SPI pins are initialized properly. It's a good manner to initialize ALL pins in the board_init() function. So do the same as you did for the Reset, CS and DS pins for the MOSI, MISO and SCK pins.

static inline void init_board(GDisplay *g) {
(void) g;

// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;

//setup pins
palSetPadMode(LCD_PORT, LCD_CS, PAL_MODE_OUTPUT_PUSHPULL); // CS
palSetPadMode(LCD_PORT, LCD_SCK, PAL_MODE_STM32_ALTERNATE_PUSHPULL); // SCK
palSetPadMode(LCD_PORT, LCD_MISO, PAL_MODE_STM32_ALTERNATE_PUSHPULL); // MISO
palSetPadMode(LCD_PORT, LCD_MOSI, PAL_MODE_STM32_ALTERNATE_PUSHPULL); // MOSI

palSetPadMode(LCD_PORT, LCD_RES, PAL_MODE_OUTPUT_PUSHPULL); // RESET
palSetPadMode(LCD_PORT, LCD_DC, PAL_MODE_OUTPUT_PUSHPULL); // DC

//set pins
palSetPad(LCD_PORT, LCD_CS);
palSetPad(LCD_PORT, LCD_RES);
palClearPad(LCD_PORT, LCD_DC);

//spiInit();
spiStart(SPI_PORT, &spi1cfg);
spiSelect(SPI_PORT);
}

Use the ChibiOS/HAL API for handling the SPI. Currently you are manually accessing some of the SPI registers which is NOT recommended when working with ChibiOS. You can find plenty of examples on how to use the ChibiOS/HAL API to interface an SPI client in the various ChibiOS examples, demos and testhal as well as for some other displays and touchscreens in the uGFX boards directory. Make sure that you use spiSelect() as well as spiUnselect() inside the acquire_bus() and release_bus() functions. Use the synchronous API (spiSend() if I remember correctly) to send the actual data.

static inline void acquire_bus(GDisplay *g) {
(void) g;
spiSelect(SPI_PORT);

}


static inline void release_bus(GDisplay *g) {
(void) g;
spiUnselect(SPI_PORT);
}

Check your SPI modes. Make sure that the clock polarity etc. is set properly. Your ChibiOS/HAL SPI config struct seems a bit odd. Usually the ILI9341 should work with all default settings. Just limit the clock speed but don't touch the SSE, SSI and so on (I might be wrong here).

static const SPIConfig spi1cfg = {
NULL,
LCD_PORT,
LCD_CS,
0
//SPI_CR1_BR_2 | SPI_CR1_BR_1
};

Check the SPI signals with an oscilloscope or a logic analyzer.

6fCYmDxh.jpg

Lastly: We have had multiple issues with the ILI93xx drivers where a supplier claimed that it's one display but in fact it was another one. While commonly this usually happens with the ILI9325 vs. ILI9320 we have seen the same with the ILI9341. If none of the above fixed your issue I'd recommend trying all the other ILI93xx drivers. This should be very straight forward as the board files for all those drivers are exactly the same.

Didn't tried this, but since I've already got it working using stm32duino ILI9341 drivers it should rule out this possibility.

What else could I do? Any suggestions? Thank you again :)

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...