MEMORY
{
  imem       : ORIGIN = 0x00400000, LENGTH = 0x00004000  /*   8K    */
  dmem       : ORIGIN = 0x00000000, LENGTH = 0x00002000  /*   8K    */
}

end = 0x7FFFEFFC;
baudrate = 0x0D;
sys_led_port = 0x80000000;
sys_uart_baud = 0x80000009;
sys_uart_stat = 0x80000008;
sys_uart_data = 0x80000004;
sys_timer_sec = 0x80000014;
sys_timer_usec = 0x80000010;

SECTIONS
{
   .stext 0x00400000 :
   {
     *(.stext)
   }  > imem
   
   .ktext 0x00400180 :
   {
     *(.ktext)
   }  > imem

   .text . :
   {
     *(.text)
   }  > imem

   .data 0x00000000 : ALIGN(2)
   {
      *(.rodata*) *(.data) *(.sdata) *(.sbss) *(.kdata)
   }  > dmem

   .bss . :
   {
      *(.bss)
   }  > dmem

   .eh_frame . :
   {
      *(.eh_frame)
   }  > dmem
}
