LPCXpresso debugger fails when a specifying custom flash sections

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPCXpresso debugger fails when a specifying custom flash sections

2,889件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agrove on Thu May 24 13:07:20 MST 2012
Hello All,

I would like to create a small section of flash at the end of physical memory to store information assigned during manufacturing.  Using the method described on the Enhanced Managed Linker Scripts page (http://support.code-red-tech.com/CodeRedWiki/EnhancedManagedLinkScripts), I reduced the size of the main flash section by 1024 bytes, and created a new flash section called Factory that is 1024 bytes. 

I then created several variables and placed then into my new Factory section and recompiled.  The code compiled without issue and a double check of the .map file confirmed that the variables are placed in the desired location. 

The issue comes when attempting to debug the application.  When I click debug, a pop-up error is displayed with what appears to be a Java exception traceback.  The error message indicates "${project_home}\Release\LPC1227\301.xml" cannot be found.  I have looked in my project directory and in the LPCXpresso install directory and cannot find any file named 301.xml.  The strange thing is, if I remove my flash section definition and references to it and recompile and debug, everything works fine. 

I'm wondering if specifying additional flash sections using the enhanced managed linker script method causes the debugger to look for additional information or something. 

Has anyone else ever seen or experienced this?

I am using the latest LPCXpresso 4.2.2 Build 275 with the Embedded Artists LPC1227 Dev board.

Thanks,

Andrew
0 件の賞賛
返信
10 返答(返信)

2,866件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu May 31 02:30:44 MST 2012
The error that you were seeing loading your project has been fixed in LPCXpresso 4.2.3 which has been released today.

Note though that with LPC11/12/13 it is currently necessary to ensure that the "Factory" section that you create in flash is aligned onto a sector boundary (4K for LPC1227) rather than just on a 1K page boundary - otherwise the flash programmer will not place your data in the right location in flash (this is something we are now investigating for a future release)

Thus you need to place your "Factory" section at 124K rather than 127K as your example currently does.


Regards,
CodeRedSupport
0 件の賞賛
返信

2,866件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue May 29 10:15:27 MST 2012
Thanks for reporting this issue. We have fixed the problem which will be in the next release.
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agrove on Tue May 29 08:16:25 MST 2012
Since the screen shot got mangled during upload and is impossible to read, I've posted a zip file with the same image.

[ATTACH]777[/ATTACH]

Andrew
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agrove on Tue May 29 08:12:17 MST 2012
I have created a very trivial project that uses the LPC1227 and creates a custom flash section at the very top of flash.  I have exported the project in a zip file and have included a screen shot of the error I receive when the debugger fails.  I am using LPCXpresso 4.2.2 Build 275 on Window 7 64bit with admin rights if that helps.

Regards,

Andrew

[ATTACH]775[/ATTACH]

[ATTACH]776[/ATTACH]
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sat May 26 09:09:52 MST 2012

Quote: agrove
Well, I can't speak for wdawson61, but I would like to know if the enhanced managed linker scripts is a broken feature.



As far as we are aware, no it isn't.

But if you want someone to take a look at the issues that you are experiencing here, then you really need to post as much of your project as you are prepared to provide.

Preferably a buildable example that shows up the problem you are seeing...

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

But certainly the linker script template that you are using, the map file generated by the linker, the definitions of the variables that you are placing into your flash, and preferably the axe file generated by your build.

Regards,
CodeRedSupport
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wdawson61 on Fri May 25 15:16:18 MST 2012
I was able to use the technique described here to get my version info at a fixed location in the binary file.

http://knowledgebase.nxp.com/showthread.php?t=1537&highlight=link_template.ld

Hope it helps1
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agrove on Fri May 25 13:09:52 MST 2012
Well, I can't speak for wdawson61, but I would like to know if the enhanced managed linker scripts is a broken feature.  If I cannot find a solution to my problem them I will certainly use the manual method.  However, the enhanced managed linker script should allow me to easily create sections and reduce the number of configuration files I have to manage myself.  Which is usually a good thing.

Andrew
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri May 25 12:32:32 MST 2012
What's so difficult there?

#1 Disable managed linker script

#2 Create a new folder ("linker") and copy managed linker script files into it

#3 Change linker script name and script path settings

#4 Open your ld file, copy crp stuff and rename it ("version")

        *(.after_vectors*)
        
        /* Code Read Protect data */
        . = 0x000002FC ;
        PROVIDE(__CRP_WORD_START__ = .) ;
        KEEP(*(.crp))
        PROVIDE(__CRP_WORD_END__ = .) ;
        ASSERT(!(__CRP_WORD_START__ == __CRP_WORD_END__), "Linker CRP Enabled, but no CRP_WORD provided within application");

[COLOR=Red]//RED = NEW
        PROVIDE(__VERSION_WORD_START__ = .) ;
        KEEP(*(.version))
        PROVIDE(__VERSION_WORD_END__ = .) ;
        ASSERT(!(__VERSION_WORD_START__ == __VERSION_WORD_END__), "Linker VERSION Enabled, but no VERSION_WORD provided within application");[/COLOR]

#5 Add your new VERSION_WORD in your main:
#define __VERSION __attribute__ ((section(".version")))
__VERSION const unsigned int VERSION_WORD = 0x20120525;
#6 Check your map file, if your word is located behind 0x02FC at 0x3000.

#7 Read your new flash word with

 this_version = *((uint32_t*)0x0300);
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agrove on Fri May 25 11:13:29 MST 2012
Unfortunately no, I was hoping some other member of this group or possibly NXP itself would be able to provide some guidance. 

However, I would be very interested to know if you've done this procedure and experienced this error or if your question is merely in the hopes of avoiding this issue altogether.

Regards,

Andrew
0 件の賞賛
返信

2,865件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wdawson61 on Fri May 25 10:59:57 MST 2012
Hi.  Did you ever resolve this?  I'd like to store version info in a fixed location as well.  If resolved, would yo mind sharing what you did to accomplish it?

Thanks, Wade.
0 件の賞賛
返信