Bricxcc and firmware test versions

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Bricxcc and firmware test versions

Post by afanofosc »

nxtboyiii wrote: But this only returns x and y at the end of the function. :(

Code: Select all

    void Jump(int & sx, int & sy)
    {
      repeat(5)
      {
      sx++;
      sy++;
      }
    }
I assume you mean "I only get modified values for x and y after Jump finishes but I want to see the values as they are changed." If that is what you mean then NXC is not for you. There are no real reference types available in the standard firmware. NXC pretends to support reference types by passing back out of the function the values of the local variables used inside the function and updating the variables passed in with those local variable values after the function call completes. If you want to modify a global variable that is shared across multiple threads then just use those global variables directly rather than trying to pass them into a function via reference parameters. NXC has always worked this way and will not be changing so long as it generates code that runs on the NXT firmware.

I have to ask, what exactly did you mean by
Using a void like this doesn't work anymore
The word "anymore" is what has me so puzzled. If it used to work differently than it does now can you point me to a compiler version and/or firmware version where it behaved the way you think it worked previously? How do you think this used to behave?

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
nxtboyiii
Posts: 366
Joined: 02 Oct 2010, 07:08
Location: Everywhere

Re: Bricxcc and firmware test versions

Post by nxtboyiii »

Sorry for confusing you. Ignore what I said. I just thought it supported that. If it did then I don't know what version it was. :oops:
Thanks, and have a nice day,
nxtboy III

programnxt.com
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Bricxcc and firmware test versions

Post by afanofosc »

A bleeding edge new test release zip (with a few rough edges) can be found in the usual test_releases folder on the BricxCC site:

http://bricxcc.sourceforge.net/test_releases/

I haven't updated the release notes or history.txt files yet but I will try to do that this weekend. There are a bunch of new API functions, a new firmware version (1.31), a modified firmware download mechanism which seems more robust (and a bit slower) than before, a plain text viewer for .txt files on your NXT in the integrated NXT Explorer tool, and the ability to manually load .sym files into both of the Watch windows so that you can (especially in the configurable watch window) tell which variable in your program you are watching (by name). This assumes that you load the .sym which corresponds with the program actually running on the NXT. BricxCC loads the "right" .sym file automatically if it can find it. The right click context menu from either Watch window lets you pick one manually. A consequence of these changes is that the .sym files are not automatically deleted like they used to be so you may find them lying about where you didn't see them before.

I'd love some feedback wrt firmware download, variable watching (particularly via the configurable watch tool), and the new MemoryManager API function. Note that watching array values does not work yet. Only scalars, including floats, and scalar fields within user-defined struct types. The old non=configurable Watch tool only gives you 32 variable slots and the variable you want to watch may not be one of those. After the .sym is loaded, though, you'll see hints for each value field telling you what that variable's name is. In the configurable watch tool, where you add a new page for each watch that you want to add it lets you pick which variable you want to watch from a drop-down list so you have access to all of them and not just the first 32.

If you want to try some tests communicating between two NXT's either via bluetooth or RS485 or you want to try some tests with bluetooth GPS devices please send me an email via the address in the BricxCC About dialog.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Bricxcc and firmware test versions

Post by mattallen37 »

Thanks for the release. I just installed the updates, and reflashed all my NXTs with the new firmware.

In the firmware, did you by any chance change the way it displays ASCII characters? It used to display the values 32-127, and, as far as I remember, any other numbers, it would display as just a blank, like 32 (space). I will do more testing, and see exactly what it does, compared to what It used to do.

Thanks for adding support to view files from within the NXT Explorer. Do you think you could add the ability to not only view them when on the NXT, but also be able to edit them on the NXT (from within the viewing window)? I did find a little problem with the viewer, but it is mostly great, and not a problem. I'll try to come up with an example program that demonstrates the problem, when I get time. I have no idea where to even begin to try to replicate the problem, but I can try. If I have a file containing the following (as viewed by note pad) (two lines)

#†"+_Þ"& " ""
"ç€#c #o #o #l

It displays the following (in the viewer) (one line)

#†"+_Þ"&

The original "message" is written by the NXT program, and is based off of random numbers, FYI.

Downloading firmware now does not require a second try as it did before (first, it would always put it into SAMBA, then the second time, it would download the firmware).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

Re: Bricxcc and firmware test versions

Post by schodet »

afanofosc wrote:[...]There are a bunch of new API functions, a new firmware version (1.31)[...]
Is it based from a new LEGO release?
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Bricxcc and firmware test versions

Post by afanofosc »

I have an early access copy of the 1.31 firmware source code but it differs from the 1.29 code on the LEGO website only a tiny bit. Very minor changes were made in c_input.c regarding the color sensor and in c_cmd.c to the numtostr opcode.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

Re: Bricxcc and firmware test versions

Post by schodet »

afanofosc wrote:I have an early access copy of the 1.31 firmware source code but it differs from the 1.29 code on the LEGO website only a tiny bit. Very minor changes were made in c_input.c regarding the color sensor and in c_cmd.c to the numtostr opcode.
So you have a read access, may be you will get a write access one day :)
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Bricxcc and firmware test versions

