Programming the NXT in C

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Programming the NXT in C

Post by mattallen37 »

So it needs to be a J-link that is IAR compatible? Okay, I'll keep my eye open for one at a decent price.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
bollinge
Posts: 1
Joined: 28 Jan 2011, 00:57

Re: Programming the NXT in C

Post by bollinge »

I'm glad to hear that NxOS is still alive - I had good success playing around with it a few years ago. I remember having some trouble getting it build with scons in the Windows/Cygwin environment, due to issues with case insensitivity in filenames on Windows. It might be easier for you to stick with Linux for building the code.

You can learn a lot just by browsing through the source code...
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Programming the NXT in C

Post by tcwan »

mattallen37 wrote:I'm not even sure yet what a bash/shell script is (although I'm open to learning something new today ;) ).
Typically shell scripts are a Unix strength, it is much more flexible than .BAT in Windows, though the latest Windows Shell is supposed to be able to handle
object oriented scripting (which I'm not familiar with).
mattallen37 wrote: I am totally open to soldering a couple headers to the PCB. I have done internal NXT work before, and it doesn't concern me much.
Ok. The JTAG headers are smaller pitch than what I'm used to. YMMV.
mattallen37 wrote: Sivan Toledo's project actually does include some drivers, it's just a matter of me getting things to compile. I'm still open to other possibilities, but I downloaded the library of drivers, as well as WinAVR. However, I can't seem to get it to compile; probably because I'm extremely new to this type of programming, and I don't know anything about what files I need to include in the project etc.
Sorry about that, I wrote that from memory, you are right, though he did mention that the drivers were derived from NxOS.
I'd suggest that you use the YAGARTO toolchain, they try to be cross-platform. But seriously, cross-compilation works best under Linux (or OS X if you prefer).

mattallen37 wrote: I don't have experience setting up compilers and IDEs, and I am fairly new to this "project" idea (10-20 various header and source files). I would greatly appreciate a walk through of setting something up (at this point I don't really care which system I go with, but NxOS sounds pretty good). The only thing I have done so far is setup WinARM (in an attempt to get Bare Metal to work), setting path to include the paths necessary (as explained here), and compiling one of the example programs included with WinARM.
http://www.yagarto.de/howto.html is a quick place to start (it assumes the use of a JTAG debugger).

I recommend going through the "Building bare-metal ARM Systems with GNU" tutorial by Miro Samek http://www.state-machine.com/resources/articles.php on what happens on the ARM microcontroller from startup.

Nicolas Schodet was going to write up a simple guide on using ARMDebug with NIF. I don't know the status of that.
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Programming the NXT in C

Post by tcwan »

Hi,
bollinge wrote:I'm glad to hear that NxOS is still alive - I had good success playing around with it a few years ago. I remember having some trouble getting it build with scons in the Windows/Cygwin environment, due to issues with case insensitivity in filenames on Windows. It might be easier for you to stick with Linux for building the code.

You can learn a lot just by browsing through the source code...
At this point in time, I think I'm the only person actively working on it. I'm not sure what happened to David Anderson, my attempts to contact him has failed.
Of course, it would be great if NxOS is picked up by others. I'm primarily using it as a teaching platform (for ARM Assembly language programming no less!), but it is pretty lightweight and has a reasonably good design (IMHO) so it is a good base to start from.

scons is something that takes getting used to (since it is not as ubiquitous as make). However, it is python-based, so it is highly extensible without excessively cryptic syntax. I haven't tried using it on Windows, but I can see that it is troublesome compared to Linux/ OS X.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Programming the NXT in C

Post by HaWe »

I would understand that as: no simple IDE like BCC (for WinXP 32) also for NxOS probably...
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Programming the NXT in C

Post by tcwan »

doc-helmut wrote:I would understand that as: no simple IDE like BCC (for WinXP 32) also for NxOS probably...
I presume you mean 'integrated IDE'? Basically if you can hook the IDE you're using to invoke the build process using scons, it should be able to work.
The other part has to do with GDB remote debugging, which may or may not have integrated support in your IDE.
I've managed to use the tools from within Eclipse, though as I observed in an earlier post, it is not the most elegant/efficient IDE around.
Of course, it is not a streamlined as compared to using Bricxcc, for example.
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

Re: Programming the NXT in C

Post by schodet »

tcwan wrote:Nicolas Schodet was going to write up a simple guide on using ARMDebug with NIF. I don't know the status of that.
No progress on that... I am too busy with my Eurobot robot and also I realized that many people want an IDE while I am a text mode user.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 5 guests