GCC nxt makefile
GCC nxt makefile
I have tried nxc before but well... it is not exactly c meaning that it does not support everything that c supports mainly pointers. I want to write a mod player for the nxt and to do that you need pointers to access the sound hardware directly. Does anybody have a makefile template that I could use to program the lego nxt robot with gcc I am running Debian gnu/linux right now.
-
- Posts: 346
- Joined: 27 Sep 2010, 03:05
- Contact:
Re: GCC nxt makefile
I don't think it's quite that easy. The compiler needs to have knowledge about the target, in more ways that just that.
Also, the target would be the NXT, which means you'll need to replace ALL the software/firmware in the NXT, not just writing a simple program to run on the existing firmware (because it may be the firmware that has that limitation)
Steve
Also, the target would be the NXT, which means you'll need to replace ALL the software/firmware in the NXT, not just writing a simple program to run on the existing firmware (because it may be the firmware that has that limitation)
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
Re: GCC nxt makefile
That is why I wanted a ready made makefile because I am not sure of the executable format that the nxt uses.hassenplug wrote:I don't think it's quite that easy. The compiler needs to have knowledge about the target, in more ways that just that.
I do not understand why the firmware could be a limitation does it not just jump to the program address or is there more or could the programs be run-time interpreted like java and not native arm code.hassenplug wrote: Also, the target would be the NXT, which means you'll need to replace ALL the software/firmware in the NXT, not just writing a simple program to run on the existing firmware (because it may be the firmware that has that limitation)
Steve
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: GCC nxt makefile
The Lego NXT FW runs programs with the .rxe extension (very specific to the NXT).
The FW is not just a boot-loader with a menu. It's a VM that runs the VM OP codes of the user program (.rxe file). The FW VM takes care of user-code multitasking, as well as it's own tasks (updating the LCD, talking with the co-processor, etc.).
At the request of Sivan Toledo, John Hansen has added FW functionality for what you seem to want (in the NBC/NXC Enhanced FW); see here. A normal .rxe file header starts with "MindstormsNXT", but if it starts with "NXTBINARY" instead, then the FW jumps to the function specified, and totally abandons everything else. That means that the user program is now responsible for everything! The user program now needs to take care of any multitasking, LCD updates, co-processor updates, etc. Simply restarting the NXT will boot the FW as usual. From the directions provided, I wasn't able to gather enough details to actually make it work, and Sivan didn't answer an email I sent him requesting assistance. If you get anywhere, please tell us about it!
The FW is not just a boot-loader with a menu. It's a VM that runs the VM OP codes of the user program (.rxe file). The FW VM takes care of user-code multitasking, as well as it's own tasks (updating the LCD, talking with the co-processor, etc.).
At the request of Sivan Toledo, John Hansen has added FW functionality for what you seem to want (in the NBC/NXC Enhanced FW); see here. A normal .rxe file header starts with "MindstormsNXT", but if it starts with "NXTBINARY" instead, then the FW jumps to the function specified, and totally abandons everything else. That means that the user program is now responsible for everything! The user program now needs to take care of any multitasking, LCD updates, co-processor updates, etc. Simply restarting the NXT will boot the FW as usual. From the directions provided, I wasn't able to gather enough details to actually make it work, and Sivan didn't answer an email I sent him requesting assistance. If you get anywhere, please tell us about it!
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: GCC nxt makefile
Hello
Once again, google is your friend!!!
for compiling with NXT GCC ELF program: http://www.jstuber.net/lego/nxt-program ... chain.html
for building GCC ARM EABI toolchain : http://nxt-firmware.ni.fr.eu.org/build/gcc/
Hope this help
Ben
Once again, google is your friend!!!
for compiling with NXT GCC ELF program: http://www.jstuber.net/lego/nxt-program ... chain.html
for building GCC ARM EABI toolchain : http://nxt-firmware.ni.fr.eu.org/build/gcc/
Hope this help
Ben
pbenco.wordpress.com/
Re: GCC nxt makefile
Thank you everyone I will be reading up on these links that you guys posted and I will certainly have something working sooner or later.
Re: GCC nxt makefile
If you want to program native C on the NXT, there are three free options available:sega16 wrote:Thank you everyone I will be reading up on these links that you guys posted and I will certainly have something working sooner or later.
NXT Native http://www.tau.ac.il/~stoledo/lego/nxt-native/ (This is quite bare-bones, just enough to configure the hardware)
NxOS-Armdebug https://github.com/tcwan/nxos-armdebug (uses same mechanism as Sivan Toledo's approach to download and run executables on the NXT)
nxtOSEK http://lejos-osek.sourceforge.net/
Disclaimer: I'm the current maintainer for NxOS-Armdebug.
Who is online
Users browsing this forum: No registered users and 7 guests