Lee kah Joo

How To Extend the Memory Space if program exceed 64K, using the M9S12NE64?

Discussion created by Lee kah Joo on Mar 8, 2006
Latest reply on Apr 10, 2006 by Jeff Smith
Hi,
 
  Currently I'm testing and learnign using the M9S12NE64 MCU and with the EVB9S12NE64. I've study how to use the function on the MCU since last time I'm using PIC18F. Currently, I want to learn how to used the Ethernet function built inside the MCU. So, I've to step by step to try the demo program download from the FreeScale Website.
 
  I've add the LCD function into the proram and compile it. But when I add the another function which to show the IP address, as highligted below, then the compiler show the bellowing error:"Out of allocation space in segment ROM_PAGE3D at address 0x3DBFD2" , So what could be the reason of  this error? Will it be when I added the extran LCD function, then the program exceed 64K? I'm using EVB9S12NE64 to learn how to use the MCU, can this board extend the size of the Flash instead of 64K?
 
 
 
void main(void)
{
 INT16 len;
 
 char Buff[32];
 
/*
*        Step 1: Intialize CRG, SCI, EMAC, and EPHY
*  Main Loop: Process Recieved Packets
*        
*       
* NOTE.- THIS EXAMPLE IS BUILD WITH THE FOLLOWING CONFIGURATIONS (see ne64config.h)*
*
*  WORD_ACCESS    1 - use word access
*  ZERO_COPY      1 - use zero copy  
*  RX_POLL_MODE   0 - use buffer interrupts
*/
 /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
 PE_low_level_init();
 /*** End of Processor Expert internal initialization.                    ***/
 /* IP address */
 localmachine.localip = *((UINT32 *)ip_address);
 /* Default gateway */
 localmachine.defgw   = *((UINT32 *)ip_gateway);
 /* Subnet mask */
 localmachine.netmask = *((UINT32 *)ip_netmask);
 /* Ethernet (MAC) address */
 localmachine.localHW[0] = hard_addr[0];
 localmachine.localHW[1] = hard_addr[1];
 localmachine.localHW[2] = hard_addr[2];
 localmachine.localHW[3] = hard_addr[3];
 localmachine.localHW[4] = hard_addr[4];
 localmachine.localHW[5] = hard_addr[5];
 /* Init system services  */   
 timer_pool_init();  
 /* Initialize all buffer descriptors */
 mBufInit ();
 /*interrupts can be enabled AFTER timer pool has been initialized */
  /* Initialize all network layers */
 EtherInit();
  __asm CLI;     /* Enable Interrupts */
 #if USE_EXTBUS
     ExternalBusCfg();
 #endif    
 arp_init();
 (void)udp_init();
 (void)tcp_init();
  /* Initialize applications */   
 (void)https_init ();
 // THIS FUNCTION IS NOT NEEDED FOR EXAMPLE 2 smtpc_init ();
 (void)udp_demo_init();

 /* Add user application init code here */
 MyAppInit();
 
 LCDInit();
 
 for (;:smileywink:  /* do forever */
 {       
#if USE_SWLED
   UseSWLedRun();
#endif
  if (gotlink) {
    LCDPuts_Line1(" Ethernet Was Connected ");
    1- sprintf(Buff,"IP = %d",ip_address);  //When Add this two line the compiler show's error...
     2- LCDPuts_Line2(Buff);  
   //LCDPuts_Line2("Please Proceed The Work!");
  
- if not add two function above, the compiler won't show error...
    
     /* Try to receive Ethernet Frame */     
    if( NETWORK_CHECK_IF_RECEIVED() == TRUE ) 
   {      
      switch( received_frame.protocol)
    {             
      case PROTOCOL_ARP:
      process_arp (&received_frame);
         break;
      case PROTOCOL_IP:
       len = process_ip_in(&received_frame);
      if(len < 0)  break;
                 switch (received_ip_packet.protocol)
      {
          case IP_ICMP:
           process_icmp_in (&received_ip_packet, len);
         break;
          case IP_UDP:
                 process_udp_in (&received_ip_packet,len);          
                 break;
         case IP_TCP:
           process_tcp_in (&received_ip_packet, len);    
           break;
          default:
         break;
       }
           break;
    default:
       break;
    }
    /* discard received frame */      
     NETWORK_RECEIVE_END();
   }
   /* Application main loops */
    /* manage arp cache tables */
    arp_manage();    
    /* TCP/IP stack Periodic tasks here... */
     (void)udp_demo_run();
   
   /* manage opened TCP connections (retransmissions, timeouts,...)*/
   tcp_poll();
   https_run ();
   // comment out this function for Example 2 smtpc_run();
  }  // if (gotlink)
   else
   {
       /* Link is DOWN - Add user application code here */
       MyAppNotLinked();
       
       LCDPuts_Line1("Ethernet Was Not Connect");
       LCDPuts_Line2("CAT 5 Cable Not Connect!");

   }   /* if (gotlink) */
 } /* Forever loop */
 
 
 
  In the current world, we would used up many of the Ethernet function in the design application, and currently I'm finding any software that can capture and sending the data to and from the devices, like we can do in the RS232 of sending and reciving the data from the devices. So, can I know where can I get this software? I've found out one which the name is "Ethereal", but it just can capture and cannot sending the data to control the devices. Thanks.
 
 
Regards
 
kahjoo
 
Message Edited by t.dowe on 2009-10-21 12:45 AM

Outcomes