[Tutorial] Creating a New Project

Discussions and support about ChibiStudio, the free development environment for ARM.
Post Reply
protobit
Posts: 3
Joined: Mon Jul 07, 2014 5:17 pm

[Tutorial] Creating a New Project

Post by protobit »

Here's a quick tutorial on how I created a new project in ChibiStudio preview 6.

Brief:
I used the STM32F4 Discovery Board for this example.

1) Copy and Paste a demo project.
2) Add the new project to a workspace.
3) Change the new project's makefile.
CHIBIOS = ../../chibios
4) Import the demo project's debug config
5) Launch appropriate debugger server
6) Done... now debug project

[youtube]1av5HnAKyjE[/youtube]
protobit
Posts: 3
Joined: Mon Jul 07, 2014 5:17 pm

Re: [Tutorial] Creating a New Project

Post by protobit »

Part 2: Auto Suggest/indexer(?)

So after completing the video I noticed that a couple functions weren't indexed by the IDE like they should be.
For example in the main.cpp file the "palSetPadMode()" function could not be found by the IDE (although the compiler/linker can find it.)

So for a temporary(?) solution I linked "tut project" to "ARMCM4-STM32F407-DISCOVERY-G++" using a project reference (Project Properties -> Project References.) This solves the problem (the IDE indexes the function) but the catch is that "ARMCM4-STM32F407-DISCOVERY-G++" project must be open for this to work.

Suggestions/thoughts?

Edit:
So the problem might have been that #include "halconf.h" resolved to two different locations for the two projects.
On the demo project it resolved to "chibios\os\hal\templates\halconf.h"
On the new project it resolved to "chibios\test\coverage\halconf.h"

So a solution was to add "C:\ChibiStudio\chibios\os\hal\templates" to includes (Project properties -> Paths and Symbols ->Includes -> Add...) to the new project. And now the indexer works. Weird...
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [Tutorial] Creating a New Project

Post by Giovanni »

Thanks for the video.

I think that the indexer gets confused because under /os there can be multiple instances of the same file however it should only look into the discovered paths.

Giovanni
Post Reply