Re: rtems-tld update.

2014-09-21 Thread Gedare Bloom
Thanks Chris. If you have any ideas on useful ways to visualize these
traces, I think it could make a good open project for a student.

-Gedare

On Sun, Sep 21, 2014 at 12:51 AM, Chris Johns chr...@rtems.org wrote:
 Hello,

 I have pushed updates to rtems-tld to rtems-tools.git plus changes to
 examples-v2 to trace into RTEMS. The trace for sparc/sis is attached.

 To run build and install the rtems-tools and install to the same location as
 my tools using the same prefix:

  $ git clone git://git.rtems.org/rtems-tools.git rtems-tools
  $ cd rtems-tools
  $ waf configure --prefix=$HOME/development/rtems/4.11
  $ waf build install
  $ cd ..
  $ git clone git://git.rtems.org/examples-v2.git examples-v2
  $ cd examples-v3
  $ waf configure \
 --rtems=$HOME/development/rtems/bsps/4.11 \
 --rtems-tools=$HOME/development/rtems/4.11
  $ waf

 Note, this assumes I have built and installed sparc/sis with a prefix of
 $HOME/development/rtems/bsps/4.11.

 Chris

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


Re: [PATCH] bsp:stm32f4XXXX system clock configuration

2014-09-21 Thread Tomasz Gregorek
There are not only styles to be corrected. I will send a new version soon.