Post by afanofosc »

mattallen37 wrote: In the firmware, did you by any chance change the way it displays ASCII characters? It used to display the values 32-127, and, as far as I remember, any other numbers, it would display as just a blank, like 32 (space). I will do more testing, and see exactly what it does, compared to what It used to do.
To my knowledge no recent changes have been made that would impact how ASCII characters are displayed.
Thanks for adding support to view files from within the NXT Explorer. Do you think you could add the ability to not only view them when on the NXT, but also be able to edit them on the NXT (from within the viewing window)?
I would transfer the file to your PC, edit it on your PC, then transfer the file to your NXT.
It displays the following (in the viewer) (one line)

#†"+_Þ"&
Can you attach a zip containing the file and I will run some tests with it.
Downloading firmware now does not require a second try as it did before (first, it would always put it into SAMBA, then the second time, it would download the firmware).
In my case it used to never take more than one try except if I got a "found new hardware" dialog during the download. In theory, it should now always work on the first try - at least so long as it takes less than 30 seconds to be "found" in firmware download mode.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Bricxcc and firmware test versions

Post by mattallen37 »

afanofosc wrote:To my knowledge no recent changes have been made that would impact how ASCII characters are displayed.
Maybe it was the same before, but I don't remember it being so.
I would transfer the file to your PC, edit it on your PC, then transfer the file to your NXT.
That is what I have been doing, and I suppose I will just continue doing so.
Can you attach a zip containing the file and I will run some tests with it.
I am not sure how to do anything with zipping files. I will try to figure out some way to attach the file. Edit: okay, I saved it AS a .zip file. Either rename it with the extension of .txt, or just "open with" notepad.

Note, I just tested it, and it works perfectly, and what I said before about the viewer not displaying properly totally doesn't apply when I download the file to the NXT from a PC. If I make the file with the NXT, then it displays improperly, just as I said before. I will try to come up with an example program that shows this. I am not ready at this time to release the program that I am using to get these results, as I explained them.
In my case it used to never take more than one try except if I got a "found new hardware" dialog during the download. In theory, it should now always work on the first try - at least so long as it takes less than 30 seconds to be "found" in firmware download mode.

John Hansen
Well, now it only takes one try. In the past, it would require a second try maybe 50% of the time, but I just used it four times (to reflash the NXT's with your latest firmware), and it only took four times total.
File.zip
(38 Bytes) Downloaded 220 times
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Bricxcc and firmware test versions

Post by mattallen37 »

Another thing, did you change anything that would affect the UnflattenVar command? It seems to be significantly different/totally not working. I will do some more tests to confirm. If this really has changed (I know something has), then that would likely explain the whole thing with the NXT not displaying the way it used to, and possibly the error with the viewer in NXT Explorer.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

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