information about setting up C / BCC for EV3

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

information about setting up C / BCC for EV3

Post by HaWe »

could please somebody write write a step-for-step guide about how to make all the installations and per-installations and adjustments for for C / BCC vor EV3?

ok, the first part is obvious - but then...?
Have the compiler, the prepocessor, makefile,... to be installed seperately?

Is everything possible just having a USB cable and no Wifi dongle and no LAN dongle and no SD card?


(1) (optional: ) uninstall all previous Bricxcc versions (Windows System folder/ Software /uninstall).

(2) install the latest final release of Bricxcc (self-extracting):
https://sourceforge.net/projects/bricxcc/files/bricxcc/ ( -> Download Now!)

(3) install BricxCC Bugfix Update ("test_release"):
new test_release available? (check file date!):
http://bricxcc.sourceforge.net/test_releases/
- extract .zip file (best to use WinZip or WinRar (when using Windows Extract Function always somethings' going wrong)
- copy and paste all unzipped content completely into BricxCC folder (usually c:\windows\program files\bricxcc)
- NEW FEATURE - from time to time also self-extracting update files available !

(4) ... (?)
Last edited by HaWe on 30 Sep 2013, 07:53, edited 2 times in total.
totokan
Posts: 45
Joined: 28 Sep 2013, 04:22

Re: Quick Guide for C / BCC vor EV3

Post by totokan »

http://bricxcc.sourceforge.net/test_rel ... me_1st.txt
You can safely ignore everything about wi-fi and telnet. Around step 9 you should be able to compile and download code to the EV3 brick and run it from BricxCC.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: information about setting up C / BCC for EV3

Post by HaWe »

thank you very much!
A little more text than I actually expected...
I'll immediately will try to follow it!
totokan
Posts: 45
Joined: 28 Sep 2013, 04:22

Re: information about setting up C / BCC for EV3

Post by totokan »

I said this in the other thread, but I'll re-post it here, in case somebody stumbles upon this thread first:
Here is a guide I put together for my students, I think it may make things a bit more clear for you Doc.
https://docs.google.com/document/d/1tA2 ... sp=sharing

PS: perhaps relegate your issues to one thread instead of saying the same thing across 4 or 5 different ones? It becomes hard to keep track of where issues currently are, and anyone else with the same problem may find only one of the threads which may not be the one with the solutions...
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: information about setting up C / BCC for EV3

Post by HaWe »

thanks for sharing!
Thread 1) Indeed it was my first intention to write a "Quick Guide" for BCC/EV3-C like I did before for BCC/NXC because the given information was a little too hard to digest.
Then I myself stumbled over the heavy load of letters to be followed.

Thread 2) On the other hand I unforgivably abused John's installation thread in which he asked for trouble reports by giving trouble reports.

Thread 3) was just a makeshift because I didn't dare to make my trouble to John's trouble.

Now I got the stuff running in some degree but I'm far from giving proposals to other desperate house programmers.
Also I must confess that the fact that not even a "hello world" program is currently running without issues after a few trials instead made me finally abandon all hope about programming simple programs by the current BCC/C release. I'm more conditioned and spoiled by the not quite and not exactly world instead of the quite and exactly wolrd of real programmers.

As I already wrote to John, I wish the power to be with him and I wish all us letter-programming pinheads the power programming to come over us.
joto1000
Posts: 4
Joined: 02 Oct 2013, 08:09

Re: information about setting up C / BCC for EV3

Post by joto1000 »

Hello, thanks for the guide.

I followed your steps, but it doesn't work.
I got the following error message:
make: *** No rule to make target `ev3_lcd.o', needed by `all'. Stop.

Do you have an idea, what I do wrong.
endojo
Posts: 12
Joined: 06 Oct 2013, 16:48

Re: information about setting up C / BCC for EV3

Post by endojo »

I got this error when I included some files from the lms-api while the project was saved in another directory.

It seems that the only solution is having the source file in the same directory like the included files.
joto1000
Posts: 4
Joined: 02 Oct 2013, 08:09

Re: information about setting up C / BCC for EV3

Post by joto1000 »

Thank you, now it's work
totokan
Posts: 45
Joined: 28 Sep 2013, 04:22

Re: information about setting up C / BCC for EV3

Post by totokan »

While I understand the desire for a simpler programming environment, and I see how much trouble trying to grapple with 'real code' is causing, personally, I am glad to be able to program and compile in C. For one thing, it means I have access to every C library, and that is an exceptionally powerful thing. As a programmer first, and a teacher second, it is a much more interesting platform to work with, seeing the potential for everyday programming languages getting libraries and compiler support for the EV3. I've seen C# code working with it, C of course, now Python too... If these quick implementations barely a month into the existence are a sign of things to come, I expect amazing things out of the ev3. These are how I expected things to go with the NXT, this is the platform I hoped the NXT would be, this is truly the 'next generation' of LEGO Mindstorms, and it is too bad it took seven years to get here!
totokan
Posts: 45
Joined: 28 Sep 2013, 04:22

Re: information about setting up C / BCC for EV3

Post by totokan »

endojo wrote:I got this error when I included some files from the lms-api while the project was saved in another directory.

It seems that the only solution is having the source file in the same directory like the included files.
There is a bug with BricxCC Project Manager, it does not include with relative paths. You can manually specify this by going to the directory with your code and opening the .prj with notepad.
When doing an include statement with quotation marks, you need to include the headers with their relative path:
#include<stdio.h> is an absolute reference, it will look in the compiler's include folders and include the first stdio.h file it finds.
#include"ev3_lcd.h" is a relative reference, it will look in the directory your code is in for ev3_lcd.h. If it is in the same folder as your code, this works if it is in another directory, for example:
C:\Code is where your code is, C:\Code\lms_api is where ev3_lcd.h is:
#include ".\lms_api\ev3_lcd.h"
The . means current directory, .. means one directory higher, and you can use absolute paths just as well:
#include "C:\Code\lms_api\ev3_lcd.h"
All of this applies to the Project Manager as well, currently you have to manually modify the .prj file. The lms_api files need to be all in the same directory as each other, though.

EDIT: I updated the tutorial and EV3Files.zip to reflect this information. Thanks for the feedback!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest