Unresolved Breakpoint

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

Unresolved Breakpoint

779 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 02:42:58 MST 2010
Hi,

First of all to describe my configuration. I am using a LPCxpresso board to debug with an LPC2362 CPU. I implemented a software which was written in Keil. Till Friday it did work in debug mode. I am running the LPCxpresso version 3.3.4. I know in this version was an error in the linker file about the RAM adress. So I changed this file and I am using my own. I don't know if this problem is solved in newer versions.

Now I have a problem with all of my breakpoints. Even if I place the first one in the first line of my main() loop. The debugger doesn't stop at the breakpoints and only shows a warning "Unresolved Breakpoints".

I also found an old thread here and followed the advice to remove the *.launch files.
No ne result!(Is there something more about it?)

The strange thing is I was debugging successfully on friday with working breakpoints and didn't change much. I just can't find the problem. And I don't think I changed something that important that the breakpoints are not working. But it seems to be the case.

I am grateful for any suggestions.

Regards

Florian
0 Kudos
16 Replies

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Thu Dec 02 06:05:40 MST 2010
Hello,
after a few plays with the optimzation and deleting the .launch and debug files and additonally changing the workspace it worked.

Thanks for your help!
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Dec 01 02:28:47 MST 2010
There is nothing obvious in your compiler/linker options that might be the cause of problems.

Can you confirm if you still fail to stop at main and see the "unresolved breakpoints" warning when you load your image in LPCXpresso 3.5.6?

If you do, can you please try the following:
Delete the *.launch files from within the project, plus the Debug and Release folders.
Select your project in the Project Explorer view and then use [FONT=Courier New][SIZE=1]Quickstart Panel -> Import and Export -> Export projects to Archive[/SIZE][/FONT] to export your project into a ZIP file.
Now select [FONT=Courier New][SIZE=1]File -> Switch Workspace[/SIZE][/FONT] and switch to a new workspace.
Now use  [FONT=Courier New][SIZE=1]Quickstart Panel -> Import Example Projects[/SIZE][/FONT] to load your project into the new workspace.

Now build and debug your project. Do you still see the same problem?

If you do, then please change the compiler optimisation level for the project from -O1 to -O0. Again do you still see the problem?

Regards,
CodeRedSupport
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Wed Dec 01 02:09:03 MST 2010
Thanks!

I thought I already changed the linker skript to be managed because of the reason you wrote below. But it wasn't. So it's back working now.

The reason I have an own startup file is that I implemented a project from the Keil IDE, so I had to change some things. But it is some time ago since I did and i can't remember what to change... .  The time I implemented the software it was the case, that the standart startup file didn't work.

Did you see anything in the compiler options below?

Thanks
Florian
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Dec 01 01:51:08 MST 2010
These symbols are created by the linker from the linker script. If they are not being found, this suggests that your modified linker script is not being picked up for some reason.

As the only reason you appeared to be using your own linker script was to work around a memory size issue which has long been fixed, I would suggest that you turn on the managed linker script mechanism and see if the autogenerated script then works.

[It might also be worth replacing your startup file from the one generated when you first created your project with the one that is generated by LPCXpresso 3.5.6. The easiest way to do this is to create a new project for your MCU with the project wizard, then copy the startup file from the new project across to your main project.]

Regards,
CodeRedSupport
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Wed Dec 01 01:46:55 MST 2010
Here the code from
1. Linker Skript
2. Lib.ld
3. mem.ld

In the attached file.
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Wed Dec 01 01:43:04 MST 2010
Hello,
since I installed the new LPCxpresso IDE(3.5.6) the startup file doesn't work anymore. The error which occurs tells, that the reference to the following are undefined.
`_vStackTop'
`_data'
`_bss'
`_ebss'

Any suggestions?

Thanks
Florian
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 07:16:34 MST 2010
I think you don't need the whole file. Just the different lines with options. And I don't want to attach the whole file if I don't need to.
I hope that is enough.

[U][B]Statup file:[/B][/U]
Building file: ../startup/LPC2300new.s
Invoking: MCU Assembler
arm-none-eabi-gcc -c -x assembler-with-cpp -DDEBUG -D__CODE_RED -g3 -mcpu=arm7tdmi -o"startup/LPC2300new.o" "../startup/LPC2300new.s"
Finished building: ../startup/LPC2300new.s

