From 97aa002c9d268c30a13b308e7138ad2c41fde7c6 Mon Sep 17 00:00:00 2001 From: Joseph Birr-Pixton Date: Tue, 10 Mar 2015 19:47:07 +0000 Subject: Fix hang on usart read overrun. This is improved on the previous patch: if we get an ORE without RXNE when we don't write a junk byte to our buffer. It also avoids the strange-looking blind read. See issue #107 for more info. Signed-off-by: Joseph Birr-Pixton --- libmaple/usart_private.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/libmaple/usart_private.h b/libmaple/usart_private.h index 8e8e11b..9bc0527 100644 --- a/libmaple/usart_private.h +++ b/libmaple/usart_private.h @@ -38,14 +38,21 @@ #include static __always_inline void usart_irq(ring_buffer *rb, usart_reg_map *regs) { + /* We can get RXNE and ORE interrupts here. Only RXNE signifies + * availability of a byte in DR. + * + * See table 198 (sec 27.4, p809) in STM document RM0008 rev 15. + * We enable RXNEIE. */ + if (regs->SR & USART_SR_RXNE) { #ifdef USART_SAFE_INSERT - /* If the buffer is full and the user defines USART_SAFE_INSERT, - * ignore new bytes. */ - rb_safe_insert(rb, (uint8)regs->DR); + /* If the buffer is full and the user defines USART_SAFE_INSERT, + * ignore new bytes. */ + rb_safe_insert(rb, (uint8)regs->DR); #else - /* By default, push bytes around in the ring buffer. */ - rb_push_insert(rb, (uint8)regs->DR); + /* By default, push bytes around in the ring buffer. */ + rb_push_insert(rb, (uint8)regs->DR); #endif + } } uint32 _usart_clock_freq(usart_dev *dev); -- cgit v1.2.3 From c21a588f565680d9bc1b22dff1177ca65c1b08e9 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 19 Nov 2014 22:38:37 -0500 Subject: Wire: release the bus on error --- libraries/Wire/Wire.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/Wire/Wire.cpp b/libraries/Wire/Wire.cpp index d646132..b08023d 100644 --- a/libraries/Wire/Wire.cpp +++ b/libraries/Wire/Wire.cpp @@ -128,6 +128,7 @@ uint8 TwoWire::process() { // shift out the address we're transmitting to i2c_shift_out(sla_addr); if (!i2c_get_ack()) { + i2c_stop(); // Fix up the state of the bus return ENACKADDR; } // Recieving @@ -146,6 +147,7 @@ uint8 TwoWire::process() { for (uint8 i = 0; i < itc_msg.length; i++) { i2c_shift_out(itc_msg.data[i]); if (!i2c_get_ack()) { + i2c_stop(); // Fix up the state of the bus return ENACKTRNS; } itc_msg.xferred++; -- cgit v1.2.3 From 3bd3c1e7e625318af8beff7ef58e1d8511cf497f Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 19 Nov 2014 22:42:17 -0500 Subject: stm32f1: gpio.h: silence yet more __always_inline warnings Signed-off-by: Marti Bolivar --- libmaple/stm32f1/include/series/gpio.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libmaple/stm32f1/include/series/gpio.h b/libmaple/stm32f1/include/series/gpio.h index aecf911..b1340ea 100644 --- a/libmaple/stm32f1/include/series/gpio.h +++ b/libmaple/stm32f1/include/series/gpio.h @@ -482,9 +482,7 @@ typedef exti_num afio_exti_num; /** * @brief Deprecated. Use exti_select(exti, port) instead. */ -static __always_inline void afio_exti_select(exti_num exti, exti_cfg port) { - exti_select(exti, port); -} +#define afio_exti_select(exti, port) exti_select((exti), (port)) #ifdef __cplusplus } -- cgit v1.2.3 From a943ad854f1f4fe13eba3d07b9ced899735cadf4 Mon Sep 17 00:00:00 2001 From: Jonatan Olofsson Date: Wed, 29 Oct 2014 03:58:07 +0100 Subject: Revert "always clear ISR DMA bit before even calling handler" --- libmaple/dma_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmaple/dma_private.h b/libmaple/dma_private.h index 82f5fc1..b25ded2 100644 --- a/libmaple/dma_private.h +++ b/libmaple/dma_private.h @@ -38,10 +38,10 @@ * in the series support files, which need dma_irq_handler().) */ #ifdef DMA_GET_HANDLER static __always_inline void dma_irq_handler(dma_dev *dev, dma_tube tube) { - dma_clear_isr_bits(dev, tube); /* in case handler doesn't */ void (*handler)(void) = DMA_GET_HANDLER(dev, tube); if (handler) { handler(); + dma_clear_isr_bits(dev, tube); /* in case handler doesn't */ } } #endif -- cgit v1.2.3 From 205c1c69d1691cdaecd1068515302e618fb1b9f9 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 17 Oct 2014 16:47:52 +0800 Subject: libmaple_types.h: add ifndef guards for some macros Signed-off-by: Marti Bolivar --- libmaple/include/libmaple/libmaple_types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libmaple/include/libmaple/libmaple_types.h b/libmaple/include/libmaple/libmaple_types.h index 60dd2ff..b4fd625 100644 --- a/libmaple/include/libmaple/libmaple_types.h +++ b/libmaple/include/libmaple/libmaple_types.h @@ -55,8 +55,12 @@ typedef void (*voidArgumentFuncPtr)(void *); #define __packed __attribute__((__packed__)) #define __deprecated __attribute__((__deprecated__)) #define __weak __attribute__((weak)) +#ifndef __always_inline #define __always_inline inline __attribute__((always_inline)) +#endif +#ifndef __unused #define __unused __attribute__((unused)) +#endif #ifndef NULL #define NULL 0 -- cgit v1.2.3 From e400311df8c08515f6bc60b8a16432613eac5967 Mon Sep 17 00:00:00 2001 From: Gregwar Date: Tue, 11 Nov 2014 20:08:20 +0100 Subject: [Makefile] Easier adding of sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grégoire Passault , Quentin Rouxel --- build-targets.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build-targets.mk b/build-targets.mk index aaff2d0..4b9c880 100644 --- a/build-targets.mk +++ b/build-targets.mk @@ -1,5 +1,8 @@ -# main project target -$(BUILD_PATH)/main.o: $(SRCROOT)/main.cpp +# Sources to compile +SRC_FILES = main.cpp +OBJ_FILES = $(addprefix $(BUILD_PATH)/,$(SRC_FILES:.cpp=.o)) + +$(BUILD_PATH)/%.o: %.cpp $(SILENT_CXX) $(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBMAPLE_INCLUDES) $(WIRISH_INCLUDES) -o $@ -c $< $(BUILD_PATH)/libmaple.a: $(BUILDDIRS) $(TGT_BIN) @@ -10,7 +13,7 @@ library: $(BUILD_PATH)/libmaple.a .PHONY: library -$(BUILD_PATH)/$(BOARD).elf: $(BUILDDIRS) $(TGT_BIN) $(BUILD_PATH)/main.o +$(BUILD_PATH)/$(BOARD).elf: $(BUILDDIRS) $(TGT_BIN) $(OBJ_FILES) $(SILENT_LD) $(CXX) $(LDFLAGS) -o $@ $(TGT_BIN) $(BUILD_PATH)/main.o -Wl,-Map,$(BUILD_PATH)/$(BOARD).map $(BUILD_PATH)/$(BOARD).bin: $(BUILD_PATH)/$(BOARD).elf -- cgit v1.2.3 From 91abbf1635da21efc95ff67b13018ce97315bff0 Mon Sep 17 00:00:00 2001 From: Grégoire Passault Date: Wed, 26 Nov 2014 22:56:37 -0500 Subject: Generate .hex files as well. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grégoire Passault Signed-off-by: Marti Bolivar --- Makefile | 2 +- build-targets.mk | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c632ee8..82ba456 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ ifneq ($(PREV_BUILD_TYPE), $(MEMORY_TARGET)) $(shell rm -rf $(BUILD_PATH)) endif -sketch: build-check MSG_INFO $(BUILD_PATH)/$(BOARD).bin +sketch: build-check MSG_INFO $(BUILD_PATH)/$(BOARD).bin $(BUILD_PATH)/$(BOARD).hex clean: rm -rf build diff --git a/build-targets.mk b/build-targets.mk index 4b9c880..8232867 100644 --- a/build-targets.mk +++ b/build-targets.mk @@ -16,6 +16,9 @@ library: $(BUILD_PATH)/libmaple.a $(BUILD_PATH)/$(BOARD).elf: $(BUILDDIRS) $(TGT_BIN) $(OBJ_FILES) $(SILENT_LD) $(CXX) $(LDFLAGS) -o $@ $(TGT_BIN) $(BUILD_PATH)/main.o -Wl,-Map,$(BUILD_PATH)/$(BOARD).map +$(BUILD_PATH)/$(BOARD).hex: $(BUILD_PATH)/$(BOARD).elf + $(SILENT_OBJCOPY) $(OBJCOPY) -v -Oihex $(BUILD_PATH)/$(BOARD).elf $@ 1>/dev/null + $(BUILD_PATH)/$(BOARD).bin: $(BUILD_PATH)/$(BOARD).elf $(SILENT_OBJCOPY) $(OBJCOPY) -v -Obinary $(BUILD_PATH)/$(BOARD).elf $@ 1>/dev/null $(SILENT_DISAS) $(DISAS) -d $(BUILD_PATH)/$(BOARD).elf > $(BUILD_PATH)/$(BOARD).disas -- cgit v1.2.3 From dc29856361aa8568d947db65aa90253c036540ae Mon Sep 17 00:00:00 2001 From: Grégoire Passault Date: Wed, 26 Nov 2014 22:58:20 -0500 Subject: Adding support for NUCLEO-F103RB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grégoire Passault --- support/make/board-includes/nucleo.mk | 10 ++ wirish/boards/nucleo/board.cpp | 149 +++++++++++++++++++++++++++++ wirish/boards/nucleo/include/board/board.h | 102 ++++++++++++++++++++ 3 files changed, 261 insertions(+) create mode 100644 support/make/board-includes/nucleo.mk create mode 100644 wirish/boards/nucleo/board.cpp create mode 100644 wirish/boards/nucleo/include/board/board.h diff --git a/support/make/board-includes/nucleo.mk b/support/make/board-includes/nucleo.mk new file mode 100644 index 0000000..a2943ce --- /dev/null +++ b/support/make/board-includes/nucleo.mk @@ -0,0 +1,10 @@ +MCU := STM32F103RB +PRODUCT_ID := 0003 +ERROR_LED_PORT := GPIOA +ERROR_LED_PIN := 5 +MCU_SERIES := stm32f1 +MCU_F1_LINE := performance +# This crap is due to ld-script limitations. If you know of a better +# way to go about this (like some magic ld switches to specify MEMORY +# at the command line), please tell us! +LD_MEM_DIR := sram_20k_flash_128k diff --git a/wirish/boards/nucleo/board.cpp b/wirish/boards/nucleo/board.cpp new file mode 100644 index 0000000..641f542 --- /dev/null +++ b/wirish/boards/nucleo/board.cpp @@ -0,0 +1,149 @@ +/****************************************************************************** + * The MIT License + * + * Copyright (c) 2011 LeafLabs, LLC. + * + * 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/nucleo/board.cpp + * @author Grégoire Passault + * @brief Nucleo board file + * + * This mapping was done using the NUCLEO documentation and may be incomplete + * or contains error + * + * If you want to use the PWM outputs, consider understanding all the remapping + * process that can be involved. You may have to tweak this file regarding your goals. + */ + +#include // For this board's header file + +#include // For stm32_pin_info and its contents + // (these go into PIN_MAP). + +#include "boards_private.h" // For PMAP_ROW(), which makes + // PIN_MAP easier to read. + +// boardInit(): NUCLEO rely on some remapping +void boardInit(void) { + afio_remap(AFIO_REMAP_TIM2_FULL); + afio_remap(AFIO_REMAP_TIM3_PARTIAL); +} + +namespace wirish { +namespace priv { +static stm32f1_rcc_pll_data pll_data = {RCC_PLLMUL_9}; +rcc_clk w_board_pll_in_clk = RCC_CLK_HSI; +rcc_pll_cfg w_board_pll_cfg = {RCC_PLLSRC_HSI_DIV_2, &pll_data}; +} +} + +// Pin map: this lets the basic I/O functions (digitalWrite(), +// analogRead(), pwmWrite()) translate from pin numbers to STM32 +// peripherals. +// +// PMAP_ROW() lets us specify a row (really a struct stm32_pin_info) +// in the pin map. Its arguments are: +// +// - GPIO device for the pin (GPIOA, etc.) +// - GPIO bit for the pin (0 through 15) +// - Timer device, or NULL if none +// - Timer channel (1 to 4, for PWM), or 0 if none +// - ADC device, or NULL if none +// - ADC channel, or ADCx if none +extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = { + + /* Arduino-like header, right connectors */ + + PMAP_ROW(GPIOA, 3, NULL, 0, ADC1, 3), /* D0/PA3 */ + PMAP_ROW(GPIOA, 2, NULL, 0, ADC1, 2), /* D1/PA2 */ + PMAP_ROW(GPIOA, 10, NULL, 0, NULL, ADCx), /* D2/PA10 */ + PMAP_ROW(GPIOB, 3, TIMER2, 2, NULL, ADCx), /* D3/PB3 REMAPPED */ + PMAP_ROW(GPIOB, 5, NULL, 0, NULL, ADCx), /* D4/PB5 */ + PMAP_ROW(GPIOB, 4, TIMER3, 1, NULL, ADCx), /* D5/PB4 REMAPPED */ + PMAP_ROW(GPIOB, 10, TIMER2, 3, NULL, ADCx), /* D6/PB10 REMAPPED */ + PMAP_ROW(GPIOA, 8, NULL, 0, NULL, ADCx), /* D7/PA8 */ + + PMAP_ROW(GPIOA, 9, NULL, 0, NULL, ADCx), /* D8/PA9 */ + PMAP_ROW(GPIOC, 7, NULL, 0, NULL, ADCx), /* D9/PC7 */ + PMAP_ROW(GPIOB, 6, TIMER4, 1, NULL, ADCx), /* D10/PB6 */ + PMAP_ROW(GPIOA, 7, TIMER3, 2, ADC1, 7), /* D11/PA7 */ + PMAP_ROW(GPIOA, 6, NULL, 0, ADC1, 6), /* D12/PA6 */ + PMAP_ROW(GPIOA, 5, NULL, 0, ADC1, 5), /* D13/PA5 LED*/ + PMAP_ROW(GPIOB, 9, NULL, 0, NULL, ADCx), /* D14/PB9 */ + PMAP_ROW(GPIOB, 8, NULL, 0, NULL, ADCx), /* D15/PB8 */ + + /* Arduino-like header, left connectors */ + + PMAP_ROW(GPIOA, 0, TIMER2, 1, ADC1, 0), /* D16/A0/PA0 */ + PMAP_ROW(GPIOA, 1, TIMER2, 2, ADC1, 1), /* D17/A1/PA1 */ + PMAP_ROW(GPIOA, 4, NULL, 0, ADC1, 4), /* D18/A2/PA4 */ + PMAP_ROW(GPIOB, 0, TIMER3, 3, ADC1, 8), /* D19/A3/PB0 */ + PMAP_ROW(GPIOC, 1, NULL, 0, ADC1, 11), /* D20/A4/PC1 */ + PMAP_ROW(GPIOC, 0, NULL, 0, ADC1, 10), /* D21/A5/PC0 */ + + /* Other pins */ + + PMAP_ROW(GPIOB, 7, NULL, 0, NULL, ADCx), /* D22/PB7 */ + PMAP_ROW(GPIOC, 2, NULL, 0, ADC1, 12), /* D23/PC2 */ + PMAP_ROW(GPIOC, 3, NULL, 0, ADC1, 13), /* D24/PC3 */ + PMAP_ROW(GPIOC, 4, NULL, 0, ADC1, 14), /* D25/PC4 */ + PMAP_ROW(GPIOC, 5, NULL, 0, ADC1, 15), /* D26/PC5 */ + + PMAP_ROW(GPIOC, 13, NULL, 0, NULL, ADCx), /* D27/PC13 USER BLUE BUTTON */ + PMAP_ROW(GPIOC, 14, NULL, 0, NULL, ADCx), /* D28/PC14 */ + PMAP_ROW(GPIOC, 15, NULL, 0, NULL, ADCx), /* D29/PC15 */ + PMAP_ROW(GPIOD, 2, NULL, 0, NULL, ADCx), /* D30/PD2 */ + PMAP_ROW(GPIOC, 10, NULL, 0, NULL, ADCx), /* D31/PC10 */ + PMAP_ROW(GPIOB, 1, NULL, 0, ADC1, 9), /* D32/PB1 */ + PMAP_ROW(GPIOB, 11, NULL, 0, NULL, ADCx), /* D33/PB11 */ + PMAP_ROW(GPIOB, 12, NULL, 0, NULL, ADCx), /* D34/PB12 */ + PMAP_ROW(GPIOB, 13, NULL, 0, NULL, ADCx), /* D35/PB13 */ + PMAP_ROW(GPIOB, 14, NULL, 0, NULL, ADCx), /* D36/PB14 */ + PMAP_ROW(GPIOB, 15, NULL, 0, NULL, ADCx), /* D37/PB15 */ + PMAP_ROW(GPIOC, 6, NULL, 0, NULL, ADCx), /* D38/PC6 */ + PMAP_ROW(GPIOC, 8, NULL, 0, NULL, ADCx), /* D39/PC8 */ + PMAP_ROW(GPIOC, 9, NULL, 0, NULL, ADCx), /* D40/PC9 */ + + PMAP_ROW(GPIOA, 13, NULL, 0, NULL, ADCx), /* D41/PA13 */ + PMAP_ROW(GPIOA, 14, NULL, 0, NULL, ADCx), /* D42/PA14 */ + PMAP_ROW(GPIOA, 15, NULL, 0, NULL, ADCx), /* D43/PA15 */ +}; + +// Array of pins you can use for pwmWrite(). Keep it in Flash because +// it doesn't change, and so we don't waste RAM. +extern const uint8 boardPWMPins[] __FLASH__ = { + 3, 5, 6, 10, 11, 16, 17, 19 +}; + +// Array of pins you can use for analogRead(). +extern const uint8 boardADCPins[] __FLASH__ = { + 16, 17, 18, 19, 20, 21 +}; + +// Array of pins that the board uses for something special. Other than +// the button and the LED, it's usually best to leave these pins alone +// unless you know what you're doing. +extern const uint8 boardUsedPins[] __FLASH__ = { + BOARD_LED_PIN, BOARD_BUTTON_PIN +}; diff --git a/wirish/boards/nucleo/include/board/board.h b/wirish/boards/nucleo/include/board/board.h new file mode 100644 index 0000000..f7e3a38 --- /dev/null +++ b/wirish/boards/nucleo/include/board/board.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * The MIT License + * + * Copyright (c) 2011 LeafLabs, LLC. + * + * 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/maple/include/board/board.h + * @author Marti Bolivar + * @brief Maple board header. + */ + +#ifndef _BOARD_MAPLE_H_ +#define _BOARD_MAPLE_H_ + +/** + * If you solder an external oscillator, you may run the board at 72mhz, + * else, we keep it at 36mhz for simplicity and stability + */ +#define CYCLES_PER_MICROSECOND 36 + +/* Pin number for the built-in button. */ +#define BOARD_BUTTON_PIN 27 + +/* Pin number for the built-in LED. */ +#define BOARD_LED_PIN 13 + +/* Number of USARTs/UARTs whose pins are broken out to headers. */ +#define BOARD_NR_USARTS 3 + +/* USART pin numbers. */ +#define BOARD_USART1_TX_PIN 7 +#define BOARD_USART1_RX_PIN 8 +#define BOARD_USART2_TX_PIN 1 +#define BOARD_USART2_RX_PIN 0 +#define BOARD_USART3_TX_PIN 29 +#define BOARD_USART3_RX_PIN 30 + +/* Number of SPI ports broken out to headers. */ +#define BOARD_NR_SPI 2 + +/* SPI pin numbers. */ +#define BOARD_SPI1_NSS_PIN 10 +#define BOARD_SPI1_MOSI_PIN 11 +#define BOARD_SPI1_MISO_PIN 12 +#define BOARD_SPI1_SCK_PIN 13 +#define BOARD_SPI2_NSS_PIN 31 +#define BOARD_SPI2_MOSI_PIN 34 +#define BOARD_SPI2_MISO_PIN 33 +#define BOARD_SPI2_SCK_PIN 32 + +/* Total number of GPIO pins that are broken out to headers and + * intended for use. This includes pins like the LED, button, and + * debug port (JTAG/SWD) pins. */ +#define BOARD_NR_GPIO_PINS 44 + +/* Number of pins capable of PWM output. */ +#define BOARD_NR_PWM_PINS 8 + +/* Number of pins capable of ADC conversion. */ +#define BOARD_NR_ADC_PINS 6 + +/* Number of pins already connected to external hardware. For Maple, + * these are just BOARD_LED_PIN, BOARD_BUTTON_PIN, and the debug port + * pins (see below). */ +#define BOARD_NR_USED_PINS 2 + +/** + * Note: there is no USB in this board. + */ + +/* Pin aliases: these give the GPIO port/bit for each pin as an + * enum. These are optional, but recommended. They make it easier to + * write code using low-level GPIO functionality. */ +enum { + PA3, PA2, PA0, PA1, PB5, PB6, PA8, PA9, PA10, PB7, PA4, PA7, PA6, PA5, PB8, + PC0, PC1, PC2, PC3, PC4, PC5, PC13, PC14, PC15, PB9, PD2, PC10, PB0, PB1, + PB10, PB11, PB12, PB13, PB14, PB15, PC6, PC7, PC8, PC9, PA13, PA14, PA15, + PB3, PB4 +}; + +#endif -- cgit v1.2.3 From 6f45284326411f3f3d68e077449f14a2d1caa693 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 27 May 2015 23:14:00 -0700 Subject: docs: point doxygen fail to the correct README --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 50badda..247edbf 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -268,7 +268,7 @@ if os.path.isdir(doxygen_xml_maybe): doxygen_xml_dir = doxygen_xml_maybe else: print("FAIL: doxygen hasn't been run yet in this repository; " - "see ../README") + "see README-building.txt") sys.exit(-1) breathe_projects = {'libmaple' : doxygen_xml_dir} -- cgit v1.2.3 From 124c8964eb81705d0924295e63866370e9c16ede Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 27 May 2015 23:15:55 -0700 Subject: docs: many small broken ref fixes, syntax bugfixes --- docs/source/bootloader.rst | 4 ++-- docs/source/epilog.rst | 3 ++- docs/source/faq.rst | 4 ++-- docs/source/lang/api/hardwarespi.rst | 3 ++- docs/source/lang/cpp/arithmetic.rst | 2 +- docs/source/libmaple/api/dma.rst | 10 +++++++--- docs/source/libmaple/api/gpio.rst | 7 +++++-- docs/source/libmaple/api/nvic.rst | 2 +- docs/source/libmaple/api/util.rst | 2 +- docs/source/libmaple/overview.rst | 2 +- 10 files changed, 24 insertions(+), 15 deletions(-) diff --git a/docs/source/bootloader.rst b/docs/source/bootloader.rst index a4ab5c9..0896ce3 100644 --- a/docs/source/bootloader.rst +++ b/docs/source/bootloader.rst @@ -613,8 +613,8 @@ In order to follow these instructions, you will need: - A binary of the bootloader you want to upload (see below). - Hardware for communicating between the Maple and your computer over serial. -- `Python `_, version 2.5 or higher. -- The `PySerial `_ library (this +- Python_, version 2.5 or higher. +- The PySerial_ library (this must be installed separately; it is not part of the Python standard library). diff --git a/docs/source/epilog.rst b/docs/source/epilog.rst index 0c1a091..3078639 100644 --- a/docs/source/epilog.rst +++ b/docs/source/epilog.rst @@ -12,7 +12,8 @@ .. _Git: http://git-scm.com/ .. _dfu-util: http://wiki.openmoko.org/wiki/Dfu-util .. _easy_install: http://packages.python.org/distribute/easy_install.html -.. _Leaflabs Maple: http://leaflabs.com/docs/hardware/maple-mini.html +.. _Leaflabs Maple: http://leaflabs.com/docs/hardware/maple.html .. _Leaflabs Maple RET6: http://leaflabs.com/docs/hardware/maple-ret6.html .. _Leaflabs Maple Mini: http://leaflabs.com/docs/hardware/maple-mini.html .. _Leaflabs Maple Native Beta: http://leaflabs.com/docs/hardware/maple-native-beta.html +.. _Maple's master pin map: http://static.leaflabs.com/pub/leaflabs/maple-docs/latest/hardware/maple.html#master-pin-map diff --git a/docs/source/faq.rst b/docs/source/faq.rst index bd155ae..b255f52 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -59,8 +59,8 @@ correspond to the pin you want to write to. If you don't know what that means, don't worry. We'll go through an example here. Let's say you want to write to pin 4 on the Maple. In order to find -out the port and bit number, take look at the Maple's :ref:`master pin -map ` next to "D4". You'll see that in the +out the port and bit number, take look at the `Maple's master pin +map`_ next to "D4". You'll see that in the "GPIO" column, there's "PB5". That's short for "**P**\ ort **B**, bit **5**". So the GPIO port is "B", and the bit is "5". (If you're not on the Maple, you can find your board's pin map :ref:`from here diff --git a/docs/source/lang/api/hardwarespi.rst b/docs/source/lang/api/hardwarespi.rst index a44a65f..4d720ac 100644 --- a/docs/source/lang/api/hardwarespi.rst +++ b/docs/source/lang/api/hardwarespi.rst @@ -42,7 +42,8 @@ function (an example is given below). .. FIXME [Breathe] Output doesn't include the class; fix & submit pull req -.. doxygenfunction:: HardwareSPI::begin +.. doxygenfunction:: HardwareSPI::begin(void) +.. doxygenfunction:: HardwareSPI::begin(SPIFrequency, uint32, uint32) .. note:: If you are using SPI port 3 (on a board that supports it; not all do); you'll need to call :ref:`lang-disabledebugports` diff --git a/docs/source/lang/cpp/arithmetic.rst b/docs/source/lang/cpp/arithmetic.rst index cef3954..b7cb5f6 100644 --- a/docs/source/lang/cpp/arithmetic.rst +++ b/docs/source/lang/cpp/arithmetic.rst @@ -110,7 +110,7 @@ types are approximate): ``short``, "0 --- 65,535", "-32,768 --- 32,767", 2 ``int``, "0 --- 4,294,967,295", "-2,147,483,648 --- 2,147,483,647", 4 ``long``, "0 --- 4,294,967,295", "-2,147,483,648 --- 2,147,483,647", 4 - ``long long``, "0 --- 1.8*10\ :sup:`19`\ " (approx.), "-9.2*10\ :sup:`18` --- 9.2*10\ :sup:`18` (approx.)", 8 + ``long long``, "0 --- 1.8*10\ :sup:`19`\ (approx.)", "-9.2*10\ :sup:`18` --- 9.2*10\ :sup:`18` (approx.)", 8 See Also diff --git a/docs/source/libmaple/api/dma.rst b/docs/source/libmaple/api/dma.rst index 286b6d6..4ce298d 100644 --- a/docs/source/libmaple/api/dma.rst +++ b/docs/source/libmaple/api/dma.rst @@ -34,6 +34,10 @@ Devices Functions --------- +.. NB: Some of these functions have multiple definitions, in which case the + complete function signature needs to be specified to disambiguate or breathe + will choke ("Unable to resolve multiple matches for function"...) + .. doxygenfunction:: dma_init .. doxygenfunction:: dma_setup_transfer .. doxygenfunction:: dma_set_num_transfers @@ -43,12 +47,12 @@ Functions .. doxygenfunction:: dma_get_irq_cause .. doxygenfunction:: dma_enable .. doxygenfunction:: dma_disable -.. doxygenfunction:: dma_set_mem_addr +.. doxygenfunction:: dma_set_mem_addr(dma_dev *, dma_tube, __io void *) .. doxygenfunction:: dma_set_per_addr .. doxygendefine:: dma_channel_regs .. doxygendefine:: dma_is_channel_enabled -.. doxygenfunction:: dma_get_isr_bits -.. doxygenfunction:: dma_clear_isr_bits +.. doxygenfunction:: dma_get_isr_bits(dma_dev *, dma_tube) +.. doxygenfunction:: dma_clear_isr_bits(dma_dev *, dma_tube) Register Map Base Pointers -------------------------- diff --git a/docs/source/libmaple/api/gpio.rst b/docs/source/libmaple/api/gpio.rst index 9e8e5c7..5f631d5 100644 --- a/docs/source/libmaple/api/gpio.rst +++ b/docs/source/libmaple/api/gpio.rst @@ -42,14 +42,17 @@ Functions .. doxygenfunction:: gpio_init .. doxygenfunction:: gpio_init_all -.. doxygenfunction:: gpio_set_mode +.. doxygenfunction:: gpio_set_mode(gpio_dev *, uint8, gpio_pin_mode) .. doxygenfunction:: gpio_exti_port .. doxygenfunction:: gpio_write_bit .. doxygenfunction:: gpio_read_bit .. doxygenfunction:: gpio_toggle_bit .. doxygenfunction:: afio_init -.. doxygenfunction:: afio_exti_select + +.. c:macro:: afio_exti_select(exti, port) + + Macro for `exti_select((exti), (port))`. .. _gpio-h-afio-remap: .. doxygenfunction:: afio_remap diff --git a/docs/source/libmaple/api/nvic.rst b/docs/source/libmaple/api/nvic.rst index 505e36e..815da2b 100644 --- a/docs/source/libmaple/api/nvic.rst +++ b/docs/source/libmaple/api/nvic.rst @@ -49,7 +49,7 @@ Functions .. doxygenfunction:: nvic_globalirq_disable .. doxygenfunction:: nvic_irq_enable .. doxygenfunction:: nvic_irq_disable -.. doxygenfunction:: nvic_irq_disable_all +.. doxygenfunction:: nvic_irq_disable_all(void) .. doxygenfunction:: nvic_sys_reset Register Maps diff --git a/docs/source/libmaple/api/util.rst b/docs/source/libmaple/api/util.rst index 54377c0..2f6e080 100644 --- a/docs/source/libmaple/api/util.rst +++ b/docs/source/libmaple/api/util.rst @@ -50,5 +50,5 @@ If an assertion fails, execution is halted at the point of the failed assertion. When libmaple has been configured properly (Wirish performs this configuration by default), the built-in LED throbs in a smooth pattern to signal the failed assertion (using -:c:func:`throb()`), and the file and line where the assert failed are +``throb()``), and the file and line where the assert failed are transmitted to the user as detailed in :ref:`lang-assert`. diff --git a/docs/source/libmaple/overview.rst b/docs/source/libmaple/overview.rst index 006f1d8..4f0db1b 100644 --- a/docs/source/libmaple/overview.rst +++ b/docs/source/libmaple/overview.rst @@ -467,7 +467,7 @@ do a read-modify-write sequence on the DMA_CCR_PL bits like so:: Of course, before doing that, you should check to make sure there's not already a device-level function for performing the same task! (In -this case, there is. It's called :c:func:`dma_set_priority()`; see +this case, there is. It's called ``dma_set_priority()``; see :ref:`libmaple-dma`.) For instance, **none of the above code is portable** to STM32F4, which uses DMA streams instead of channels for this purpose. -- cgit v1.2.3 From 5646191ad51da501a5929390c4ecce90559335fb Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 27 May 2015 23:31:25 -0700 Subject: gitignore: doxygen_sqlite3.db and self-reference --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index ec1e96b..3885445 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ build/ doxygen/xml/ doxygen/html/ +doxygen/doxygen_sqlite3.db main.cpp libmaple.layout tags @@ -10,3 +11,6 @@ TAGS arm cscope* .gdbinit + +# Don't ignore this file itself +!.gitignore -- cgit v1.2.3 From c5f25beb3e50939ff61997717960369c1897f90a Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 28 May 2015 00:20:08 -0700 Subject: legacy branch: set docs release to 'legacy' --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 247edbf..dc01672 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -61,7 +61,7 @@ copyright = u'2010, 2011, LeafLabs, LLC. 2014 Various Contributors' version = '0.0' # The full version, including alpha/beta/rc tags. # FIXME [RELEASE] update this for the release -release = 'prerelease' +release = 'legacy' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3 From f8b2b9341661440dde1644f3c7f1c8479dd7c149 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 28 May 2015 00:24:56 -0700 Subject: docs: superficial librambutan rebranding --- docs/Makefile | 4 ++-- docs/README | 15 ++++-------- docs/README-building.txt | 39 ++++++++++++++++++++------------ docs/README-maintainers.txt | 14 ++++-------- docs/source/_templates/indexcontent.html | 13 ++++++----- 5 files changed, 43 insertions(+), 42 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 5255525..8b35b93 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,4 +1,4 @@ -# Makefile for LeafLabs documentation (automatically generated by +# Makefile for librambutan documentation (automatically generated by # Sphinx). # You can set these variables from the command line. @@ -130,5 +130,5 @@ doctest: "results in $(BUILDDIR)/doctest/output.txt." doxygen: - @echo "Wrong! You need to run this from within libmaple!" + @echo "Wrong! You need to run this from the top level!" false diff --git a/docs/README b/docs/README index 60fb888..cdfe0ae 100644 --- a/docs/README +++ b/docs/README @@ -1,14 +1,14 @@ -This repository contains source files used to generate the -documentation for LeafLabs' libmaple and Maple IDE projects [*]. The -HTML documentation generated from these sources is available online: +This directory contains source files used to generate the documentation for +librambutan. The HTML documentation generated from these sources is available +online: - http://leaflabs.com/docs/ + http://docs.rambutan.cc/projects/librambutan/en/master The above URL is the recommended way for users to read the documentation. The docs for the latest release are always available there. -Older versions are here: +Ancient libmaple versions are here: http://static.leaflabs.com/pub/leaflabs/maple-docs/ @@ -17,8 +17,3 @@ The file README-building.txt explains how to build the HTML docs. The file README-maintainers.txt contains important information for maintainers of the documentation (e.g. how to add docs for a new board, how to cut a release version of the docs, etc.). - -[*] libmaple and Maple IDE themselves are in separate repositories: - - https://github.com/leaflabs/libmaple - https://github.com/leaflabs/maple-ide diff --git a/docs/README-building.txt b/docs/README-building.txt index 6846bf7..b763f84 100644 --- a/docs/README-building.txt +++ b/docs/README-building.txt @@ -1,8 +1,7 @@ -This file explains how to build the HTML documentation. As such, it's -probably only useful to LeafLabs developers. Users can read the HTML -for the latest release here: +This file explains how to build the HTML documentation. Users can quickly read +the HTML for the latest release here: - http://leaflabs.com/docs/ + http://docs.rambutan.cc/projects/librambutan/en/master/ Install Dependencies -------------------- @@ -11,8 +10,7 @@ First, you will need to install some dependencies (Doxygen, Sphinx, and Breathe). 1. Much of the documentation is pulled out of the libmaple source - code's Doxygen comments, so you need a recent-ish version of - Doxygen in your PATH: + code's Doxygen comments, so you need Doxygen in your PATH: http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc @@ -22,21 +20,32 @@ and Breathe). These are your choices for how to install Sphinx: - - From source or .egg: - http://pypi.python.org/pypi/Sphinx#downloads + - From a Linux package manager, eg: + $ sudo apt-get install python-sphinx + + - From an OS X package manager, like MacPorts or homebrew. + + - Via pip: + $ sudo pip install Sphinx - Via easy_install: $ sudo easy_install -U Sphinx + - From source or .egg: + http://pypi.python.org/pypi/Sphinx#downloads + You need Sphinx version >= 1.0.6. 3. We use a Sphinx plugin called Breathe to parse Doxygen's XML output into a form usable by Sphinx. (More about Breathe: http://michaeljones.github.com/breathe/). - LeafLabs sometimes patches Breathe for the purposes of building our + The more recent versions of Breathe seem to have all the features necessary + to build these docs, so you can install the distribution version (breathe-doc). + + Alternatively, LeafLabs sometimes patches Breathe for the purposes of building docs, so clone the LeafLabs Breathe tree from GitHub (somewhere - else on your system, NOT in the leaflabs-docs repo): + else on your system, NOT in the librambutan repo): - LeafLabs developers, clone with push permissions: $ git clone git@github.com:leaflabs/breathe.git @@ -44,7 +53,7 @@ and Breathe). - Everyone else, clone without them: $ git clone git://github.com/leaflabs/breathe.git -4. After that's done, set environment variable BREATHE_HOME to point to + After that's done, set environment variable BREATHE_HOME to point to Breathe. Something like this in Bash: $ export BREATHE_HOME=/path/to/breathe/repo/ @@ -59,14 +68,14 @@ produce Doxygen XML output, then you can generate the final HTML docs. 1. Before the first time you run Sphinx (and any time the Doxygen comments in the libmaple source code are changed), you'll need to - re-run doxygen on libmaple. + re-run doxygen on the top level of librambutan. - $ cd /path/to/top/level + $ cd /path/to/top/level/librambutan $ make doxygen Doxygen will yell at you a lot; it's generally safe to ignore it. -2. Finally, you can build the HTML (in the leaflabs-docs repository): +2. Finally, you can build the HTML: $ cd /path/to/docs $ make html @@ -93,7 +102,7 @@ comments lives in source/. The directory source/_static/ is for static content (like style sheets); source/_templates/ is meant to contain Sphinx templates. -Read more about Sphinx and use the existing leaflabs-docs source for +Read more about Sphinx and use the existing source for examples when writing new docs. The directory tmpl/ contains template ReST files you should sometimes use when creating a page that follows a pattern (like a libmaple API page), in order to keep the style diff --git a/docs/README-maintainers.txt b/docs/README-maintainers.txt index 48e8e5c..959c5e8 100644 --- a/docs/README-maintainers.txt +++ b/docs/README-maintainers.txt @@ -1,14 +1,10 @@ This file contains information useful for the documentation's -maintainers. As such, it's probably only useful to LeafLabs -developers. Users can read the HTML for the latest release here: +maintainers. Users can read the HTML for the latest release here: - http://leaflabs.com/docs/ + http://docs.rambutan.cc/projects/librambutan/en/master/ -Things you can learn how to do from this file: - -- Cut a release version -- Fix errors in/otherwise maintain the current docs release -- Add docs for a new board +This file is out of date (libmaple era). librambutan uses readthedocs.org to +auto-build documentation. Building Documentation for a Release ------------------------------------ @@ -184,7 +180,7 @@ It needs to be updated RIGHT AWAY, you say? Here's what you do: - Distribute the updated docs. These are world-visible here: - http://static.leaflabs.com/pub/leaflabs/maple-docs/ + http://docs.rambutan.cc/ Adding a New Board ------------------ diff --git a/docs/source/_templates/indexcontent.html b/docs/source/_templates/indexcontent.html index d1bb65b..2d1c8f9 100644 --- a/docs/source/_templates/indexcontent.html +++ b/docs/source/_templates/indexcontent.html @@ -14,22 +14,23 @@ {% block body %} -

Hi!

+

Hi There!

-This is the documentation for the LeafLabs Maple boards, version {{ -release }}. +This is the documentation for librambutan, a libre firmware library for STM32 +ARM microcontrollers. If browsing on the docs.rambutan.cc website, you can +select the version/branch from the box in the lower right-hand corner.

Read This First

Having problems? Check out Troubleshooting and the FAQ. Can't find what you want -here? Look on the LeafLabs -wiki. +here? Head back up to the project-wide +docs.

See the What's New page for -changes that are new in {{ release }}.

+changes that are new in '{{ release }}'.

Contents at a Glance

-- cgit v1.2.3 From 71ef6f46a797f739bf140df934f137d92d791abc Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 28 May 2015 00:25:36 -0700 Subject: superficial librambutan rebranding --- CREDITS | 13 +++++-------- HACKING | 8 ++++---- README | 66 +++++++++++++++++++++++++++++++++-------------------------------- 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/CREDITS b/CREDITS index 2b803b1..8965ee8 100644 --- a/CREDITS +++ b/CREDITS @@ -1,16 +1,13 @@ - This is at least a partial credits-file of people that have - contributed to libmaple (it was originally drawn from the - commit logs, so it e.g. leaves out contributions that didn't - come in the form of patches). It's formatted the same way as - the Linux kernel CREDITS: sorted by name and formatted for - easy processing. + This is at least a partial credits-file of people that have contributed + to libmaple and librambutan (it was originally drawn from the commit + logs, so it e.g. leaves out contributions that didn't come in the form + of patches). It's formatted the same way as the Linux kernel CREDITS: + sorted by name and formatted for easy processing. The fields are: name (N), email (E), web-address (W), description (D). Feel free to add any other fields present in the Linux CREDITS file. - LeafLabs - ---------- N: Marti Bolivar diff --git a/HACKING b/HACKING index 7fdec9a..441fa31 100644 --- a/HACKING +++ b/HACKING @@ -1,6 +1,6 @@ Read this before submitting patches: - http://leaflabs.com/docs/libmaple/contributing.html + http://docs.rambutan.cc/projects/librambutan/en/master/libmaple/contributing.html In particular, patches without sign-off lines will not be accepted. @@ -8,9 +8,9 @@ If your patch is formatted very differently from the libmaple style, you may find the astyle options file in contrib/astylerc useful for auto-formatting it roughly in the libmaple style. -LeafLabs is a small shop. Please help us merge your patches -efficiently by getting formatting nits etc. out of the way before -submitting. +We are a small collection of volunteers. Please help us merge your +patches efficiently by getting formatting nits etc. out of the way +before submitting. When writing your patch, feel free to add yourself to the CREDITS file. If you can't write your name in ASCII (or choose not to diff --git a/README b/README index 400e656..3249e84 100644 --- a/README +++ b/README @@ -1,23 +1,33 @@ - _ _ _ _ - | (_) |__ _ __ ___ __ _ _ __ | | ___ - | | | '_ \| '_ ` _ \ / _` | '_ \| |/ _ \ - | | | |_) | | | | | | (_| | |_) | | __/ - |_|_|_.__/|_| |_| |_|\__,_| .__/|_|\___| - |_| by LeafLabs! - leaflabs.com + _ _ _ _ _ + | (_) |__ _ __ __ _ _ __ ___ | |__ _ _| |_ __ _ _ __ + | | | '_ \| '__/ _` | '_ ` _ \| '_ \| | | | __/ _` | '_ \ + | | | |_) | | | (_| | | | | | | |_) | |_| | || (_| | | | | + |_|_|_.__/|_| \__,_|_| |_| |_|_.__/ \__,_|\__\__,_|_| |_| The latest version of this repository can be found here: - https://github.com/leaflabs/libmaple + https://github.com/rambutan32/librambutan IMPORTANT: read HACKING _before_ submitting patches. General information ------------------------------------------------------------------------------ -libmaple is a library for programming ST's STM32 line of Cortex M3 +librambutan is a fork of Leaflab's libmaple firmware libraries. As of 2015 +Leaflabs is not actively maintaining libmaple and the original Maple series +hardware is End Of Life. For the foreseeable future the name 'libmaple' will +continue to be used in documentation and filenames for backwards compatability. +You can get the latest information about the Rambutan project at: + + https://forums.rambutan.cc + +The original libmaple can be found at: + + https://github.com/leaflabs/libmaple + +librambutan is a library for programming ST's STM32 line of Cortex M3 microcontrollers. It has a pure C layer, libmaple proper, which does most of the work, and a C++ layer, Wirish, which provides high-level convenience functions and a Wiring/Arduino-compatible interface. @@ -26,36 +36,28 @@ libmaple is designed for portability, and currently runs on a variety of STM32F1 performance and value line MCUs, with experimental support for STM32F2 MCUs. -Using libmaple +Using librambutan ------------------------------------------------------------------------------ -The easiest way to use libmaple is in concert with the Maple IDE. -Maple IDE, a sister project from LeafLabs, is an Arduino IDE fork -usable for programming Maple boards, which includes libmaple and a -compilation and upload toolchain: +A HOWTO on setting up this library for use from the command line in a Unix +environment is available here: - http://leaflabs.com/docs/maple-ide-install.html + http://docs.rambutan.cc/projects/librambutan/en/master/unix-toolchain.html -Additionally, a HOWTO on setting up this library for use from the -command line in a Unix environment is available here: - - http://leaflabs.com/docs/unix-toolchain.html +At a minimum you will need the gcc-arm-none-eabi toolchain on your path, +including the newlib libc and the libstdc++ libraries. Documentation, Etc. ------------------------------------------------------------------------------ -HTML documentation for the latest release of libmaple/Maple IDE is -available here: - - http://leaflabs.com/docs/ +Hosted HTML documentation for several versions of librambutan are available at: -libmaple is well documented via Doxygen comments. The HTML -documentation referenced above (which also includes the Doxygen -output) is automatically generated from the source files in the -leaflabs-docs repository. In order to obtain the leaflabs-docs -repository, visit: + http://docs.rambutan.cc/projects/librambutan/en/master/ - http://github.com/leaflabs/leaflabs-docs/ +libmaple is well documented via Doxygen comments. The HTML documentation +referenced above (which also includes the Doxygen output) is automatically +generated from the source files in the docs directory. See the READMEs there +for details. Repository Layout ------------------------------------------------------------------------------ @@ -66,8 +68,7 @@ Repository Layout /contrib/ - Community-contributed resources. LeafLabs doesn't maintain the - contents of this directory, so it may get stale. + Community-contributed resources. /examples/ @@ -86,7 +87,8 @@ Repository Layout /LICENSE - Licensing and copyright information. + Licensing and copyright information. librambutan is (mostly) under an MIT + license. /main.cpp.example -- cgit v1.2.3