The first step is to import a makefile project into the Eclipse environment. ChibiOS/RT demos do not include Eclipse project files but just a normal Makefile. Eclipse is able to import a Makefile project and create its own project file so this is not a problem. This is how it is done:
Open you Eclipse environment and select the workspace created into the ChibiOS/RT project directory. From within Eclipse select “File→New→C_Projectâ€, a dialog box will show. Select “Makefile_project→Empty_Project†in the “Project type:†box. Select â€â€“ Other Toolchain –†in the “Toolchains:†box. Unselect the “Use default location†check box. Select the demo directory using the “Browse…†button. Something like â€C:\Projects\ChibiOS-RT\demos\ARMCM3-STM32F103-GCC†will appear in the “Location:†box. In the project name box put the same name of the directory containing the demo, â€ARMCM3-STM32F103-GCC†in this example.
Compile and Run is no Problem but all sub directories missing and also eclipse mark a mistake of missing file
It is because Eclipse cannot "see" the files outside the demo directory. Create a new folder into the project (File->New->Folder) but instead giving it a name, select "Advanced..." and link it to the ./os folder of ChibiOS, then re-index the project (right click->index->rebuild). Eclipse should now be able to see all files and symbols.
Heh, that is the static code checker introduced in Eclipse Indigo, in their infinite wisdom it is always active by default, I just disabled it, too much noise.
Window->Preferences->C/C++->CodeAnalysis then disable all checks you don't want to see.
Hopefully it will improve in next versions, I hope they make it something you run when needed and not always active.
hi, I'm trying to work with the STM32L-discovery demo from chibios, and I had the same problems as Joerg-SH... after following your answers for solving them, I've found a new problem:
I'm using yagarto toolchain, and when I build the demo, it looks like eclipse don't recognise basic definitions like uint32_t, uint16_t... do you know what could be the problem with that?
I think all the above problems are because the eclipse doesn't add the include folder from the cross compiler, and hence doesn't find <stddef.h> which includes NULL, size_t, uint32_t, uint16_t, etc. Once you add that by hand, the errors and warnings go away and there is no need to disable the static analysis.