I am trying to set up an Eclipse development environment for building the core firmware. I have GIT, GNU, and the rest of the command line development tools installed. I can successfully build the firmware and flash to the device from the command line. I downloaded and installed the latest Eclipse IDE installed with the CDT plug-in and added the GIT repositories, however I can’t figure out how to get it to build. Does anyone have a Eclipse dev environment setup and working where they can build the firmware and flash the core? Also had anyone been able to get debugging using the JTAG shield and a JTAG device working within Eclipse?
@Coffee That did it! Thanks. My mistake was to import the project using: "Import->Git->Projects from git."
I removed those ‘git’ projects and started over, importing them from local directories (which I had used “git clone https:…” to download them locally).
For some reason I don’t understand, importing them using Git within Eclipse will not give you the C/C++ property associations on that project.
@mtnscott the problems with compiling the source code is solved. But I still have problems with debugging the code. Below a short log file made during programming and debugging.
Can I ask a favour. I am still at the stage before, trying to get GIT GNU and the rest installed.
I am using a MacBook Pro, OSX 10.7.x but would really appreciated a bit more detail on the all the steps required to build offline.
I am working from South Africa and although I have a 4Mb/s link, working (especially flashing) via the IDE is NOT an option, if lucky something as small as the Flashing LED could take 3-4 minutes…
So, if you have a simple Howto, or can point me in the right direction for some NOOB details, much appreciated.
Until now I used the toolchain to create and run a number of test programs to get familiar with the whole environment on my MacBook. I used a simple text editor (TextWrangler) to do the coding and after building I use the dfu-util to flash the program to the SparkCore, all via the command line.
Because my programs are becoming more complex I decided to use Eclipse, I installed it based on the instructions of @Coffee and created 3 projects: core-common-lib, core-communication-lib and core-firmware. In the core-firmware I added my own software ( .cpp in the src folder and .h files in the inc folder) and updated the build.mk file accordingly.
Unfortunately I now get a lot of errors (or warnings, i am not sure) in one of the cpp files, see the code snipped below.
void InitializeTimer2() { // See core-common-lib/STM32F10x_StdPeriph_Driver/inc/stm32f10x_tim.h
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE); // RCC: Reset and Clock Control
TIM_TimeBaseInitTypeDef timerInitStructure2;
timerInitStructure2.TIM_Prescaler = 40000; // Max 65536, clock 72MHz (= 13.8ns)
timerInitStructure2.TIM_CounterMode = TIM_CounterMode_Up;
timerInitStructure2.TIM_Period = 15000; // Max 65536, Auto Reload Register ?
timerInitStructure2.TIM_ClockDivision = TIM_CKD_DIV1;
timerInitStructure2.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(TIM2, &timerInitStructure2);
TIM_ClearITPendingBit(TIM2, TIM_IT_Update); //Clear the interrupt bit
TIM_Cmd(TIM2, ENABLE);
}
Eclipse complains with e.g. the following message:
Multiple markers at this line
- Symbol 'TIM_CounterMode_Up' could not be resolved
- Field 'TIM_CounterMode' could not be resolved
Probably there is a missing include path to the core-common-lib/STM32F10x_StdPeriph_Driver/inc/stm32f10x_tim.h file.
Any idea how to solve this?
Hi @Coffee, I dubble checked my .h files and they all include “application.h”. The strange thing is that when I build via the command line I don’t get those errors.
EDIT: Therefor I think that it is a setting within Eclipse.