about th EMAC DMA Descriptor memory

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

about th EMAC DMA Descriptor memory

1,173 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jasonliao on Sun Oct 03 07:48:51 MST 2010
[SIZE=2]Hi all,[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]Is lpc1768 EMAC DMA Descriptor have to assign in AHB32 memory section?:confused:[/SIZE]
[SIZE=2]If yes, how to assign the buffer to AHB32 in LPCXpresso (code-red IDE)?[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]best rgds,[/SIZE]
[SIZE=2]Jason[/SIZE]
0 Kudos
Reply
7 Replies

1,093 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Oct 08 07:05:36 MST 2010
You need to use the (NOLOAD) attribute on you new sections:

.AHB1 (NOLOAD) :
{
*(.AHB1*)
} > AHBRAM1

.AHB0 (NOLOAD):
{
*(.AHB0*)
} > AHBRAM0
0 Kudos
Reply

1,093 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jasonliao on Fri Oct 08 06:41:03 MST 2010
[FONT=Arial][SIZE=2]my linkscript as below:[/SIZE][/FONT]
[FONT=Arial][SIZE=2][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]GROUP(libcr_nohost.a libcr_c.a libcr_eabihelpers.a)[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]MEMORY
{
  /* Define each memory region */
  MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x80000 /* 512k */
  RamLoc32 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x8000 /* 32k */
  AHBRAM0  (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x4000
  AHBRAM1  (rwx) : ORIGIN = 0x20080000, LENGTH = 0x4000
  CANAccFilterRAM (rwx) : ORIGIN = 0x40038000, LENGTH = 0x800 /* 2k */[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]}
  /* Define a symbol for the top of each memory region */
  __top_MFlash512 = 0x0 + 0x80000;
  __top_RamLoc32 = 0x10000000 + 0x8000;
  __top_AHBRAM0 = 0x2007c000 + 0x4000;
  __top_AHBRAM1 = 0x20080000 + 0x4000;
  __top_CANAccFilterRAM = 0x40038000 + 0x800;[/COLOR][/SIZE][/FONT]

[FONT=Arial Narrow][SIZE=2][COLOR=blue]ENTRY(ResetISR)[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]SECTIONS
{
.text :
{
  KEEP(*(.isr_vector))
  *(.text*)
  *(.rodata*)[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] } > MFlash512[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] 
.ARM.extab :
{
  *(.ARM.extab* .gnu.linkonce.armextab.*)
} > MFlash512[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] __exidx_start = .;
.ARM.exidx :
{
  *(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > MFlash512
__exidx_end = .;[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] _etext = .;
 
.data :
{
  _data = .;
  *(vtable)
  *(.data*)
  _edata = .;
} > RamLoc32 AT>MFlash512[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] /* zero initialized data */
.bss :
{
  _bss = .;
  *(.bss*)
  *(COMMON)
  _ebss = .;
} > RamLoc32

/* Where we put the heap with cr_clib */
.cr_heap :
{
  end = .;
  _pvHeapStart = .;
} > RamLoc32

_vRamTop = __top_RamLoc32 ;
_vStackTop = _vRamTop - 16;

.AHB1 :
{
  *(.AHB1*)
} > AHBRAM1

.AHB0 :
{
  *(.AHB0*)
} > AHBRAM0

}
[/COLOR][/SIZE][/FONT]
0 Kudos
Reply

1,093 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Oct 08 03:24:09 MST 2010
And your linker script is ..... ????
0 Kudos
Reply

1,093 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jasonliao on Fri Oct 08 03:22:23 MST 2010
[FONT=Arial][SIZE=2]Hi,[/SIZE][/FONT]
[FONT=Arial][SIZE=2][/SIZE][/FONT]
[FONT=Arial][SIZE=2]:oMy mean:[/SIZE][/FONT]
[FONT=Arial][SIZE=2]If I use the [COLOR=blue]__attribute__ ((section(".AHB1")))[/COLOR] then create a binary file (by arm-none-eabi-objcopy). [/SIZE][/FONT]
[FONT=Arial][SIZE=2]Both code & data will be fill into the binary file.[/SIZE][/FONT]
[FONT=Arial][SIZE=2]I also create the iHex file, I can see the address 0x00000000~0x2008xxxx in the hex file. [/SIZE][/FONT]
[FONT=Arial][SIZE=2][/SIZE][/FONT]
[SIZE=2]So, the binary or hex will become to big size file....[/SIZE]
[SIZE=2][/SIZE]
0 Kudos
Reply

1,093 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Oct 05 08:46:46 MST 2010
Sorry, I am not sure I understand what you are saying.

Can you provide a more detailed description of what you have done and what behaviour you then see? Preferably include an example project that can be built to show up the problem.

Regards,
CodeRedSupport
0 Kudos
Reply

1,093 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jasonliao on Tue Oct 05 08:40:15 MST 2010
[FONT=Arial][SIZE=2]Thank you:).[/SIZE][/FONT]
[FONT=Arial][SIZE=2][/SIZE][/FONT]
[FONT=Arial][SIZE=2]But, I will got a big size (512KB) binary file by the binary utilites[/SIZE][/FONT]
[FONT=Arial][SIZE=2]when I assign the AHB memory section for the DMA. :([/SIZE][/FONT]
[FONT=Arial][SIZE=2][/SIZE][/FONT]
[FONT=Arial][SIZE=2]best rgds,[/SIZE][/FONT]
[FONT=Arial][SIZE=2]Jason[/SIZE][/FONT]
0 Kudos
Reply

1,093 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Oct 04 00:56:54 MST 2010
I'm not an expert on the LPC17 ethernet, but my reading of the user manual is that if you want to use the DMA, then this has to be to the AHB RAM.

If you want to assign actual program variables into the AHB RAM, then take a look at:

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

Alternatively, if you look at the uIP port provided in the RDB1768 examples that ship with LPCXpresso, you can see that this sets up DMA by simply using pointers into the AHM RAM. You can view the NXP application note that the RDB1768 port is based on at:

http://ics.nxp.com/support/documents/microcontrollers/?search=uip&Search.x=0&Search.y=0

[RDB1768 is Code Red's own LPC1768 based development board]

Regards,
CodeRedSupport
0 Kudos
Reply