[U][B]All C-Files:[/B][/U]
Invoking: MCU C Compiler
arm-none-eabi-gcc -DDEBUG -D__CODE_RED -O1 -g -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=arm7tdmi -D__REDLIB__ -MMD -MP -MF"startup/target.d" -MT"startup/target.d" -o"startup/target.o" "../startup/target.c"
Finished building: ../startup/target.c

[U][B]*.axf file:[/B][/U]
Building target: test.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map=test.map -mcpu=arm7tdmi -T "..\mylinkerskripts\Debug.ld" -o"test.axf"  [U]allFiles.o[/U]
Finished building target: test.axf

[U][B]binary file:[/B][/U]
make --no-print-directory post-build
Performing post-build steps
arm-none-eabi-size test.axf; # arm-none-eabi-objcopy -O binary test.axf test.bin ; checksum -d test.bin;
   text       data        bss        dec        hex    filename
  65752         12      24588      90352      160f0    test.axf

Thanks
Florian
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 06:53:29 MST 2010
I also found the linker.map file. I don't think there was anything discarded. But how would it look if it would be. And would it be in the beginning? ( This file is quite long)

Thanks
Florian
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Nov 30 06:52:06 MST 2010
Using an old version of the tools is certainly not going to help. There is some information on installing a new version in parallel to your existing installation that you may find helpful here:

http://support.code-red-tech.com/CodeRedWiki/MultipleInstallations

Anyway, please can you:

[LIST]
[*]Select the Console view and ensure the C-Build console is being shown. Right click on the console and choose "Clear".
[*]Select your project in the Project Explorer view
[*]Click on "Clean <project_name>" in the Quickstart view
[*]Click on "Build <project_name>" in the Quickstart view
[*]Go back to the C-Build console, press Ctrl-A to select all, Ctrl-C to copy, then paste the clipboard into a text editor.
[/LIST]
Now save the build log into a file, and attach it to this thread.

This will enable us to see ALL of the options that are being used to build your project.

Regards,
CodeRedSupport.
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 06:44:36 MST 2010
In the meantime I have let the IDE generate a new linker skript. And changed just the RAM size( from 8 to 32) in the mem.lib. I think then you get completely the file I posted before.

Thanks
Florian
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 06:29:10 MST 2010
Moved to an attached file
[B][/B]
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 06:24:49 MST 2010
Optimization options: Optimization: (-O1)
                                Debugging (-g)

I am using my own Linker skript. Reason: LPCxpresso v3.3.4 has an error on the memory adressing of the LPC2362. Maybe I should install the newest version and use the generated. I will post it extra. Soyou have a better overview.
The linker file I will post is some time older so maybe there is the error.

I am nearly a beginner with this IDE and I didn't work with it a few month so I didn't need a linker map yet an don`t know how to find it.
Also which compilation options do you mean(and where to find them)?

Thanks Florian
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Nov 30 03:56:37 MST 2010
*Exactly* which optimization options are you using? Also, are you using the standard (managed) linker script, or are you providing your own. If you are using your own, please post it, together with your compilation options.

I also suggest you look in your linker map to see whether the linker has discarded or inlined your functions.
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 03:36:03 MST 2010
The code is to complex to post. And I think I am not allowed to post it.

But I am only calling functions from my main().
The main looks like:

main()
{
init();//initializes the used hardware ...

while (1)
  {
   OperationCodeFunction()
  }
}

Even if I place the breakpoint at the function call init() the breakpoint is unresolved. (With the other Optimization options)

Thanks
Florian
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Nov 30 03:16:44 MST 2010
This is likely to be caused by the optimizer discarding the code on which you were trying to set the breakpoint. The most common cause of this is when you fail to declare variables as "volatile" when they should be, and thus the compiler sees that the code has no effect and discards it.

Perhaps you could post the code around the 'failed' breakpoint (including the definition of any variables used) and we can confirm this.
0 Kudos

759 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elm on Tue Nov 30 03:09:04 MST 2010
The problem had to do with some changes in the Optimization for speed and size.
I tried a few different and now I am not having that problem anymore.
Does someone know the reason for that?

Thanks
Florian
0 Kudos