From 0dbe45a0b492911dbd288795af6928ace711de33 Mon Sep 17 00:00:00 2001 From: t-moe Date: Tue, 17 Mar 2015 13:33:35 +0100 Subject: [PATCH] Cleaned up folders. --- example/.cproject => .cproject | 0 example/.gitignore => .gitignore | 0 example/.project => .project | 0 .../language.settings.xml | 0 example/Makefile => Makefile | 0 README.md | 61 +-------------- eclipse/README.md | 26 ------- eclipse/install.sh | 8 -- example/src/main.c | 50 ------------- .../libs => libs}/StmCoreNPheriph/Makefile | 0 .../StmCoreNPheriph/inc/core_cm4.h | 0 .../StmCoreNPheriph/inc/core_cm4_simd.h | 0 .../StmCoreNPheriph/inc/core_cmFunc.h | 0 .../StmCoreNPheriph/inc/core_cmInstr.h | 0 .../libs => libs}/StmCoreNPheriph/inc/misc.h | 0 .../StmCoreNPheriph/inc/stm32f4_discovery.h | 0 .../inc/stm32f4_discovery_lis302dl.h | 0 .../StmCoreNPheriph/inc/stm32f4xx.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_adc.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_can.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_conf.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_crc.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_cryp.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_dac.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_dbgmcu.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_dcmi.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_dma.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_dma2d.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_exti.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_flash.h | 0 .../inc/stm32f4xx_flash_ramfunc.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_fsmc.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_gpio.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_hash.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_i2c.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_iwdg.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_ltdc.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_pwr.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_rcc.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_rng.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_rtc.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_sai.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_sdio.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_spi.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_syscfg.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_tim.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_usart.h | 0 .../StmCoreNPheriph/inc/stm32f4xx_wwdg.h | 0 .../StmCoreNPheriph/inc/system_stm32f4xx.h | 0 .../libs => libs}/StmCoreNPheriph/src/misc.c | 0 .../StmCoreNPheriph/src/stm32f4_discovery.c | 0 .../src/stm32f4_discovery_lis302dl.c | 0 .../StmCoreNPheriph/src/stm32f4xx_adc.c | 0 .../StmCoreNPheriph/src/stm32f4xx_can.c | 0 .../StmCoreNPheriph/src/stm32f4xx_crc.c | 0 .../StmCoreNPheriph/src/stm32f4xx_cryp.c | 0 .../StmCoreNPheriph/src/stm32f4xx_cryp_aes.c | 0 .../StmCoreNPheriph/src/stm32f4xx_cryp_des.c | 0 .../StmCoreNPheriph/src/stm32f4xx_cryp_tdes.c | 0 .../StmCoreNPheriph/src/stm32f4xx_dac.c | 0 .../StmCoreNPheriph/src/stm32f4xx_dbgmcu.c | 0 .../StmCoreNPheriph/src/stm32f4xx_dcmi.c | 0 .../StmCoreNPheriph/src/stm32f4xx_dma.c | 0 .../StmCoreNPheriph/src/stm32f4xx_dma2d.c | 0 .../StmCoreNPheriph/src/stm32f4xx_exti.c | 0 .../StmCoreNPheriph/src/stm32f4xx_flash.c | 0 .../src/stm32f4xx_flash_ramfunc.c | 0 .../StmCoreNPheriph/src/stm32f4xx_fsmc.c | 0 .../StmCoreNPheriph/src/stm32f4xx_gpio.c | 0 .../StmCoreNPheriph/src/stm32f4xx_hash.c | 0 .../StmCoreNPheriph/src/stm32f4xx_hash_md5.c | 0 .../StmCoreNPheriph/src/stm32f4xx_hash_sha1.c | 0 .../StmCoreNPheriph/src/stm32f4xx_i2c.c | 0 .../StmCoreNPheriph/src/stm32f4xx_iwdg.c | 0 .../StmCoreNPheriph/src/stm32f4xx_ltdc.c | 0 .../StmCoreNPheriph/src/stm32f4xx_pwr.c | 0 .../StmCoreNPheriph/src/stm32f4xx_rcc.c | 0 .../StmCoreNPheriph/src/stm32f4xx_rng.c | 0 .../StmCoreNPheriph/src/stm32f4xx_rtc.c | 0 .../StmCoreNPheriph/src/stm32f4xx_sai.c | 0 .../StmCoreNPheriph/src/stm32f4xx_sdio.c | 0 .../StmCoreNPheriph/src/stm32f4xx_spi.c | 0 .../StmCoreNPheriph/src/stm32f4xx_syscfg.c | 0 .../StmCoreNPheriph/src/stm32f4xx_tim.c | 0 .../StmCoreNPheriph/src/stm32f4xx_usart.c | 0 .../StmCoreNPheriph/src/stm32f4xx_wwdg.c | 0 .../libs => libs}/libarm_cortexM4l_math.a | Bin .../libs => libs}/libarm_cortexM4lf_math.a | Bin src/main.c | 70 ++++++++++++++++++ {example/src => src}/startup.s | 0 {example/src => src}/system_stm32f4xx.c | 0 .../utils => utils}/discovery_board.launch | 0 {example/utils => utils}/gdb.script | 0 {example/utils => utils}/st-util-daemon.sh | 0 {example/utils => utils}/stm32_flash.ld | 0 95 files changed, 71 insertions(+), 144 deletions(-) rename example/.cproject => .cproject (100%) rename example/.gitignore => .gitignore (100%) rename example/.project => .project (100%) rename {example/.settings => .settings}/language.settings.xml (100%) rename example/Makefile => Makefile (100%) delete mode 100644 eclipse/README.md delete mode 100755 eclipse/install.sh delete mode 100644 example/src/main.c rename {example/libs => libs}/StmCoreNPheriph/Makefile (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/core_cm4.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/core_cm4_simd.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/core_cmFunc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/core_cmInstr.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/misc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4_discovery.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4_discovery_lis302dl.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_adc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_can.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_conf.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_crc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_cryp.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_dac.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_dbgmcu.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_dcmi.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_dma.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_dma2d.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_exti.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_flash.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_flash_ramfunc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_fsmc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_gpio.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_hash.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_i2c.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_iwdg.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_ltdc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_pwr.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_rcc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_rng.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_rtc.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_sai.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_sdio.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_spi.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_syscfg.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_tim.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_usart.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/stm32f4xx_wwdg.h (100%) rename {example/libs => libs}/StmCoreNPheriph/inc/system_stm32f4xx.h (100%) rename {example/libs => libs}/StmCoreNPheriph/src/misc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4_discovery.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4_discovery_lis302dl.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_adc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_can.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_crc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_cryp.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_cryp_aes.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_cryp_des.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_cryp_tdes.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_dac.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_dbgmcu.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_dcmi.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_dma.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_dma2d.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_exti.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_flash.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_flash_ramfunc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_fsmc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_gpio.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_hash.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_hash_md5.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_hash_sha1.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_i2c.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_iwdg.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_ltdc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_pwr.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_rcc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_rng.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_rtc.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_sai.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_sdio.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_spi.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_syscfg.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_tim.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_usart.c (100%) rename {example/libs => libs}/StmCoreNPheriph/src/stm32f4xx_wwdg.c (100%) rename {example/libs => libs}/libarm_cortexM4l_math.a (100%) rename {example/libs => libs}/libarm_cortexM4lf_math.a (100%) create mode 100644 src/main.c rename {example/src => src}/startup.s (100%) rename {example/src => src}/system_stm32f4xx.c (100%) rename {example/utils => utils}/discovery_board.launch (100%) rename {example/utils => utils}/gdb.script (100%) rename {example/utils => utils}/st-util-daemon.sh (100%) rename {example/utils => utils}/stm32_flash.ld (100%) diff --git a/example/.cproject b/.cproject similarity index 100% rename from example/.cproject rename to .cproject diff --git a/example/.gitignore b/.gitignore similarity index 100% rename from example/.gitignore rename to .gitignore diff --git a/example/.project b/.project similarity index 100% rename from example/.project rename to .project diff --git a/example/.settings/language.settings.xml b/.settings/language.settings.xml similarity index 100% rename from example/.settings/language.settings.xml rename to .settings/language.settings.xml diff --git a/example/Makefile b/Makefile similarity index 100% rename from example/Makefile rename to Makefile diff --git a/README.md b/README.md index a57866d..8e53dbe 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,6 @@ -BFH stm32f4 discovery linuxsupport +Discoverpixy ============================ #TODO Adjust this readme - -## Synopsis - -The following project consists of a minimal setup for the carme-m4 STM32F407 board. The makefile should be easily adaptable to your needs. - -## Motivation - -We'd like to enable linux enthusiastic students of the bern university of applied sciences to work with their beloved operating system without setting up a virtual machine just to run *atollic true studio*. ;) - -## Installation and required packages - -You'll need the following packages installed on your system: - - arm-none-eabi-binutils - arm-none-eabi-gcc - arm-none-eabi-gdb - arm-none-eabi-newlib - stlink - make - -The package names are taken from the arch linux community repository, hence they may differ on your linux distribution. - -## Instructions - -####first steps - -- Clone the repository. -- Install the required software packages. -- Plug in your carme-m4. -- Don't forget to add yourself to the group 'dialout' by invoking "gpasswd -a ${USER} dialout" - -#### using make - -- Build software: make all -- Debug software: make debug -- flash software: make flash -- start/stop st-util deamon: make start/stop - - -#### eclipse support - -If you want to use eclipse instead of pure makefiles you are free to do so and we are happy to support you with that: - -- Checkout the readme in the eclipse directory for instructions on how to install and configure eclipse correctly. -- Import the example project into eclipse as "existing project" and have fun :) - - -## Contributors - -- t-moe -- id101010 - -## Links - -- https://carme.bfh.ch - -## Additional Tags - -stm32, stm32f407, bfh ti, berner fachhochschule für technik und informatik, carme-m4, atollic true studio, linux diff --git a/eclipse/README.md b/eclipse/README.md deleted file mode 100644 index aea674c..0000000 --- a/eclipse/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Eclipse Support -============================ - -## Overview - -Eclipse CDT integrates seamlessly with makefile projects. Furthermore you can flash your target and debug it using eclipse (via gdb). - -## Eclipse Installation - -- Install eclipse (normal package) -- Run the script install.sh. It will install CDT and the required plugins to get you started. - -## How to use -- Copy the example project to your desired location and import it into eclipse as "existing project". -- Open the C/C++ Perspective -- You can compile the code normally by pressing the "build" button. Our makefile is used in the background. -- To download the code you have to press the "debug" button. Make sure the st-util deamon is running beforehand. (Start it with "make start") -- To debug the SFR's you can use the embsysregview plugin. [Tutorial](http://embsysregview.sourceforge.net/content/install3.html) - - -## Known Issues / Remarks - -- If you rename the project in either the makefile and/or eclipse you need to ajust the pathes of the debug configuration. -- Eclipse shows an error when you try to debug and st-util is not started or has crashed. Use "make start/stop" to reconnect. -- The code analyzer in eclipse is separated form the compiler. You may see lines marked with an error although they would compile just fine. Check that the Include directories are correct in the project properties (search for "Paths and Symbols") -- Stepping **over** a for loop will cause the debugger to hang. This is a bug in st_link. diff --git a/eclipse/install.sh b/eclipse/install.sh deleted file mode 100755 index 15777c1..0000000 --- a/eclipse/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -echo "installing cdt, make support, cross gcc support, gdb hardware debugging and memoryview enhancements" - -eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/tools/cdt/releases/8.4 -installIU org.eclipse.cdt.feature.group,org.eclipse.cdt.gnu.build.feature.group,org.eclipse.cdt.build.crossgcc.feature.group,org.eclipse.cdt.debug.gdbjtag.feature.group,org.eclipse.cdt.debug.ui.memory.feature.group - - -echo "installing ebmsysregview (sfr register view)" -eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://embsysregview.sourceforge.net/update -installIU org.eclipse.cdt.embsysregview_feature.feature.group diff --git a/example/src/main.c b/example/src/main.c deleted file mode 100644 index 57035f6..0000000 --- a/example/src/main.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "stm32f4_discovery.h" -#include - - -int main(void) { - int state=0; - bool oldButtonState; - bool newButtonState; - - STM_EVAL_LEDInit(LED3); - STM_EVAL_LEDInit(LED4); - STM_EVAL_LEDInit(LED5); - STM_EVAL_LEDInit(LED6); - STM_EVAL_PBInit(BUTTON_USER,BUTTON_MODE_GPIO); - - STM_EVAL_LEDOff(LED3); - STM_EVAL_LEDOff(LED4); - STM_EVAL_LEDOff(LED5); - STM_EVAL_LEDOff(LED6); - - while(1) { - - newButtonState=STM_EVAL_PBGetState(BUTTON_USER); - if((newButtonState^oldButtonState) && newButtonState) { - state++; - state%=4; - } - oldButtonState=newButtonState; - - switch(state) { - case 0: - STM_EVAL_LEDOff(LED6); - STM_EVAL_LEDOn(LED3); - break; - case 1: - STM_EVAL_LEDOff(LED3); - STM_EVAL_LEDOn(LED4); - break; - case 2: - STM_EVAL_LEDOff(LED4); - STM_EVAL_LEDOn(LED5); - break; - case 3: - STM_EVAL_LEDOff(LED5); - STM_EVAL_LEDOn(LED6); - break; - - } - } -} diff --git a/example/libs/StmCoreNPheriph/Makefile b/libs/StmCoreNPheriph/Makefile similarity index 100% rename from example/libs/StmCoreNPheriph/Makefile rename to libs/StmCoreNPheriph/Makefile diff --git a/example/libs/StmCoreNPheriph/inc/core_cm4.h b/libs/StmCoreNPheriph/inc/core_cm4.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/core_cm4.h rename to libs/StmCoreNPheriph/inc/core_cm4.h diff --git a/example/libs/StmCoreNPheriph/inc/core_cm4_simd.h b/libs/StmCoreNPheriph/inc/core_cm4_simd.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/core_cm4_simd.h rename to libs/StmCoreNPheriph/inc/core_cm4_simd.h diff --git a/example/libs/StmCoreNPheriph/inc/core_cmFunc.h b/libs/StmCoreNPheriph/inc/core_cmFunc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/core_cmFunc.h rename to libs/StmCoreNPheriph/inc/core_cmFunc.h diff --git a/example/libs/StmCoreNPheriph/inc/core_cmInstr.h b/libs/StmCoreNPheriph/inc/core_cmInstr.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/core_cmInstr.h rename to libs/StmCoreNPheriph/inc/core_cmInstr.h diff --git a/example/libs/StmCoreNPheriph/inc/misc.h b/libs/StmCoreNPheriph/inc/misc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/misc.h rename to libs/StmCoreNPheriph/inc/misc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4_discovery.h b/libs/StmCoreNPheriph/inc/stm32f4_discovery.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4_discovery.h rename to libs/StmCoreNPheriph/inc/stm32f4_discovery.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4_discovery_lis302dl.h b/libs/StmCoreNPheriph/inc/stm32f4_discovery_lis302dl.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4_discovery_lis302dl.h rename to libs/StmCoreNPheriph/inc/stm32f4_discovery_lis302dl.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx.h b/libs/StmCoreNPheriph/inc/stm32f4xx.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx.h rename to libs/StmCoreNPheriph/inc/stm32f4xx.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_adc.h b/libs/StmCoreNPheriph/inc/stm32f4xx_adc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_adc.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_adc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_can.h b/libs/StmCoreNPheriph/inc/stm32f4xx_can.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_can.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_can.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_conf.h b/libs/StmCoreNPheriph/inc/stm32f4xx_conf.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_conf.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_conf.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_crc.h b/libs/StmCoreNPheriph/inc/stm32f4xx_crc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_crc.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_crc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_cryp.h b/libs/StmCoreNPheriph/inc/stm32f4xx_cryp.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_cryp.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_cryp.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_dac.h b/libs/StmCoreNPheriph/inc/stm32f4xx_dac.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_dac.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_dac.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_dbgmcu.h b/libs/StmCoreNPheriph/inc/stm32f4xx_dbgmcu.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_dbgmcu.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_dbgmcu.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_dcmi.h b/libs/StmCoreNPheriph/inc/stm32f4xx_dcmi.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_dcmi.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_dcmi.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_dma.h b/libs/StmCoreNPheriph/inc/stm32f4xx_dma.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_dma.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_dma.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_dma2d.h b/libs/StmCoreNPheriph/inc/stm32f4xx_dma2d.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_dma2d.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_dma2d.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_exti.h b/libs/StmCoreNPheriph/inc/stm32f4xx_exti.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_exti.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_exti.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_flash.h b/libs/StmCoreNPheriph/inc/stm32f4xx_flash.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_flash.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_flash.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_flash_ramfunc.h b/libs/StmCoreNPheriph/inc/stm32f4xx_flash_ramfunc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_flash_ramfunc.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_flash_ramfunc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_fsmc.h b/libs/StmCoreNPheriph/inc/stm32f4xx_fsmc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_fsmc.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_fsmc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_gpio.h b/libs/StmCoreNPheriph/inc/stm32f4xx_gpio.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_gpio.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_gpio.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_hash.h b/libs/StmCoreNPheriph/inc/stm32f4xx_hash.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_hash.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_hash.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_i2c.h b/libs/StmCoreNPheriph/inc/stm32f4xx_i2c.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_i2c.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_i2c.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_iwdg.h b/libs/StmCoreNPheriph/inc/stm32f4xx_iwdg.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_iwdg.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_iwdg.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_ltdc.h b/libs/StmCoreNPheriph/inc/stm32f4xx_ltdc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_ltdc.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_ltdc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_pwr.h b/libs/StmCoreNPheriph/inc/stm32f4xx_pwr.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_pwr.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_pwr.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_rcc.h b/libs/StmCoreNPheriph/inc/stm32f4xx_rcc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_rcc.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_rcc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_rng.h b/libs/StmCoreNPheriph/inc/stm32f4xx_rng.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_rng.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_rng.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_rtc.h b/libs/StmCoreNPheriph/inc/stm32f4xx_rtc.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_rtc.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_rtc.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_sai.h b/libs/StmCoreNPheriph/inc/stm32f4xx_sai.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_sai.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_sai.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_sdio.h b/libs/StmCoreNPheriph/inc/stm32f4xx_sdio.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_sdio.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_sdio.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_spi.h b/libs/StmCoreNPheriph/inc/stm32f4xx_spi.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_spi.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_spi.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_syscfg.h b/libs/StmCoreNPheriph/inc/stm32f4xx_syscfg.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_syscfg.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_syscfg.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_tim.h b/libs/StmCoreNPheriph/inc/stm32f4xx_tim.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_tim.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_tim.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_usart.h b/libs/StmCoreNPheriph/inc/stm32f4xx_usart.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_usart.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_usart.h diff --git a/example/libs/StmCoreNPheriph/inc/stm32f4xx_wwdg.h b/libs/StmCoreNPheriph/inc/stm32f4xx_wwdg.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/stm32f4xx_wwdg.h rename to libs/StmCoreNPheriph/inc/stm32f4xx_wwdg.h diff --git a/example/libs/StmCoreNPheriph/inc/system_stm32f4xx.h b/libs/StmCoreNPheriph/inc/system_stm32f4xx.h similarity index 100% rename from example/libs/StmCoreNPheriph/inc/system_stm32f4xx.h rename to libs/StmCoreNPheriph/inc/system_stm32f4xx.h diff --git a/example/libs/StmCoreNPheriph/src/misc.c b/libs/StmCoreNPheriph/src/misc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/misc.c rename to libs/StmCoreNPheriph/src/misc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4_discovery.c b/libs/StmCoreNPheriph/src/stm32f4_discovery.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4_discovery.c rename to libs/StmCoreNPheriph/src/stm32f4_discovery.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4_discovery_lis302dl.c b/libs/StmCoreNPheriph/src/stm32f4_discovery_lis302dl.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4_discovery_lis302dl.c rename to libs/StmCoreNPheriph/src/stm32f4_discovery_lis302dl.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_adc.c b/libs/StmCoreNPheriph/src/stm32f4xx_adc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_adc.c rename to libs/StmCoreNPheriph/src/stm32f4xx_adc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_can.c b/libs/StmCoreNPheriph/src/stm32f4xx_can.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_can.c rename to libs/StmCoreNPheriph/src/stm32f4xx_can.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_crc.c b/libs/StmCoreNPheriph/src/stm32f4xx_crc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_crc.c rename to libs/StmCoreNPheriph/src/stm32f4xx_crc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_cryp.c b/libs/StmCoreNPheriph/src/stm32f4xx_cryp.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_cryp.c rename to libs/StmCoreNPheriph/src/stm32f4xx_cryp.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_cryp_aes.c b/libs/StmCoreNPheriph/src/stm32f4xx_cryp_aes.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_cryp_aes.c rename to libs/StmCoreNPheriph/src/stm32f4xx_cryp_aes.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_cryp_des.c b/libs/StmCoreNPheriph/src/stm32f4xx_cryp_des.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_cryp_des.c rename to libs/StmCoreNPheriph/src/stm32f4xx_cryp_des.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_cryp_tdes.c b/libs/StmCoreNPheriph/src/stm32f4xx_cryp_tdes.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_cryp_tdes.c rename to libs/StmCoreNPheriph/src/stm32f4xx_cryp_tdes.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_dac.c b/libs/StmCoreNPheriph/src/stm32f4xx_dac.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_dac.c rename to libs/StmCoreNPheriph/src/stm32f4xx_dac.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_dbgmcu.c b/libs/StmCoreNPheriph/src/stm32f4xx_dbgmcu.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_dbgmcu.c rename to libs/StmCoreNPheriph/src/stm32f4xx_dbgmcu.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_dcmi.c b/libs/StmCoreNPheriph/src/stm32f4xx_dcmi.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_dcmi.c rename to libs/StmCoreNPheriph/src/stm32f4xx_dcmi.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_dma.c b/libs/StmCoreNPheriph/src/stm32f4xx_dma.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_dma.c rename to libs/StmCoreNPheriph/src/stm32f4xx_dma.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_dma2d.c b/libs/StmCoreNPheriph/src/stm32f4xx_dma2d.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_dma2d.c rename to libs/StmCoreNPheriph/src/stm32f4xx_dma2d.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_exti.c b/libs/StmCoreNPheriph/src/stm32f4xx_exti.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_exti.c rename to libs/StmCoreNPheriph/src/stm32f4xx_exti.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_flash.c b/libs/StmCoreNPheriph/src/stm32f4xx_flash.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_flash.c rename to libs/StmCoreNPheriph/src/stm32f4xx_flash.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_flash_ramfunc.c b/libs/StmCoreNPheriph/src/stm32f4xx_flash_ramfunc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_flash_ramfunc.c rename to libs/StmCoreNPheriph/src/stm32f4xx_flash_ramfunc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_fsmc.c b/libs/StmCoreNPheriph/src/stm32f4xx_fsmc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_fsmc.c rename to libs/StmCoreNPheriph/src/stm32f4xx_fsmc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_gpio.c b/libs/StmCoreNPheriph/src/stm32f4xx_gpio.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_gpio.c rename to libs/StmCoreNPheriph/src/stm32f4xx_gpio.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_hash.c b/libs/StmCoreNPheriph/src/stm32f4xx_hash.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_hash.c rename to libs/StmCoreNPheriph/src/stm32f4xx_hash.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_hash_md5.c b/libs/StmCoreNPheriph/src/stm32f4xx_hash_md5.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_hash_md5.c rename to libs/StmCoreNPheriph/src/stm32f4xx_hash_md5.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_hash_sha1.c b/libs/StmCoreNPheriph/src/stm32f4xx_hash_sha1.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_hash_sha1.c rename to libs/StmCoreNPheriph/src/stm32f4xx_hash_sha1.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_i2c.c b/libs/StmCoreNPheriph/src/stm32f4xx_i2c.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_i2c.c rename to libs/StmCoreNPheriph/src/stm32f4xx_i2c.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_iwdg.c b/libs/StmCoreNPheriph/src/stm32f4xx_iwdg.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_iwdg.c rename to libs/StmCoreNPheriph/src/stm32f4xx_iwdg.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_ltdc.c b/libs/StmCoreNPheriph/src/stm32f4xx_ltdc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_ltdc.c rename to libs/StmCoreNPheriph/src/stm32f4xx_ltdc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_pwr.c b/libs/StmCoreNPheriph/src/stm32f4xx_pwr.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_pwr.c rename to libs/StmCoreNPheriph/src/stm32f4xx_pwr.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_rcc.c b/libs/StmCoreNPheriph/src/stm32f4xx_rcc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_rcc.c rename to libs/StmCoreNPheriph/src/stm32f4xx_rcc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_rng.c b/libs/StmCoreNPheriph/src/stm32f4xx_rng.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_rng.c rename to libs/StmCoreNPheriph/src/stm32f4xx_rng.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_rtc.c b/libs/StmCoreNPheriph/src/stm32f4xx_rtc.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_rtc.c rename to libs/StmCoreNPheriph/src/stm32f4xx_rtc.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_sai.c b/libs/StmCoreNPheriph/src/stm32f4xx_sai.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_sai.c rename to libs/StmCoreNPheriph/src/stm32f4xx_sai.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_sdio.c b/libs/StmCoreNPheriph/src/stm32f4xx_sdio.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_sdio.c rename to libs/StmCoreNPheriph/src/stm32f4xx_sdio.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_spi.c b/libs/StmCoreNPheriph/src/stm32f4xx_spi.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_spi.c rename to libs/StmCoreNPheriph/src/stm32f4xx_spi.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_syscfg.c b/libs/StmCoreNPheriph/src/stm32f4xx_syscfg.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_syscfg.c rename to libs/StmCoreNPheriph/src/stm32f4xx_syscfg.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_tim.c b/libs/StmCoreNPheriph/src/stm32f4xx_tim.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_tim.c rename to libs/StmCoreNPheriph/src/stm32f4xx_tim.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_usart.c b/libs/StmCoreNPheriph/src/stm32f4xx_usart.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_usart.c rename to libs/StmCoreNPheriph/src/stm32f4xx_usart.c diff --git a/example/libs/StmCoreNPheriph/src/stm32f4xx_wwdg.c b/libs/StmCoreNPheriph/src/stm32f4xx_wwdg.c similarity index 100% rename from example/libs/StmCoreNPheriph/src/stm32f4xx_wwdg.c rename to libs/StmCoreNPheriph/src/stm32f4xx_wwdg.c diff --git a/example/libs/libarm_cortexM4l_math.a b/libs/libarm_cortexM4l_math.a similarity index 100% rename from example/libs/libarm_cortexM4l_math.a rename to libs/libarm_cortexM4l_math.a diff --git a/example/libs/libarm_cortexM4lf_math.a b/libs/libarm_cortexM4lf_math.a similarity index 100% rename from example/libs/libarm_cortexM4lf_math.a rename to libs/libarm_cortexM4lf_math.a diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..508d282 --- /dev/null +++ b/src/main.c @@ -0,0 +1,70 @@ +#include "stm32f4_discovery.h" + + +int main(void) { + int state=0; + const int APB1_CLK=42E6; //42mhz APB1 Takt + TIM_TimeBaseInitTypeDef tinit; + + STM_EVAL_LEDInit(LED3); + STM_EVAL_LEDInit(LED4); + STM_EVAL_LEDInit(LED5); + STM_EVAL_LEDInit(LED6); + + STM_EVAL_LEDOff(LED3); + STM_EVAL_LEDOff(LED4); + STM_EVAL_LEDOff(LED5); + STM_EVAL_LEDOff(LED6); + + + TIM_TimeBaseStructInit(&tinit); + + RCC_APB1PeriphClockCmd(RCC_APB1ENR_TIM6EN,ENABLE); + //RCC->APB1ENR |= RCC_APB1ENR_TIM6EN; + + tinit.TIM_Prescaler = APB1_CLK/1000 -1; + tinit.TIM_Period = 249; + TIM_TimeBaseInit(TIM6,&tinit); + TIM_Cmd(TIM6,ENABLE); + + + /*TIM6->PSC = APB1_CLK/1000 -1; + TIM6->DIER |=TIM_DIER_UIE; + TIM6->ARR = 249; + TIM6->CR1 |= TIM_CR1_ARPE | TIM_CR1_CEN; + TIM6->EGR = TIM_EGR_UG; + TIM6->SR &= ~TIM_SR_UIF;*/ + + + while(1) { + + //while((TIM6->SR&0x01)==0); + //TIM6->SR=0; + + while(TIM_GetFlagStatus(TIM6,TIM_FLAG_Update)!=SET); + TIM_ClearFlag(TIM6,TIM_FLAG_Update); + + state++; + state%=4; + + switch(state) { + case 0: + STM_EVAL_LEDOff(LED5); + STM_EVAL_LEDOn(LED3); + break; + case 1: + STM_EVAL_LEDOff(LED3); + STM_EVAL_LEDOn(LED4); + break; + case 2: + STM_EVAL_LEDOff(LED4); + STM_EVAL_LEDOn(LED6); + break; + case 3: + STM_EVAL_LEDOff(LED6); + STM_EVAL_LEDOn(LED5); + break; + + } + } +} diff --git a/example/src/startup.s b/src/startup.s similarity index 100% rename from example/src/startup.s rename to src/startup.s diff --git a/example/src/system_stm32f4xx.c b/src/system_stm32f4xx.c similarity index 100% rename from example/src/system_stm32f4xx.c rename to src/system_stm32f4xx.c diff --git a/example/utils/discovery_board.launch b/utils/discovery_board.launch similarity index 100% rename from example/utils/discovery_board.launch rename to utils/discovery_board.launch diff --git a/example/utils/gdb.script b/utils/gdb.script similarity index 100% rename from example/utils/gdb.script rename to utils/gdb.script diff --git a/example/utils/st-util-daemon.sh b/utils/st-util-daemon.sh similarity index 100% rename from example/utils/st-util-daemon.sh rename to utils/st-util-daemon.sh diff --git a/example/utils/stm32_flash.ld b/utils/stm32_flash.ld similarity index 100% rename from example/utils/stm32_flash.ld rename to utils/stm32_flash.ld