Page 1 of 2
Missing LTDC and DMA2D related core stuff
Posted: Wed Jun 24, 2015 7:49 pm
by TexZK
Hi Giovanni,
while porting my LTDC and DMA2D demo from ChibiOS 2.6 to 3.0 I found that the current 3.0 trunk is still missing some STM32 core definitions to describe those peripherals.
You can find the modified files in the attachment. Since they are core features of the STM32 device, and not peripheral drivers, I guess they should be merged in the trunk instead of being patched by some community branch. Also, some board definitions are wrong and need to be updated.
I will upload the updated demoboard project to the community git repository soon, including peripheral drivers.
Re: Missing LTDC and DMA2D related core stuff
Posted: Wed Jun 24, 2015 10:58 pm
by Giovanni
Hi,
Thanks, putting this in queue.
Giovanni
Re: Missing LTDC and DMA2D related core stuff
Posted: Fri Jun 26, 2015 9:16 am
by Giovanni
Merged as-is, good work.
Giovanni
Re: Missing LTDC and DMA2D related core stuff
Posted: Fri Jun 26, 2015 9:23 am
by TexZK
Thanks

The ported demo project and peripheral drivers are currently available in my forked community repository at:
https://github.com/TexZK/ChibiOS-Contrib/tree/ltdc_dma2dI'm moving some stuff to better places in order to finalize the pull request of the official community repository.
Re: Missing LTDC and DMA2D related core stuff
Posted: Fri Jun 26, 2015 7:41 pm
by cosar
Hi TexZK. Good job! Have you tested the code on 429 discovery board. I couldn't get it to work. It seems it does not initialize ltdc correctly.
Re: Missing LTDC and DMA2D related core stuff
Posted: Sat Jun 27, 2015 1:07 pm
by TexZK
Ok, I've found the problem. In the patch I sent to Giovanni in the first post, I didn't include some old code from the 2.6 version, located in the
board.c file.
What I'm writing here below is a
quick patch taken from the old demo, which will be put into the community HAL files instead.
Include the needed files:
Code: Select all
#include "ili9341.h"
#include "stm32_ltdc.h"
#include "stm32_dma2d.h"
extern ILI9341Driver ILI9341D1;
Initialize the peripherals:
Code: Select all
/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
#if STM32_LTDC_USE_LTDC
ltdcInit();
#endif
#if STM32_DMA2D_USE_DMA2D
dma2dInit();
#endif
ili9341ObjectInit(&ILI9341D1);
}
Let me know if it works now. As written before, I'm including the LTDC driver into the community HAL source code, plus some household stuff, which are the way to go.
Re: Missing LTDC and DMA2D related core stuff
Posted: Sun Jun 28, 2015 9:31 pm
by barthess
@TexZK
Could you test your demo after merging? I have moved your linker script into
project directory because main chibios repository already contains SMT32F429xI.ld
@Giovanni
Is there way to elegantly redefine memory region defined in linker script? From Makefile
for example, or from tiny wrapper under the main linker script?
Re: Missing LTDC and DMA2D related core stuff
Posted: Sun Jun 28, 2015 9:43 pm
by Giovanni
LD scripts are not that flexible, if you need to do custom layouts probably it is better to copy the .ld in the project directory.
Giovanni
Re: Missing LTDC and DMA2D related core stuff
Posted: Sun Jun 28, 2015 10:17 pm
by TexZK
I've updated my community repository to remove dependencies on the ST peripheral library, and use the SDRAM by FSMC driver of the ChibiOS community instead.
Ok for the linker script, that's an easy fix, I'll move it too

Re: Missing LTDC and DMA2D related core stuff
Posted: Sun Jun 28, 2015 10:25 pm
by barthess
I've see your pull request. Did SDRAM code works as expected?