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]
[Tutorial] Creating a New Project
Re: [Tutorial] Creating a New Project
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...
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...
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [Tutorial] Creating a New Project
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
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
Who is online
Users browsing this forum: No registered users and 3 guests