Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About bongo

  • Rank
  1. i really tried to be nice ;-) i already tried different ways to tell the compiler about array size...and all i get is an "error: missing right paren". that's all ;-( using global access is no way to go, as i have multiples of these arrays, but all of them have to be processed using the same functions. the only way i see so far is to convert to a 1D array and calculate position myself, although i think that ansi c should support 2D arrays in functions. thanx!
  2. hi it's a 18f2525. with a bank size of 256 bytes, i think this shouldn't be a problem. regards bongo
  3. i try to include a 2 dimensional arrays in function calls to have functions doing some modifications to arrays. a very simple example to initialize the array is: unsigned char MATRIX[15][16]; void Init (unsigned char *myMATRIX) { unsigned char x,y; for (x=0;x<15;x++) { for (y=0;y<16;y++) { myMATRIX[x][y] = x+y; } } } void main (void) { Init(MATRIX); } i would expect that a memory area of 240 bytes would be reserved for the array variable MATRIX, and when calling the Init function, the start address of this memory range would be given to t
  4. When using BoostC from within the Sourceboost IDE, it does a smart build, i.e. only the files that have changed are recompiled. for all other files, the existing object files are used. When using MPLAB (as an ide for BoostC) to build the design (i think i have to, if i want to debug using ICD2), then on each build, all files are compiled again, no matter if they have changed or not. So this is the most time consuming part of the process when fixing little bugs, as it compiles only on 1 core of a quad core cpu. Is there a way to configure MPLAB to only recompile the files that have cha
  5. that's how i finally did it, after giving up the initial concept... thanx! bongo
  6. to make it a bit more clear, here the test proggy: #include <system.h> #include "SndSer18a1.h" void main (void) { unsigned char myarray[15][6]; PrintMyArray(myarray); } void PrintMyArray(unsigned char *thearray) { for (unsigned char i=0; i<6;i++) { SsTxt(thearray[i]); } } void SsTxt(const unsigned char *text) { unsigned char loop; loop = 0; while ((text[loop] !=0) && (loop < 255)) { SsSend(text[loop++]); } } i get an error message for the line SsTxt(thearray); which tries to give a single line of text to the SsTxt fun
  7. i have a multidimensional array, or let's say an array of string, that i would like to use in a function. i tried ma make an exemple: unsigned char myarray[15][6]; these are 6 strings of the lenght of 15 characters. right? now i want to give this to a function by reference: PrintMyArray(myarray); the function itself is defined as: void PrintMyArray(unsigned char *thearray) { for (unsigned char i=0; i<6;i++) { printF(thearray[i]; } } unfortunately, this does not work. what do i have to do to give an array to function? thanx!
  8. hi dave thanx for the answer! looks like i found the reason: when optimization is enabled in mplab, it compiles and links with the -O1 option, resulting in the bigger code. when i turn off optimization, there is no such option and the result shrinks to 92%. this behaviour does not really make sense, but at least it seems to work now! thank you! regards bongo
  9. when i build my project within the sourceboost IDE (6.96), it requires for 92% program memory. when i build from within MPLAB 8.40, after a very looooong time i get a failure and it reports that the design requiers for 101% program memory. i already had this effect with former projects, requiring for about 10% more program memory when building them from within MPLAB. what am i doing wrong? thanx!
  10. i usually put functions that i use for several projects into libraries instead of adding the c-code to each project. now i have some functions that have to behave different, depending on the pic i use, i.e. there are some lines that are different for slow or fast processors. i used to have a #ifdef slowpic <code for slow version> #else <code for fast version> #endif construct in my source code, while having a #define slowpic in the globaldefs.h file when using a slow processor. now i think about moving the whole stuff into a .lib file. is it p
  11. looks like eeprom simulation does not work. for details, refer to detailed description (within this forum)
  12. looks like this is really a simulator bug!! running the procedure on a real target works!
  13. i also tried the built-in eeprom access tasks. looks like they also do not work on the simulator. what am i doing wrong???
  14. i try to use the sourceboost simulator to check if my code for accessing internal eeprom of a 18f2525 works. my code is a 1:1 asm2c conversion of the microchip example code. result: - my code does not work (on the simulator, didn't test on a target yet) - the simulator shows strange behaviour SIMULATOR PROBLEMS: i first write a few bytes of data to the eeprom window of the simulator (manual entry). this looks ok, but as soon as i start simulation (first step into the program, with no access to the eeprom), each even address of the eeprom gets overwritten with the data from th
  15. hi pavel i have 6.93rc2 What compiler version do you use? Version 6.92 is broken in this respect (projects that have sources not in the project dir may not build). All other releases are fine (including 6.93 RC).. Pavel
  • Create New...