Discussion:
Support for High End ARMs
(too old to reply)
dieter.kiermaier-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 13:56:57 UTC
Permalink
Hi Greg,

this is Dieter, I am pretty new to NuttX (while not even completely new to u-boot / Linux).
First off all, thanks much for the great work you do!

I am playing with the SAMA5 port of NuttX and wonder if there is already some work in progress to also port the LCD driver / configuration also to the SAMA5D3-Xplained board, which also have a nice 4.3" TFT.

If not, what is the preffered way to send patches to contribute to your project?

Maybe I will have some newbie questions...

Many thanks and have a great day,
Dieter
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 14:18:17 UTC
Permalink
Hi, Dieter,
Post by dieter.kiermaier-/***@public.gmane.org [nuttx]
this is Dieter, I am pretty new to NuttX (while not even completely new to u-boot / Linux).
First off all, thanks much for the great work you do!
Post by dieter.kiermaier-/***@public.gmane.org [nuttx]
I am playing with the SAMA5 port of NuttX and wonder if there is already some work in progress to also port the LCD driver / configuration also to the SAMA5D3-Xplained board, which also have a nice 4.3" TFT.
I really like the SAMA5D parts and the Xplained board is a real bargain. I have been working with the SAMA5D4-EK for the past couple of months and so the SAMA5 is definitely the most active platform right now.


I don't have the 4.3" LCD for the SAMA5D3 Xplained board and I have not heard of any work in progress for it.


I have LCD support for the SAMA5D3x-EK (see nuttx/configs/sama5d3x-ek) and for the SAMA5D4-EK (see nuttx/configs/sama5d4-ek). My understanding is that while the LCD mechanical connections differ between these evaluation kits and and Xplained board, the electrical configuration is identical. I don't know anything about the 5.4" TFT display that you have. The SAMA5D3x-EK has a 5" LCD and the SAMA5D4-EK has a 7" LCD, both are 800 x something.


The LCDs that I have could be reconfigured to work with the Xplained board. The difference is that the interface to the Xplained board is via a ribbon cable; the EKs have connectors on board.


The interfaces are 24-bit RGB panel interface in both cases (really 18-bit since I think that only the MS 6-bits of each component are actually used). That output format is easily configured, however, using 'make menuconfig'


If your LCD is not very different, than the logic for the SAMA5D3x-EK will probably adapt without very much trouble.


There are some great graphic demos for both of the EK boards. The SAMA5D4-EK NxWM configuration is especially complete.


And I have have just spent that last month or two implementing full Linux-style monolithic kernel and user processes for the SAMA5 (see the SAMA5D4-EK knsh configuration).
Post by dieter.kiermaier-/***@public.gmane.org [nuttx]
If not, what is the preffered way to send patches to contribute to your project?
Most people post patches directly in this forum. But I supsect that there are people who don't like to see their mailboxes fill up with patches. (If you do post a patch on this forum, don't put it inline. The forum software corrupts patches pretty badly. Use an attachment).


Some people send patches to my personal mail that you can get from this forum. That is fine too.


Probably the best way is using the SourceForge patch management system at http://sourceforge.net/p/nuttx/patches/?source=navbar . It keeps the patches in a good format and allows status reporting for each patch. However, not many people use that system.


Greg
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 14:32:28 UTC
Permalink
What kind of touchscreen interface does your LCD use? The SAMA5D3x-EK LCD uses the SAMA5D's built in ADC touchscreen logic which I never really got working as well as I would like (probably just needs some tuning). The SAMA5D4-EK LCD has an Atmel maXTouch multi-touch LCD controller which is wonderful.


Greg
Dieter Kiermaier dieter.kiermaier-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 16:11:03 UTC
Permalink
Hi Greg,
it is using a maxTouch controller, too.
Yes, for sure a pretty nice one!

I guess I need a few days to become more familiar with NuttX but after that I will try to add LCD support for also the XPlained Kit.

Many thanks for your quick reply,
Dieter



On Friday, September 19, 2014 4:32 PM, "spudarnia-/***@public.gmane.org [nuttx]" <***@yahoogroups.com> wrote:




What kind of touchscreen interface does your LCD use? The SAMA5D3x-EK LCD uses the SAMA5D's built in ADC touchscreen logic which I never really got working as well as I would like (probably just needs some tuning). The SAMA5D4-EK LCD has an Atmel maXTouch multi-touch LCD controller which is wonderful.

Greg
Dieter Kiermaier dieter.kiermaier-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 16:12:50 UTC
Permalink
Sorry, forgot to ask one more thing - am I right, that the default configuration for the Xplained kit is not using any external memory?
It looks like because there is no CS configured?

Many thanks,
Dieter



On Friday, September 19, 2014 6:11 PM, Dieter Kiermaier <***@yahoo.com> wrote:



Hi Greg,
it is using a maxTouch controller, too.
Yes, for sure a pretty nice one!

I guess I need a few days to become more familiar with NuttX but after that I will try to add LCD support for also the XPlained Kit.

Many thanks for your quick reply,
Dieter



On Friday, September 19, 2014 4:32 PM, "spudarnia-/***@public.gmane.org [nuttx]" <***@yahoogroups.com> wrote:




What kind of touchscreen interface does your LCD use? The SAMA5D3x-EK LCD uses the SAMA5D's built in ADC touchscreen logic which I never really got working as well as I would like (probably just needs some tuning). The SAMA5D4-EK LCD has an Atmel maXTouch multi-touch LCD controller which is wonderful.

Greg
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 16:47:25 UTC
Permalink
Hi, Dieter,
Post by Dieter Kiermaier dieter.kiermaier-/***@public.gmane.org [nuttx]
Sorry, forgot to ask one more thing - am I right, that the default configuration for the Xplained kit is not using any external memory?
It looks like because there is no CS configured?
Yes, in fact the basic code runs from SDRAM. But all code that runs in SDRAM has to be loaded by a bootloader (because something has to initialize the SDRAM before you an load the code into it). Therefore, there is no need to initialize SDRAM from NuttX (In fact, you can't re-initialize SDRAM if you are running from it without crashing). So NuttX, like Linux, simply leaves the external memory configuration in place as it was set up by the bootloader.


For the case of the SAMA5D-Xplained, there are not many boot options. I booted from NOR flash on the SAMA5D3x-EK but the SAMA5D-Xplained has no NOR flash so you have to run out of SDRAM. The only question is then what media you store the binary on before booting from SDRAM. There are several options: NAND, serial flash, or an SD card (and others I think).


I did most testing with nuttx.bin on an SD card using the U-Boot bootloader. These are the commands that I used to boot NuttX from the SD card:


U-Boot> fatload mmc 0 0x20008000 nuttx.bin
U-Boot> go 0x20008040


This is all described in configs/sama5d-xplained/README.txt.


The SAMA5D4-EK does not have NOR FLASH either. In that case, I wrote my own tiny bootloader that you can find at configs/sama5d4-ek/dramboot. I put this on the SD card as boot.bin. You an then coerce the ROM boot loader to boot from the program called boot.bin on an SD card instead of U-Boot in NAND.


The dramboot program loads into internal SRAM at boot time, initializes SDRAM, then loads nuttx.hex over serial into SDRAM, and starts it (or it can be configured to just wait so that you can break in with a debugger after the code has been loaded into SDRAM. Then you can set breakpoints and single step into NuttX). I found this very handy. I imagine that dramboot could be ported to the SAMA5D Xplained without too much effort.


NuttX also has verified support for the NAND on the SAMA5D3 boards. However, there is no proper NAND FLASH file system available now.


Greg
Dieter Kiermaier dieter.kiermaier-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 18:52:04 UTC
Permalink
Hi Greg,

thanks so far - I got it running (with nsh support) by loading it via ftftp from u-boot.
Your documentation is really great!

So my next steps will be to get the framebuffer / lcd driver up and running.
If I understand you right, I don't have change something at the memory configuration?

Looking forward to see my first picture :)

After I got this running I have to setup network and usb (host) for HID and mass storage.

Have a great weekend,
Dieter



On Friday, September 19, 2014 6:47 PM, "spudarnia-/***@public.gmane.org [nuttx]" <***@yahoogroups.com> wrote:




Hi, Dieter,
Post by Dieter Kiermaier dieter.kiermaier-/***@public.gmane.org [nuttx]
Sorry, forgot to ask one more thing - am I right, that the default configuration for the Xplained kit is not using any external memory?
It looks like because there is no CS configured?
Yes, in fact the basic code runs from SDRAM. But all code that runs in SDRAM has to be loaded by a bootloader (because something has to initialize the SDRAM before you an load the code into it). Therefore, there is no need to initialize SDRAM from NuttX (In fact, you can't re-initialize SDRAM if you are running from it without crashing). So NuttX, like Linux, simply leaves the external memory configuration in place as it was set up by the bootloader.

For the case of the SAMA5D-Xplained, there are not many boot options. I booted from NOR flash on the SAMA5D3x-EK but the SAMA5D-Xplained has no NOR flash so you have to run out of SDRAM. The only question is then what media you store the binary on before booting from SDRAM. There are several options: NAND, serial flash, or an SD card (and others I think).

I did most testing with nuttx.bin on an SD card using the U-Boot bootloader. These are the commands that I used to boot NuttX from the SD card:

U-Boot> fatload mmc 0 0x20008000 nuttx.bin
U-Boot> go 0x20008040

This is all described in configs/sama5d-xplained/README.txt.

The SAMA5D4-EK does not have NOR FLASH either. In that case, I wrote my own tiny bootloader that you can find at configs/sama5d4-ek/dramboot. I put this on the SD card as boot.bin. You an then coerce the ROM boot loader to boot from the program called boot.bin on an SD card instead of U-Boot in NAND.

The dramboot program loads into internal SRAM at boot time, initializes SDRAM, then loads nuttx.hex over serial into SDRAM, and starts it (or it can be configured to just wait so that you can break in with a debugger after the code has been loaded into SDRAM. Then you can set breakpoints and single step into NuttX). I found this very handy. I imagine that dramboot could be ported to the SAMA5D Xplained without too much effort.

NuttX also has verified support for the NAND on the SAMA5D3 boards. However, there is no proper NAND FLASH file system available now.

Greg
spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org [nuttx]
2014-09-19 19:15:12 UTC
Permalink
Hi, Dieter,
Post by Dieter Kiermaier dieter.kiermaier-/***@public.gmane.org [nuttx]
thanks so far - I got it running (with nsh support) by loading it via ftftp from u-boot.
Your documentation is really great!
Thanks. Some people have trouble following all of the README files. But if you realize that the detailed documentation that you need is probably right in the directories that you are working with it can be very convenient.
Post by Dieter Kiermaier dieter.kiermaier-/***@public.gmane.org [nuttx]
So my next steps will be to get the framebuffer / lcd driver up and running.
If I understand you right, I don't have change something at the memory configuration?
Yes, you will need to reserve some memory at the end of SDRAM for a framebuffer. Look at the SAMA5D4-EK for examples (the SAMA5D3x-EK examples run out of NOR FLASH so the memory configuration is different). These set aside the last 6MiB of SDRAM for a framebuffer on that board.


1. Reserve the SDRAM


CONFIG_SAMA5_DDRCS_RESERVE=y
CONFIG_SAMA5_DDRCS_HEAP_END=0x2fa00000


2. Configure the framebuffer


CONFIG_SAMA5_LCDC_FB_VBASE=0x2fa00000
CONFIG_SAMA5_LCDC_FB_PBASE=0x2fa00000
CONFIG_SAMA5_LCDC_FB_SIZE=6291456


The SDRAM memory map will then be:
.txt
.data
.bss
heap
freamebuffer


6MiB is probably more than you need to reserve. Eventually can tune that number by adding up the size of each video plane that you enable plus space for DMA descriptors. But 6MiB should is more than enough to get started.


Look at the configs/sama5d4-ek/README.txt file. That is a lot of LCD setup information in that file (it is 210KiB in length!).


You will probably want to use the SAMA5D4-EK as a model in general event though the SAMA5D4 is very different from the SAMA5D3. That is because that is the platform runs from SDRAM and that also builds in the maXTouch support.


Greg

Continue reading on narkive:
Loading...