Jump to content

Dave

Administrators
  • Content Count

    2,046
  • Joined

  • Last visited

Posts posted by Dave


  1. tom 2007,

     

    Hello,

     

    For my project I need to be able to use large arrays (512 bytes). So i'm trying to compile it with -idx 2 option but i always get 2 unresolved external functions:

     

    "D:\program files\SourceBoost\boostlink_pic.exe"  -idx 2  /ld "D:\program files\SourceBoost\lib\large" libc.pic18.lib
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external function:'strncpy16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external symbol, function:strncpy16
    Error: Unresolved external function:'strncmp16(unsigned char*,unsigned char*,unsigned char)'
    Error: Unresolved external symbol, function:strncmp16
    1> 1> BoostLink Optimizing Linker Version 7.04

     

    I'm compiling from the IDE and have checked 'memory model: large' in settings->options menu.

    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


  2. djace,

    Hi,

     

    I am new to this forum and I am reposting this message since last time I put it in the wrong topic .

    I have a PIC16F689 and I am trying to compile the RSA Ansi C library from http://www.di-mgt.com.au/bigdigits.html.

    My compiler build fails since it can not find the : "assert.h" file. I looked in the BostSource installation folder and could not find it.

    Does anyone knows where can I download additional header files for my PIC?

     

    Thanks,

    Ed.

    This header doesn't exist for the BoostC compiler.

    You could make you own with the following contents:

     

    #define _ASSERT( assertArg )

     

    Regards

    Dave


  3. HI I have been using a v6 version of boostc for a few years and until tonight I have had no problems. I have just installed the latest version on my laptop in order to use a PPIC16F1829 part but now I am dead in the water as pp.exe creates and eror every time I try to build my project the line it is running is

     

    Clean: Deleting intermediary and output files.

    Clean: Done.

    Executing: "C:\Program Files (x86)\SourceBoost\boostc_pic16.exe" SER_to_SPI_2.c -O1 -W1 -v -t 16F1829

    BoostC Optimizing C Compiler Version 7.04 (for PIC16 architecture)

    http://www.sourceboost.com

    Copyright© 2004-2011 Pavel Baranov

    Copyright© 2004-2011 David Hobday

     

    Single user Lite License (Unregistered) for 0 node(s)

    Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only

     

     

    SER_to_SPI_2.c

    Starting preprocessor: "C:\Program Files (x86)\SourceBoost\pp.exe" SER_to_SPI_2.c -i "C:\Program Files (x86)\SourceBoost\include" -d _PIC16F1829 -la -c2 -o SER_to_SPI_2.pp -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX

     

    Error: preprocessing error

     

    failure

    BUILD FAILED: Wed Sep 07 22:21:35 2011

     

    I though this would be a fairly easy exercise but :-( my cource code reads

     

    void main(void) {

    }

     

    I have not bought an upgrade to v7 yet as I thought I would get the thing compiling then upgrade.

     

     

    HELP HELP HELP

     

    ASAP Please

    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


  4. Boostfede,

     

    I have <system.h> included.

     

    I don´t know why I get the "success" message followed by the "build failed" message.

     

    Anyway, the code generated is correct. The uC functions as expected.

    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


  5. Hi

     

     

    Im getting the "build failed" message but It doesn´t show why.

     

     

    main.c

    success

    Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" "C:\Users\16f688\main.obj" "C:\Program Files\SourceBoost\Lib\libc.pic16.lib" -O1 -p "display" -t 16F688

    BoostLink Optimizing Linker Version 6.97

    http://www.sourceboost.com

    Copyright© 2004-2010 Pavel Baranov

    Copyright© 2004-2010 David Hobday

    Optimisation level:1

    Building CASM file

    Memory Usage Report

    ===================

    RAM available:256 bytes, used:11 bytes (4.3%), free:245 bytes (95.7%),

    Heap size:245 bytes, Heap max single alloc:94 bytes

    ROM available:4096 words, used:79 words (2.0%), free:4017 words (98.0%)

    success

    Loaded C:\Users\16f688\display.COF.

    BUILD FAILED

     

     

    I´m using mplab 8.76.

     

    This is the code:

     

    void main() {

     

    set_bit( porta, 0 );

    set_bit( porta, 1 );

    set_bit( portc, 0 );

     

    while(1);

    }

     

     

    Apparently, if I comment the "set_bit" lines, I don´t get the "build failed" error.

     

    I´m having strange problems related boostc and mplab as you can see in another post (pwm).

    Maybe the integration is not ok?

     

    Thanks

    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


  6. Thanks again for your help. Dropping the brackets made my code compile, although this is not how K & R describe using function pointers.
    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.

     

    I'm still getting the warnings mentioned before, though,

    "Coff generation: Internal Warning: Member Var:cmdFunc Unrecognised type id:0x10000BBD"

    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.

     

    and looking at the assembler generated I am not confident the correct values are being written into the array for the function pointers. I can see the ASCII for the strings and the string terminator followed by a single byte that increases in value (from 0x01) for each entry in the array. Any idea what might be causing this, or at least, what it means?
    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


  7. Tony,

     

    I have attached my project snapshot if you need it; the AROStdTypes.h should be placed in the 'include' folder. There must be something fundamentally wrong with the way I am trying to do function pointers.

     

    Functionally, the user enters a command into main, getCmd then searches the commands array for the command string and returns the address of the array element found. The main function then calls the returned command function via the pointer stored in the array. At least this is what's supposed to happen!

     

    Cheers,

    Tony O'Brien.

    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


  8. Tony,

    Hi -

     

    I am running an older version of BoostC (v.6.81) as this is what my work has purchased. I am trying to add a function pointer to a structure but the compiler gives a "Missing right brace" error. As far as I can see there is nothing wrong with the code. Is this a limitation with this version of the compiler? The manual says "pointers can be used in the standard way". The code below is situated in a header file.

     

    typedef struct cmd_S

    {

    void ( *cmdFunc )( char * cmdLinePt );

    char cmdStr[ CMD_STR_MAX_LEN ];

    } cmdStruct;

    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


  9. Sparky1039,

    Simple question. I do I go about performing a conditional compile to code within “void main ()” ?

    For code development I’m switching between two processors, one real hardware, other in Proteus simulation i.e. F67J11 and F67K22 respectively. Proteus lacks a 67J11 model so I’m using the 67K22 as a close substitute for my testing. The biggest difference between the two in my application is how the ADC registers are set up. The “J” part requires writing to a secondary SFR to set the ANCONx registers, where as the “K” part has no secondary SFR but has a 3rd ANCONx register.

    I know #ifdef is applied for things like “pragmas” and such outside void main for conditional compilation, but I’m unsure how to apply a similar process to SFR register config’s within in void main (or other functions). Any explanation would be appreciated.

    thx

    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


  10. trossin,

    Alright. I have not purchashed 7.x yet as I was not able to debug an assembler project on 7.02. So I broke down and tried 7.04 today with a fresh tiny assembler project. I've included how things went below. The bottom line is that I have v8.60 of the MPLAB suite installed on my machine and I am unable to build an assembler project so I can't try to debug it.
    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


  11. 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


  12. tom 2007,

    I can give my project but it will not work in the IDE because it needs to be able to send/receive data on the SPI port with the SD card.

    I've tried changing the project so it runs in the IDE but this requires me to change a lot of stuff then the bug doesn't happen anymore :(

     

    The hardware is very basic: PIC18F4550 + SD card holder connected to the SPI interface and 1 pin for sending debug information to the serial port of the computer...

    Send us the bad project and we can take a look, send project to support@sourceboost.com.

     

    Regards

    Dave


  13. tom 2007,

     

    I'm trying to access an SD card using the Petit FAT File System but it's not really working properly:

     

    First there was this problem in the pf_read() function:

    				
    clst = (fs->fptr == 0) ? /* On the top of the file? */
    fs->org_clust : get_fat(fs->curr_clust);

     

    This didn't work (fs->fptr == 0) equals true but clst remains 0 and fs->org_clust was 250.

    After replacing this code with this:

    if (fs->fptr==0){
    clst = fs->org_clust;
    }else{
    clst = get_fat(fs->curr_clust);
    }

    this line of code finaly started working properly (clst became 250).

     

    Now i still have the problem of the Fat file system structure which is declared as a variable in main() getting corrupt by calling the send_cmd() function:

     

    BYTE send_cmd (BYTE cmd,DWORD arg){
    BYTE n;
    BYTE res;
    
    if (cmd & 0x80) {	/* ACMD<n> is the command sequense of CMD55-CMD<n> */
    	cmd &= 0x7F;
    	res = send_cmd(CMD55, 0);
    	if (res > 1) return res;
    }
    
    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);
    serial_send_string("fat c2:");
    serial_send_long(fs->n_fatent);
    serial_send_string("\r\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);
    
    //up to here there is no problem, nr of clusters = 15546
    return res; //after this line the number of clusters (stored in the fat file system structure in main()) is corrupted (high byte is set to 0)!
    }

     

    the function is called from (disk_readp) like this:

    //no problem with the file system structure (number of clusters is 15546)
    BYTE tmp = send_cmd(CMD17, lba);
    //here the number of clusters has changed to 186 high byte is 0

     

    Has anyone ever had the same problem? I'm not sure if this is a bug in the compiler but because it happens when the send_cmd function returns I don't know what to do anymore :(

    Is there somewhere a working example of boostc and FAT(32) / SD cards?

     

    I'm using boostc 7.03 and PIC18F4550

     

    Thanks a lot

    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


  14. HP-65,

    I just upgraded to 7.04 and (as usual) tried to unpack the library sources and Novotos,

    but goodies.exe crashes with an access violation, right after the license agreement (WinXP, SP3).

    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


  15. Used Software:

    Windows xp-sp3

    MPlab 8.73a

    Sourceboost 7.04

    processor: PIC16F88

     

    C Code:

     

    /* Set 31250Hz clock frequency */

     

    #pragma CLOCK_FREQ 31250

     

    /* Set PIC16 configuration word 1 Internal RC-clock 31250Hz no watchdog no startup-timer*/

    #pragma DATA _CONFIG1, 0x3F38

     

    /* Set PIC16 configuration word 2 */

    #pragma DATA _CONFIG2, 0x3FFC

     

     

    void main (void)

     

    {

     

    // LED Eblock output on PortB

    portb = 0x00 ;

    trisb = 0x00 ;

     

    char a = 0;

    short b = 31995;

    short c = 2133;

     

    a = b / c;

     

    // a = 31995 / 2133

    // a = 15 (= 0b00001111)

     

    portb = a;

     

    while (1){

    }

     

     

    }

     

     

    This piece of code Compiles and links without problems when used in Sourceboost IDE .

     

    When you setup the same project in MPlab8.73a IDE:

    Compiling works without complaining.

    Linking gives the message:

     

    Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" "G:\SourceboostMPlab\sourceboost.obj" -O1 -p "MPlabIDE" -t 16F88

    BoostLink Optimizing Linker Version 7.04

    http://www.sourceboost.com

    Copyright© 2004-2011 Pavel Baranov

    Copyright© 2004-2011 David Hobday

     

     

    Optimisation level:1

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)'

    Error: Unresolved external symbol, function:__div_16_16

     

     

    failure

    Link step failed.

    BUILD FAILED: Wed Aug 03 22:07:02 2011

     

    What can I do to solve this?

     

    Thanks in advance,

     

    Lieuwe

    Missing library - Add Libc.pic16.lib to the mplab project.

     

    Regards

    Dave


  16. sdx,

    ...But while compiling BoostC(for PIC16F and PIC18F targets) fails to identify 'Log10' & 'Log' !...

    seems very disappointing...

    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


  17. 'JMoore'

    First, I have a problem with SourceBoost integration with MPLAB: When I make a change in one file, it recompiles all of them. Since my projects will be fairly large, this can be a nuisance.

     

    Is there something I can change to make it selective in its compile? I have already concluded, for now, that the -X version of MPLAB is not ready enough yet.

    Sadly this is a current limitation with MPLAB integration.

     

    Beyond that, I would be interested in comments on what makes SourceBoost a good choice (not looking for negative comments or I wouldn't post it here). Obviously the price is attractive. Beyond that, what features are more desirable?
    Function overloading, function template and Novo RTOS are two unique features that are worth looking at.

     

    For example, I would prefer to not be bothered with the quirks of the PIC - such as specifying memory banks and other stuff you don't have to sweat on other chips (such as Atmel or Freescale). Does SourceBoost do this in a more automatic manner?
    The BoostC compiler/linker handles bank switching for you.

     

    Regards

    Dave


  18. TCroft4,

    I have copied ( and possibly corrupted) a Novo project and am getting the following linker error. I think I have misplaced something! Any guidance would be welcomed.

     

    Thank

     

    Ted

     

     

    Error: Unresolved external function:'SysiWaitSemaphore(unsigned char,unsigned short)'

    Error: Unresolved external symbol, function:SysiWaitSemaphore

    Error: Unresolved external function:'SysiWaitSemaphore(unsigned char,unsigned short)'

    Error: Unresolved external symbol, function:SysiWaitSemaphore

    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


  19. Mike Webb,

    I have now gone back to MPLAB v8.56 and all is well - very strange.

     

    If anyone else has light to shed on this I would like to know. I will stick with v8.56 for now though!

    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


  20. dion,

    Hi. Why do the breakpoints i set disappear when I enter debug mode? And I then get the "Can't locate source line for..."

    Thanks.

    If there is no target device code is produce for a give line of program the break point will be removed when the debugger is entered.

    For example if a function is not called anywhere in a program no code is generated for it, and so if you try to set a break point on a line in the function that is not called then the breakpoint will be removed when the debugger is entered as there is no actual opcodes and therefore code address to put a breakpoint at.

     

    The "Can't locate source line for..." message is generated if the program execution is paused and the address of the program counter (PC register) points at an address for which the debugger does not have source code, for example if you stop the code execution while it is in the delay_us() function, then you will get this message as no source code actuall exists for this function as it is a special one generated by the linker program when you code is linked.

     

    I hope that helps.

     

    Regards

    Dave

×
×
  • Create New...