From 2275ed7b0c355920927be6709a87a0482a749eb2 Mon Sep 17 00:00:00 2001 From: chrysn Date: Sun, 26 Feb 2012 03:40:18 +0100 Subject: overhauled documentation includes minor refactoring in example code and modification of how the generic and the tinygecko specific vector.h go together (bringing it in line with stm32/f1's memorymap.h) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4e41096..07825ec 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ LIBDIR = $(DESTDIR)/$(PREFIX)/lib SHAREDIR = $(DESTDIR)/$(PREFIX)/share/libopencm3/scripts INSTALL = install -TARGETS = stm32/f1 stm32/f2 stm32/f4 lpc13xx lm3s +TARGETS = stm32/f1 stm32/f2 stm32/f4 lpc13xx lm3s efm32/tinygecko # Be silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) -- cgit v1.2.3 From d526dd3268500d397746b19d2ab6688abf524077 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 19 Oct 2012 00:49:27 +0200 Subject: rename tinygecko->efm32tg everywhere --- Makefile | 2 +- include/libopencm3/dispatch/nvic.h | 2 +- include/libopencm3/efm32/efm32tg/irq.yaml | 28 +++++++++ include/libopencm3/efm32/efm32tg/memorymap.h | 76 +++++++++++++++++++++++ include/libopencm3/efm32/tinygecko/irq.yaml | 28 --------- include/libopencm3/efm32/tinygecko/memorymap.h | 76 ----------------------- include/libopencmsis/dispatch/irqhandlers.h | 2 +- lib/dispatch/vector_nvic.c | 2 +- lib/efm32/efm32tg/EFM32TG840F32.ld | 15 +++++ lib/efm32/efm32tg/Makefile | 38 ++++++++++++ lib/efm32/efm32tg/libopencm3_efm32tg.ld | 79 ++++++++++++++++++++++++ lib/efm32/tinygecko/EFM32TG840F32.ld | 15 ----- lib/efm32/tinygecko/Makefile | 38 ------------ lib/efm32/tinygecko/libopencm3_efm32tinygecko.ld | 79 ------------------------ 14 files changed, 240 insertions(+), 240 deletions(-) create mode 100644 include/libopencm3/efm32/efm32tg/irq.yaml create mode 100644 include/libopencm3/efm32/efm32tg/memorymap.h delete mode 100644 include/libopencm3/efm32/tinygecko/irq.yaml delete mode 100644 include/libopencm3/efm32/tinygecko/memorymap.h create mode 100644 lib/efm32/efm32tg/EFM32TG840F32.ld create mode 100644 lib/efm32/efm32tg/Makefile create mode 100644 lib/efm32/efm32tg/libopencm3_efm32tg.ld delete mode 100644 lib/efm32/tinygecko/EFM32TG840F32.ld delete mode 100644 lib/efm32/tinygecko/Makefile delete mode 100644 lib/efm32/tinygecko/libopencm3_efm32tinygecko.ld (limited to 'Makefile') diff --git a/Makefile b/Makefile index 02d3c7a..80f0822 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ SHAREDIR = $(DESTDIR)/$(PREFIX)/share/libopencm3/scripts INSTALL = install SRCLIBDIR = $(shell pwd)/lib -TARGETS = stm32/f1 stm32/f2 stm32/f4 lpc13xx lpc17xx lpc43xx lm3s efm32/tinygecko +TARGETS = stm32/f1 stm32/f2 stm32/f4 lpc13xx lpc17xx lpc43xx lm3s efm32/efm32tg # Be silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) diff --git a/include/libopencm3/dispatch/nvic.h b/include/libopencm3/dispatch/nvic.h index 2146c83..27c6161 100644 --- a/include/libopencm3/dispatch/nvic.h +++ b/include/libopencm3/dispatch/nvic.h @@ -6,7 +6,7 @@ # include #elif defined(EFM32TG) -# include +# include #elif defined(LPC43XX) # include diff --git a/include/libopencm3/efm32/efm32tg/irq.yaml b/include/libopencm3/efm32/efm32tg/irq.yaml new file mode 100644 index 0000000..f4aaba3 --- /dev/null +++ b/include/libopencm3/efm32/efm32tg/irq.yaml @@ -0,0 +1,28 @@ +includeguard: LIBOPENCM3_EFM32TG_NVIC_H +partname_humanreadable: EFM32 Tiny Gecko series +partname_doxygen: EFM32TG +# The names and sequence are taken from d0034_efm32tg_reference_manual.pdf table 4.1. +irqs: + - dma + - gpio_even + - timer0 + - usart0_rx + - usart0_tx + - acmp01 + - adc0 + - dac0 + - i2c0 + - gpio_odd + - timer1 + - usart1_rx + - usart1_tx + - lesense + - leuart0 + - letimer0 + - pcnt0 + - rtc + - cmu + - vcmp + - lcd + - msc + - aes diff --git a/include/libopencm3/efm32/efm32tg/memorymap.h b/include/libopencm3/efm32/efm32tg/memorymap.h new file mode 100644 index 0000000..abf37ce --- /dev/null +++ b/include/libopencm3/efm32/efm32tg/memorymap.h @@ -0,0 +1,76 @@ +/* + * This file is part of the libopencm3 project. + * + * Copyright (C) 2012 chrysn + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/** @file + * + * Layout of the system address space of Tiny Gecko devices. + * + * This reflects d0034_efm32tg_reference_manual.pdf figure 5.2. + */ + +/* The common cortex-m3 definitions were verified from + * d0034_efm32tg_reference_manual.pdf figure 5.2. The CM3 ROM Table seems to be + * missing there. The details (everything based on SCS_BASE) was verified from + * d0002_efm32_cortex-m3_reference_manual.pdf table 4.1, and seems to fit, but + * there are discrepancies. */ +#include + +#define CODE_BASE 0x00000000 + +#define SRAM_BASE 0x20000000 +#define SRAM_BASE_BITBAND 0x22000000 + +#define PERIPH_BASE 0x40000000 +#define PERIPH_BASE_BITBAND 0x42000000 + +/* Details of the "Code" section */ + +#define FLASH_BASE (CODE_BASE + 0x00000000) +#define USERDATA_BASE (CODE_BASE + 0x0fe00000) +#define LOCKBITS_BASE (CODE_BASE + 0x0fe04000) +#define CHIPCONFIG_BASE (CODE_BASE + 0x0fe08000) +#define CODESPACESRAM_BASE (CODE_BASE + 0x10000000) + +/* Tiny Gecko peripherial definitions */ + +#define VCMP_BASE (PERIPH_BASE + 0x00000000) +#define ACMP0_BASE (PERIPH_BASE + 0x00001000) +#define ACMP1_BASE (PERIPH_BASE + 0x00001400) +#define ADC_BASE (PERIPH_BASE + 0x00002000) +#define DAC0_BASE (PERIPH_BASE + 0x00004000) +#define GPIO_BASE (PERIPH_BASE + 0x00006000) /**< @see gpio.h */ +#define I2C0_BASE (PERIPH_BASE + 0x0000a000) +#define USART0_BASE (PERIPH_BASE + 0x0000c000) +#define USART1_BASE (PERIPH_BASE + 0x0000c400) +#define TIMER0_BASE (PERIPH_BASE + 0x00010000) +#define TIMER1_BASE (PERIPH_BASE + 0x00010400) +#define RTC_BASE (PERIPH_BASE + 0x00080000) +#define LETIMER0_BASE (PERIPH_BASE + 0x00082000) +#define LEUART0_BASE (PERIPH_BASE + 0x00084000) +#define PCNT0_BASE (PERIPH_BASE + 0x00086000) +#define WDOG_BASE (PERIPH_BASE + 0x00088000) +#define LCD_BASE (PERIPH_BASE + 0x0008a000) +#define LESENSE_BASE (PERIPH_BASE + 0x0008c000) +#define MSC_BASE (PERIPH_BASE + 0x000c0000) +#define DMA_BASE (PERIPH_BASE + 0x000c2000) +#define EMU_BASE (PERIPH_BASE + 0x000c6000) +#define CMU_BASE (PERIPH_BASE + 0x000c8000) /**< @see cmu.h */ +#define RMU_BASE (PERIPH_BASE + 0x000ca000) +#define PRS_BASE (PERIPH_BASE + 0x000cc000) +#define AES_BASE (PERIPH_BASE + 0x000e0000) diff --git a/include/libopencm3/efm32/tinygecko/irq.yaml b/include/libopencm3/efm32/tinygecko/irq.yaml deleted file mode 100644 index da954f6..0000000 --- a/include/libopencm3/efm32/tinygecko/irq.yaml +++ /dev/null @@ -1,28 +0,0 @@ -includeguard: LIBOPENCM3_EFM32_TINYGECKO_NVIC_H -partname_humanreadable: EFM32 Tiny Gecko series -partname_doxygen: EFM32TG -# The names and sequence are taken from d0034_efm32tg_reference_manual.pdf table 4.1. -irqs: - - dma - - gpio_even - - timer0 - - usart0_rx - - usart0_tx - - acmp01 - - adc0 - - dac0 - - i2c0 - - gpio_odd - - timer1 - - usart1_rx - - usart1_tx - - lesense - - leuart0 - - letimer0 - - pcnt0 - - rtc - - cmu - - vcmp - - lcd - - msc - - aes diff --git a/include/libopencm3/efm32/tinygecko/memorymap.h b/include/libopencm3/efm32/tinygecko/memorymap.h deleted file mode 100644 index abf37ce..0000000 --- a/include/libopencm3/efm32/tinygecko/memorymap.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2012 chrysn - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -/** @file - * - * Layout of the system address space of Tiny Gecko devices. - * - * This reflects d0034_efm32tg_reference_manual.pdf figure 5.2. - */ - -/* The common cortex-m3 definitions were verified from - * d0034_efm32tg_reference_manual.pdf figure 5.2. The CM3 ROM Table seems to be - * missing there. The details (everything based on SCS_BASE) was verified from - * d0002_efm32_cortex-m3_reference_manual.pdf table 4.1, and seems to fit, but - * there are discrepancies. */ -#include - -#define CODE_BASE 0x00000000 - -#define SRAM_BASE 0x20000000 -#define SRAM_BASE_BITBAND 0x22000000 - -#define PERIPH_BASE 0x40000000 -#define PERIPH_BASE_BITBAND 0x42000000 - -/* Details of the "Code" section */ - -#define FLASH_BASE (CODE_BASE + 0x00000000) -#define USERDATA_BASE (CODE_BASE + 0x0fe00000) -#define LOCKBITS_BASE (CODE_BASE + 0x0fe04000) -#define CHIPCONFIG_BASE (CODE_BASE + 0x0fe08000) -#define CODESPACESRAM_BASE (CODE_BASE + 0x10000000) - -/* Tiny Gecko peripherial definitions */ - -#define VCMP_BASE (PERIPH_BASE + 0x00000000) -#define ACMP0_BASE (PERIPH_BASE + 0x00001000) -#define ACMP1_BASE (PERIPH_BASE + 0x00001400) -#define ADC_BASE (PERIPH_BASE + 0x00002000) -#define DAC0_BASE (PERIPH_BASE + 0x00004000) -#define GPIO_BASE (PERIPH_BASE + 0x00006000) /**< @see gpio.h */ -#define I2C0_BASE (PERIPH_BASE + 0x0000a000) -#define USART0_BASE (PERIPH_BASE + 0x0000c000) -#define USART1_BASE (PERIPH_BASE + 0x0000c400) -#define TIMER0_BASE (PERIPH_BASE + 0x00010000) -#define TIMER1_BASE (PERIPH_BASE + 0x00010400) -#define RTC_BASE (PERIPH_BASE + 0x00080000) -#define LETIMER0_BASE (PERIPH_BASE + 0x00082000) -#define LEUART0_BASE (PERIPH_BASE + 0x00084000) -#define PCNT0_BASE (PERIPH_BASE + 0x00086000) -#define WDOG_BASE (PERIPH_BASE + 0x00088000) -#define LCD_BASE (PERIPH_BASE + 0x0008a000) -#define LESENSE_BASE (PERIPH_BASE + 0x0008c000) -#define MSC_BASE (PERIPH_BASE + 0x000c0000) -#define DMA_BASE (PERIPH_BASE + 0x000c2000) -#define EMU_BASE (PERIPH_BASE + 0x000c6000) -#define CMU_BASE (PERIPH_BASE + 0x000c8000) /**< @see cmu.h */ -#define RMU_BASE (PERIPH_BASE + 0x000ca000) -#define PRS_BASE (PERIPH_BASE + 0x000cc000) -#define AES_BASE (PERIPH_BASE + 0x000e0000) diff --git a/include/libopencmsis/dispatch/irqhandlers.h b/include/libopencmsis/dispatch/irqhandlers.h index ad3f4a1..41c4b28 100644 --- a/include/libopencmsis/dispatch/irqhandlers.h +++ b/include/libopencmsis/dispatch/irqhandlers.h @@ -6,7 +6,7 @@ # include #elif defined(EFM32TG) -# include +# include #elif defined(LPC43XX) # include diff --git a/lib/dispatch/vector_nvic.c b/lib/dispatch/vector_nvic.c index 9ac9517..9373319 100644 --- a/lib/dispatch/vector_nvic.c +++ b/lib/dispatch/vector_nvic.c @@ -6,7 +6,7 @@ # include "../stm32/f4/vector_nvic.c" #elif defined(EFM32TG) -# include "../efm32/tinygecko/vector_nvic.c" +# include "../efm32/efm32tg/vector_nvic.c" #elif defined(LPC43XX) # include "../lpc43xx/vector_nvic.c" diff --git a/lib/efm32/efm32tg/EFM32TG840F32.ld b/lib/efm32/efm32tg/EFM32TG840F32.ld new file mode 100644 index 0000000..f7baa90 --- /dev/null +++ b/lib/efm32/efm32tg/EFM32TG840F32.ld @@ -0,0 +1,15 @@ +/* lengths from d011_efm32tg840_datasheet.pdf table 1.1, offset from + * d0034_efm32tg_reference_manual.pdf figure 5.2. + * + * the origins and memory structure are constant over all tinygeckos, but the + * MEMORY section requires the use of constants, and has thus to be duplicated + * over the chip variants. + * */ + +MEMORY +{ + rom (rx) : ORIGIN = 0, LENGTH = 32k + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 4k +} + +INCLUDE tinygecko.ld; diff --git a/lib/efm32/efm32tg/Makefile b/lib/efm32/efm32tg/Makefile new file mode 100644 index 0000000..65f8d02 --- /dev/null +++ b/lib/efm32/efm32tg/Makefile @@ -0,0 +1,38 @@ +## +## This file is part of the libopencm3 project. +## +## Copyright (C) 2009 Uwe Hermann +## Copyright (C) 2012 chrysn +## +## This library is free software: you can redistribute it and/or modify +## it under the terms of the GNU Lesser General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public License +## along with this library. If not, see . +## + +LIBNAME = libopencm3_efm32tg +FAMILY = EFM32TG + +PREFIX ?= arm-none-eabi +#PREFIX ?= arm-elf +CC = $(PREFIX)-gcc +AR = $(PREFIX)-ar +CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ + -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ + -ffunction-sections -fdata-sections -MD -D$(FAMILY) +# ARFLAGS = rcsv +ARFLAGS = rcs +OBJS = vector.o + +VPATH += ../:../../cm3 + +include ../../Makefile.include + diff --git a/lib/efm32/efm32tg/libopencm3_efm32tg.ld b/lib/efm32/efm32tg/libopencm3_efm32tg.ld new file mode 100644 index 0000000..8ef5e42 --- /dev/null +++ b/lib/efm32/efm32tg/libopencm3_efm32tg.ld @@ -0,0 +1,79 @@ +/* + * This file is part of the libopencm3 project. + * + * Copyright (C) 2009 Uwe Hermann , + * Copyright (C) 2012 chrysn + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/* Generic linker script for EFM32 targets using libopencm3. */ + +/* Memory regions must be defined in the ld script which includes this one. */ + +/* Enforce emmition of the vector table. */ +EXTERN (vector_table) + +/* Define the entry point of the output file. */ +ENTRY(reset_handler) + +/* Define sections. */ +SECTIONS +{ + . = ORIGIN(rom); + + .text : { + *(.vectors) /* Vector table */ + *(.text*) /* Program code */ + . = ALIGN(4); + *(.rodata*) /* Read-only data */ + . = ALIGN(4); + _etext = .; + } >rom + + . = ORIGIN(ram); + + .data : AT(_etext) { + _data = .; + *(.data*) /* Read-write initialized data */ + . = ALIGN(4); + _edata = .; + } >ram + + .bss : { + *(.bss*) /* Read-write zero initialized data */ + *(COMMON) + . = ALIGN(4); + _ebss = .; + } >ram AT >rom + _data_loadaddr = LOADADDR(.data); + + /* + * The .eh_frame section appears to be used for C++ exception handling. + * You may need to fix this if you're using C++. + */ + /DISCARD/ : { *(.eh_frame) } + + /* + * Another section used by C++ stuff, appears when using newlib with + * 64bit (long long) printf support - discard it for now. + */ + /DISCARD/ : { *(.ARM.exidx) } + + . = ALIGN(4); + end = .; +} + +PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); + diff --git a/lib/efm32/tinygecko/EFM32TG840F32.ld b/lib/efm32/tinygecko/EFM32TG840F32.ld deleted file mode 100644 index f7baa90..0000000 --- a/lib/efm32/tinygecko/EFM32TG840F32.ld +++ /dev/null @@ -1,15 +0,0 @@ -/* lengths from d011_efm32tg840_datasheet.pdf table 1.1, offset from - * d0034_efm32tg_reference_manual.pdf figure 5.2. - * - * the origins and memory structure are constant over all tinygeckos, but the - * MEMORY section requires the use of constants, and has thus to be duplicated - * over the chip variants. - * */ - -MEMORY -{ - rom (rx) : ORIGIN = 0, LENGTH = 32k - ram (rwx) : ORIGIN = 0x20000000, LENGTH = 4k -} - -INCLUDE tinygecko.ld; diff --git a/lib/efm32/tinygecko/Makefile b/lib/efm32/tinygecko/Makefile deleted file mode 100644 index 550860c..0000000 --- a/lib/efm32/tinygecko/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -## -## This file is part of the libopencm3 project. -## -## Copyright (C) 2009 Uwe Hermann -## Copyright (C) 2012 chrysn -## -## This library is free software: you can redistribute it and/or modify -## it under the terms of the GNU Lesser General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public License -## along with this library. If not, see . -## - -LIBNAME = libopencm3_efm32tinygecko -FAMILY = TINYGECKO - -PREFIX ?= arm-none-eabi -#PREFIX ?= arm-elf -CC = $(PREFIX)-gcc -AR = $(PREFIX)-ar -CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ - -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ - -ffunction-sections -fdata-sections -MD -D$(FAMILY) -# ARFLAGS = rcsv -ARFLAGS = rcs -OBJS = vector.o - -VPATH += ../:../../cm3 - -include ../../Makefile.include - diff --git a/lib/efm32/tinygecko/libopencm3_efm32tinygecko.ld b/lib/efm32/tinygecko/libopencm3_efm32tinygecko.ld deleted file mode 100644 index 8ef5e42..0000000 --- a/lib/efm32/tinygecko/libopencm3_efm32tinygecko.ld +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2009 Uwe Hermann , - * Copyright (C) 2012 chrysn - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -/* Generic linker script for EFM32 targets using libopencm3. */ - -/* Memory regions must be defined in the ld script which includes this one. */ - -/* Enforce emmition of the vector table. */ -EXTERN (vector_table) - -/* Define the entry point of the output file. */ -ENTRY(reset_handler) - -/* Define sections. */ -SECTIONS -{ - . = ORIGIN(rom); - - .text : { - *(.vectors) /* Vector table */ - *(.text*) /* Program code */ - . = ALIGN(4); - *(.rodata*) /* Read-only data */ - . = ALIGN(4); - _etext = .; - } >rom - - . = ORIGIN(ram); - - .data : AT(_etext) { - _data = .; - *(.data*) /* Read-write initialized data */ - . = ALIGN(4); - _edata = .; - } >ram - - .bss : { - *(.bss*) /* Read-write zero initialized data */ - *(COMMON) - . = ALIGN(4); - _ebss = .; - } >ram AT >rom - _data_loadaddr = LOADADDR(.data); - - /* - * The .eh_frame section appears to be used for C++ exception handling. - * You may need to fix this if you're using C++. - */ - /DISCARD/ : { *(.eh_frame) } - - /* - * Another section used by C++ stuff, appears when using newlib with - * 64bit (long long) printf support - discard it for now. - */ - /DISCARD/ : { *(.ARM.exidx) } - - . = ALIGN(4); - end = .; -} - -PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); - -- cgit v1.2.3 From 62345af9ee354bce9f705b1370dbce2aa25d6d70 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 19 Oct 2012 13:51:16 +0200 Subject: install opencmsis --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 80f0822..b2a31c3 100644 --- a/Makefile +++ b/Makefile @@ -64,9 +64,11 @@ examples: lib install: lib @printf " INSTALL headers\n" $(Q)$(INSTALL) -d $(INCDIR)/libopencm3 + $(Q)$(INSTALL) -d $(INCDIR)/libopencmsis $(Q)$(INSTALL) -d $(LIBDIR) $(Q)$(INSTALL) -d $(SHAREDIR) $(Q)cp -r include/libopencm3/* $(INCDIR)/libopencm3 + $(Q)cp -r include/libopencmsis/* $(INCDIR)/libopencmsis @printf " INSTALL libs\n" $(Q)$(INSTALL) -m 0644 lib/*.a $(LIBDIR) @printf " INSTALL ldscripts\n" -- cgit v1.2.3 From e11edaff11fc48736a801453e6cd4c64be8e96ca Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 19 Oct 2012 14:04:55 +0200 Subject: build all efm32 families --- Makefile | 2 +- lib/efm32/efm32g/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ lib/efm32/efm32gg/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ lib/efm32/efm32lg/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 lib/efm32/efm32g/Makefile create mode 100644 lib/efm32/efm32gg/Makefile create mode 100644 lib/efm32/efm32lg/Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile index b2a31c3..994e8a4 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ SHAREDIR = $(DESTDIR)/$(PREFIX)/share/libopencm3/scripts INSTALL = install SRCLIBDIR = $(shell pwd)/lib -TARGETS = stm32/f1 stm32/f2 stm32/f4 lpc13xx lpc17xx lpc43xx lm3s efm32/efm32tg +TARGETS = stm32/f1 stm32/f2 stm32/f4 lpc13xx lpc17xx lpc43xx lm3s efm32/efm32tg efm32/efm32g efm32/efm32lg efm32/efm32gg # Be silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) diff --git a/lib/efm32/efm32g/Makefile b/lib/efm32/efm32g/Makefile new file mode 100644 index 0000000..923be47 --- /dev/null +++ b/lib/efm32/efm32g/Makefile @@ -0,0 +1,38 @@ +## +## This file is part of the libopencm3 project. +## +## Copyright (C) 2009 Uwe Hermann +## Copyright (C) 2012 chrysn +## +## This library is free software: you can redistribute it and/or modify +## it under the terms of the GNU Lesser General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public License +## along with this library. If not, see . +## + +LIBNAME = libopencm3_efm32g +FAMILY = EFM32G + +PREFIX ?= arm-none-eabi +#PREFIX ?= arm-elf +CC = $(PREFIX)-gcc +AR = $(PREFIX)-ar +CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ + -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ + -ffunction-sections -fdata-sections -MD -D$(FAMILY) +# ARFLAGS = rcsv +ARFLAGS = rcs +OBJS = vector.o + +VPATH += ../:../../cm3 + +include ../../Makefile.include + diff --git a/lib/efm32/efm32gg/Makefile b/lib/efm32/efm32gg/Makefile new file mode 100644 index 0000000..0d9d0bd --- /dev/null +++ b/lib/efm32/efm32gg/Makefile @@ -0,0 +1,38 @@ +## +## This file is part of the libopencm3 project. +## +## Copyright (C) 2009 Uwe Hermann +## Copyright (C) 2012 chrysn +## +## This library is free software: you can redistribute it and/or modify +## it under the terms of the GNU Lesser General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public License +## along with this library. If not, see . +## + +LIBNAME = libopencm3_efm32gg +FAMILY = EFM32GG + +PREFIX ?= arm-none-eabi +#PREFIX ?= arm-elf +CC = $(PREFIX)-gcc +AR = $(PREFIX)-ar +CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ + -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ + -ffunction-sections -fdata-sections -MD -D$(FAMILY) +# ARFLAGS = rcsv +ARFLAGS = rcs +OBJS = vector.o + +VPATH += ../:../../cm3 + +include ../../Makefile.include + diff --git a/lib/efm32/efm32lg/Makefile b/lib/efm32/efm32lg/Makefile new file mode 100644 index 0000000..c76323e --- /dev/null +++ b/lib/efm32/efm32lg/Makefile @@ -0,0 +1,38 @@ +## +## This file is part of the libopencm3 project. +## +## Copyright (C) 2009 Uwe Hermann +## Copyright (C) 2012 chrysn +## +## This library is free software: you can redistribute it and/or modify +## it under the terms of the GNU Lesser General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public License +## along with this library. If not, see . +## + +LIBNAME = libopencm3_efm32lg +FAMILY = EFM32LG + +PREFIX ?= arm-none-eabi +#PREFIX ?= arm-elf +CC = $(PREFIX)-gcc +AR = $(PREFIX)-ar +CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ + -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \ + -ffunction-sections -fdata-sections -MD -D$(FAMILY) +# ARFLAGS = rcsv +ARFLAGS = rcs +OBJS = vector.o + +VPATH += ../:../../cm3 + +include ../../Makefile.include + -- cgit v1.2.3 From cece71ba2fbb750f8c6cfe57121748a9ab626205 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 19 Oct 2012 16:13:34 +0200 Subject: install *all* efm32 linker scripts this will install the per-family linker scripts twice (doesn't hurt, gets overwritten), but more importantly intalls the per-chip scripts too. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 994e8a4..32c3925 100644 --- a/Makefile +++ b/Makefile @@ -73,6 +73,7 @@ install: lib $(Q)$(INSTALL) -m 0644 lib/*.a $(LIBDIR) @printf " INSTALL ldscripts\n" $(Q)$(INSTALL) -m 0644 lib/*.ld $(LIBDIR) + $(Q)$(INSTALL) -m 0644 lib/efm32/*/*.ld $(LIBDIR) @printf " INSTALL scripts\n" $(Q)$(INSTALL) -m 0644 scripts/* $(SHAREDIR) -- cgit v1.2.3