waf: wil the new build system copy header files to include as autoconf?

2016-04-30 Thread printk
Hi, will the new build system copy the headers to include too?

...
duhuanpeng.
u74147@gmail.com


___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 4/4] arm/raspberrypi: add VideoCore framebuffer without initialization

2016-04-30 Thread Alan Cudmore
I applied the 4 patches ( I had to use the “patch” command, I could not get 
“git apply” to work for some reason ) 
It runs on the Raspberry Pi A+ ( 256MB RAM, single core ) , but it did not boot 
on the Raspberry Pi 2. I commented out the calls to rpi_init_cmdline() and it 
booted on the Pi 2 again.

I will try to troubleshoot more as soon as I can.

Alan

> On Apr 28, 2016, at 7:29 AM, Pavel Pisa  wrote:
> 
> From: YANG Qiao 
> Date: Thu, 13 Aug 2015 00:06:10 +0200
> 
> ---
> c/src/lib/libbsp/arm/raspberrypi/Makefile.am  |   1 +
> c/src/lib/libbsp/arm/raspberrypi/console/fb.c | 331 ++
> 2 files changed, 332 insertions(+)
> create mode 100644 c/src/lib/libbsp/arm/raspberrypi/console/fb.c
> 
> diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am 
> b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
> index 258f8a0..77935dc 100644
> --- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
> +++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
> @@ -114,6 +114,7 @@ libbsp_a_SOURCES += ../../shared/console_select.c
> libbsp_a_SOURCES += ../../shared/console_write.c
> libbsp_a_SOURCES += console/console-config.c
> libbsp_a_SOURCES += console/usart.c
> +libbsp_a_SOURCES += console/fb.c
> 
> # Mailbox
> libbsp_a_SOURCES += misc/mailbox.c
> diff --git a/c/src/lib/libbsp/arm/raspberrypi/console/fb.c 
> b/c/src/lib/libbsp/arm/raspberrypi/console/fb.c
> new file mode 100644
> index 000..a83d560
> --- /dev/null
> +++ b/c/src/lib/libbsp/arm/raspberrypi/console/fb.c
> @@ -0,0 +1,331 @@
> +/**
> + * @file
> + *
> + * @ingroup raspberrypi
> + *
> + * @brief framebuffer support.
> + */
> +
> +/*
> + * Copyright (c) 2015 Yang Qiao
> + *
> + *  The license and distribution terms for this file may be
> + *  found in the file LICENSE in this distribution or at
> + *
> + *  http://www.rtems.org/license/LICENSE
> + *
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define SCREEN_WIDTH 1024
> +#define SCREEN_HEIGHT 768
> +#define BPP 32
> +#define BUFFER_SIZE (SCREEN_WIDTH*SCREEN_HEIGHT*BPP/8)
> +
> +/* flag to limit driver to protect against multiple opens */
> +static Atomic_Flag driver_mutex;
> +
> +/*
> + * screen information for the driver (fb0).
> + */
> +
> +static struct fb_var_screeninfo fb_var_info = {
> +  .xres= SCREEN_WIDTH,
> +  .yres= SCREEN_HEIGHT,
> +  .bits_per_pixel  = BPP
> +};
> +
> +static struct fb_fix_screeninfo fb_fix_info = {
> +  .smem_start  = (void *) NULL,
> +  .smem_len= 0,
> +  .type= FB_TYPE_PACKED_PIXELS,
> +  .visual  = FB_VISUAL_TRUECOLOR,
> +  .line_length = 0
> +};
> +
> +int raspberrypi_get_fix_screen_info( struct fb_fix_screeninfo *info )
> +{
> +  *info = fb_fix_info;
> +  return 0;
> +}
> +
> +int raspberrypi_get_var_screen_info( struct fb_var_screeninfo *info )
> +{
> +  *info = fb_var_info;
> +  return 0;
> +}
> +
> +static int
> +find_mode_from_cmdline(void)
> +{
> +  const char* opt;
> +  char* endptr;
> +  uint32_t width;
> +  uint32_t height;
> +  uint32_t bpp;
> +  opt = rpi_cmdline_arg("--video=");
> +  if (opt)
> +  {
> +  opt += sizeof("--video=")-1;
> +  width = strtol(opt, &endptr, 10);
> +  if (*endptr != 'x')
> +  {
> +  return -2;
> +  }
> +  opt = endptr+1;
> +  height = strtol(opt, &endptr, 10);
> +  switch (*endptr)
> +  {
> +  case '-':
> +  opt = endptr+1;
> +  if (strlen(opt) <= 2)
> +  bpp = strtol(opt, &endptr, 10);
> +  else
> +  {
> +  bpp = strtol(opt, &endptr, 10);
> +  if (*endptr != ' ')
> +  {
> +  return -4;
> +  }
> +  }
> +  case ' ':
> +  case 0:
> +  break;
> +  default:
> +  return -3;
> +  }
> +  }
> +  else
> +return -1;
> +
> +  fb_var_info.xres= width;
> +  fb_var_info.yres= height;
> +
> +  return 0;
> +}
> +
> +static int
> +find_mode_from_vc(void)
> +{
> +  bcm2835_get_display_size_entries entries;
> +  bcm2835_mailbox_get_display_size(&entries);
> +  unsigned int width = entries.width;
> +  unsigned int height = entries.height;
> +
> +  if (width == 0 || height == 0)
> +  {
> +fb_var_info.xres= SCREEN_WIDTH;
> +fb_var_info.yres= SCREEN_HEIGHT;
> +  }
> +  else
> +  {
> +fb_var_info.xres = width;
> +fb_var_info.yres = height;
> +  }
> +
> +  return 0;
> +}
> +
> +static bool
> +hdmi_is_present(void)
> +{
> +  bcm2835_get_display_size_entries entries;
> +  bcm2835_mailbox_get_display_size(&entries);
> +  if(entries.width == 0x290 && entries.height ==0x1A0 )
> +  {
> +return false;
> +  }
> +  else
> +  {
> +return true;
> +  }
> +}
> +
> +int
> +fb_init(void)
> +{
> +  if (fb_fix_i

Re: PWM driver tested in RTEMS with RGB

2016-04-30 Thread punit vara
Sorry for late reply. Thank you for your detailed review. I am still
busy this week with my academic work.I would like to have suggestions
on my proposal.

Should I change anything in my proposal like title or any other detail
? Any suggestions ?

Is there any vim setup instruction for RTEMS coding style(i.e Linux
community has). If not ? I would love to develop vim plugin if it is
possible to develop in less time. It will be useful for every RTEMS
developer.

On Tue, Apr 26, 2016 at 8:21 PM, Martin Galvan
 wrote:
> Hi Punit! Sorry for the delay; I finally got to review your code.
> First and foremost, it'd be great if you could tell us which
> StarterWare version/git commit are you using, so that we can keep it
> handy when reviewing your code. Sorry if you already mentioned it, my
> memory is a bit sketchy these days :)
>
> As a general comment I'd say you should keep a consistent coding style
> throughout the code you write yourself. While the core RTEMS style
> (spaces after parentheses, etc) isn't required in BSP code, at least
> indentations should be correct. Indentations in RTEMS are usually two
> spaces.
>
> More on coding style later.
>
> On Fri, Apr 15, 2016 at 4:48 PM, punit vara  wrote:
>> This is my first patch I already sent you when I successfully merged TI SW 
>> code.
>>
>> https://github.com/punitvara/rtems_gsoc16/tree/master/pwm/patch
>
> I take it you're referring to 0001-add-new-pwm-driver.patch. A few comments:
>
> 1) Whenever possible, try to keep the original coding style for
> imported code. This makes it easier to track changes and such. Same
> goes for e.g. the order in which functions are declared (e.g.
> EHRPWMConfigureAQActionOnA and B).
>
> 2) I think you should add the TI license to bbb-pwm.c as well. It
> would also be really nice if you added a comment atop the imported
> files saying which SW version/git commit they come from.

https://github.com/punitvara/rtems_gsoc16/blob/master/pwm/patch/0001-PWM-successful-code-added.patch

I added Ti licence at last patch. Do I need to add any other licence ?
I will update my local repo with your other suggestion. I considered
all your suggestions. I will soon generate some patches and show you.
Then you can guide me further.

Once again thank you for mentoring every one.

Regards,
Punit Vara
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel