“GCC Toolchain for CoreSTM32”的版本间的差异

来自Microduino Wikipedia
跳转至: 导航搜索
Setting up GCC toolchain
Setting up GCC toolchain
第15行: 第15行:
 
* Sourcery CodeBench Lite(formerly Code Soucery). http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
 
* Sourcery CodeBench Lite(formerly Code Soucery). http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
  
 
+
It is said that Sourcery CodeBench Lite has better performance than other compilers, but we haven't made any test.
It is said that Sourcery CodeBench Lite has better performance than other versions of compiler, but we haven't made any test.
 
  
 
= Using IDE(Integrated Development Environment) =
 
= Using IDE(Integrated Development Environment) =

2014年7月16日 (三) 14:59的版本

Why GCC toolchain

  • 100% opensource and free
  • Controll everything of CoreSTM32
  • Discover 100% power of STM32 micro processor. Much higher performance compared to Maple IDE.

Setting up GCC toolchain

You have two choices:

OR

It is said that Sourcery CodeBench Lite has better performance than other compilers, but we haven't made any test.

Using IDE(Integrated Development Environment)

I prefer Eclipse, but you have multiple choices, like

Testing Program: Blink

#include "stm32f10x.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"

int main(void) {

  int i;
  GPIO_InitTypeDef GPIO_InitStructure;
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;

  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOA, &GPIO_InitStructure);

  while (1) {

    GPIO_SetBits(GPIOA, GPIO_Pin_8);

    /* delay */
    for (i = 0; i < 0x1000000; i++)
      ;
    GPIO_ResetBits(GPIOA, GPIO_Pin_8);

    /* delay */
    for (i = 0; i < 0x1000000; i++)
      ;
  }
}