Hello,
I am trying to compile Riot on Windows 7 and I am using the gcc-arm-embedded toolchain with build tools downloaded (make and rm) from Sourcery CodeBench with Eclipse as the IDE. I am having problems compiling the code.
I am trying to compile the HelloWorld example by using the Makefile in the folder $(RIOTBASE)/examples/hello-world. This makefile includes $(RIOTBASE)/Makefile.include and there is no problem with this step. However, I am getting an error message with further makefile includes from within this file.
For example one of the error messages I get is
C:/Users/ram.somaraju/Desktop/RIOT-master/examples/hello-world/…/…/Makefile.include:47: C:/Users/ram.somaraju/Desktop/RIOT-master/examples/hello-world/C:/Users/ram.somaraju/Desktop/RIOT-master/Makefile.modules: Invalid argument
Clearly, this is not a well defined path, but I have not been able to fix it. Is there an easy solution to this problem? I am a Makefile novice and am not sure how to proceed.
Thank you very much for any help/advice you can provide.
Kind Regards,
Abhinav
Hi Abhinav!
Sorry for the late reply.
I am trying to compile the HelloWorld example by using the Makefile in
the folder $(RIOTBASE)/examples/hello-world. This makefile includes
$(RIOTBASE)/Makefile.include and there is no problem with this step.
However, I am getting an error message with further makefile includes
from within this file.
For now I have no clue what could cause this error message, but I'll give it a
try with my Windows machine at home, when I find some time and see if can shed
some light on this.
One thing that sometimes causes weird Make errors on Linux are trailing spaces
in the Makefiles, e.g. after the definition of the
PROJECT^h^h^h^h^h^h^hAPPLICATION name.
Cheers,
Oleg
Hello Oleg,
No problem about the late reply. This is no longer an issue for me. I
decided not to use the make build system and I am now using the internal
builder from Eclipse to build the project. This seems to be a better
solution for us in the long run.
Thank you for the offer to help in any case!
Regards,
Abhinav
Hi!
No problem about the late reply. This is no longer an issue for me. I
decided not to use the make build system and I am now using the internal
builder from Eclipse to build the project. This seems to be a better
solution for us in the long run.
Interesting, I didn't know that Eclipse provides an internal builder that
works without any build system like Make. Would be interesting to know how far
one can go with this solution. Maybe this could be a feasible way for other
non-*nix users, too. Hence, it would be really great if you could be us in the
loop about your experience.
Cheers,
Oleg
Hi!
Hence, it would be really great if you could be us in the loop about
your experience.
My focus is on the STM discovery boards but I think one can use the same
procedure for any board. Here are the steps I used to build the project
for the STM board:
1) Start a new C project in Eclipse (I used the STM discovery Led Blink
sample project).
2) Select Internal Eclipse Builder (Project->Properties->C/C++
Builder->Builder Settings)
3) Create New Folder within project (File->New Folder)
4) Import Required Folders from RIOT (File->Import->File System) into
newly created directories. Repeat this step for all required
directories. I needed to import the following : RIOT/core,
RIOT/cpu/stm32f407vg, RIOT/cpu/cortex_common, RIOT/board/stmf4discovery.
5) Add header include paths for each imported folder
(Project->Properties->C/C++ General->Paths and Symbols->includes).
6) I had my own debugger installed (which was using a macro with name
DEBUG) and I had to change #define DEBUG to #define DEBUGRIOT for all
occurrences in the folder RIOT/core
7) Add cpu name in preprocessor #defines (e.g. STMF429_439xx)
Note: You can also import multiple folders that you are not using and
then exclude folders from build later on (right click on folder and
select resource configuration). This allows you to (easily) change
boards/cpu if you are not using too many!
Cheers,
Abhinav