STM32F4 discovery makefile
sarraciro
sarraciro at yahoo.it
Fri Oct 25 21:53:48 UTC 2013
Maybe including the tree of the git-link is more quick (:))...
But actually I ignore how...
--
RC
Il giorno ven, 25/10/2013 alle 21.21 +0200, sarraciro ha scritto:
> Hi, I've built with success a template for the stm32f4-discovery.
> Now I want integrate the GPIO support (for starting) .
> I've noticed :
> http://git.rtems.org/rtems/tree/c/src/lib/libbsp/arm/stm32f4
>
> Then I made this structure: two directories inc & src
> |-- init.c
> |-- lib
> | |-- inc
> | | |-- bsp.h
> | | |-- bspopts.h
> | | |-- i2c.h
> | | |-- io.h
> | | |-- irq.h
> | | |-- rcc.h
> | | |-- stm32f4.h
> | | |-- stm32f4xxxx_gpio.h
> | | |-- stm32f4xxxx_rcc.h
> | | |-- stm32_i2c.h
> | | |-- stm32_usart.h
> | | `-- usart.h
> | |-- Makefile
> | `-- src
> | |-- console-config.c
> | |-- i2c.c
> | |-- i2c-config.c
> | `-- usart.c
> |-- Makefile
> |-- pmacros.h
> |-- system.h
> |-- init.c
> |-- lib
> | |-- inc
> | | |-- bsp.h
> | | |-- bspopts.h
> | | |-- i2c.h
> | | |-- io.h
> | | |-- irq.h
> | | |-- rcc.h
> | | |-- stm32f4.h
> | | |-- stm32f4xxxx_gpio.h
> | | |-- stm32f4xxxx_rcc.h
> | | |-- stm32_i2c.h
> | | |-- stm32_usart.h
> | | `-- usart.h
> | |-- Makefile
> | `-- src
> | |-- console-config.c
> | |-- i2c.c
> | |-- i2c-config.c
> | `-- usart.c
> |-- Makefile
> |-- pmacros.h
> |-- system.h
>
> but how to the control of building-process can flow through from the
> first makefile to the second one (lib/) for build the library? there 're
> any recommendations to build & include a library?
> Regards
> --
> SC
> Il giorno mer, 23/10/2013 alle 21.34 -0500, Joel Sherrill ha scritto:
> > Are you building inside the tree or outside?
> >
> > If outside, how do you build the rest of your application?
> >
> > The got module examples-v2 has working examples of the type of make files you are talking about but you are under no obligation to use them.
> >
> > sarraciro <sarraciro at yahoo.it> wrote:
> >
> >
> > I found (docs-> /rtems/bsps/4.11/share/rtems4.11/make/Template) a README
> > that explains howto write the makefile,
> > I don't understand where I have to set RTEMS_MAKEFILE_PATH...
> >
> > However AlanC don't set this variable (I not saw it until now) in his
> > example...
> > seems that there are several ways to build with a makefile...
> > The documentation talks about leaf node Makefile and Makefile for
> > directory.
> > But both include Makefile.inc or/and leaf.cfg (bsps support I
> > presume)....
> >
> > I'm confused about it ... I never used them until now ... can anyone
> > explain me what is the advised method and how to move on??
> > Regards
> >
> > --
> > SC
> >
> > Il giorno mer, 23/10/2013 alle 13.55 +0200, sarraciro ha scritto:
> > > Hi all,
> > > I'm working on makefile to build custom application for
> > > stm32f4-discovery.
> > >
> > > The flags that I think are needed are:
> > > #include $(RTEMS_ROOT)/make/custom/default.cfg
> > > RTEMS_CPU = arm
> > > CPU_CFLAGS= -march=arm7-m -mthumb
> > > CFLAGS_OPTIMIZE_V = -O2 -g
> > >
> > > That not match the flags that I that I used to building fw for STM32F4
> > > without rtems:
> > > CFLAGS = -g -O2 -Wall -Tstm32_flash.ld
> > > CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork
> > > CFLAGS += -mfloat-abi=soft -mfpu=fpv4-sp-d16
> > >
> > > Another important thing is (imho) add to source files the
> > > startup_stm32f4xx.s file
> > > SRCS += lib/startup_stm32f4xx.s # add startup file to build
> > >
> > > I'm starting from AlanC makefile for RasPi...
> > > I'm a bit confused right now... AlanC don't use the SRCS and CFLAGS
> > > environment variables to build OBJS.... and I'm loosing in the Makefile
> > > documentation...
> > > Can anyone explain how to go on? or provide a makefile for example?
> > >
> > > I attach the makefiles that I would merge in some (right) way.
> > >
> > > Regards
> > >
> > > --
> > > SC
> > > _______________________________________________
> > > rtems-users mailing list
> > > rtems-users at rtems.org
> > > http://www.rtems.org/mailman/listinfo/rtems-users
> >
> >
> > _______________________________________________
> > rtems-users mailing list
> > rtems-users at rtems.org
> > http://www.rtems.org/mailman/listinfo/rtems-users
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
More information about the users
mailing list