标题: 利用Eclipse IDE for C/C++ Developers和GNU Tools ARM Embedded编译器,建立的一... [打印本页] 作者: bibi 时间: 2015-4-19 00:56 标题: 利用Eclipse IDE for C/C++ Developers和GNU Tools ARM Embedded编译器,建立的一... 工作环境说明:
1. 硬件平台: DX开发板主板 + DX103核心板
2. 软件平台: Eclipse IDE for C/C++ Developers + GNU Tools ARM Embedded
(1) IDE: Eclipse IDE for C/C++ Developers
(2) 编译器: GNU Tools ARM Embedded编译器,支持STM32F103的标准外设驱动库3.5版本
//
// This file is part of the GNU ARM Eclipse distribution.
// Copyright (c) 2014 Liviu Ionescu.
//
#include <stdio.h>
#include "diag/Trace.h"
#include "stm32f10x_conf.h"
// ----------------------------------------------------------------------------
//
// STM32F1 empty sample (trace via ITM).
//
// Trace support is enabled by adding the TRACE macro definition.
// By default the trace messages are forwarded to the ITM output,
// but can be rerouted to any device o.r completely suppressed, by
// changing the definitions required in system/src/diag/trace_impl.c
// (currently OS_USE_TRACE_ITM, OS_USE_TRACE_SEMIHOSTING_DEBUG/_STDOUT).
//
// Sample pragmas to cope with warnings. Please note the related line at
// the end of this function, used to pop the compiler diagnostics status.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#pragma GCC diagnostic ignored "-Wreturn-type"
int main(int argc, char* argv[])
{
// At this stage the system clock should have already been configured
// at high speed.