Unresolved breakpoints

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unresolved breakpoints

813 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Mon May 23 15:53:21 MST 2011
Hello, I´m having a problem with the inclusion of code libraries.
I configured my workspace to include 3 libraries to work with.
I configured them through the project properties menu, in the "Directories" and "Libraries" tabs (as you can see in the images atached).
Then, I coded a small main() function to test the gpio library. The problem is that I can use the gpio functions from the library. If I set a breakpoint in any function of the "lpc17xx_gpio.c" file I get the "unresolved breakpoint" message.
Then I tried to set a breakpoint in other library, the "task.c" file within the FreeRTOS library, and I get the same error message.
Please, I will appreciate any help you can give me. I´m dealing with this since a few hours ago and I coudn´t make it work.

Best regards,
Fernando
0 Kudos
Reply
13 Replies

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Wed May 25 13:43:15 MST 2011
Larry,

The led finally is blinking. Thanks again.
I´m attaching the library. Post a message once you download it, so I can erase it.

Regards,
Fernando
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Tue May 24 16:46:01 MST 2011

Quote: Fernando
Thanks Larry for have taken the time to watch the code.



You are welcome Fernando.

Did it blink?  If it did I will delete the attachment.

Where did you get this driver library from?  Do you have a URL?
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Tue May 24 14:46:37 MST 2011
Thanks Larry for have taken the time to watch the code.
I´m really sory it was my stupid mistake. I´m used to the LPC13 library that works slightly different.
Thanks to all who posted in response to my problem too.

Best regards,
Fernando
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Tue May 24 11:48:53 MST 2011

Quote: Fernando
...[I], but I want to use Embedded Artist�s library.[/I]



Hi Fernando,

That was put together by NXP and not Embedded Artists.

All the driver functions that you are calling in your code seem to do repetitious checks to see what port you are writing to and assigning a pointer to it each time.  Study what the other driver functions for other peripherals are doing and you will see that they are not so efficient.

I think you will find that using the hardware device registers directly will allow you to better understand what is happening in your code.  It will produce more efficient code and will be easier for you to maintain.
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Tue May 24 04:12:18 MST 2011
Thanks a lot Larry. I really appreciate your help.
I will try to run the project when i come home after work.

Best regards,
Fernando Mondello
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Mon May 23 22:37:56 MST 2011
Hi Fernando,

You had -llibCMSISv1_p30_lpc17xx and -llibDrivers_LPC17xx in settings->MCU Linker->libraries.

They should be -lCMSISv1_p30_lpc17xx and -lDrivers_LPC17xx.

I changed them and built the project.  The breakpoints work fine now.:)

Also you need to look at the parameter definitions for the calls to the peripheral functions.  They are not defined the way you used them.  Take a look at main.c to see the changes I made.  I added delay loops so you could see the led blink.  Yes it blinks now.:)

I am attaching the fixed project code here.  I suggest you open a new workspace.  Then import CMSISv1_p30_lpc17xx and Fernando.zip into the new workspace.  This is in case there are problems with your old workspace or in case I made a mistake.

Please let me know when you have downloaded, successfully imported, and run the project and I will delete this attachment.  You will probably want to delete your attachment above at that time too.

If you have any questions just ask.

Good Luck,
Larry
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Mon May 23 20:35:02 MST 2011
Hello Larry,

I´m attaching the zip file. I don´t know what I´ve touched, but now there is a compiler error asking for a library that is already configured, so it´s only getting worst !!

Best regards,
Fernando
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Mon May 23 19:56:59 MST 2011
Hi Fernando,

If there is nothing proprietary in your project export everything to a .zip and post it here.  We can try to see if there is something obvious that you may have missed.

Larry
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Mon May 23 19:46:17 MST 2011
I´m still trying to make it work, but it´s impossible.
The strange thing is that the compiler doesn´t complain about the functions included in main() from "lpc17xx_gpio.h", but they don´t work.
Please, any help from CodeRedSupport it will help a lot.

Best regards.
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Mon May 23 19:08:33 MST 2011
Yes, they are added, but it still doesn´t work.
0 Kudos
Reply

802 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by atomicdog on Mon May 23 17:36:39 MST 2011
have you added the library file projects as "project references" to your main project?
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fernando on Mon May 23 17:26:01 MST 2011
Thanks Rob, as you noticed, the problem is that [I]I CAN´T use the library functions.
Also I forgot to upload the images. The optimizations are turned off (-O0).
The program works accesing directly to the hardware registers, but I want to use Embedded Artist´s library.
I don´t know where the problem is. I have another project running from a LPC1343 and it works fine. The thing is that I cant make it work for the LPC1769. The examples work, but not my project.

Best regards,
Fernando
[/I]
0 Kudos
Reply

803 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon May 23 16:33:46 MST 2011

Quote: Fernando
The problem is that I can use the gpio functions from the library.



Ah, yes - I see how that can be a problem

All fun aside: what exactly have you set in your projects?
To do proper debugging it is advisable to set Optimizations to None (in project properties - C/C++ Build - Settings) for all libraries and the main project.
And remove the "--gc-sections" from the linker options in your main project. This option may give strange results while debugging. Somehow it is possible that the debugging information in the .axf file is not in line with the real code anymore - I've seen erratic jumps through my source files while single stepping that was not following the normal program flow.

You could try a simple I/O toggle without using the library:
static void LedToggleTask( void *pvParameters )
{
    static unsigned long ulLEDState = 1;

    for( ;; )
    {
        vTaskDelay(500);

        /* Turn the LED off if it was on, and on if it was off. */

        ulLEDState = !ulLEDState;
        LPC_GPIO0->MASKED_ACCESS[ ( 1 << mainLED_BIT) ] = ( ulLEDState << mainLED_BIT );
    }
}

int main(void) {
    
    /* Set the LPCXpresso LPC13xx LED port to output. */
    LPC_GPIO0->DIR |= ( 0x1 << mainLED_BIT );

    xTaskCreate(LedToggleTask, "LED", 100, NULL, 2, NULL);
    
    vTaskStartScheduler();

    for(;;) ;
}


If your code does not run, or does not seem to run, pause debugging and you will see if it went wrong. If you got stuck in the fault handler interrupt (on a while(1); ) you most likely made a mistake like returning from your tasks function (it should be an infinite loop) or a too small stack. Or you just have a too small heap size (defined in FreeRTOSConfig.h).
Set configCHECK_FOR_STACK_OVERFLOW and configUSE_MALLOC_FAILED_HOOK to 1 in order to have FreeRTOS check on this.

Rob
0 Kudos
Reply