New BricxCC and NBC/NXC release

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: New BricxCC and NBC/NXC release

Post by afanofosc »

I don't know what to tell you other than that I don't have any problems with NQC code in the same version of BricxCC that you are using. Try resetting the API with Default on the API tab. Also on the Colors tab and the Templates tab. Or run BricxCC from a command prompt with /reset to reset all the registry settings to their default values.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
slavkozn
Posts: 24
Joined: 04 Oct 2010, 19:35
Contact:

Re: New BricxCC and NBC/NXC release

Post by slavkozn »

Hi,

first thanks for new release.

I tried to compile the new nbc release under Linux (to provide Debian packages), but in rc4 tar package are not Makefile files. I find the bricxcc.mak and NXT/nbcunix.mak, but i am not sure if it is safe to use these. Need i rename the files or i have to use files from rc3, please? In the bricxcc.mak is mentioned unix.mak, but this file is not in package, and it seems to be for archive creation only intented.

The compilation with old Makefile files was success, but the output was not tested - i have not the brick here.

In rc4 is missing nbx.1 manpage too, can i use the one from rc3 or some changes are needed?

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

Re: New BricxCC and NBC/NXC release

Post by afanofosc »

Use

Code: Select all

make -fbricxcc.mak archivenbcunix
to create a unix-specific source archive. It renames and copies some files before creating the tgz archive. Then you can extract the new tgz and just use make without any parameters to build the compiler. Here's the bit from bricxcc.mak which does the magic:

Code: Select all

archivenbcunix:: clean
	mv unix.mak Makefile
	mv NXT/nbcunix.mak NXT/Makefile
	tar -czf nbc-$(VER).unix-src.tgz $(UNIXFILES) Makefile NXT/Makefile
	mv Makefile unix.mak
	mv NXT/Makefile NXT/nbcunix.mak
	mv nbc-$(VER).unix-src.tgz ../nbc/beta
You will need to have the ../nbc/beta folder already created relative to the pwd

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
slavkozn
Posts: 24
Joined: 04 Oct 2010, 19:35
Contact:

Re: New BricxCC and NBC/NXC release

Post by slavkozn »

Thanks for reply, but please are we both talking about the same package ("NBC/NXC 1.2.1 r4 Source release")? When i try to run your suggestion, i get:

Code: Select all

LANG=C make -fbricxcc.mak archivenbcunix
rm -rf *.dcu *.o *.ppu *.rst *.compiled *.bak *.~* *.ddp nbc_preproc.inc
mv unix.mak Makefile
mv: cannot stat `unix.mak': No such file or directory
make: *** [archivenbcunix] Error 1
and also:

Code: Select all

LANG=C make
make: *** No targets specified and no makefile found.  Stop.

LANG=C ls -l Makefile unix.mak
ls: cannot access Makefile: No such file or directory
ls: cannot access unix.mak: No such file or directory
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: New BricxCC and NBC/NXC release

Post by afanofosc »

Possibly I screwed up when I built the source archive (which was done using make -fbricxcc.mak archvicenbcsrc). Grab a copy of unix.mak from the SVN repository.

http://bricxcc.svn.sourceforge.net/view ... c/unix.mak

I will correct the source archive.

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: New BricxCC and NBC/NXC release

Post by mattallen37 »

afanofosc wrote:I don't know what to tell you other than that I don't have any problems with NQC code in the same version of BricxCC that you are using. Try resetting the API with Default on the API tab. Also on the Colors tab and the Templates tab. Or run BricxCC from a command prompt with /reset to reset all the registry settings to their default values.

John Hansen
Thanks for the advice. I reset to default the API, Colors, and Templates. Now it seems to work perfectly for coloring :D The only problem now, is that it still crashes when I try to open large programs (or any that aren't tiny) :cry:
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: New BricxCC and NBC/NXC release

Post by afanofosc »

Please send me a program that reliably crashes the IDE when you open it. I can open the NQC header file (api.nqh) which is 69k in size and it opens fine without crashing anything. My computer is a laptop running Windows 7 with an I5 processor. Perhaps it is related to the timing of opening the file?

Are you running in MDI mode or tabbed mode? Do you keep your template window docked or floating? Do you have the templates on the editor popup menu or not?

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: New BricxCC and NBC/NXC release

Post by muntoo »

afanofosc wrote:Are you running in MDI mode or tabbed mode? Do you keep your template window docked or floating? Do you have the templates on the editor popup menu or not?
I'm pretty sure he's using tabbed mode ever since he learned how to switch to it.
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: New BricxCC and NBC/NXC release

Post by mattallen37 »

Ok, here is a program that always crashes BCC (but only when I already have BCC open, and I go to the menu, and I browse for it).

Code: Select all

int A,B,C,D,E,F,G,H,I;
task main ()
{
 start smux;
 start seven_segment_output;
}
task seven_segment_output ()
{
  while (true)
  {if (A>22 && B>22 && C>22 && D>22){OnRev (OUT_AB); OnFwd (OUT_AB);}
    else //    1111
    {if (A>22 && B>22 && C<22 && D<22){Off (OUT_B); OnRev (OUT_A); OnFwd (OUT_A);}
      else //3   0011
      {if (A>22 && B>22 && C>22 && D<22){OnFwd (OUT_A); OnRev (OUT_AB);}
        else //7   0111
        {if (A>22 && B>22 && C<22 && D>22){OnRev (OUT_A); OnFwd (OUT_AB);}
          else //E   1011
          {if (A<22 && B<22 && C>22 && D>22){Off (OUT_A); OnFwd (OUT_B); OnRev (OUT_B);}
            else //H   1100
            {if (A>22 && B<22 && C>22 && D>22){OnFwd (OUT_B); OnRev (OUT_AB);}
              else //L   1101
              {if (A<22 && B>22 && C>22 && D>22){OnFwd (OUT_AB); OnRev (OUT_B);}
                else //P   1110
                {if (A<22 && B<22 && C<22 && D<22){Off (OUT_AB);}
                  else //0   0000
                  {if (A>22 && B<22 && C<22 && D<22){Off (OUT_B); OnRev (OUT_A);}
                    else //1   0001
                    {if (A<22 && B>22 && C<22 && D<22){Off (OUT_B); OnFwd (OUT_A);}
                      else //2   0010
                      {if (A<22 && B<22 && C>22 && D<22){Off (OUT_A); OnRev (OUT_B);}
                        else //4   0100
                        {if (A>22 && B<22 && C>22 && D<22){OnRev (OUT_AB);}
                          else //5   0101
                          {if (A<22 && B>22 && C>22 && D<22){OnRev (OUT_B); OnFwd (OUT_A);}
                            else //6   0110
                            {if (A<22 && B<22 && C<22 && D>22){Off (OUT_A); OnFwd (OUT_B);}
                              else //8   1000
                              {if (A>22 && B<22 && C<22 && D>22){OnFwd (OUT_B); OnRev (OUT_A);}
                                else //9   1001
                                {if (A<22 && B>22 && C<22 && D>22){OnFwd (OUT_AB);}
                                       //-   1010
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
#define SHORT_WAIT 1
task smux ()
{
  while (true)
  {
    if (SENSOR_1>= 98)
    {
      Wait(SHORT_WAIT);
      if (SENSOR_1>= 98)
      {
        SetSensor(SENSOR_1, SENSOR_TOUCH);
        SetSensor(SENSOR_1, SENSOR_LIGHT);
        Wait(SHORT_WAIT);
      }
    }
    A = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    B = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    C = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    D = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    E = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    F = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    G = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    H = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
    I = SENSOR_1*1;
    SetSensor(SENSOR_1, SENSOR_TOUCH);
    SetSensor(SENSOR_1, SENSOR_LIGHT);
    Wait(SHORT_WAIT);
  }
}
/*
task zero(){Off (OUT_AB);}
task one(){Off (OUT_B); OnRev (OUT_A);}
task two(){Off (OUT_B); OnFwd (OUT_A);}
task three(){Off (OUT_B); OnRev (OUT_A); OnFwd (OUT_A);}
task four(){Off (OUT_A); OnRev (OUT_B);}
task five(){OnRev (OUT_B); OnFwd (OUT_A);}
task six(){OnRev (OUT_B); OnFwd (OUT_A);}
task seven(){OnFwd (OUT_A); OnRev (OUT_AB);}
task eight(){Off (OUT_A); OnFwd (OUT_B);}
task nine(){OnFwd (OUT_B); OnRev (OUT_A);}
task dash(){OnFwd (OUT_AB);}
task EE(){OnRev (OUT_A); OnFwd (OUT_AB);}
task HH(){Off (OUT_A); OnFwd (OUT_B); OnRev (OUT_B);}
task LL(){OnRev (OUT_AB); OnFwd (OUT_B);}
task PP(){OnFwd (OUT_AB); OnRev (OUT_B);}
task blank(){OnFwd (OUT_AB);OnRev (OUT_AB);}
*/
My computer is running Windows 7 64-bit OS. It has a 2.5gHz quad core processor, and 8gb RAM.

I am using tabs ("MDI" is not selected). I have the templates window on the left, and it is not "connected" to the BCC main window (I can move it around). Not sure what you mean by "Do you have the templates on the editor popup menu or not?".
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: New BricxCC and NBC/NXC release

Post by afanofosc »

With this particular program I can get the IDE to crash if I open it as matt_test.nxc but it seems to open just fine as matt_test.nqc. It has something to do with the Code Explorer window but so far I have not been able to pinpoint the cause.

I have not made any changes to the NQC parsing code or the NXC parsing code, for that matter, in a really long time. Ditto for the Code Explorer code as well. Can you open this same program in the last BricxCC prior to the new release without any errors? You did recently switch from MDI mode to tabbed mode, didn't you?

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

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