]> git.sur5r.net Git - freertos/commitdiff
Remove all printf() statements from Kinetis demo as they prevent the code running...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 8 Dec 2011 13:16:34 +0000 (13:16 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 8 Dec 2011 13:16:34 +0000 (13:16 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1653 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_Kinetis_K60_Tower_IAR/Freescale_Code/cpu/arm_cm4.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/Freescale_Code/cpu/start.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/Freescale_Code/cpu/vectors.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/Freescale_Code/drivers/enet/eth_phy.c
Demo/CORTEX_Kinetis_K60_Tower_IAR/main-full.c

index 0e253bcb48ba7b318697379f2ad32fccfb172f81..cda27557277338e865a0948420a75ea62208246d 100644 (file)
@@ -78,12 +78,6 @@ void enable_irq (int irq)
 {\r
     int div;\r
     \r
-    /* Make sure that the IRQ is an allowable number. Right now up to 91 is \r
-     * used.\r
-     */\r
-    if (irq > 91)\r
-        printf("\nERR! Invalid IRQ value passed to enable irq function!\n");\r
-    \r
     /* Determine which of the NVICISERs corresponds to the irq */\r
     div = irq/32;\r
     \r
@@ -119,12 +113,6 @@ void disable_irq (int irq)
 {\r
     int div;\r
     \r
-    /* Make sure that the IRQ is an allowable number. Right now up to 91 is \r
-     * used.\r
-     */\r
-    if (irq > 91)\r
-        printf("\nERR! Invalid IRQ value passed to disable irq function!\n");\r
-    \r
     /* Determine which of the NVICICERs corresponds to the irq */\r
     div = irq/32;\r
     \r
@@ -159,15 +147,6 @@ void set_irq_priority (int irq, int prio)
     /*irq priority pointer*/\r
     uint8 *prio_reg;\r
     \r
-    /* Make sure that the IRQ is an allowable number. Right now up to 91 is \r
-     * used.\r
-     */\r
-    if (irq > 91)\r
-        printf("\nERR! Invalid IRQ value passed to priority irq function!\n");\r
-\r
-    if (prio > 15)\r
-        printf("\nERR! Invalid priority value passed to priority irq function!\n");\r
-    \r
     /* Determine which of the NVICIPx corresponds to the irq */\r
     prio_reg = (uint8 *)(((uint32)&NVICIP0) + irq);\r
     /* Assign priority to IRQ */\r
index d39070b40af3a14e422c4f479757916822ec8d6b..830c1e70b7e88bfbc22c0b0a3116bd6f315cffba 100644 (file)
@@ -29,33 +29,9 @@ void start(void)
        /* Perform processor initialization */\r
        sysinit();\r
         \r
-    printf("\n\n");\r
-       \r
-       /* Determine the last cause(s) of reset */\r
-       if (MC_SRSH & MC_SRSH_SW_MASK)\r
-               printf("Software Reset\n");\r
-       if (MC_SRSH & MC_SRSH_LOCKUP_MASK)\r
-               printf("Core Lockup Event Reset\n");\r
-       if (MC_SRSH & MC_SRSH_JTAG_MASK)\r
-               printf("JTAG Reset\n");\r
-       \r
-       if (MC_SRSL & MC_SRSL_POR_MASK)\r
-               printf("Power-on Reset\n");\r
-       if (MC_SRSL & MC_SRSL_PIN_MASK)\r
-               printf("External Pin Reset\n");\r
-       if (MC_SRSL & MC_SRSL_COP_MASK)\r
-               printf("Watchdog(COP) Reset\n");\r
-       if (MC_SRSL & MC_SRSL_LOC_MASK)\r
-               printf("Loss of Clock Reset\n");\r
-       if (MC_SRSL & MC_SRSL_LVD_MASK)\r
-               printf("Low-voltage Detect Reset\n");\r
-       if (MC_SRSL & MC_SRSL_WAKEUP_MASK)\r
-               printf("LLWU Reset\n"); \r
-       \r
+    /* Determine the flash revision */\r
+    flash_identify();    \r
 \r
-       /* Determine specific Kinetis device and revision */\r
-       cpu_identify();\r
-       \r
        /* Jump to main process */\r
        main();\r
 \r
@@ -63,168 +39,6 @@ void start(void)
        while(1);\r
 }\r
 /********************************************************************/\r
-/*!\r
- * \brief   Kinetis Identify\r
- * \return  None\r
- *\r
- * This is primarly a reporting function that displays information\r
- * about the specific CPU to the default terminal including:\r
- * - Kinetis family\r
- * - package\r
- * - die revision\r
- * - P-flash size\r
- * - Ram size\r
- */\r
-void cpu_identify (void)\r
-{\r
-    /* Determine the Kinetis family */\r
-    switch((SIM_SDID & SIM_SDID_FAMID(0x7))>>SIM_SDID_FAMID_SHIFT) \r
-    {  \r
-       case 0x0:\r
-               printf("\nK10-");\r
-               break;\r
-       case 0x1:\r
-               printf("\nK20-");\r
-               break;\r
-       case 0x2:\r
-               printf("\nK30-");\r
-               break;\r
-       case 0x3:\r
-               printf("\nK40-");\r
-               break;\r
-       case 0x4:\r
-               printf("\nK60-");\r
-               break;\r
-       case 0x5:\r
-               printf("\nK70-");\r
-               break;\r
-       case 0x6:\r
-               printf("\nK50-");\r
-               break;\r
-       case 0x7:\r
-               printf("\nK53-");\r
-               break;\r
-       default:\r
-               printf("\nUnrecognized Kinetis family device.\n");  \r
-               break;          \r
-    }\r
-\r
-    /* Determine the package size */\r
-    switch((SIM_SDID & SIM_SDID_PINID(0xF))>>SIM_SDID_PINID_SHIFT) \r
-    {  \r
-       case 0x2:\r
-               printf("32pin       ");\r
-               break;\r
-       case 0x4:\r
-               printf("48pin       ");\r
-               break;\r
-       case 0x5:\r
-               printf("64pin       ");\r
-               break;\r
-       case 0x6:\r
-               printf("80pin       ");\r
-               break;\r
-       case 0x7:\r
-               printf("81pin       ");\r
-               break;\r
-       case 0x8:\r
-               printf("100pin      ");\r
-               break;\r
-       case 0x9:\r
-               printf("104pin      ");\r
-               break;\r
-       case 0xA:\r
-               printf("144pin      ");\r
-               break;\r
-       case 0xC:\r
-               printf("196pin      ");\r
-               break;\r
-       case 0xE:\r
-               printf("256pin      ");\r
-               break;\r
-       default:\r
-               printf("\nUnrecognized Kinetis package code.      ");  \r
-               break;          \r
-    }                \r
-\r
-    /* Determine the revision ID */\r
-    printf("Silicon rev %d     \n", (SIM_SDID & SIM_SDID_REVID(0xF))>>SIM_SDID_REVID_SHIFT);\r
-    \r
-    \r
-    /* Determine the flash revision */\r
-    flash_identify();    \r
-    \r
-    /* Determine the P-flash size */\r
-    switch((SIM_FCFG1 & SIM_FCFG1_FSIZE(0xFF))>>SIM_FCFG1_FSIZE_SHIFT)\r
-    {\r
-       case 0x0:\r
-               printf("12 kBytes of P-flash    ");\r
-               break;\r
-       case 0x1:\r
-               printf("16 kBytes of P-flash    ");\r
-               break;\r
-       case 0x2:\r
-               printf("32 kBytes of P-flash    ");\r
-               break;\r
-       case 0x3:\r
-               printf("48 kBytes of P-flash    ");\r
-               break;\r
-       case 0x4:\r
-               printf("64 kBytes of P-flash    ");\r
-               break;\r
-       case 0x5:\r
-               printf("96 kBytes of P-flash    ");\r
-               break;\r
-       case 0x6:\r
-               printf("128 kBytes of P-flash   ");\r
-               break;\r
-       case 0x7:\r
-               printf("192 kBytes of P-flash   ");\r
-               break;\r
-       case 0x8:\r
-               printf("256 kBytes of P-flash   ");\r
-               break;\r
-       case 0x9:\r
-               printf("320 kBytes of P-flash   ");\r
-               break;\r
-       case 0xA:\r
-               printf("384 kBytes of P-flash   ");\r
-               break;\r
-       case 0xB:\r
-               printf("448 kBytes of P-flash   ");\r
-               break;\r
-       case 0xC:\r
-               printf("512 kBytes of P-flash   ");\r
-               break;\r
-       case 0xFF:\r
-               printf("Full size P-flash       ");\r
-               break;\r
-               default:\r
-                       printf("ERR!! Undefined P-flash size\n");  \r
-                       break;                  \r
-    }\r
-\r
-    /* Determine the RAM size */\r
-    switch((SIM_SOPT1 & SIM_SOPT1_RAMSIZE(0xF))>>SIM_SOPT1_RAMSIZE_SHIFT)\r
-    {\r
-       case 0x5:\r
-               printf(" 32 kBytes of RAM\n\n");\r
-               break;\r
-       case 0x7:\r
-               printf(" 64 kBytes of RAM\n\n");\r
-               break;\r
-       case 0x8:\r
-               printf(" 96 kBytes of RAM\n\n");\r
-               break;\r
-       case 0x9:\r
-               printf(" 128 kBytes of RAM\n\n");\r
-               break;\r
-               default:\r
-                       printf(" ERR!! Undefined RAM size\n\n");  \r
-                       break;                  \r
-    }\r
-}\r
-/********************************************************************/\r
 /*!\r
  * \brief   flash Identify\r
  * \return  None\r
@@ -253,8 +67,6 @@ void flash_identify (void)
     /* Wait for the command to complete */\r
     while(!(FTFL_FSTAT & FTFL_FSTAT_CCIF_MASK));\r
     \r
-    printf("Flash parameter version %d.%d.%d.%d\n",FTFL_FCCOB4,FTFL_FCCOB5,FTFL_FCCOB6,FTFL_FCCOB7);\r
-\r
     /* Get the flash version ID */   \r
 \r
     /* Write the flash FCCOB registers with the values for a read resource command */\r
@@ -269,8 +81,6 @@ void flash_identify (void)
 \r
     /* Wait for the command to complete */\r
     while(!(FTFL_FSTAT & FTFL_FSTAT_CCIF_MASK));\r
-\r
-    printf("Flash version ID %d.%d.%d.%d\n",FTFL_FCCOB4,FTFL_FCCOB5,FTFL_FCCOB6,FTFL_FCCOB7);  \r
 }\r
 /********************************************************************/\r
 \r
index 8ce4241621fb9015d7d597a4b4f224f161d8350e..2312305dfb351d9ccdf70ff538ba5f98783292c3 100644 (file)
@@ -300,10 +300,7 @@ typedef void (*vector_entry)(void);
 \r
 void default_isr(void)\r
 {\r
-   #define VECTORNUM                     (*(volatile uint8_t*)(0xE000ED04))\r
-\r
-   printf("\n****default_isr entered on vector %d*****\r\n\n",VECTORNUM);\r
-   return;\r
+   for( ;; );\r
 }\r
 /******************************************************************************/\r
 /* End of "vectors.c" */\r
index 6183f50ee4d40a941e66eb2baf81b9950009d4e7..87e6db87cb704e25358941f96335db836998a1a2 100644 (file)
@@ -397,17 +397,10 @@ eth_phy_reg_dump(int ch, int phy_addr)
 {\r
     int j, settings;\r
     \r
-    printf("\n    MII Register Block\n");\r
-    printf("--------------------------------");\r
     for (j = 0; j < 32; j++)\r
     {\r
         mii_read(ch, phy_addr, j, &settings);\r
-        if (!(j % 4))\r
-            printf("\n0x%02X-0x%02X : %04X ", j, j + 3, settings);\r
-        else\r
-            printf("%04X ", settings);\r
     }\r
-    printf("\n");\r
     \r
     return 0;\r
 }\r
index a8b60fa3ed8b08c5c73b7fe55e8490dd2c3ef76a..c401d0ce1fcbbdbff61eabe3e878a98ed4b9af62 100644 (file)
@@ -389,7 +389,6 @@ static long lChangedTimerPeriodAlready = pdFALSE;
                if( lChangedTimerPeriodAlready == pdFALSE )\r
                {\r
                        lChangedTimerPeriodAlready = pdTRUE;\r
-                       printf( "%s", pcStatusMessage );\r
                        \r
                        /* This call to xTimerChangePeriod() uses a zero block time.  \r
                        Functions called from inside of a timer callback function must \r
@@ -561,7 +560,6 @@ volatile size_t xFreeHeapSpace;
                xTimerStart( xLED2Timer, portMAX_DELAY );\r
                \r
                xFreeHeapSpace = xPortGetFreeHeapSize();\r
-               printf( "%d bytes of FreeRTOS heap remain unused\nconfigTOTAL_HEAP_SIZE can be reduced\n", xFreeHeapSpace );\r
                \r
                if( xFreeHeapSpace > 100 )\r
                {\r