information about setting up C / BCC for EV3
Re: information about setting up C / BCC for EV3
Oh, right, I already knew that but I forgot
But thank you for remembering me!
But thank you for remembering me!
Re: information about setting up C / BCC for EV3
there actually was a platform (at least 1) for the NXT to work with gnu c++ /eclipse: it was working with the OS nxtOSEK.totokan wrote: 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....
These are how I expected things to go with the NXT, this is the platform I hoped the NXT would be
Unfortunately the developer threw it into the community but there was neither a good tutorial nor any support by the developer actually after that, he left the matter to the community and progressed to other projects. So it extincted somehow in the oblivion.
A good idea thus has been wasted, and it's the way it had happened and surely will happen to other platforms (either for NXT or for EV3).
A programming platform for hobby programmers (IMO) will only survive
- if it's easy to approach and to understand, self-evident, intuitive to handle
- if it's free of charge and open source
- if it keeps to standards which already are established (C, Java, Basic, Pascal...)
- if it's widely distributed in the community by frequently used multilingual forums
- if (possibly many) professional developers extensively provide help in exactly these forums and their knowledge is spread from one to other countries.
That's the long success story of NQC/NXC and e.g., LeJos.
The crux of the matter is the balancing act between e.g., obfuscations of the underlying C code and the intuitiveness of the C API syntax.
Last edited by HaWe on 08 Oct 2013, 10:07, edited 1 time in total.
Re: information about setting up C / BCC for EV3
Technically, this is just a "not yet implemented" feature rather than a bug. I would recommend for the time being just keeping all your source files in the same folder as the library files, though you don't need to do that if you modify your makefile to link to libev3.so. I need to dig up the instructions for how to do that properly. David Gilday got it to work and I just haven't implemented it in BricxCC automatically yet.totokan wrote:There is a bug with BricxCC Project Manager, it does not include with relative paths.
What does the generated makefile look like when you put relative or absolute paths into the .prj file? You can tell BricxCC not to delete the makefile and have a look at it using notepad. This option is on the Compiler -> General tab.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: information about setting up C / BCC for EV3
To use relative #include paths with the gcc toolset, it is a matter of specifying -I <path-to-include-dir> (and for linking with libraries, add -L <path-to-library-dir>) as arguments to gcc. I think it would be trivial to edit the Makefile to do so, if BricxCC does not currently add them.afanofosc wrote:Technically, this is just a "not yet implemented" feature rather than a bug. I would recommend for the time being just keeping all your source files in the same folder as the library files, though you don't need to do that if you modify your makefile to link to libev3.so. I need to dig up the instructions for how to do that properly. David Gilday got it to work and I just haven't implemented it in BricxCC automatically yet.totokan wrote:There is a bug with BricxCC Project Manager, it does not include with relative paths.
What does the generated makefile look like when you put relative or absolute paths into the .prj file? You can tell BricxCC not to delete the makefile and have a look at it using notepad. This option is on the Compiler -> General tab.
John Hansen
NB: I have not played with BricxCC yet so I don't know when it generates the Makefiles or if it overwrites the Makefile on every compile.
Re: information about setting up C / BCC for EV3
Apologies if I am in the wrong thread but, as a non-programmer, I am totally confused by what I read about coding the EV3.
I have only one project which is written in NXC.
Can I just download the latest bricxcc and find a newer version of NXC into which I can load my existing program?
Or do I have to load everything detailed in this thread and learn C instead?
I have only one project which is written in NXC.
Can I just download the latest bricxcc and find a newer version of NXC into which I can load my existing program?
Or do I have to load everything detailed in this thread and learn C instead?
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
Re: information about setting up C / BCC for EV3
You should be able to recompile your existing project in the new bricxcc and download it (barring any NXT specific issues).h-g-t wrote:Apologies if I am in the wrong thread but, as a non-programmer, I am totally confused by what I read about coding the EV3.
I have only one project which is written in NXC.
Can I just download the latest bricxcc and find a newer version of NXC into which I can load my existing program?
Or do I have to load everything detailed in this thread and learn C instead?
Bricxcc (test versions) now supports compiling both NXC code as well as native C code, for those who wish to bypass the LEGO Virtual Machine altogether.
The discussion has to do with compiling and running the native C code using the test versions of bricxcc.
Re: information about setting up C / BCC for EV3
Thank you, that is just what I wanted.
If I ever decide to use C later on, is there a guide anywhere about EV3-specific commands?
If I ever decide to use C later on, is there a guide anywhere about EV3-specific commands?
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
Re: information about setting up C / BCC for EV3
for using EV3 and NXC sensors by EV3-C:
what header(s) do I have to include?
to be used: all sensors of EV3 retail + edu + NXC sensors: ultrasonic, Color-NXT2.0, Light-NXT1.0, Sound-NXT1.0 (I suppose that NXT and EV3 Touch Sensors have the same internal resistors);
Mindsensors TouchJMux, Mindsensors SensorMux, PCF8574 (for homebrewed touch mux) and Mindsensors RCX style motormux
are probably not already available I guess...?
what header(s) do I have to include?
to be used: all sensors of EV3 retail + edu + NXC sensors: ultrasonic, Color-NXT2.0, Light-NXT1.0, Sound-NXT1.0 (I suppose that NXT and EV3 Touch Sensors have the same internal resistors);
Mindsensors TouchJMux, Mindsensors SensorMux, PCF8574 (for homebrewed touch mux) and Mindsensors RCX style motormux
are probably not already available I guess...?
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: information about setting up C / BCC for EV3
The NXT and EV3 touch sensors are different (they actually use different pins to detect the open close of the switch). So for instance you can't use an EV3 touch sensor connected to the touch mux.
Re: information about setting up C / BCC for EV3
ah, ok, thx, so to plug single sensors directly one could use probably both types alternatively,
and for the touch mux it's just reading NXT style ADC values with NXT sensors plugged in...
but again about my question about EV3 and NXC sensors by EV3-C:
what header(s) do I have to include?
and for the touch mux it's just reading NXT style ADC values with NXT sensors plugged in...
but again about my question about EV3 and NXC sensors by EV3-C:
what header(s) do I have to include?
Who is online
Users browsing this forum: No registered users and 3 guests