2014-09-20 20:41 GMT+02:00 Joel Sherrill joel.sherr...@oarcorp.com:

 Style comments from me. I will let those who know who the HW comment on
 that.

 On September 20, 2014 1:23:26 PM CDT, tomasz.grego...@gmail.com 
 tomasz.grego...@gmail.com wrote:
 From: Tomasz Gregorek tomasz.grego...@gmail.com
 
 Added simple math to caclulate register values for the PLL
 and for the prescalers. It will try to keep 48MHz for the USB OTG FS.
 Also it will slow down Flash memory for the high speeds.
 ---
  c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h |  10 +
  .../libbsp/arm/stm32f4/include/stm32f4_flash.h |  41 
  .../libbsp/arm/stm32f4/include/stm32f4_rcc.h   |  94 +
 c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c| 211
 +
  4 files changed, 356 insertions(+)
 create mode 100644
 c/src/lib/libbsp/arm/stm32f4/include/stm32f4_flash.h
 
 diff --git a/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h
 b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h
 index 59d13ef..d26f914 100644
 --- a/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h
 +++ b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h
 @@ -55,6 +55,16 @@
 
  /** @} */
 
 +/**
 + * @name STM32F4 FLASH
 + * @{
 + */
 +
 +#include bsp/stm32f4_flash.h
 +#define STM32F4_FLASH ((volatile stm32f4_flash *) (STM32F4_BASE +
 0x40023C00))
 +
 +/** @} */
 +
  #include bsp/stm32_i2c.h
 
  /**
 diff --git a/c/src/lib/libbsp/arm/stm32f4/include/stm32f4_flash.h
 b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4_flash.h
 new file mode 100644
 index 000..31b3992
 --- /dev/null
 +++ b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4_flash.h
 @@ -0,0 +1,41 @@
 +/**
 + * @file
 + * @ingroup stm32f4_flash
 + * @brief STM32F4 FLASH support.
 + */
 +
 +/*
 + * Copyright (c) 2014 Tomasz Gregorek.  All rights reserved.
 + *
 + *  tomasz.grego...@gmial.com
 + *
 + * 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.
 + */
 +
 +#ifndef LIBBSP_ARM_STM32F4_STM32F4_FLASH_H
 +#define LIBBSP_ARM_STM32F4_STM32F4_FLASH_H
 +
 +#include bsp/utility.h
 +
 +/**
 + * @defgroup stm32f10xxx_flash STM32F4 FLASH Support
 + * @ingroup stm32f4_flash
 + * @brief STM32F4FXXX FLASH Support
 + * @{
 + */
 +
 +typedef struct {
 +   uint32_t acr;
 +   uint32_t keyr;
 +   uint32_t optkeyr;
 +   uint32_t sr;
 +   uint32_t cr;
 +   uint32_t optcr;
 +   uint32_t optcr1;
 +} stm32f4_flash;
 +
 +/** @} */
 +
 +#endif /* LIBBSP_ARM_STM32F4_STM32F4_FLASH_H */
 diff --git a/c/src/lib/libbsp/arm/stm32f4/include/stm32f4_rcc.h
 b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4_rcc.h
 index 8126340..ce85b8e 100644
 --- a/c/src/lib/libbsp/arm/stm32f4/include/stm32f4_rcc.h
 +++ b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4_rcc.h
 @@ -56,4 +56,98 @@ typedef struct {
 
  /** @} */
 
 +#define RCC_CR_HSION  BSP_BIT32(0)
 +#define RCC_CR_HSIRDY BSP_BIT32(1)
 +#define RCC_CR_HSITRIM3
 +#define RCC_CR_HSICAL 8
 +#define RCC_CR_HSEON  BSP_BIT32(16)
 +#define RCC_CR_HSERDY BSP_BIT32(17)
 +#define RCC_CR_HSEBYP BSP_BIT32(18)
 +#define RCC_CR_CSSON  BSP_BIT32(19)
 +#define RCC_CR_PLLON  BSP_BIT32(24)
 +#define RCC_CR_PLLRDY BSP_BIT32(25)
 +#define RCC_CR_PLLI2SON   BSP_BIT32(26)
 +#define RCC_CR_PLLI2SRDY  BSP_BIT32(27)
 +
 +
 +#define RCC_PLLCFGR_PLLM0
 +#define RCC_PLLCFGR_PLLN6
 +#define RCC_PLLCFGR_PLLP16
 +
 +#define RCC_PLLCFGR_PLLSRC_HSE BSP_BIT32(22)
 +#define RCC_PLLCFGR_PLLSRC_HSI 0
 +
 +#define RCC_PLLCFGR_PLLQ 24
 +
 +
 +#define RCC_CFGR_SW  0
 +#define RCC_CFGR_SW_MASK 3
 +#define RCC_CFGR_SW_HSI  0
 +#define RCC_CFGR_SW_HSE  1
 +#define RCC_CFGR_SW_PLL  2
 +
 +#define RCC_CFGR_SWS 2
 +#define RCC_CFGR_SWS_MASK(3  RCC_CFGR_SWS)
 +
 +#define RCC_CFGR_SWS_HSI 0
 +#define RCC_CFGR_SWS_HSE (1  RCC_CFGR_SWS)
 +#define RCC_CFGR_SWS_PLL (2  RCC_CFGR_SWS)
 +
 +#define RCC_CFGR_HPRE4
 +#define RCC_CFGR_HPRE_BY_1 0
 +#define RCC_CFGR_HPRE_BY_2   ( 8  RCC_CFGR_HPRE)
 +#define RCC_CFGR_HPRE_BY_4   ( 9  RCC_CFGR_HPRE)
 +#define RCC_CFGR_HPRE_BY_8   (10  RCC_CFGR_HPRE)
 +#define RCC_CFGR_HPRE_BY_16  (11  RCC_CFGR_HPRE)
 +#define RCC_CFGR_HPRE_BY_64  (12  RCC_CFGR_HPRE)
 +#define RCC_CFGR_HPRE_BY_128 (13  RCC_CFGR_HPRE)
 +#define RCC_CFGR_HPRE_BY_256 (14  RCC_CFGR_HPRE)
 +#define RCC_CFGR_HPRE_BY_512 (15  RCC_CFGR_HPRE)
 +
 +#define RCC_CFGR_PPRE110
 +#define RCC_CFGR_PPRE1_BY_1   0
 +#define RCC_CFGR_PPRE1_BY_2   (4  RCC_CFGR_PPRE1)
 +#define RCC_CFGR_PPRE1_BY_4   (5  RCC_CFGR_PPRE1)
 +#define RCC_CFGR_PPRE1_BY_8   (6  RCC_CFGR_PPRE1)
 +#define RCC_CFGR_PPRE1_BY_16  (7  RCC_CFGR_PPRE1)
 +
 +#define RCC_CFGR_PPRE213
 +#define RCC_CFGR_PPRE2_BY_1   0
 +#define RCC_CFGR_PPRE2_BY_2   (4  RCC_CFGR_PPRE2)
 +#define 

Re: Cortex-M0 BPS creation

2014-09-21 Thread Sebastian Huber

On 22/09/14 06:36, Мороз Олег wrote:

 Hello everyone. i'm new to  BSP development.  We have a project which is
uses some kind of cortex-m0 microcontroller. As i understand it's armv6-m
family. Is this CPU family is supported by rtems? I'm reading the book called
BSP and device driver development guide  and it says look at
cpukit/score/cpu/CPU. This directory contains only armv7-m and armv4 files.
Is it correct?


The armv7-m support will probably work also for a Cortex-M0.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel