From: richardbarry Date: Wed, 20 Apr 2011 20:04:32 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1375 1d2547de-c912-0410... X-Git-Tag: V7.0.1~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a05fa8c1b3d9c96b227548d88e5634349634ad2e;p=freertos git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1375 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h b/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h index fc0d7cd2f..b06a3a5c6 100644 --- a/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h @@ -59,8 +59,8 @@ /* The following #error directive is to remind users that a batch file must be - * executed prior to this project being built. The batch file *cannot* be - * executed from within CCS4! Once it has been executed, re-open or refresh + * executed prior to this project being built. The batch file *cannot* be + * executed from within CCS4! Once it has been executed, re-open or refresh * the CCS4 project and remove the #error line below. */ //#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above. @@ -88,7 +88,7 @@ #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 ) -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40 * 1024 ) ) +#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 30 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) #define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/mss_ethernet_mac/mss_ethernet_mac_regs.h b/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/mss_ethernet_mac/mss_ethernet_mac_regs.h index d54c6e94f..85779fa18 100644 --- a/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/mss_ethernet_mac/mss_ethernet_mac_regs.h +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/mss_ethernet_mac/mss_ethernet_mac_regs.h @@ -19,12 +19,12 @@ #ifdef __cplusplus extern "C" { -#endif +#endif #include "../../CMSIS/a2fxxxm3.h" #include "mss_ethernet_mac.h" #include "mss_ethernet_mac_user_cfg.h" - + typedef uint32_t addr_t; @@ -42,25 +42,26 @@ typedef struct { /***************************************************************************//** * There should be one instance of this structure for each instance of * the MAC in your system. MSS_MAC_init routine initializes this structure. - * It is used to identify the various MACs in your system and an initilized - * MAC instance's structure should be passed as first parameter to MAC functions + * It is used to identify the various MACs in your system and an initilized + * MAC instance's structure should be passed as first parameter to MAC functions * to identify which MAC should perform the requested operation. - * Software using the MAC driver should only need to create one single - * instance of this data structure for each MAC hardware instance in + * Software using the MAC driver should only need to create one single + * instance of this data structure for each MAC hardware instance in * the system. Using MAC_get_configuration routine, latest status of the driver * may be read by receiving its flags field, similarly MAC_configure routine lets * you modify some of these flags. */ +#include "net/pack_struct_start.h" typedef struct { addr_t base_address; /**< Register base address of the driver*/ uint8_t flags; /**< Configuration of the driver*/ int8_t last_error; /**< Index of last error happened inside the driver*/ uint8_t mac_address[6]; /**< MAC address of the drived instance*/ - uint8_t mac_filter_data[90]; /**< MAC filter data, 15 addresses to be used for + uint8_t mac_filter_data[90]; /**< MAC filter data, 15 addresses to be used for received data filtering*/ uint16_t last_timer_value; /**< Last read value of timer */ uint32_t time_out_value; /**< Time out value */ - MSS_MAC_callback_t listener; /**< Pointer to the call-back function to be triggered + MSS_MAC_callback_t listener; /**< Pointer to the call-back function to be triggered when a package is received*/ /* transmit related info: */ @@ -72,48 +73,49 @@ typedef struct { uint32_t rx_desc_index; /**< index of the receive descriptor getting used*/ // uint8_t rx_buffers[RX_RING_SIZE][MSS_RX_BUFF_SIZE+4];/**< array of receive buffers*/ MAC_descriptor_t rx_descriptors[RX_RING_SIZE];/**< array of receive descriptors*/ - + uint8_t phy_address; /**< MII address of the connected PHY*/ - + struct { uint32_t rx_interrupts; /**< Number of receive interrupts occurred.*/ - uint32_t rx_filtering_fail; /**< Number of received frames which did not pass + uint32_t rx_filtering_fail; /**< Number of received frames which did not pass the address recognition process.*/ uint32_t rx_descriptor_error; /**< Number of occurrences of; no receive buffer was available when trying to store the received data.*/ - uint32_t rx_runt_frame; /**< Number of occurrences of; the frame is damaged by - a collision or by a premature termination before + uint32_t rx_runt_frame; /**< Number of occurrences of; the frame is damaged by + a collision or by a premature termination before the end of a collision window.*/ - uint32_t rx_not_first; /**< Number of occurrences of; start of the frame is + uint32_t rx_not_first; /**< Number of occurrences of; start of the frame is not the first descriptor of a frame.*/ - uint32_t rx_not_last; /**< Number of occurrences of; end of the frame is not + uint32_t rx_not_last; /**< Number of occurrences of; end of the frame is not the first descriptor of a frame.*/ - uint32_t rx_frame_too_long; /**< Number of occurrences of; a current frame is - longer than maximum size of 1,518 bytes, as specified + uint32_t rx_frame_too_long; /**< Number of occurrences of; a current frame is + longer than maximum size of 1,518 bytes, as specified by 802.3.*/ - uint32_t rx_collision_seen; /**< Number of occurrences of; a late collision was seen + uint32_t rx_collision_seen; /**< Number of occurrences of; a late collision was seen (collision after 64 bytes following SFD).*/ - uint32_t rx_crc_error; /**< Number of occurrences of; a CRC error has occurred + uint32_t rx_crc_error; /**< Number of occurrences of; a CRC error has occurred in the received frame.*/ - uint32_t rx_fifo_overflow; /**< Number of frames not accepted due to the receive + uint32_t rx_fifo_overflow; /**< Number of frames not accepted due to the receive FIFO overflow.*/ - uint32_t rx_missed_frame; /**< Number of frames not accepted due to the + uint32_t rx_missed_frame; /**< Number of frames not accepted due to the unavailability of the receive descriptor.*/ uint32_t tx_interrupts; /**< Number of transmit interrupts occurred.*/ - uint32_t tx_loss_of_carrier; /**< Number of occurrences of; a loss of the carrier + uint32_t tx_loss_of_carrier; /**< Number of occurrences of; a loss of the carrier during a transmission.*/ uint32_t tx_no_carrier; /**< Number of occurrences of; the carrier was not asserted by an external transceiver during the transmission.*/ - uint32_t tx_late_collision; /**< Number of occurrences of; a collision was detected + uint32_t tx_late_collision; /**< Number of occurrences of; a collision was detected after transmitting 64 bytes.*/ - uint32_t tx_excessive_collision;/**< Number of occurrences of; the transmission was + uint32_t tx_excessive_collision;/**< Number of occurrences of; the transmission was aborted after 16 retries.*/ uint32_t tx_collision_count; /**< Number of collisions occurred.*/ - uint32_t tx_underflow_error; /**< Number of occurrences of; the FIFO was empty during + uint32_t tx_underflow_error; /**< Number of occurrences of; the FIFO was empty during the frame transmission.*/ } statistics; -} MAC_instance_t __attribute__((packed)); +} MAC_instance_t +#include "net/pack_struct_end.h" /*------------------------------------------------------------------------------ @@ -130,29 +132,29 @@ typedef struct uint32_t CSR0_TAP[3]; uint32_t CSR0_DBO; uint32_t CSR0_RESERVED1[11]; - + uint32_t MAC_CSR_RESERVED0[32]; - + uint32_t CSR1[32]; - + uint32_t MAC_CSR_RESERVED1[32]; - + uint32_t CSR2[32]; - + uint32_t MAC_CSR_RESERVED2[32]; - + uint32_t CSR3[32]; - + uint32_t MAC_CSR_RESERVED3[32]; - + uint32_t CSR4[32]; - + uint32_t MAC_CSR_RESERVED4[32]; - + uint32_t CSR5_TI; uint32_t CSR5_TPS; uint32_t CSR5_TU; - uint32_t CSR5_RESERVED0[2]; + uint32_t CSR5_RESERVED0[2]; uint32_t CSR5_UNF; uint32_t CSR5_RI; uint32_t CSR5_RU; @@ -169,7 +171,7 @@ typedef struct uint32_t CSR5_RESERVED3[9]; uint32_t MAC_CSR_RESERVED5[32]; - + uint32_t CSR6_HP; uint32_t CSR6_SR; uint32_t CSR6_HO; @@ -191,7 +193,7 @@ typedef struct uint32_t CSR6_RESERVED5; uint32_t MAC_CSR_RESERVED6[32]; - + uint32_t CSR7_TIE; uint32_t CSR7_TSE; uint32_t CSR7_TUE; @@ -210,11 +212,11 @@ typedef struct uint32_t CSR7[15]; uint32_t MAC_CSR_RESERVED7[32]; - + uint32_t CSR8[32]; uint32_t MAC_CSR_RESERVED8[32]; - + uint32_t CSR9_SCS; uint32_t CSR9_SCLK; uint32_t CSR9_SDI; @@ -227,11 +229,11 @@ typedef struct uint32_t CSR9_RESERVED1[12]; uint32_t MAC_CSR_RESERVED9[32]; - + uint32_t CSR10[32]; uint32_t MAC_CSR_RESERVED10[32]; - + uint32_t CSR11_TIM[16]; uint32_t CSR11_CON; uint32_t CSR11_NRP[3]; @@ -559,19 +561,19 @@ typedef struct #define CSR5_TS_SHIFT 20 /** 000 - Stopped; RESET or STOP TRANSMIT command issued. */ -#define CSR5_TS_STOPPED 0u +#define CSR5_TS_STOPPED 0u /** 001 - Running, fetching the transmit descriptor. */ -#define CSR5_TS_RUNNING_FD 1u +#define CSR5_TS_RUNNING_FD 1u /** 010 - Running, waiting for end of transmission. */ -#define CSR5_TS_RUNNING_WT 2u +#define CSR5_TS_RUNNING_WT 2u /** 011 - Running, transferring data buffer from host memory to FIFO. */ -#define CSR5_TS_RUNNING_TD 3u +#define CSR5_TS_RUNNING_TD 3u /** 101 - Running, setup packet. */ -#define CSR5_TS_RUNNING_SP 5u +#define CSR5_TS_RUNNING_SP 5u /** 110 - Suspended; FIFO underflow or unavailable descriptor. */ -#define CSR5_TS_SUSPENDED 6u +#define CSR5_TS_SUSPENDED 6u /** 111 - Running, closing transmit descriptor. */ -#define CSR5_TS_RUNNING_CD 7u +#define CSR5_TS_RUNNING_CD 7u /*------------------------------------------------------------------------------ * CSR5_RS: @@ -584,19 +586,19 @@ typedef struct #define CSR5_RS_SHIFT 17 /** 000 - Stopped; RESET or STOP RECEIVE command issued. */ -#define CSR5_RS_STOPPED 0u +#define CSR5_RS_STOPPED 0u /** 001 - Running, fetching the receive descriptor. */ -#define CSR5_RS_RUNNING_FD 1u +#define CSR5_RS_RUNNING_FD 1u /** 010 - Running, waiting for the end-of-receive packet before prefetch of the - *next descriptor. */ -#define CSR5_RS_RUNNING_WR 2u + *next descriptor. */ +#define CSR5_RS_RUNNING_WR 2u /** 011 - Running, waiting for the receive packet. */ -#define CSR5_RS_RUNNING_RB 3u +#define CSR5_RS_RUNNING_RB 3u /** 100 - Suspended, unavailable receive buffer. */ -#define CSR5_RS_SUSPENDED 4u +#define CSR5_RS_SUSPENDED 4u /** 101 - Running, closing the receive descriptor. */ -#define CSR5_RS_RUNNING_CD 5u -/** 111 - Running, transferring data from FIFO to host memory. */ +#define CSR5_RS_RUNNING_CD 5u +/** 111 - Running, transferring data from FIFO to host memory. */ #define CSR5_RS_RUNNING_TD 7u /*------------------------------------------------------------------------------ diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewd b/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewd new file mode 100644 index 000000000..2a764fcc4 --- /dev/null +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewd @@ -0,0 +1,1675 @@ + + + + 2 + + Blinky + + ARM + + 1 + + C-SPY + 2 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + JLINK_ID + 2 + + 12 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 1 + 1 + 1 + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\FreeRTOS\FreeRTOSPlugin.ewplugin + 0 + + + $EW_DIR$\common\plugins\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + Full + + ARM + + 1 + + C-SPY + 2 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + JLINK_ID + 2 + + 12 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 1 + 1 + 1 + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\FreeRTOS\FreeRTOSPlugin.ewplugin + 0 + + + $EW_DIR$\common\plugins\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + + diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewp b/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewp new file mode 100644 index 000000000..94dd369a3 --- /dev/null +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewp @@ -0,0 +1,1913 @@ + + + + 2 + + Blinky + + ARM + + 1 + + General + 3 + + 18 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Full + + ARM + + 1 + + General + 3 + + 18 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 11 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Common_Demo_Source + + Blinky + + + $PROJ_DIR$\..\Common\Minimal\BlockQ.c + + + $PROJ_DIR$\..\Common\Minimal\blocktim.c + + + $PROJ_DIR$\..\Common\Minimal\death.c + + + $PROJ_DIR$\..\Common\Minimal\dynamic.c + + + $PROJ_DIR$\..\Common\Minimal\flash.c + + + $PROJ_DIR$\..\Common\Minimal\GenQTest.c + + + $PROJ_DIR$\..\Common\Minimal\QPeek.c + + + $PROJ_DIR$\..\Common\Minimal\recmutex.c + + + $PROJ_DIR$\..\Common\Minimal\semtest.c + + + $PROJ_DIR$\..\Common\Minimal\TimerDemo.c + + + + FreeRTOS_Source + + Portable + + $PROJ_DIR$\..\..\Source\portable\MemMang\heap_2.c + + + $PROJ_DIR$\..\..\Source\portable\IAR\ARM_CM3\port.c + + + $PROJ_DIR$\..\..\Source\portable\IAR\ARM_CM3\portasm.s + + + + $PROJ_DIR$\..\..\Source\list.c + + + $PROJ_DIR$\..\..\Source\queue.c + + + $PROJ_DIR$\..\..\Source\tasks.c + + + $PROJ_DIR$\..\..\Source\timers.c + + + + FreeTCPIP(based on uIP) + + Blinky + + + $PROJ_DIR$\..\Common\ethernet\FreeTCPIP\psock.c + + + $PROJ_DIR$\..\Common\ethernet\FreeTCPIP\timer.c + + + $PROJ_DIR$\..\Common\ethernet\FreeTCPIP\uip.c + + + $PROJ_DIR$\..\Common\ethernet\FreeTCPIP\uip_arp.c + + + + Microsemi_Source + + CMSIS + + $PROJ_DIR$\MicroSemi_Code\CMSIS\core_cm3.c + + + $PROJ_DIR$\MicroSemi_Code\CMSIS\system_a2fxxxm3.c + + + + Drivers + + $PROJ_DIR$\MicroSemi_Code\drivers\mss_ethernet_mac\crc32.c + + Blinky + + + + $PROJ_DIR$\MicroSemi_Code\drivers\I2C\i2c.c + + Blinky + + + + $PROJ_DIR$\MicroSemi_Code\drivers\mss_ethernet_mac\mss_ethernet_mac.c + + Blinky + + + + $PROJ_DIR$\MicroSemi_Code\drivers\mss_gpio\mss_gpio.c + + + $PROJ_DIR$\MicroSemi_Code\drivers\OLED\oled.c + + Blinky + + + + $PROJ_DIR$\MicroSemi_Code\drivers\mss_ethernet_mac\phy.c + + Blinky + + + + + Startup + + $PROJ_DIR$\MicroSemi_Code\CMSIS\startup_iar\startup_a2fxxxm3.s + + + + + Web_Server + + Blinky + + + $PROJ_DIR$\..\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c + + + $PROJ_DIR$\WebServer\httpd-cgi.c + + + $PROJ_DIR$\..\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c + + + $PROJ_DIR$\..\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c + + + + $PROJ_DIR$\main-blinky.c + + Full + + + + $PROJ_DIR$\main-full.c + + Blinky + + + + $PROJ_DIR$\ParTest.c + + + $PROJ_DIR$\printf-stdarg.c + + + $PROJ_DIR$\uIP_Task.c + + Blinky + + + + + diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.eww b/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.eww new file mode 100644 index 000000000..f4971a444 --- /dev/null +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\RTOSDemo_IAR.ewp + + + + + diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c b/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c index 82b48f6e4..af060a25c 100644 --- a/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c @@ -185,8 +185,8 @@ int main(void) xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); - /* Create the software timer that is responsible for turning off the LED - if the button is not pushed within 5000ms, as described at the top of + /* Create the software timer that is responsible for turning off the LED + if the button is not pushed within 5000ms, as described at the top of this file. */ xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ @@ -289,8 +289,8 @@ unsigned long ulReceivedValue; if( ulReceivedValue == 100UL ) { /* NOTE - accessing the LED port should use a critical section - because it is accessed from multiple tasks, and the button interrupt - - in this trivial case, for simplicity, the critical section is + because it is accessed from multiple tasks, and the button interrupt + - in this trivial case, for simplicity, the critical section is omitted. */ if( ( ulGPIOState & mainTASK_CONTROLLED_LED ) != 0 ) { @@ -340,7 +340,7 @@ void vApplicationMallocFailedHook( void ) { /* Called if a call to pvPortMalloc() fails because there is insufficient free memory available in the FreeRTOS heap. pvPortMalloc() is called - internally by FreeRTOS API functions that create tasks, queues, software + internally by FreeRTOS API functions that create tasks, queues, software timers, and semaphores. The size of the FreeRTOS heap is set by the configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */ for( ;; ); @@ -364,7 +364,7 @@ void vApplicationIdleHook( void ) volatile size_t xFreeStackSpace; /* This function is called on each cycle of the idle task. In this case it - does nothing useful, other than report the amout of FreeRTOS heap that + does nothing useful, other than report the amout of FreeRTOS heap that remains unallocated. */ xFreeStackSpace = xPortGetFreeHeapSize(); @@ -376,3 +376,4 @@ volatile size_t xFreeStackSpace; reduced accordingly. */ } } + diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c b/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c index d965dc8bf..51299bc9a 100644 --- a/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c @@ -209,7 +209,7 @@ callback function updates the OLED text. */ #define mainOLED_PERIOD_ms ( 75UL ) /* The period at which the check timer will expire, in ms, if an error has been -reported in one of the standard demo tasks. */ +reported in one of the standard demo tasks. */ #define mainERROR_CHECK_TIMER_PERIOD_ms ( 500UL ) /* A zero block time. */ @@ -228,24 +228,24 @@ static void prvQueueReceiveTask( void *pvParameters ); static void prvQueueSendTask( void *pvParameters ); /* - * The LED timer callback function. This does nothing but switch the red LED + * The LED timer callback function. This does nothing but switch the red LED * off. */ static void vLEDTimerCallback( xTimerHandle xTimer ); /* - * The check timer callback function, as described at the top of this file. + * The check timer callback function, as described at the top of this file. */ static void vCheckTimerCallback( xTimerHandle xTimer ); /* - * The OLED timer callback function, as described at the top of this file. + * The OLED timer callback function, as described at the top of this file. */ static void vOLEDTimerCallback( xTimerHandle xHandle ); /* * This is not a 'standard' partest function, so the prototype is not in - * partest.h, and is instead included here. + * partest.h, and is instead included here. */ void vParTestSetLEDFromISR( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ); @@ -292,8 +292,8 @@ int main(void) xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL ); xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL ); - /* Create the software timer that is responsible for turning off the LED - if the button is not pushed within 5000ms, as described at the top of + /* Create the software timer that is responsible for turning off the LED + if the button is not pushed within 5000ms, as described at the top of this file. */ xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */ ( 5000 / portTICK_RATE_MS ), /* The timer period, in this case 5000ms (5s). */ @@ -325,7 +325,7 @@ int main(void) vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); /* Create the web server task. */ -// xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); + xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); /* Start the tasks and timer running. */ vTaskStartScheduler(); @@ -455,7 +455,7 @@ const unsigned long ulValueToSend = 100UL; while the check and OLED timers can be created in main(), they cannot be started from main(). Once the scheduler has started, the timer service task will drain the command queue, and now the check and OLED timers can be - started successfully. */ + started successfully. */ xTimerStart( xCheckTimer, portMAX_DELAY ); xTimerStart( xOLEDTimer, portMAX_DELAY ); @@ -561,7 +561,7 @@ void vApplicationMallocFailedHook( void ) { /* Called if a call to pvPortMalloc() fails because there is insufficient free memory available in the FreeRTOS heap. pvPortMalloc() is called - internally by FreeRTOS API functions that create tasks, queues, software + internally by FreeRTOS API functions that create tasks, queues, software timers, and semaphores. The size of the FreeRTOS heap is set by the configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */ for( ;; ); diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/printf-stdarg.c b/Demo/CORTEX_A2F200_IAR_and_Keil/printf-stdarg.c index b5ac41be7..46713639c 100644 --- a/Demo/CORTEX_A2F200_IAR_and_Keil/printf-stdarg.c +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/printf-stdarg.c @@ -38,7 +38,7 @@ static void printchar(char **str, int c) ++(*str); } else - { + { (void)putchar(c); } } @@ -189,7 +189,7 @@ static int print( char **out, const char *format, va_list args ) int printf(const char *format, ...) { va_list args; - + va_start( args, format ); return print( 0, format, args ); } @@ -197,7 +197,7 @@ int printf(const char *format, ...) int sprintf(char *out, const char *format, ...) { va_list args; - + va_start( args, format ); return print( &out, format, args ); } @@ -206,9 +206,9 @@ int sprintf(char *out, const char *format, ...) int snprintf( char *buf, unsigned int count, const char *format, ... ) { va_list args; - + ( void ) count; - + va_start( args, format ); return print( &buf, format, args ); } @@ -283,7 +283,7 @@ int main(void) /* To keep linker happy. */ -int write( int i, char* c, int n) +int __write( int i, char* c, int n) { (void)i; (void)n; diff --git a/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c b/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c index bc7ad544e..914e570a5 100644 --- a/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c +++ b/Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c @@ -114,19 +114,19 @@ static void prvSetMACAddress( void ); /* * Perform any uIP initialisation required to ready the stack for http - * processing. + * processing. */ static void prvInitialise_uIP( void ); /* - * Handles Ethernet interrupt events. + * Handles Ethernet interrupt events. */ static void prvEMACEventListener( unsigned long ulISREvents ); static void prvUIPTimerCallback( xTimerHandle xTimer ); /* - * Initialise the MAC hardware. + * Initialise the MAC hardware. */ static void prvInitEmac( void ); @@ -383,7 +383,7 @@ const unsigned char ucPHYAddress = 1; MSS_MAC_init( ucPHYAddress ); - MSS_MAC_set_callback( prvEMACEventListener ); + MSS_MAC_set_callback( ( MSS_MAC_callback_t ) prvEMACEventListener ); /* Setup the EMAC and the NVIC for MAC interrupts. */ NVIC_SetPriority( EthernetMAC_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );