bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
hey (John...?),
I just discovered a new release...:
[ ] bricxcc_setup_33810_20130220.exe 21-Feb-2013 04:22
listed at test_releases http://bricxcc.sourceforge.net/test_releases/
- is there any reason why it's not to find at https://sourceforge.net/projects/bricxcc/files/bricxcc/ ?
- is there an overview about what's new since test_release20121101.zip 01-Nov-2012 13:05 21M ?
- what's different to test_release20130218.zip 18-Feb-2013 08:16 23M ?
I just discovered a new release...:
[ ] bricxcc_setup_33810_20130220.exe 21-Feb-2013 04:22
listed at test_releases http://bricxcc.sourceforge.net/test_releases/
- is there any reason why it's not to find at https://sourceforge.net/projects/bricxcc/files/bricxcc/ ?
- is there an overview about what's new since test_release20121101.zip 01-Nov-2012 13:05 21M ?
- what's different to test_release20130218.zip 18-Feb-2013 08:16 23M ?
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
The primary difference is that I was asked to start releasing test releases with an installer since it is not much bigger than the zip, which requires manual installation and unblocking of files before things work right.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
ok, I see, so it's not a complete new release, thank you!
Is it still true for complete releases that older versions first have to be uninstalled?
Is it still true for complete releases that older versions first have to be uninstalled?
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
I do not think that older versions of BricxCC have ever had to be uninstalled before installing a new version. Perhaps it has been a good idea to do so, but I don't think it has ever been required. It should work fine installing a newer release over an existing install.
Btw, I uploaded a new firmware test release. It changes a few string opcodes to only count the first null as part of a string for things like concatenation, string subset, and converting from a string to a byte array.
While this helps some things I am seeing that it breaks the FlattenVar <--> UnflattenVar functions, i.e., the string that comes out of FlattenVar has had any extra nulls stripped out of it, which means you could not successfully restore the original type by passing that "string" into UnflattenVar.
I am exploring alternatives to FlattenVar and UnflattenVar that would work correctly with a byte array intermediate type.
I also have a set of header files that I would love to have people try out and look for defects. These can be used by extracting them to a folder of your choosing and setting the include path on the NBC/NXC tab along with turning on the "ignore system include files" option.
http://bricxcc.sourceforge.net/test_rel ... folder.zip
John Hansen
Btw, I uploaded a new firmware test release. It changes a few string opcodes to only count the first null as part of a string for things like concatenation, string subset, and converting from a string to a byte array.
While this helps some things I am seeing that it breaks the FlattenVar <--> UnflattenVar functions, i.e., the string that comes out of FlattenVar has had any extra nulls stripped out of it, which means you could not successfully restore the original type by passing that "string" into UnflattenVar.
I am exploring alternatives to FlattenVar and UnflattenVar that would work correctly with a byte array intermediate type.
I also have a set of header files that I would love to have people try out and look for defects. These can be used by extracting them to a folder of your choosing and setting the include path on the NBC/NXC tab along with turning on the "ignore system include files" option.
http://bricxcc.sourceforge.net/test_rel ... folder.zip
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
NXC is now finally getting more and more ACDC then if I daresay ?
ps:
Is it just a new layout and sorting of existing functions from NXCdefs.h to seperate header files or are there also many new features included?
Which functions are new so that they particularly should be tested intensively?
Is it just a new layout and sorting of existing functions from NXCdefs.h to seperate header files or are there also many new features included?
Which functions are new so that they particularly should be tested intensively?
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
no special functions to be tested particularly??
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
There aren't any new functions really but I would love for people to test whether existing programs compile with proper #include statements added. I have not yet documented which headers contain which functions.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
I did so but I get compile errors.
I guess I have to use a specific #include "???.h"
- but which?
D:\Akten\Programmierung\NXC\include\test-nxc_include_folder\include
when disabling "ignore include files" everything works fine.
do I have to #include all those billions of single .h files by each and every's single name for each single NXC program?
or shall we use a "import-nxc-defs.h" program file to be included in future?
( I guess most people will always use more or less all of those files, especially those for math, stdio, stdlib, display, all sensors manufactured by Lego and all 3rd parties, motors, tasks, a.s.o., at any time...)
I guess I have to use a specific #include "???.h"
- but which?
Code: Select all
task main(){
int a,b=1,c=1,d=1,e=1,f=1,g=1,h=1,i=1,j=1,k=1,l=1,m=1,n=1,o=1,p=1,q=1,r=1,s=1,t=1,u=1,v=1,w=1,x=1,y=1,z=1;
//float a,b=1,c=1,d=1,e=1,f=1,g=1,h=1,i=1,j=1,k=1,l=1,m=1,n=1,o=1,p=1,q=1,r=1,s=1,t=1,u=1,v=1,w=1,x=1,y=1,z=1;
long clock;
int cc;
for (cc=0; cc<1000; ++cc) { // 26000 assignements
a=2;
b*=a;
c*=b;
d*=c;
e/=d;
f*=e;
g*=f;
h*=g;
i/=h;
j*=i;
k*=j;
l*=k;
m/=l;
n*=m;
o*=n;
p*=o;
q/=p;
r*=q;
s*=r;
t*=s;
u/=t;
v*=u;
w*=v;
x*=w;
y/=x;
z*=y;
}
clock=CurrentTick()-FirstTick();
NumOut(0,40, clock); // with int:973; with float: 1051
while (true) {
}
}
the same it's with the following program# Error: Undefined Identifier CurrentTick
File "C:\DOKUME~1\s3000\LOKALE~1\Temp\temp.nxc" ; line 41, position 20
# clock=CurrentTick(
#----------------------------------------------------------
...
#----------------------------------------------------------
Code: Select all
/*****************************************************************************/
// Display output
char LCDline[]={56,48,40,32,24,16,8,0};
int _cur_x_=0, _cur_y_=56; // cursor home for NXC = upper left = (0,56)
int _tab_width_=24; // tab width by default = 24 = 4* 6-point letter
unsigned long _TEXTSTYLE_ = DRAW_OPT_NORMAL; // text style by default
#define scrclr() { ClearScreen(); _cur_x_=0; _cur_y_=56; }
#define gotoxy( x, y ) { _cur_x_=x; _cur_y_=y; } // move cursor to position
#define curxy( x, y ) { _cur_x_=x; _cur_y_=y; } // move cursor to (alias)
#define curx ( x ) { _cur_x_=x; } // move cursor to x-pos
#define cury ( y ) { _cur_y_=y; } // move cursor to y-pos
#define curhome () { _cur_x_=0; _cur_y_=56; } // move cursor home
#define settabwidth( t ) { _tab_width_ = t; } // redefine tab width
#define settextstyle( t ) { _TEXTSTYLE_ = t; } // redefine text style
//*********************************************
inline string strsplit(string &src, string mark) {
string _sret="";
int p=-1, l;
p=Pos(mark, src);
if (p>=0) {
l=strlen(mark);
_sret= SubStr(src, 0, p);
src=SubStr(src, p+l, strlen(src)-p);
}
return _sret;
}
//*********************************************
string strexch(string src, string ex, string ch) {
string _sst;
_sst=strsplit(src,ex);
if (_sst !="") return (StrCat(_sst,ch,src));
else return("");
}
//*********************************************
void backspace() {
TextOut(_cur_x_, _cur_y_, " ");
if (_cur_x_ >=6) _cur_x_-=6;
else if ((_cur_x_ ==0)&&(_cur_y_ <56)) {_cur_x_=90; _cur_y_ +=8; }
TextOut(_cur_x_, _cur_y_, " ");
}
// printfxy()
// featuring "\i" for writing inverted
//******************************************************************************
#define printfxy( _x_, _y_, _f_, _v_) { \
_cur_y_=_y_; string _s2, _sv; \
_s2=_f_; \
if (Pos("\i",_s2)>=0) { \
_TEXTSTYLE_= DRAW_OPT_INVERT; \
_s2=strexch(_s2,"\i",""); \
} \
int len=0; \
if (Pos("%",_s2)==-1) { _sv=_s2; } \
else { _sv = FormatVal(_s2, _v_); } \
TextOut(_x_, _y_, _sv, _TEXTSTYLE_); \
len=strlen(_sv); \
_cur_x_=_x_+6*(len); \
_TEXTSTYLE_= DRAW_OPT_NORMAL; \
}
// printfEx redefined as printf()
// featuring \n, \t, and "\i" for writing inverted
//******************************************************************************
#define printf(_fmt, _val) { \
int _x=_cur_x_; int _y=_cur_y_; \
string _sf, _s; \
_sf=_fmt; \
while (Pos("\n",_sf)>=0) { \
_s=strsplit(_sf,"\n"); \
while (Pos("\t",_s)>=0) { \
_x=(1+_x/_tab_width_)*_tab_width_; \
_s=strexch(_s, "\t", ""); } \
printfxy( _x, _y, _s, _val); \
_x=0; _y-=8; \
} \
while (Pos("\t",_sf)>=0) { \
_x=(1+_x/_tab_width_)*_tab_width_; \
_sf=strexch(_sf, "\t", ""); } \
if(_x>=96) {_x=0; _y-=8;} \
if(_y<0) {scrclr(); _y=56;} \
printfxy( _x, _y, _sf, _val); \
}
//********************************************************************
task main()
{
printf("\n 4 - %d \n=", 1);
printf("%d \n\n ???", 3);
printf("\n hello, \n%s !!!", "world");
while (1);
}
include path is :# Error: Invalid constant expression
File "C:\DOKUME~1\s3000\LOKALE~1\Temp\temp.nxc" ; line 11, position 46
# unsigned long _TEXTSTYLE_ = DRAW_OPT_NORMAL;
#----------------------------------------------------------
# Error: Undefined Identifier Pos
File "C:\DOKUME~1\s3000\LOKALE~1\Temp\temp.nxc" ; line 28, position 8
# p=Pos(
#----------------------------------------------------------
# Error: ';' expected
File "C:\DOKUME~1\s3000\LOKALE~1\Temp\temp.nxc" ; line 28, position 9
# p=Pos(m
#----------------------------------------------------------
# Error: Undefined Identifier strlen
File "C:\DOKUME~1\s3000\LOKALE~1\Temp\temp.nxc" ; line 30, position 11
# l=strlen(
#----------------------------------------------------------
# Error: ';' expected
File "C:\DOKUME~1\s3000\LOKALE~1\Temp\temp.nxc" ; line 30, position 12
# l=strlen(m
#----------------------------------------------------------
# Error: Undefined Identifier strlen
...
D:\Akten\Programmierung\NXC\include\test-nxc_include_folder\include
when disabling "ignore include files" everything works fine.
do I have to #include all those billions of single .h files by each and every's single name for each single NXC program?
or shall we use a "import-nxc-defs.h" program file to be included in future?
( I guess most people will always use more or less all of those files, especially those for math, stdio, stdlib, display, all sensors manufactured by Lego and all 3rd parties, motors, tasks, a.s.o., at any time...)
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
Doc,
You were, iirc, the one who wanted me to break apart the large NXCDefs.h into smaller bits so that if you didn't need all those functions the compiler could run faster. Putting all the small files into one big include file would get us back to square one. Use the BricxCC Grep tool to find the .h file in your include path which contains CurrentTick and #include that one. Then try to compile again and grep search for the .h file containing the next unknown symbol that the compiler complains about. Keep doing that until the compiler no longer complains and you have your program ready to compile with the minimal set of header files required.
John Hansen
You were, iirc, the one who wanted me to break apart the large NXCDefs.h into smaller bits so that if you didn't need all those functions the compiler could run faster. Putting all the small files into one big include file would get us back to square one. Use the BricxCC Grep tool to find the .h file in your include path which contains CurrentTick and #include that one. Then try to compile again and grep search for the .h file containing the next unknown symbol that the compiler complains about. Keep doing that until the compiler no longer complains and you have your program ready to compile with the minimal set of header files required.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: bricxcc_setup_33810_20130220.exe - Feb-2013 04:22
yeeees - I once suggested to break them in parts, right (in a time long, long ago, in a Galaxy far, far away ) - I was actually thinking of 4 or 5 header files then over all.
The reason was mainly to have a faster and closer look over pre-grouped functions.
But even if I have included all files - wouldn't eliminate the code optimizer every function which was left unused? Only compiling and linking just the ones which have been used, together with my specific code functions ?
This anyway had been the functionality how I expected that it would work.
If I'll include all the 70 files, each one by a single ,
#include "..."
for each single program I write then I'm afraid I'll periodically get a stack overflow error with my file editor before I've finally reached task main() to type in
no, in earnest:
I probably won't write any new programs for the NXT any more (this stuff simply doesn't work for my requirements about fool-proof NXT networks and I already sold almost everything of my NXT components at ebay) -
but in order to test some old ones for you and your *.h bunch we maybe can copy
all the sensor files in 1 (NXCsensors.h)
all the motor files in 1 (NXCmotors.h)
all the maths, array and strings operations in 1 (NXCmasop.h)
all the display, btn and file io in 1 (NXCiolib.h)
and all the rest in 1 (NXC42.h - if there will be a final rest of last questions to ultimate answers at the end)
- OR -
maybe you wish to make a list of all the 70 (or what ever will be)
#include "fileXYZ.h"
that actually need to be included (except those which will be automatically included by other ones )
then I can make a "include_all_h.c" file out of it which simply can be included by
#include "include_all_h.c"
The reason was mainly to have a faster and closer look over pre-grouped functions.
But even if I have included all files - wouldn't eliminate the code optimizer every function which was left unused? Only compiling and linking just the ones which have been used, together with my specific code functions ?
This anyway had been the functionality how I expected that it would work.
If I'll include all the 70 files, each one by a single ,
#include "..."
for each single program I write then I'm afraid I'll periodically get a stack overflow error with my file editor before I've finally reached task main() to type in
no, in earnest:
I probably won't write any new programs for the NXT any more (this stuff simply doesn't work for my requirements about fool-proof NXT networks and I already sold almost everything of my NXT components at ebay) -
but in order to test some old ones for you and your *.h bunch we maybe can copy
all the sensor files in 1 (NXCsensors.h)
all the motor files in 1 (NXCmotors.h)
all the maths, array and strings operations in 1 (NXCmasop.h)
all the display, btn and file io in 1 (NXCiolib.h)
and all the rest in 1 (NXC42.h - if there will be a final rest of last questions to ultimate answers at the end)
- OR -
maybe you wish to make a list of all the 70 (or what ever will be)
#include "fileXYZ.h"
that actually need to be included (except those which will be automatically included by other ones )
then I can make a "include_all_h.c" file out of it which simply can be included by
#include "include_all_h.c"
Who is online
Users browsing this forum: No registered users and 1 guest