From 848e93f82db671b616ba01196c539ebea2df891c Mon Sep 17 00:00:00 2001 From: rtel Date: Wed, 15 Oct 2014 21:01:31 +0000 Subject: [PATCH] Core kernel code: Allow the stats formatting functions to be built in without stdio.h being included inside tasks.c. Kernel port code: - Slight change to the Cortex-A GIC-less port to move all non portable code to the application level. SAMA5D4 demo project: - Update the Atmel provided library to V1.1. - Create a DDR build configuration. - Ensure interrupts are all edge sensitive. - Update the regtest code to use all 32 flop registers. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2313 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../usb/common/core/USBDescriptors.c | 8 - .../usb/device/core/USBDCallbacks.c | 1 - .../FreeRTOS_tick_config.c | 2 +- .../RTOSDemo.ewp | 2 +- .../CORTEX_A5_SAMA5D3x_Xplained_IAR/main.c | 34 +- .../settings/RTOSDemo.dbgdt | 6 +- .../settings/RTOSDemo.dni | 7 +- .../settings/RTOSDemo.wsdt | 12 +- .../settings/RTOSDemo.wspos | 2 +- .../libboard_sama5d4x-ek/include/gmacd.h | 20 + .../resources/ewarm/sama5d4x/sram.icf | 8 +- .../source/board_lowlevel.c | 15 +- .../source/board_memories.c | 63 +- .../libboard_sama5d4x-ek/source/gmacd.c | 486 ++-- .../libchip_sama5d4x/include/trace.h | 2 +- .../libchip_sama5d4x/source/pio_it.c | 6 +- .../AtmelFiles/usb/USBDDriverDescriptors.c | 558 +++++ .../AtmelFiles/usb/common/cdc/CDCLineCoding.c | 71 + .../cdc/CDCSetControlLineStateRequest.c | 87 + .../usb/common/core/USBDescriptors.c | 319 +++ .../AtmelFiles/usb/common/core/USBRequests.c | 244 ++ .../USBDCallbackInvocationFlowchart.png | Bin 0 -> 11380 bytes .../usb/device/USBDeviceStateDiagram.png | Bin 0 -> 8827 bytes .../usb/device/cdc-serial/CDCDSerial.c | 228 ++ .../usb/device/cdc-serial/CDCDSerialDriver.c | 116 + .../usb/device/cdc-serial/CDCDSerialPort.c | 458 ++++ .../device/cdc-serial/CDCDSerial_Callbacks.c | 70 + .../usb/device/cdc-serial/CDCarchitecture.png | Bin 0 -> 28223 bytes .../device/cdc-serial/USB-SerialConverter.png | Bin 0 -> 10177 bytes .../usb/device/cdc-serial/drv/6119.inf | 45 + .../AtmelFiles/usb/device/core/USBD.c | 550 +++++ .../usb/device/core/USBDCallbacks.c | 89 + .../AtmelFiles/usb/device/core/USBDDriver.c | 823 ++++++ .../usb/device/core/USBDDriverCallbacks.c | 84 + .../usb/device/hal_examples/hal_udp.c | 1675 +++++++++++++ .../usb/device/hal_examples/hal_udphs.c | 2198 +++++++++++++++++ .../AtmelFiles/usb/include/CDCAUDDDriver.h | 307 +++ .../AtmelFiles/usb/include/CDCDSerial.h | 106 + .../AtmelFiles/usb/include/CDCDSerialDriver.h | 249 ++ .../AtmelFiles/usb/include/CDCDSerialPort.h | 167 ++ .../AtmelFiles/usb/include/CDCDescriptors.h | 275 +++ .../AtmelFiles/usb/include/CDCHIDDDriver.h | 152 ++ .../AtmelFiles/usb/include/CDCMSDDriver.h | 155 ++ .../AtmelFiles/usb/include/CDCNotifications.h | 111 + .../AtmelFiles/usb/include/CDCRequests.h | 183 ++ .../AtmelFiles/usb/include/DUALCDCDDriver.h | 157 ++ .../AtmelFiles/usb/include/SBC.h | 678 +++++ .../AtmelFiles/usb/include/SBCMethods.h | 118 + .../AtmelFiles/usb/include/USBD.h | 278 +++ .../AtmelFiles/usb/include/USBDDriver.h | 149 ++ .../AtmelFiles/usb/include/USBD_HAL.h | 111 + .../AtmelFiles/usb/include/USBDescriptors.h | 549 ++++ .../AtmelFiles/usb/include/USBLib_Trace.h | 209 ++ .../AtmelFiles/usb/include/USBLib_Types.h | 81 + .../AtmelFiles/usb/include/USBRequests.h | 354 +++ .../AtmelFiles/usb/usb.h | 100 + .../CDCCommandConsole.c | 32 +- .../FreeRTOSConfig.h | 16 +- .../FreeRTOS_tick_config.c | 50 +- .../Full_Demo/IntQueueTimer.c | 70 +- .../Full_Demo/main_full.c | 2 +- .../Full_Demo/reg_test.S | 199 +- .../CORTEX_A5_SAMA5D4x_EK_IAR/RTOSDemo.ewd | 12 +- .../CORTEX_A5_SAMA5D4x_EK_IAR/RTOSDemo.ewp | 134 +- .../cstartup_with_FreeRTOS_vectors.s | 45 - .../Demo/CORTEX_A5_SAMA5D4x_EK_IAR/main.c | 43 +- .../settings/RTOSDemo.dbgdt | 20 +- .../settings/RTOSDemo.dni | 8 +- .../settings/RTOSDemo.wsdt | 18 +- .../RTOSDemo/src/Full_Demo/main_full.c | 2 +- FreeRTOS/Source/include/timers.h | 2 +- .../Source/portable/IAR/ARM_CA5_No_GIC/port.c | 12 +- .../portable/IAR/ARM_CA5_No_GIC/portASM.s | 15 +- FreeRTOS/Source/portable/MSVC-MingW/port.c | 2 +- FreeRTOS/Source/tasks.c | 10 +- 75 files changed, 12978 insertions(+), 492 deletions(-) create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/USBDDriverDescriptors.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/common/cdc/CDCLineCoding.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/common/cdc/CDCSetControlLineStateRequest.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/common/core/USBDescriptors.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/common/core/USBRequests.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/USBDCallbackInvocationFlowchart.png create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/USBDeviceStateDiagram.png create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/cdc-serial/CDCDSerial.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/cdc-serial/CDCDSerialDriver.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/cdc-serial/CDCDSerialPort.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/cdc-serial/CDCDSerial_Callbacks.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/cdc-serial/CDCarchitecture.png create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/cdc-serial/USB-SerialConverter.png create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/cdc-serial/drv/6119.inf create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/core/USBD.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/core/USBDCallbacks.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/core/USBDDriver.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/core/USBDDriverCallbacks.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/hal_examples/hal_udp.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/device/hal_examples/hal_udphs.c create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCAUDDDriver.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCDSerial.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCDSerialDriver.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCDSerialPort.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCDescriptors.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCHIDDDriver.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCMSDDriver.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCNotifications.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/CDCRequests.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/DUALCDCDDriver.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/SBC.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/SBCMethods.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/USBD.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/USBDDriver.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/USBD_HAL.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/USBDescriptors.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/USBLib_Trace.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/USBLib_Types.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/include/USBRequests.h create mode 100644 FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/usb/usb.h diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/common/core/USBDescriptors.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/common/core/USBDescriptors.c index 80cd4e0c0..963103fc7 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/common/core/USBDescriptors.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/common/core/USBDescriptors.c @@ -186,8 +186,6 @@ uint8_t *pc1, *pc2; usTemp = ( ( *pc2 ) << 8 ) | *pc1; return usTemp; -#warning The above code replaces the line below to ensure aborts are not received due to unaligned accesses. Alternatively use the --no_unaligned_access compiler option. - //return endpoint->wMaxPacketSize; } /** @@ -208,15 +206,9 @@ uint8_t USBEndpointDescriptor_GetInterval( * \param configuration Pointer to a USBConfigurationDescriptor instance. * \return Total length (in bytes) of the configuration. */ -volatile unsigned long ulCount = 0; uint32_t USBConfigurationDescriptor_GetTotalLength( const USBConfigurationDescriptor *configuration) { -ulCount++; -if( ulCount == 5 ) -{ - __asm volatile( "NOP" ); -} return configuration->wTotalLength; } diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/device/core/USBDCallbacks.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/device/core/USBDCallbacks.c index 3b892b9d4..1796d35e6 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/device/core/USBDCallbacks.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/device/core/USBDCallbacks.c @@ -54,7 +54,6 @@ WEAK void USBDCallbacks_Initialized(void) { /* Does nothing */ - __asm volatile( "NOP" ); } /** diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c index 51fcba4a8..33ebf0b8e 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/FreeRTOS_tick_config.c @@ -114,7 +114,7 @@ void vConfigureTickInterrupt( void ) is shared with other system peripherals, so System_Handler() must be installed in place of FreeRTOS_Tick_Handler() if other system handlers are required. The tick must be given the lowest priority (0 in the SAMA5 AIC) */ - IRQ_ConfigureIT( ID_PIT, 0, FreeRTOS_Tick_Handler ); + IRQ_ConfigureIT( ID_PIT, AIC_SMR_SRCTYPE_EXT_POSITIVE_EDGE, FreeRTOS_Tick_Handler ); /* See commend directly above IRQ_ConfigureIT( ID_PIT, 0, System_Handler ); */ IRQ_EnableIT( ID_PIT ); PIT_EnableIT(); diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/RTOSDemo.ewp b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/RTOSDemo.ewp index 4a2a07c4b..a83ecc1c5 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/RTOSDemo.ewp +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/RTOSDemo.ewp @@ -214,7 +214,7 @@