Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/boards.txt maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/boards.txt
- --- maple-ide-v0.0.12/hardware/leaflabs/boards.txt 2011-09-13 12:52:36.000000000 +0200
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/boards.txt 2013-02-06 10:12:24.268843386 +0100
- @@ -197,3 +197,27 @@
- maple_nativeRAM.build.density=STM32_HIGH_DENSITY
- maple_nativeRAM.build.error_led_port=GPIOC
- maple_nativeRAM.build.error_led_pin=15
- +
- +##############################################################
- +olimex_stm32_h103.name=OLIMEX STM32-H103 to JTAG
- +
- +olimex_stm32_h103.upload.file_type=bin
- +olimex_stm32_h103.upload.maximum_size=128000
- +olimex_stm32_h103.upload.ram.maximum_size=20000
- +olimex_stm32_h103.upload.flash.maximum_size=128000
- +olimex_stm32_h103.upload.usbID=1EAF:0003
- +olimex_stm32_h103.upload.altID=0
- +olimex_stm32_h103.upload.uploader=dfu-util
- +olimex_stm32_h103.upload.auto_reset=true
- +
- +olimex_stm32_h103.build.board=olimex_stm32_h103
- +olimex_stm32_h103.build.mcu=STM32F103RB
- +olimex_stm32_h103.build.family=cortex-m3
- +olimex_stm32_h103.build.f_cpu=72000000L
- +olimex_stm32_h103.build.core=maple
- +olimex_stm32_h103.build.vect=VECT_TAB_FLASH
- +olimex_stm32_h103.build.linker=olimex_stm32_h103/jtag.ld
- +olimex_stm32_h103.build.using=armcompiler
- +olimex_stm32_h103.build.density=STM32_MEDIUM_DENSITY
- +olimex_stm32_h103.build.error_led_port=GPIOC
- +olimex_stm32_h103.build.error_led_pin=12
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/cores/maple/boards.h maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/boards.h
- --- maple-ide-v0.0.12/hardware/leaflabs/cores/maple/boards.h 2011-09-13 12:52:36.000000000 +0200
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/boards.h 2013-02-06 09:47:33.672320050 +0100
- @@ -127,6 +127,8 @@
- #include "maple_native.h"
- #elif defined(BOARD_maple_mini)
- #include "maple_mini.h"
- +#elif defined(BOARD_olimex_stm32_h103)
- +#include "olimex_stm32_h103.h"
- #elif defined(BOARD_maple_RET6)
- /*
- * **NOT** MAPLE REV6. This the **Maple RET6 EDITION**, which is a
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103/flash.ld maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103/flash.ld
- --- maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103/flash.ld 1970-01-01 01:00:00.000000000 +0100
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103/flash.ld 2013-02-06 09:50:54.135862436 +0100
- @@ -0,0 +1,29 @@
- +/*
- + * Maple (STM32F103RBT6, medium density) linker script for Flash builds.
- + */
- +
- +/*
- + * Define memory spaces.
- + */
- +MEMORY
- +{
- + ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 17K
- + rom (rx) : ORIGIN = 0x08005000, LENGTH = 108K
- +}
- +
- +/*
- + * Use medium density device vector table
- + */
- +GROUP(libcs3_stm32_med_density.a)
- +
- +REGION_ALIAS("REGION_TEXT", rom);
- +REGION_ALIAS("REGION_DATA", ram);
- +REGION_ALIAS("REGION_BSS", ram);
- +REGION_ALIAS("REGION_RODATA", rom);
- +
- +/*
- + * Define the rest of the sections
- + */
- +_FLASH_BUILD = 1;
- +
- +INCLUDE common.inc
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103/jtag.ld maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103/jtag.ld
- --- maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103/jtag.ld 1970-01-01 01:00:00.000000000 +0100
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103/jtag.ld 2013-02-06 09:50:54.135862436 +0100
- @@ -0,0 +1,29 @@
- +/*
- + * Maple (STM32F103RBT6, medium density) linker script for JTAG (bare
- + * metal, no bootloader) builds.
- + */
- +
- +/*
- + * Define memory spaces.
- + */
- +MEMORY
- +{
- + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
- + rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- +}
- +
- +/*
- + * Use medium density device vector table
- + */
- +GROUP(libcs3_stm32_med_density.a)
- +
- +REGION_ALIAS("REGION_TEXT", rom);
- +REGION_ALIAS("REGION_DATA", ram);
- +REGION_ALIAS("REGION_BSS", ram);
- +REGION_ALIAS("REGION_RODATA", rom);
- +
- +/*
- + * Define the rest of the sections
- + */
- +_FLASH_BUILD = 1;
- +INCLUDE common.inc
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103/ram.ld maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103/ram.ld
- --- maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103/ram.ld 1970-01-01 01:00:00.000000000 +0100
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103/ram.ld 2013-02-06 09:50:54.135862436 +0100
- @@ -0,0 +1,27 @@
- +/*
- + * Maple (STM32F103RBT6, medium density) linker script for RAM builds.
- + */
- +
- +/*
- + * Define memory spaces.
- + */
- +MEMORY
- +{
- + ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 17K
- + rom (rx) : ORIGIN = 0x08005000, LENGTH = 0K
- +}
- +
- +/*
- + * Use medium density device vector table
- + */
- +GROUP(libcs3_stm32_med_density.a)
- +
- +REGION_ALIAS("REGION_TEXT", ram);
- +REGION_ALIAS("REGION_DATA", ram);
- +REGION_ALIAS("REGION_BSS", ram);
- +REGION_ALIAS("REGION_RODATA", ram);
- +
- +/*
- + * Define the rest of the sections
- + */
- +INCLUDE common.inc
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103.cpp maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103.cpp
- --- maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103.cpp 1970-01-01 01:00:00.000000000 +0100
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103.cpp 2013-02-06 10:07:14.140405415 +0100
- @@ -0,0 +1,123 @@
- +/******************************************************************************
- + * The MIT License
- + *
- + * Copyright (c) 2011 LeafLabs, LLC.
- + * Copyright (c) 2011 David Kiliani.
- + *
- + * Permission is hereby granted, free of charge, to any person
- + * obtaining a copy of this software and associated documentation
- + * files (the "Software"), to deal in the Software without
- + * restriction, including without limitation the rights to use, copy,
- + * modify, merge, publish, distribute, sublicense, and/or sell copies
- + * of the Software, and to permit persons to whom the Software is
- + * furnished to do so, subject to the following conditions:
- + *
- + * The above copyright notice and this permission notice shall be
- + * included in all copies or substantial portions of the Software.
- + *
- + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- + * SOFTWARE.
- + *****************************************************************************/
- +
- +/**
- + * @file wirish/boards/olimex_stm32_h103/board.cpp
- + * @author David Kiliani <[email protected]>
- + * @brief Olimex STM32_H103 board file.
- + */
- +
- +#ifdef BOARD_olimex_stm32_h103
- +
- +#include <olimex_stm32_h103.h>
- +
- +#include <gpio.h>
- +#include <timer.h>
- +
- +#include <wirish_types.h>
- +
- +void boardInit(void) {
- +}
- +
- +extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
- +
- + /* Header EXT1 */
- +
- + {GPIOA, TIMER1, NULL, 11, 4, ADCx}, /* D0/EXT1_1/PA11 (USBDM) */
- + {GPIOA, TIMER1, NULL, 8, 1, ADCx}, /* D1/EXT1_2/PA8 */
- + {GPIOA, NULL, NULL, 12, 0, ADCx}, /* D2/EXT1_3/PA12 (USBDP) */
- + {GPIOA, TIMER1, NULL, 9, 2, ADCx}, /* D3/EXT1_4/PA9 */
- +
- + {GPIOA, TIMER1, NULL, 10, 3, ADCx}, /* D4/EXT1_7/PA10 */
- + {GPIOC, NULL, NULL, 10, 0, ADCx}, /* D5/EXT1_8/PC10 */
- + {GPIOC, NULL, NULL, 11, 0, ADCx}, /* D6/EXT1_9/PC11 (USBpull) */
- + {GPIOC, NULL, NULL, 12, 0, ADCx}, /* D7/EXT1_10/PC12 (LED) */
- + {GPIOD, NULL, NULL, 2, 0, ADCx}, /* D8/EXT1_11/PD2 */
- + {GPIOB, NULL, NULL, 5, 0, ADCx}, /* D9/EXT1_12/PB5 */
- + {GPIOB, TIMER4, NULL, 6, 1, ADCx}, /* D10/EXT1_13/PB6 */
- + {GPIOA, TIMER3, ADC1, 6, 1, 6}, /* D11/EXT1_14/PA6 */
- + {GPIOB, TIMER4, NULL, 7, 2, ADCx}, /* D12/EXT1_15/PB7 */
- + {GPIOB, TIMER4, NULL, 8, 3, ADCx}, /* D13/EXT1_16/PB8 */
- + {GPIOB, TIMER4, NULL, 9, 4, ADCx}, /* D14/EXT1_17/PB9 */
- + {GPIOA, NULL, ADC1, 5, 0, 5}, /* D15/EXT1_18/PA5 */
- + {GPIOC, NULL, ADC1, 0, 0, 10}, /* D16/EXT1_19/PC0 */
- + {GPIOC, NULL, ADC1, 1, 0, 11}, /* D17/EXT1_20/PC1 */
- + {GPIOB, TIMER3, ADC1, 0, 3, 8}, /* D18/EXT1_21/PB0 */
- + {GPIOA, TIMER3, ADC1, 7, 2, 7}, /* D19/EXT1_22/PA7 */
- +
- + {GPIOC, NULL, NULL, 13, 0, ADCx}, /* D20/EXT1_24/PC13 */
- +
- + {GPIOB, TIMER3, ADC1, 1, 4, 9}, /* D21/EXT1_26/PB1 */
- +
- + /* Header EXT2 */
- +
- + {GPIOC, NULL, ADC1, 2, 0, 12}, /* D22/EXT2_2/PC2 */
- +
- + {GPIOA, TIMER2, ADC1, 0, 1, 0}, /* D23/EXT2_4/PA0 (BUT) */
- +
- + {GPIOA, TIMER2, ADC1, 2, 3, 2}, /* D24/EXT2_7/PA2 */
- + {GPIOA, TIMER2, ADC1, 1, 2, 1}, /* D25/EXT2_8/PA1 */
- + {GPIOC, NULL, ADC1, 3, 0, 13}, /* D26/EXT2_9/PC3 */
- + {GPIOA, TIMER2, ADC1, 3, 4, 3}, /* D27/EXT2_10/PA3 */
- + {GPIOA, NULL, ADC1, 4, 0, 4}, /* D28/EXT2_11/PA4 */
- + {GPIOC, NULL, ADC1, 4, 0, 14}, /* D29/EXT2_12/PC4 (USB-P) */
- + {GPIOC, NULL, ADC1, 5, 0, 15}, /* D30/EXT2_13/PC5 */
- + {GPIOB, NULL, NULL, 10, 0, ADCx}, /* D31/EXT2_14/PB10 */
- + {GPIOB, NULL, NULL, 11, 0, ADCx}, /* D32/EXT2_15/PB11 */
- + {GPIOB, NULL, NULL, 13, 0, ADCx}, /* D33/EXT2_16/PB13 */
- + {GPIOB, NULL, NULL, 12, 0, ADCx}, /* D34/EXT2_17/PB12 */
- + {GPIOB, NULL, NULL, 14, 0, ADCx}, /* D35/EXT2_18/PB14 */
- + {GPIOB, NULL, NULL, 15, 0, ADCx}, /* D36/EXT2_19/PB15 */
- + {GPIOC, NULL, NULL, 6, 0, ADCx}, /* D37/EXT2_20/PC6 */
- + {GPIOC, NULL, NULL, 7, 0, ADCx}, /* D38/EXT2_21/PC7 */
- + {GPIOC, NULL, NULL, 8, 0, ADCx}, /* D39/EXT2_22/PC8 */
- +
- + {GPIOC, NULL, NULL, 9, 0, ADCx}, /* D40/EXT2_24/PC9 */
- +
- + /* JTAG header */
- +
- + {GPIOA, NULL, NULL, 13, 0, ADCx}, /* D41/JTAG7/PA13 */
- + {GPIOA, NULL, NULL, 14, 0, ADCx}, /* D42/JTAG9/PA14 */
- + {GPIOA, NULL, NULL, 15, 0, ADCx}, /* D43/JTAG5/PA15 */
- + {GPIOB, NULL, NULL, 3, 0, ADCx}, /* D44/JTAG13/PB3 */
- + {GPIOB, NULL, NULL, 4, 0, ADCx}, /* D45/JTAG3/PB4 */
- +};
- +
- +extern const uint8 boardPWMPins[] __FLASH__ = {
- + 0, 1, 3, 4, 10, 11, 12, 13, 14, 18, 19, 21, 23, 24, 25, 27
- +};
- +
- +extern const uint8 boardADCPins[] __FLASH__ = {
- + 11, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
- +};
- +
- +extern const uint8 boardUsedPins[] __FLASH__ = {
- + BOARD_LED_PIN, BOARD_BUTTON_PIN, BOARD_JTMS_SWDIO_PIN,
- + BOARD_JTCK_SWCLK_PIN, BOARD_JTDI_PIN, BOARD_JTDO_PIN, BOARD_NJTRST_PIN
- +};
- +
- +#endif
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103.h maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103.h
- --- maple-ide-v0.0.12/hardware/leaflabs/cores/maple/olimex_stm32_h103.h 1970-01-01 01:00:00.000000000 +0100
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/olimex_stm32_h103.h 2013-02-06 10:07:07.693839998 +0100
- @@ -0,0 +1,99 @@
- +/******************************************************************************
- + * The MIT License
- + *
- + * Copyright (c) 2011 LeafLabs, LLC.
- + * Copyright (c) 2011 David Kiliani.
- + *
- + * Permission is hereby granted, free of charge, to any person
- + * obtaining a copy of this software and associated documentation
- + * files (the "Software"), to deal in the Software without
- + * restriction, including without limitation the rights to use, copy,
- + * modify, merge, publish, distribute, sublicense, and/or sell copies
- + * of the Software, and to permit persons to whom the Software is
- + * furnished to do so, subject to the following conditions:
- + *
- + * The above copyright notice and this permission notice shall be
- + * included in all copies or substantial portions of the Software.
- + *
- + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- + * SOFTWARE.
- + *****************************************************************************/
- +
- +/**
- + * @file wirish/boards/olimex_stm32_h103/include/board/board.h
- + * @author David Kiliani <[email protected]>
- + * @brief Olimex STM32_H103 board header.
- + */
- +
- +#ifndef _BOARD_OLIMEX_STM32_H103_H_
- +#define _BOARD_OLIMEX_STM32_H103_H_
- +
- +#define CYCLES_PER_MICROSECOND 72
- +#define SYSTICK_RELOAD_VAL 71999 /* takes a cycle to reload */
- +
- +#define BOARD_BUTTON_PIN 23
- +#define BOARD_LED_PIN 7
- +
- +/* Number of USARTs/UARTs whose pins are broken out to headers */
- +#define BOARD_NR_USARTS 3
- +
- +/* Default USART pin numbers (not considering AFIO remap) */
- +#define BOARD_USART1_TX_PIN 3
- +#define BOARD_USART1_RX_PIN 4
- +#define BOARD_USART2_TX_PIN 24
- +#define BOARD_USART2_RX_PIN 27
- +#define BOARD_USART3_TX_PIN 31
- +#define BOARD_USART3_RX_PIN 32
- +
- +/* Number of SPI ports */
- +#define BOARD_NR_SPI 2
- +
- +/* Default SPI pin numbers (not considering AFIO remap) */
- +#define BOARD_SPI1_NSS_PIN 28
- +#define BOARD_SPI1_MOSI_PIN 19
- +#define BOARD_SPI1_MISO_PIN 11
- +#define BOARD_SPI1_SCK_PIN 15
- +#define BOARD_SPI2_NSS_PIN 34
- +#define BOARD_SPI2_MOSI_PIN 36
- +#define BOARD_SPI2_MISO_PIN 35
- +#define BOARD_SPI2_SCK_PIN 33
- +
- +/* Total number of GPIO pins that are broken out to headers and
- + * intended for general use. */
- +#define BOARD_NR_GPIO_PINS 46
- +
- +/* Number of pins capable of PWM output */
- +#define BOARD_NR_PWM_PINS 16
- +
- +/* Number of pins capable of ADC conversion */
- +#define BOARD_NR_ADC_PINS 16
- +
- +/* Number of pins already connected to external hardware. For Maple,
- + * these are just BOARD_LED_PIN and BOARD_BUTTON_PIN. */
- +#define BOARD_NR_USED_PINS 7
- +
- +/* Debug port pins */
- +#define BOARD_JTMS_SWDIO_PIN 41
- +#define BOARD_JTCK_SWCLK_PIN 42
- +#define BOARD_JTDI_PIN 43
- +#define BOARD_JTDO_PIN 44
- +#define BOARD_NJTRST_PIN 45
- +
- +/* USB configuration */
- +//#define BOARD_USB_DISC_DEV GPIOC
- +//#define BOARD_USB_DISC_BIT 11
- +
- +enum {
- + PA11, PA8, PA12, PA9, PA10, PC10, PC11, PC12, PD2, PB5, PB6, PA6, PB7, PB8,
- + PB9, PA5, PC0, PC1, PB0, PA7, PC13, PB1, PC2, PA0, PA2, PA1, PC3, PA3, PA4,
- + PC4, PC5, PB10, PB11, PB13, PB12, PB14, PB15, PC6, PC7, PC8, PC9, PA13,
- + PA14, PA15, PB3, PB4
- +};
- +
- +#endif
- diff -Nur maple-ide-v0.0.12/hardware/leaflabs/cores/maple/usb_config.h maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/usb_config.h
- --- maple-ide-v0.0.12/hardware/leaflabs/cores/maple/usb_config.h 2011-09-13 12:52:36.000000000 +0200
- +++ maple-ide-v0.0.12_olimex_stm32_h103/hardware/leaflabs/cores/maple/usb_config.h 2013-02-06 20:20:39.164428114 +0100
- @@ -41,6 +41,12 @@
- #define USB_DISC_DEV GPIOB
- #define USB_DISC_PIN 9
- +#elif defined(BOARD_olimex_stm32_h103)
- +
- + #define VCOM_ID_PRODUCT 0x0004
- + #define USB_DISC_DEV GPIOC
- + #define USB_DISC_PIN 11
- +
- #elif defined(BOARD_maple_native)
- #define VCOM_ID_PRODUCT 0x0004
- BinΓ€rdateien maple-ide-v0.0.12/lib/librxtxSerial.so and maple-ide-v0.0.12_olimex_stm32_h103/lib/librxtxSerial.so sind verschieden.
Advertisement
Add Comment
Please, Sign In to add comment