Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Henry

Pages: [1]
1
Hi All,

I am using the Crossworks project with an LPC2468, which is ok so far.
Now I want to put a structure of 0x20 bytes exactly at 0x7DFE0 in FLASH.
The project makes use of a linker script instead of Rowley`s section placement file.

My question is "How can I place the file at this address using a linker script?"


This is what I did up to now:
Modification of the script file uTaskerLPC23XX.ld
1.  FLASH has been reduced and a memory segment has been added
    MEMORY
    {
    FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x0007C000       
                                                                 /* ... */
    STRUANLAGE (rx) :ORIGIN = 0x0007DFE0, LENGTH = 0x20     
                                                                 /* ... */
    }
2.  The section .struanl has been added
    SECTIONS
    {
                                      /* ..... */   
       __struanl_start__ = 0x7DFE0;
       .struanl __struanl_start__ (NOLOAD) :
       {
         *(.struanl .struanl.* .glue_7t .glue_7 .gnu.linkonce.t.*)

       }
       . = ASSERT(__struanl_start__  >= 0x7DFE0 && (__struanl_start__ + SIZEOF(.struanl)) <= 0x7E000 , "error: .struanl is too large to fit in STRURANLAGE memory segment");
                                    /* ....   */

    }


Linking is done without errors.

The structure I would like to locate at 0x7DFE is in StrukturAnlage.c:
    const STRUANLAGE Anlage = {
   ...
   
    }

In the Project Manager at Section Options I changed the Constant Section Name from .rodata to .struanl.
This should be ok. as I have done that before in a project that used a section placement file.
But I suppose that this modification is useless because a linker script is used.

When I load the progamme into the debugger (Crossworks), Anlage is at address 0, not at 0x7DFE0.

I then added an attribute to the structure
  const STRUANLAGE Anlage __attribute__ ((section(".struanl"))) = {
   ...
  }
but the result is the same, i.e. Anlage is located at address 0.

Can anybody tell me what is wrong?

Henry

2
NXPTM LPC2XXX and LPC17XX / Accessing external memory
« on: August 03, 2010, 01:18:33 PM »
Hi,

I am using the Rowley-(LPC2378)-project with the LPC2468-16 OEM board from Embedded Artists.
The problem is that I cannot write to external SDRAM located in the range of 0xA0000000...0xAFFFFFFF.

I have modified the linker script like this, which is similar to a modification for the internal USB RAM, which is ok:
Code: [Select]
MEMORY
{
/*
Some other memory segments here  ....
*/
  EXTERNAL_SDRAM (wx) : ORIGIN = 0xA0000000, LENGTH = 0x02000000  /* für EA-Board hinzugefügt, bss2-Segment am  Dateiende */
}

SECTIONS
{
/*
Some other sections here ....
*/
  __EXTERNAL_SDRAM_segment_start__ = 0xA0000000;              
  __EXTERNAL_SDRAM_segment_end__  =  0xA2000000;
/*----------------------------------------------------------------*/
  __bss2_load_start__ = ALIGN(__EXTERNAL_SDRAM_segment_start__ , 4);
  .bss2 ALIGN(__EXTERNAL_SDRAM_segment_start__ , 4) (NOLOAD) :
  {
    __bss2_start__ = .;
    *(.bss2 .bss2.* .gnu.linkonce.b.*) *(COMMON)
  }
  __bss2_end__ = __bss2_start__ + SIZEOF(.bss2);

  . = ASSERT(__bss2_end__ <= __EXTERNAL_SDRAM_segment_end__ && __bss2_end__ >= (__EXTERNAL_SDRAM_segment_start__) , "error: .bss2 is too large to fit in EXTERNAL_SDRAM memory segment");

}


Are additional considerations required for external memory?

While the structures / buffers are assigned to the correct memory range, it is not possible to write to that memory.
I suppose that the reason for this has something to do with the specific project, because there is another project (ARM, not THUMB mode) which does fine.

Does anybody know how to solve this problem?

Regards,

Henry

3
Hello,

when I try to load the uTasker project using Crossworks, normally the messages
  "LIBMEM RPC loader has not initialized correctly" or sometimes
  "Loader is not a LIBMEM RPC loader"
show up.

I am using
  CrossStudio 2.0.3,
  Configuration THUMB FLASH DEBUG + some modifications
  OLIMEX ARM-USB-OCD

Sometimes the application can be loaded after the RESET button on the board has been pressed. But normally the only solution is to load a hex-file (created from the same project) with FlashMagic and run it.
After that my application can be loaded once by the Crossworks debugger and so on.

I have another application (configuration ARM RAM DEBUG, not uTasker) that loads over and over again (once I have managed to load it). So I suppose the problem has something to do with my application.

Does anybody know where to start solving this problem?

Regards,
Henry

Pages: [1]