Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Dave

  1. Correct, all you get is a warm fuzzy feeling. No, there are specific upgrade prices, which you can find here:http://www.sourceboo...C/Upgrades.html All upgrades are included until a new major revision is released, a major version lifetime was historically around 2-4 years, but there is no guarantees on this time for future major releases. Regards Dave
  2. tom 2007, This one had me scratching my head for a while. The problem is in the string.h header file, size_type was not used in a few places it should have been. Attached is a corrected version of this file. Regards Dave string.zip
  3. Dave


    djace, This header doesn't exist for the BoostC compiler.You could make you own with the following contents: #define _ASSERT( assertArg ) Regards Dave
  4. Dave

    Mplab Error

    gurday, Looks like you are mixing versions of compiler and linker, generally this is not recommended and is no doubt the cause of your problems. Regards Dave
  5. Have you tried running pp.exe from a command line prompt?It maybe your anti-virus software has quarantined this file? I'm running Win 7 64bit and don't see any problems. Regards Dave
  6. Boostfede, I have just tried your code with BoostC V7.04 and MPLAB V8.76, all works OK.I have just tried your code with BoostC V6.97 and MPLAB V8.76, all works OK. So I'm not sure why its not working for you, and more perplexing is that fact that it is dependent on the set_bit macro. Regards Dave
  7. Hi all, BoostC/BoostC++ V7 compiler now supports the following additional 35 target devices: PIC12F1822, PIC12LF1822, PIC12F1840, PIC12LF1840, PIC12F617, PIC16F1823, PIC16LF1823, PIC16F1824, PIC16LF1824, PIC16F1825, PIC16LF1825, PIC16F1826, PIC16LF1826, PIC16F1828, PIC16LF1828, PIC16F1829, PIC16LF1829, PIC16F1847, PIC16LF1847, PIC16LF1902, PIC16LF1903, PIC16F1938, PIC16LF1938, PIC16F1939, PIC16LF1939, PIC16F1946, PIC16LF1946, PIC16F1947, PIC16LF1947, PIC16F707, PIC16LF707, PIC16LF720, PIC16LF721, PIC16LF722A, PIC16LF723A You can download the required updated files from here: http://www.sourceboost.com/CommonDownload/..._04-11-2010.zip The files will need to be manually copied to the appropriate destinations. Regards Dave
  8. Remember to add #include <system.h> to your source code for the set_bit macro to work.Even if this is missing I would still expect to get an error generated, so maybe something else is wrong. Regards Dave
  9. You are correct, accepted syntax doesn't appear to be as one would expect, I've added it to our bug list to get fixed. You can ignore this warning. It just means that the debug file (coff file) can't represent the function pointer data type. All this means is that you won't be able to watch the pointer values in the debugger. The way function pointers are implemented in BoostC is that the function pointer has a simple value, that value is an index into a jump table where the function arguments are patched, then the actual function is called. On return the return value is patched up and then the code returns to the caller. So what you see for each function pointer being a number that start at 1 and increases is what would you should get. Regards Dave
  10. Tony, Drop the brackets when using the function pointer, see below: #define CMD_STR_MAX_LEN 10 #define CMD_NUM 10 #define NULL 0 typedef struct cmd_S { char cmdStr[ CMD_STR_MAX_LEN ]; void ( *cmdFunc )( char * cmdLinePt ); } cmdStruct; void cmdLoad( char* cmdLine ) { } void cmdRun( char* cmdLine ) { } void cmdStop( char* cmdLine ) { } cmdStruct commands[ CMD_NUM ] = { { "\1load", cmdLoad }, { "\1run", cmdRun }, { "\1stop", cmdStop }, }; void ( *cmdFunc )(); //----------- char* str = "1234567890"; cmdStruct* getCmd( char ** cmdLinePtPt ) { //-------- int i = 1; *cmdLinePtPt = str; return &commands[ i ]; } void main( void ) { cmdStruct* command; char* cmdBuffPt = NULL; //--------- command = getCmd( &cmdBuffPt ); if ( command != NULL ) { command->cmdFunc( cmdBuffPt ); } while(1); } Regards Dave
  11. Tony, You have probably done made the same mistake I did when trying to compile your code: #define CMD_STR_MAX_LEN 1; typedef struct cmd_S { void ( *cmdFunc )( char * cmdLinePt ); char cmdStr[ CMD_STR_MAX_LEN ]; } cmdStruct; void main() { } Notice the mistake? There is a semi colon where it shouldn't be, at the end of "#define CMD_STR_MAX_LEN 1;". Removing that allows successful compilation for me. Regards Dave
  12. Sparky1039, In you code make sure you use #include<system.h> in your source files, this will then include the appropriate header file for the device you select. You can conditionally compile code for each target using the following: void foo() { #ifdef _PIC18F67J11 // code and register use specific to PIC18F67J11 ..... #else // code and register use specific to the other device ..... #endif } or void foo() { #ifdef _PIC18F67J11 // code and register use specific to PIC18F67J11 ..... #endif #ifdef _PIC18F67K22 // code and register use specific to PIC18F67K22 ..... #endif } or #ifdef _PIC18F67J11 // function when using PIC18F67J11 void foo() { ... } #endif #ifdef _PIC18F67K22 // function when using PIC18F67J11 void foo() { ... } #endif I hope that helps. Regards Dave
  13. trossin, Very dissappointing I'm not seeing quite the same issue as you. The different maybe the way you are specifying the path to the MPASM. I browsed using the "." button on the tools dialog box so my path is a shortened version eg "C:\PROGRA~2\MICROC~1\MPASMS~1\MPASMWIN.exe" and contains no spaces. Please try setting the path using the "." button and let us know what happens. Irrespective of that I still could not link the code because the target type is not specified in the mplink command line. Looks like Microchip have changes there command line arguments to MPLINK so that it needs to know the target device, and we have not kept up. Work Around As a work around i created a batch file to do the assembly, linking and conversion to hex file. The batch file I placed in the project folder. This batch file can't be invoked by placing it in the assembler command line because this some other stuff other than just assembling, ie it also invokes mplink and mp2hex. BTW I tried this with MPLAB V8.66. I invoke this batch file by placing the command line to it in used this in the Setting->Options->Tools-> Programmer. So to initiate an assembly I have to push the "P" button on the tool bar instead of the "A" button. After the assembly is complete you can enter the debugger as normal. Attached is my batch file. I hope that helps. Regards Dave assemble.zip
  14. Dave

    Problem With Petit Fat File System

    tom 2007, The problems you see seems to be that the software stack used for variables does handle recursion as intended, that is as you found other variables on the software stack can become corrupted. This is not meant to happen. But even if that did work recursion as intended there is still a problem, that is a recursive function call will over right its arguments and local variables. With a correctly crafted function this isn't necessarily an issue. The answer will be to separate out the code in send_cmd into two funtions, something along the lines of: unsigned char send_cmd (BYTE cmd,DWORD arg){ unsigned char res; FATFS * fs = pf_fatfs(); if (cmd & 0x80) { /* ACMD<n> is the command sequense of CMD55-CMD<n> */ cmd &= 0x7F; res = send_cmdxxx(CMD55, 0); if (res > 1) return res; } return send_cmdxxx( cmd ); } unsigned char send_cmdxxx (BYTE cmd,DWORD arg){ BYTE n; unsigned char res; FATFS * fs = pf_fatfs(); pff_select(); /* Send a command packet */ xmit_spi(cmd); /* Start + Command index */ xmit_spi((BYTE)(arg >> 24)); /* Argument[31..24] */ xmit_spi((BYTE)(arg >> 16)); /* Argument[23..16] */ xmit_spi((BYTE)(arg >> 8)); /* Argument[15..8] */ xmit_spi((BYTE)arg); /* Argument[7..0] */ n = 0x01; /* Dummy CRC + Stop */ if (cmd == CMD0) n = 0x95; /* Valid CRC for CMD0(0) */ if (cmd == CMD8) n = 0x87; /* Valid CRC for CMD8(0x1AA) */ xmit_spi(n); /* Receive a command response */ n = 10; /* Wait for a valid response in timeout of 10 attempts */ do { res = rcv_spi(); } while ((res & 0x80) && --n); serial_send_string("fatent in send_cmd:"); serial_send_long(fs->n_fatent); serial_send_string("\r\n"); return res; /* Return with the response value */ } I hope that helps. Regards Dave
  15. Dave

    Problem With Petit Fat File System

    tom 2007, Send us the bad project and we can take a look, send project to support@sourceboost.com. Regards Dave
  16. Dave

    Problem With Petit Fat File System

    tom 2007, These do sound like compiler bugs.Please try BoostC V7.04. If you still have the same issues it would be good if you can provide a simple project that demonstrates the issues and can be run under the SourceBoost IDE debugger/simulator, then we should be able to help. Regards Dave
  17. HP-65, I have tried this and don't see a problem. Please check that you have exactly the same goodies.exe file I have: File Size: 757,760 bytes Date modified: 08 July 2011, 08:39:24 Regards Dave
  18. Missing library - Add Libc.pic16.lib to the mplab project. Regards Dave
  19. Dave


    sdx, I agree this is not good.This subject is one that comes up from time to time, but its not one that is easily to do hence its still on the todo list. Regards Dave
  20. 'JMoore' Sadly this is a current limitation with MPLAB integration. Function overloading, function template and Novo RTOS are two unique features that are worth looking at. The BoostC compiler/linker handles bank switching for you. Regards Dave
  21. Dave

    Unresolved External Function

    TCroft4, Are you building a custom version of the library or linking in a supplied version? Ether way this error means that linked can't find this function. Regards Dave
  22. Hi all, V7.04 of the SourceBoost Package is now available: Key changes: 1) Novo RTOS Bug - Sleeping task sleeps much longer than expected when two tasks awake at the same time. 2) IDE - Fixed multiple workspace and project handling issues introduced in V7.03 http://www.sourceboost.com/CommonDownload.html Regards Dave
  23. Mike Webb, I just tried MPLAB V8.73a (appears as V8.73.00.00 under menu Help -> About MPLAB IDE) on a totally clean installation on Windows XP.1) Installed MPLAB V8.73a 2) Installed SourceBoost package V7.04. 3) Setup tool suite locations in MPLAB. 4) Created a new project in MPLAB. 5) Added a source file to the project. 6) Compiled project with success. 7) Single stepped project in MPLAB running MPLAB SIM, watching variables change value. So it all worked for me with SB V7.04. Regards Dave
  24. JMoore, What are setjmp/longjmp used for ? Regards Dave
  25. Dave

    C File Dissapears From Sourceboostide Workspace

    Hi All, SourceBoost V7.04 (now released) should fix these issues. Regards Dave