Jump to content

danutz

EstablishedMember
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

0 Neutral

About danutz

  • Rank
    Newbrie
  1. danutz

    Multiple Project Configuration

    Thank you Russ, that is useful. Anyway, it would be better to compile only the files that changed since the last build. And this could be done by creating separate obj files for each configuration. Dan
  2. SourceBoost 6.90 I need to create the same program for 2 different boards, so I duplicated the project (the .__c file), renamed the copy and used the -d compiler option to make a define. So both projects use the same sources, but not all the sources will differ by using the define. The problem: - make changes in the sources - build one of the projects. It will see the changes and compile the appropriate files - build the second project. It won't see any changes in the source files, and will only link the project Probably you compile a file only if the time it was changed is newer than the .obj time, and by building the first configuration a newer .obj was created. If this is the case, maybe you could add an information about the last compile time of every source file, in order to better separate the two projects. Or prefix the .obj files with the projecta name... Thank you, Dan
  3. Is there a way to get (in the program) the date and time at which the project was built? maybe by defining a variable that receives the system time... I searched the documentation and didn't find any time related function. Thank you, Dan
  4. I use the % operator in both interrupt and main code, and get this warning: Serious Warning: Possible sw stack corruption, function '__rem_16_16' called by more than one asynchronous thread (main/Task, interrupt, interrupt low) The same problem when dividing to a number that's not power of 2. Could the compiler create different functions for interrupt and main code? (let's say __rem_16_16_int would be called when using % inside an interrupt and __rem_16_16 when using % in the main code). BoostC, SourceBoost 6.70, 18F2620. Thank you, Dan
  5. danutz

    Very Slow Compile

    Thank you for your answer. I think that changing the process priority from task manager is a job to do everytime I open Sourceboost. I know this seems to be the only way for the moment, but it would be useful to be able to do this from inside Sourceboost, once for ever (of course, just as a temporary solution, until a faster version of the compiler will appear). Dan
  6. danutz

    Very Slow Compile

    BoostC latest version, PIC18F2620, 18F2321, 16F767, most probably on all PICs. It takes about 2-3 minutes to compile a 4k program on a Celeron M 1,6GHz, 768MB RAM. Also, the compiler uses all the CPU. If it's too difficult to optimize the compile time, could you at least add an option to change the priority of the process? Almost everytime I compile a program my wireless connection disconnects... Thank you, Dan
  7. SourceBoost IDE 6.60 BoostC Target: any 16F I get the following compile error when I try to access individual bits of a struct member: failure D:\Prj\ec\program\test2\test_struct_bit.c(13:6): error: unexpected '.' operator after 'b' D:\Prj\ec\program\test2\test_struct_bit.c(13:2): error: failed to generate expression D:\Prj\ec\program\test2\test_struct_bit.c(13:2): error: invalid operand 'st.b.4' D:\Prj\ec\program\test2\test_struct_bit.c(13:9): error: failed to generate expression Failed to locate output file 'test_struct_bit.obj' Done Failed The program that will reproduce the error is: #include <system.h> struct str { unsigned char a, b; }; struct str st; void main() { st.a = 2; st.b.4 = 1; } Dan
  8. danutz

    Wrong Memory Usage Report

    SourceBoost 6.60 Compiler - BoostC Target - PIC16F767 The linker's memory usage report is incorrect. It seems to consider the last memory location occupied, which is not correct if there are holes in the code memory (for example, by putting data at the end of code memory space). The following code will reproduce the problem: #include <system.h> #pragma DATA 0x1500, 1 int main() { while(1) { } return 0; } Memory Usage Report =================== RAM available:368 bytes, used:3 bytes (0.9%), free:365 bytes (99.1%), Heap size:365 bytes, Heap max single alloc:111 bytes ROM available:8192 words, used:5377 words (65.7%), free:2815 words (34.3%) Dan
  9. No, it has no EEPROM :-( I used the second option from Dave and it works fine. Only that I had to put a 0x0782 (addwf PCL, f) between address and the first 0x34xx. (#pragma DATA 0x1500, 0x0782, 0x34xx, ....) Thank you both for your answers Dan
  10. I get this error: error in built-in assembly void MyFunction(unsigned int unCmd) { clear_bit(PORTNSEL, nSEL_BIT); asm { movf param00_TrimiteComandaWord+1, W movwf SSPBUF bsf STATUS, RP0 } ... } the compiler doesn't recognize SSPBUF and STATUS. If I replace them with _sspbuf and _status it works. Should I include some specific header or BoostC doesn't recognize Microchip's definitions? Also, how can I access the input variables of a function? In the example I tried like in C2C-Plus, and it doesn't work. Dan
  11. Can't be done Why do you want to do this? Regards Dave <{POST_SNAPBACK}> I need to do this because I store data in the code memory. C2C-Plus had problems in accessing this data (in certain conditions makes a call to a wrong address), so I had to define that data in assembler. Like this: void Init_Mem() @ 0x1500 { asm { clrw bsf PCLATH, 2 bcf PCLATH, 1 bsf PCLATH, 0 addwf PCL, 1 retlw .65 ... } } This is for initialization, then I load the offset in W and make a call to 0x1501. All the data arrays <256 bytes. Since I deleted the old data declaration (const char[] = {...}, it wouldn't be easy to rewrite it. Dan
  12. How can I put a function at a certain address in BoostC? In C2C-Plus it's void MyFunction() @ 0x1234, but this seems not to work in BoostC. Thank you, Dan
  13. I get the same error on C2C-Plus 5.9.7e. Target - PIC16F767 Program size - almost 7k (the maximum code memory size is 8k) I also have some data at fixed addresses in the code memory. I ran into this problem earlier and solved it by moving the data at other locations, but now the program is too big to do this again. Any idea? Also, the compiler has a bug in accessing data stored in the code memory. label_0194 movlw D'10' subwf _i_main, W btfsc STATUS, C goto label_0195 movf _i_main, W movwf _code_tmp_0000 addlw LOW(arr000+1) movlw HIGH(arr000+1) btfsc STATUS, C addlw 1 ; ****** movwf PCLATH movf _code_tmp_0000 , W call arr000 bsf STATUS, RP0 bcf STATUS, RP1 movwf _m_main incf _i_main, F goto label_0194 label_0195 ****** adding 1 to the high byte of the address of the first byte could result in changing the bit 3 of PCLATH (if bits 2, 1 and 0 are set). In this case the call is made to a wrong address. Dan
  14. danutz

    Upgrade Policy

    Hello! I know it's not exactly on-topic, but I did not know where to ask. If I do an upgrade from C2C-plus to BoostC will I be able to use BoostC on one computer and C2C-plus on another (for C2C-plus I have a two nodes license) or I'll have to have only one at a certain moment? Thank you, Dan
×