Bricxcc and firmware test versions
Posted: 07 Oct 2010, 16:17
I have made a change to the way BricxCC tries to find and load the hhctrl library which is used to launch HTML help. If you can replace your BricxCC executable with the one from the zip at the link below and try launching help I would appreciate it.
http://sourceforge.net/projects/bricxcc ... p/download
If it still does not work then I would ask that you install a debug viewer from Microsoft and have it running when you launch BricxCC and try the help system. Then send me the logs that it collects. The debug viewer is at this link:
http://download.sysinternals.com/Files/DebugView.zip
This build of BricxCC includes a new compiler version as well. It reports 1.2.1.r4 as the NBC compiler version. It is not yet the official release of this compiler version, which will include a number of API additions and changes that I haven't made yet. One thing it includes that requires the firmware image I posted yesterday is a new system call function called MemoryManager. It lets you force a compact operation and returns the status of that call along with the PoolSize and the DataspaceSize values from the firmware. There is a constant called POOL_MAX_SIZE in NBCCommon.h which is 32768. If the PoolSize reaches that value you have run out of RAM. I ran some tests with this new function yesterday and I was getting confusing results so I am not 100% sure what is going on in the firmware. You can call this function via SysMemoryManager or GetMemoryInfo.
I would appreciate some help testing out the behavior of this function in order to better understand the values that it reports back for PoolSize and DataspaceSize as you allocate and resize arrays or copy data around from string to string with concatenation, or anything which should make an array longer or shorter than it used to be. Passing false as the first parameter will not force a compact operation and in that case the function call should always return NO_ERR (aka 0).
The firmware zip has been uploaded to this URL:
http://sourceforge.net/projects/bricxcc ... p/download
John Hansen
http://sourceforge.net/projects/bricxcc ... p/download
If it still does not work then I would ask that you install a debug viewer from Microsoft and have it running when you launch BricxCC and try the help system. Then send me the logs that it collects. The debug viewer is at this link:
http://download.sysinternals.com/Files/DebugView.zip
This build of BricxCC includes a new compiler version as well. It reports 1.2.1.r4 as the NBC compiler version. It is not yet the official release of this compiler version, which will include a number of API additions and changes that I haven't made yet. One thing it includes that requires the firmware image I posted yesterday is a new system call function called MemoryManager. It lets you force a compact operation and returns the status of that call along with the PoolSize and the DataspaceSize values from the firmware. There is a constant called POOL_MAX_SIZE in NBCCommon.h which is 32768. If the PoolSize reaches that value you have run out of RAM. I ran some tests with this new function yesterday and I was getting confusing results so I am not 100% sure what is going on in the firmware. You can call this function via SysMemoryManager or GetMemoryInfo.
Code: Select all
task main() {
byte data[];
byte data2[];
int data3[];
int ps, ds;
char result = GetMemoryInfo(false, ps, ds);
NumOut(0, LCD_LINE1, ps);
NumOut(0, LCD_LINE2, ds);
Wait(SEC_5);
ClearScreen();
Wait(SEC_1);
/*
result = GetMemoryInfo(true, ps, ds);
NumOut(0, LCD_LINE1, ps);
NumOut(0, LCD_LINE2, ds);
Wait(SEC_5);
ClearScreen();
Wait(SEC_1);
*/
ArrayInit(data, 10, 3000);
data[10]++;
ps = data[10];
data2 = data;
ArrayBuild(data3, ps, ds, ps, ds, ps, ds, ps, ds);
result = GetMemoryInfo(false, ps, ds);
NumOut(0, LCD_LINE1, ps);
NumOut(0, LCD_LINE2, ds);
NumOut(0, LCD_LINE8, data[10]);
Wait(SEC_5);
ClearScreen();
Wait(SEC_1);
result = GetMemoryInfo(true, ps, ds);
NumOut(0, LCD_LINE1, ps);
NumOut(0, LCD_LINE2, ds);
NumOut(0, LCD_LINE8, data2[10]);
Wait(SEC_5);
ClearScreen();
Wait(SEC_1);
// while(true);
}
The firmware zip has been uploaded to this URL:
http://sourceforge.net/projects/bricxcc ... p/download
John Hansen