Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unable to compile STM32F4 code sample with Eclipse
Unable to compile STM32F4 code sample with Eclipse [message #1749280] Mon, 05 December 2016 08:12 Go to next message
ailee ll is currently offline ailee llFriend
Messages: 2
Registered: August 2016
Junior Member
I'm trying to compile a simple STM32F4 sample using Eclipse with the GNU ARM Eclipse plugin.
and the source code from main.c
#include "main.h"

/**
 * Main application entry point.
 */
int main() {
    init();

    do {
        loop();
    } while(1);
}

/**
 * Application initialization.
 */
void init() {
    RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
    GPIO_InitTypeDef gpio;
    GPIO_StructInit(&gpio);
    gpio.GPIO_Mode = GPIO_Mode_OUT;
    gpio.GPIO_Pin = LEDS;
    GPIO_Init(GPIOD, &gpio);

    GPIO_SetBits(GPIOD, LEDS);
}

/**
 * Application loop.
 */
void loop() {
    static uint32_t counter = 0;
    ++counter;
    GPIO_ResetBits(GPIOD, LEDS);
    GPIO_SetBits(GPIOD, LED[counter % 4]);
    delay(250);
}

/**
 * Delay by given ms
 *
 * @param ms
 */
void delay(uint32_t ms) {
    ms *= 3360;
    while(ms--) {
        __NOP();
    }
}

Any ideas what these errors mean?
Re: Unable to compile STM32F4 code sample with Eclipse [message #1749325 is a reply to message #1749280] Mon, 05 December 2016 15:04 Go to previous message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
Hi, you don't appear to have included any errors.

Note the GNU Arm Eclipse plug-ins are an excellent third-party add-on to CDT, but the best place for support on them is their forums: http://gnuarmeclipse.github.io/support/forum/
Previous Topic:Impossible to set up multi source directory project
Next Topic:Extending CDT configurations/tools
Goto Forum:
  


Current Time: Tue Mar 19 05:22:03 GMT 2024

Powered by FUDForum. Page generated in 0.01912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top