cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030R8T6 Help me to Start

sourcing
Associate II
Posted on July 01, 2015 at 15:53

Im a newbe to arm family

Im using coocox ide.

I create my 1st project compile n and downloaded to STM32F030-Discovery board.

The project compiled successfully and downloaded but nothing is happening on the board.

What Iam Trying is Just To Turn On The LED.

Below Is My Code Pls Guide Me What Iam Missing.

&sharpinclude <stm32f0xx_gpio.h>

&sharpinclude <stm32f0xx_rcc.h>

GPIO_InitTypeDef Gp; //Create GPIO struct

//Define LED pins

&sharpdefine GreenLED_Pin GPIO_Pin_9

&sharpdefine BlueLED_Pin GPIO_Pin_8

&sharpdefine LED_GPIO GPIOC

int main(void)

{

RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC, ENABLE);

Gp.GPIO_Pin = GreenLED_Pin; //My alteration

Gp.GPIO_Mode = GPIO_Mode_OUT; //Set GPIO pins as output

Gp.GPIO_OType = GPIO_OType_PP; //Ensure output is push-pull vs open drain

Gp.GPIO_PuPd = GPIO_PuPd_NOPULL; //No internal pullup resistors required

Gp.GPIO_Speed = GPIO_Speed_Level_1; //Set GPIO speed to lowest

GPIO_Init(LED_GPIO, &Gp); //Assign struct to LED_GPIO

    while(1)

    {

     GPIO_SetBits(LED_GPIO, GreenLED_Pin);

    }

}

Thank you

#stm32f030r8t6-disco-beginner #keil5-stm32f030-l6320w
7 REPLIES 7
Posted on July 01, 2015 at 17:16

Seems reasonable enough, so load it with the debugger, and step through it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
aaslan
Associate II
Posted on July 04, 2015 at 17:58

use keil it is free for stm32f0 devices

http://www2.keil.com/stmicroelectronics-stm32/mdk

and this way you benefit stm32cubemx auto code generation feature
sourcing
Associate II
Posted on July 09, 2015 at 13:49

I got this error on keil ide while compiling

what is this  Error: L6320W about ?

*** Using Compiler 'V5.05 update 2 (build 169)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

Rebuild target 'Target 1'

compiling Keil1.c...

linking...

.\Objects\Keil1.axf: Error: L6320W: Ignoring --entry command. Cannot find argument 'Reset_Handler'.

.\Objects\Keil1.axf: Warning: L6320W: Ignoring --first command. Cannot find argument '__Vectors'.

Not enough information to list image symbols.

Not enough information to list the image map.

Finished: 2 information, 1 warning and 1 error messages.

''.\Objects\Keil1.axf'' - 1 Error(s), 1 Warning(s).

Target not created.

Build Time Elapsed:  00:00:02

aaslan
Associate II
Posted on July 09, 2015 at 14:31

search on google here is the link 

http://www.keil.com/support/docs/3531.htm

Uncheck the 

Use MicroLIB

 checkbox in 

Options for Target

Target

 tab, then rebuild your project.

Posted on July 09, 2015 at 16:49

Seems more probable that the project doesn't contain a startup_stm32f0xx.s file with the vectors and startup code.

You should review the structure of the example/template projects provided with the firmware libraries.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sourcing
Associate II
Posted on July 09, 2015 at 17:44

@aslan.mehmet

Use Microlib Is NotChecked.

sourcing
Associate II
Posted on July 09, 2015 at 17:50

@Clive1

Actually The Error I Posted Is Shown When I Compile  An Example Project.

I Manually Included Directories In Options->Target -> C/C++ Tab (Keil)