diff --git a/demos/bsp/boards/ngx/board_ngx4330.c b/demos/bsp/boards/ngx/board_ngx4330.c
index 4462eb2d4..a44f5de11 100644
--- a/demos/bsp/boards/ngx/board_ngx4330.c
+++ b/demos/bsp/boards/ngx/board_ngx4330.c
@@ -54,7 +54,10 @@ const static struct {
void board_init(void)
{
CGU_Init();
+
+#if TUSB_CFG_OS == TUSB_OS_NONE // TODO may move to main.c
SysTick_Config( CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE)/CFG_TICKS_PER_SECOND ); /* 1 ms Timer */
+#endif
//------------- USB Bus power HOST ONLY-------------//
scu_pinmux(0x1, 7, MD_PUP | MD_EZI, FUNC4); // P1_7 USB0_PWR_EN, USB0 VBus function Xplorer
diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject
index c734c75a4..47e3ae697 100644
--- a/demos/host/host_freertos/.cproject
+++ b/demos/host/host_freertos/.cproject
@@ -34,6 +34,7 @@
-
+
@@ -91,9 +92,7 @@
-
-
-
+
@@ -326,6 +325,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -665,6 +777,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -988,6 +1213,119 @@
+
+
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opt
index 3c296ccf2..440468797 100644
--- a/demos/host/host_freertos/host_freertos.uvopt
+++ b/demos/host/host_freertos/host_freertos.uvopt
@@ -370,7 +370,7 @@
1
0
- 1
+ 0
8
@@ -502,6 +502,196 @@
+
+ Board NGX4330
+ 0x4
+ ARM-ADS
+
+ 12000000
+
+ 1
+ 1
+ 1
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\UV4Build\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 8
+
+
+ 0
+ Data Sheet
+ DATASHTS\NXP\LPC43xx\LPC43x0_DS.pdf
+
+
+ 1
+ User Manual
+ DATASHTS\NXP\LPC43xx\LPC43xx_UM.pdf
+
+
+ 2
+ Technical Reference Manual
+ datashts\arm\cortex_m4\r0p1\DDI0439C_CORTEX_M4_R0P1_TRM.PDF
+
+
+ 3
+ Generic User Guide
+ datashts\arm\cortex_m4\r0p1\DUI0553A_CORTEX_M4_DGUG.PDF
+
+
+
+ SARMCM3.DLL
+ -MPU
+ DCM.DLL
+ -pCM4
+ SARMCM3.DLL
+ -MPU
+ TCM.DLL
+ -pCM4
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 7
+
+
+
+
+
+
+
+
+
+ .\keil_ram.ini
+ Segger\JL2CM3.dll
+
+
+
+ 0
+ UL2CM3
+ -O975 -S0 -C0)
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ DLGUARM
+
+
+
+ 0
+ JL2CM3
+ -U268003250 -O110 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(4) -TO19 -TC72000000 -TP21 -TDS800B -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB5 -TFE0 -FO15 -FD10000000 -FC800 -FN0
+
+
+
+
+
+ 0
+ 1
+ SystemCoreClock
+
+
+
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+
+
+
+
+
+
app
0
@@ -1044,7 +1234,7 @@
0
0
0
- 2112
+ 2113
2115
0
..\..\..\vendor\freertos\freertos\Source\tasks.c
@@ -1148,7 +1338,7 @@
0
5
0
- 60
+ 61
62
0
..\..\..\vendor\fatfs\diskio.c
@@ -1162,9 +1352,9 @@
1
0
0
- 21
+ 22
0
- 1717
+ 1718
1723
0
..\..\..\vendor\fatfs\ff.c
@@ -1354,10 +1544,10 @@
2
0
0
- 0
+ 20
0
- 0
- 0
+ 153
+ 162
0
..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s
startup_LPC43xx.s
@@ -1572,7 +1762,7 @@
0
0
0
- 122
+ 123
129
0
..\..\bsp\lpc175x_6x\startup_keil\startup_LPC17xx.s
diff --git a/demos/host/host_freertos/host_freertos.uvproj b/demos/host/host_freertos/host_freertos.uvproj
index 26a84174b..1d9fb2cc7 100644
--- a/demos/host/host_freertos/host_freertos.uvproj
+++ b/demos/host/host_freertos/host_freertos.uvproj
@@ -2511,6 +2511,841 @@
+
+ Board NGX4330
+ 0x4
+ ARM-ADS
+
+
+ LPC4330
+ NXP (founded by Philips)
+ IRAM(0x10000000-0x1001FFFF) IRAM2(0x20000000-0x2000FFFF) CLOCK(12000000) CPUTYPE("Cortex-M4") FP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+ ..\src\main.c
+
+
+ cdc_serial_app.c
+ 1
+ ..\src\cdc_serial_app.c
+
+
+ keyboard_app.c
+ 1
+ ..\src\keyboard_app.c
+
+
+ mouse_app.c
+ 1
+ ..\src\mouse_app.c
+
+
+ rndis_app.c
+ 1
+ ..\src\rndis_app.c
+
+
+ msc_app.c
+ 1
+ ..\src\msc_app.c
+
+
+ cli.c
+ 1
+ ..\src\cli.c
+
+
+
+
+ tinyusb
+
+
+ tusb.c
+ 1
+ ..\..\..\tinyusb\tusb.c
+
+
+ osal_none.c
+ 1
+ ..\..\..\tinyusb\osal\osal_none.c
+
+
+ hcd.c
+ 1
+ ..\..\..\tinyusb\host\hcd.c
+
+
+ hub.c
+ 1
+ ..\..\..\tinyusb\host\hub.c
+
+
+ usbh.c
+ 1
+ ..\..\..\tinyusb\host\usbh.c
+
+
+ ehci.c
+ 1
+ ..\..\..\tinyusb\host\ehci\ehci.c
+
+
+ hal_lpc11uxx.c
+ 1
+ ..\..\..\tinyusb\hal\hal_lpc11uxx.c
+
+
+ hal_lpc13uxx.c
+ 1
+ ..\..\..\tinyusb\hal\hal_lpc13uxx.c
+
+
+ hal_lpc43xx.c
+ 1
+ ..\..\..\tinyusb\hal\hal_lpc43xx.c
+
+
+ hal_lpc175x_6x.c
+ 1
+ ..\..\..\tinyusb\hal\hal_lpc175x_6x.c
+
+
+ errors.c
+ 1
+ ..\..\..\tinyusb\common\errors.c
+
+
+ fifo.c
+ 1
+ ..\..\..\tinyusb\common\fifo.c
+
+
+ cdc_host.c
+ 1
+ ..\..\..\tinyusb\class\cdc_host.c
+
+
+ cdc_rndis_host.c
+ 1
+ ..\..\..\tinyusb\class\cdc_rndis_host.c
+
+
+ hid_host.c
+ 1
+ ..\..\..\tinyusb\class\hid_host.c
+
+
+ msc_host.c
+ 1
+ ..\..\..\tinyusb\class\msc_host.c
+
+
+ ohci.c
+ 1
+ ..\..\..\tinyusb\host\ohci\ohci.c
+
+
+ cdc_device.c
+ 1
+ ..\..\..\tinyusb\class\cdc_device.c
+
+
+ custom_class_host.c
+ 1
+ ..\..\..\tinyusb\class\custom_class_host.c
+
+
+ hid_device.c
+ 1
+ ..\..\..\tinyusb\class\hid_device.c
+
+
+ msc_device.c
+ 1
+ ..\..\..\tinyusb\class\msc_device.c
+
+
+
+
+ freertos
+
+
+ FreeRTOSCommonHooks.c
+ 1
+ ..\..\..\vendor\freertos\freertoslpc\FreeRTOSCommonHooks.c
+
+
+ croutine.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\croutine.c
+
+
+ list.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\list.c
+
+
+ queue.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\queue.c
+
+
+ tasks.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\tasks.c
+
+
+ timers.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\timers.c
+
+
+ heap_4.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\portable\MemMang\heap_4.c
+
+
+ port_cm4f.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\portable\RVDS\ARM_CM4F\port_cm4f.c
+
+
+ port_cm3.c
+ 1
+ ..\..\..\vendor\freertos\freertos\Source\portable\RVDS\ARM_CM3\port_cm3.c
+
+
+ 2
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 0
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+ fatfs
+
+
+ ccsbcs.c
+ 1
+ ..\..\..\vendor\fatfs\ccsbcs.c
+
+
+ diskio.c
+ 1
+ ..\..\..\vendor\fatfs\diskio.c
+
+
+ ff.c
+ 1
+ ..\..\..\vendor\fatfs\ff.c
+
+
+
+
+ boards
+
+
+ board.c
+ 1
+ ..\..\bsp\boards\board.c
+
+
+ printf_retarget.c
+ 1
+ ..\..\bsp\boards\printf_retarget.c
+
+
+ pca9532.c
+ 1
+ ..\..\bsp\boards\embedded_artists\oem_base_board\pca9532.c
+
+
+ board_ngx4330.c
+ 1
+ ..\..\bsp\boards\ngx\board_ngx4330.c
+
+
+ board_lpc4357usb.c
+ 1
+ ..\..\bsp\boards\microbuilder\board_lpc4357usb.c
+
+
+ board_rf1ghznode.c
+ 1
+ ..\..\bsp\boards\microbuilder\board_rf1ghznode.c
+
+
+ board_lpcxpresso1769.c
+ 1
+ ..\..\bsp\boards\lpcxpresso\board_lpcxpresso1769.c
+
+
+ board_lpcxpresso1347.c
+ 1
+ ..\..\bsp\boards\lpcxpresso\board_lpcxpresso1347.c
+
+
+ board_mcb4300.c
+ 1
+ ..\..\bsp\boards\keil\board_mcb4300.c
+
+
+ board_ea4357.c
+ 1
+ ..\..\bsp\boards\embedded_artists\ea4357\board_ea4357.c
+
+
+
+
+ bsp lpc43xx
+
+
+ startup_LPC43xx.s
+ 2
+ ..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s
+
+
+ lpc43xx_uart.c
+ 1
+ ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_uart.c
+
+
+ lpc43xx_scu.c
+ 1
+ ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_scu.c
+
+
+ lpc43xx_gpio.c
+ 1
+ ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_gpio.c
+
+
+ lpc43xx_cgu.c
+ 1
+ ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_cgu.c
+
+
+ system_LPC43xx.c
+ 1
+ ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\system_LPC43xx.c
+
+
+ lpc43xx_i2c.c
+ 1
+ ..\..\bsp\lpc43xx\CMSIS_LPC43xx_DriverLib\src\lpc43xx_i2c.c
+
+
+
+
+ bsp lpc175x_6x
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 2
+ 2
+ 2
+ 11
+
+
+
+
+
+ 2
+ 0
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 0
+ 2
+ 2
+
+
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ core_cm3.c
+ 1
+ ..\..\bsp\lpc175x_6x\CMSISv2p00_LPC17xx\src\core_cm3.c
+
+
+ system_LPC17xx.c
+ 1
+ ..\..\bsp\lpc175x_6x\CMSISv2p00_LPC17xx\src\system_LPC17xx.c
+
+
+ lpc17xx_clkpwr.c
+ 1
+ ..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\source\lpc17xx_clkpwr.c
+
+
+ lpc17xx_gpio.c
+ 1
+ ..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\source\lpc17xx_gpio.c
+
+
+ lpc17xx_uart.c
+ 1
+ ..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\source\lpc17xx_uart.c
+
+
+ lpc17xx_pinsel.c
+ 1
+ ..\..\bsp\lpc175x_6x\LPC17xx_DriverLib\source\lpc17xx_pinsel.c
+
+
+ startup_LPC17xx.s
+ 2
+ ..\..\bsp\lpc175x_6x\startup_keil\startup_LPC17xx.s
+
+
+
+
+
diff --git a/vendor/freertos/FreeRTOSConfig.h b/vendor/freertos/FreeRTOSConfig.h
index 111ef5933..125675355 100644
--- a/vendor/freertos/FreeRTOSConfig.h
+++ b/vendor/freertos/FreeRTOSConfig.h
@@ -11,6 +11,6 @@
#include "FreeRTOSConfig_lpc175x_6x.h"
#else
#error "not yet supported MCU"
-#endif /* ifdef CORE_M4 */
+#endif
# endif /* __FREERTOS_CONFIG__H */
diff --git a/vendor/freertos/freertos/Source/portable/MemMang/heap_1.c b/vendor/freertos/freertos/Source/portable/MemMang/heap_1.c
deleted file mode 100644
index ceec51cc7..000000000
--- a/vendor/freertos/freertos/Source/portable/MemMang/heap_1.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.
-
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
- ***************************************************************************
- * *
- * FreeRTOS tutorial books are available in pdf and paperback. *
- * Complete, revised, and edited pdf reference manuals are also *
- * available. *
- * *
- * Purchasing FreeRTOS documentation will not only help you, by *
- * ensuring you get running as quickly as possible and with an *
- * in-depth knowledge of how to use FreeRTOS, it will also help *
- * the FreeRTOS project to continue with its mission of providing *
- * professional grade, cross platform, de facto standard solutions *
- * for microcontrollers - completely free of charge! *
- * *
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
- * *
- * Thank you for using FreeRTOS, and thank you for your support! *
- * *
- ***************************************************************************
-
-
- This file is part of the FreeRTOS distribution.
-
- FreeRTOS is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License (version 2) as published by the
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
- >>>NOTE<<< The modification to the GPL is included to allow you to
- distribute a combined work that includes FreeRTOS without being obliged to
- provide the source code for proprietary components outside of the FreeRTOS
- kernel. FreeRTOS is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details. You should have received a copy of the GNU General Public
- License and the FreeRTOS license exception along with FreeRTOS; if not it
- can be viewed here: http://www.freertos.org/a00114.html and also obtained
- by writing to Richard Barry, contact details for whom are available on the
- FreeRTOS WEB site.
-
- 1 tab == 4 spaces!
-
- ***************************************************************************
- * *
- * Having a problem? Start by reading the FAQ "My application does *
- * not run, what could be wrong?" *
- * *
- * http://www.FreeRTOS.org/FAQHelp.html *
- * *
- ***************************************************************************
-
-
- http://www.FreeRTOS.org - Documentation, training, latest versions, license
- and contact details.
-
- http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
- including FreeRTOS+Trace - an indispensable productivity tool.
-
- Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
- the code with commercial support, indemnification, and middleware, under
- the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
- provide a safety engineered and independently SIL3 certified version under
- the SafeRTOS brand: http://www.SafeRTOS.com.
-*/
-
-
-/*
- * The simplest possible implementation of pvPortMalloc(). Note that this
- * implementation does NOT allow allocated memory to be freed again.
- *
- * See heap_2.c, heap_3.c and heap_4.c for alternative implementations, and the
- * memory management pages of http://www.FreeRTOS.org for more information.
- */
-#include
-
-/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
-all the API functions to use the MPU wrappers. That should only be done when
-task.h is included from an application file. */
-#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-#include "FreeRTOS.h"
-#include "task.h"
-
-#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-/* Allocate the memory for the heap. The struct is used to force byte
-alignment without using any non-portable code. */
-static union xRTOS_HEAP
-{
- #if portBYTE_ALIGNMENT == 8
- volatile portDOUBLE dDummy;
- #else
- volatile unsigned long ulDummy;
- #endif
- unsigned char ucHeap[ configTOTAL_HEAP_SIZE ];
-} xHeap;
-
-static size_t xNextFreeByte = ( size_t ) 0;
-/*-----------------------------------------------------------*/
-
-void *pvPortMalloc( size_t xWantedSize )
-{
-void *pvReturn = NULL;
-
- /* Ensure that blocks are always aligned to the required number of bytes. */
- #if portBYTE_ALIGNMENT != 1
- if( xWantedSize & portBYTE_ALIGNMENT_MASK )
- {
- /* Byte alignment required. */
- xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
- }
- #endif
-
- vTaskSuspendAll();
- {
- /* Check there is enough room left for the allocation. */
- if( ( ( xNextFreeByte + xWantedSize ) < configTOTAL_HEAP_SIZE ) &&
- ( ( xNextFreeByte + xWantedSize ) > xNextFreeByte ) )/* Check for overflow. */
- {
- /* Return the next free byte then increment the index past this
- block. */
- pvReturn = &( xHeap.ucHeap[ xNextFreeByte ] );
- xNextFreeByte += xWantedSize;
- }
- }
- xTaskResumeAll();
-
- #if( configUSE_MALLOC_FAILED_HOOK == 1 )
- {
- if( pvReturn == NULL )
- {
- extern void vApplicationMallocFailedHook( void );
- vApplicationMallocFailedHook();
- }
- }
- #endif
-
- return pvReturn;
-}
-/*-----------------------------------------------------------*/
-
-void vPortFree( void *pv )
-{
- /* Memory cannot be freed using this scheme. See heap_2.c, heap_3.c and
- heap_4.c for alternative implementations, and the memory management pages of
- http://www.FreeRTOS.org for more information. */
- ( void ) pv;
-
- /* Force an assert as it is invalid to call this function. */
- configASSERT( pv == NULL );
-}
-/*-----------------------------------------------------------*/
-
-void vPortInitialiseBlocks( void )
-{
- /* Only required when static memory is not cleared. */
- xNextFreeByte = ( size_t ) 0;
-}
-/*-----------------------------------------------------------*/
-
-size_t xPortGetFreeHeapSize( void )
-{
- return ( configTOTAL_HEAP_SIZE - xNextFreeByte );
-}
-
-
-
diff --git a/vendor/freertos/freertos/Source/portable/MemMang/heap_2.c b/vendor/freertos/freertos/Source/portable/MemMang/heap_2.c
deleted file mode 100644
index f2edf3003..000000000
--- a/vendor/freertos/freertos/Source/portable/MemMang/heap_2.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.
-
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
- ***************************************************************************
- * *
- * FreeRTOS tutorial books are available in pdf and paperback. *
- * Complete, revised, and edited pdf reference manuals are also *
- * available. *
- * *
- * Purchasing FreeRTOS documentation will not only help you, by *
- * ensuring you get running as quickly as possible and with an *
- * in-depth knowledge of how to use FreeRTOS, it will also help *
- * the FreeRTOS project to continue with its mission of providing *
- * professional grade, cross platform, de facto standard solutions *
- * for microcontrollers - completely free of charge! *
- * *
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
- * *
- * Thank you for using FreeRTOS, and thank you for your support! *
- * *
- ***************************************************************************
-
-
- This file is part of the FreeRTOS distribution.
-
- FreeRTOS is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License (version 2) as published by the
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
- >>>NOTE<<< The modification to the GPL is included to allow you to
- distribute a combined work that includes FreeRTOS without being obliged to
- provide the source code for proprietary components outside of the FreeRTOS
- kernel. FreeRTOS is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details. You should have received a copy of the GNU General Public
- License and the FreeRTOS license exception along with FreeRTOS; if not it
- can be viewed here: http://www.freertos.org/a00114.html and also obtained
- by writing to Richard Barry, contact details for whom are available on the
- FreeRTOS WEB site.
-
- 1 tab == 4 spaces!
-
- ***************************************************************************
- * *
- * Having a problem? Start by reading the FAQ "My application does *
- * not run, what could be wrong?" *
- * *
- * http://www.FreeRTOS.org/FAQHelp.html *
- * *
- ***************************************************************************
-
-
- http://www.FreeRTOS.org - Documentation, training, latest versions, license
- and contact details.
-
- http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
- including FreeRTOS+Trace - an indispensable productivity tool.
-
- Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
- the code with commercial support, indemnification, and middleware, under
- the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
- provide a safety engineered and independently SIL3 certified version under
- the SafeRTOS brand: http://www.SafeRTOS.com.
-*/
-
-/*
- * A sample implementation of pvPortMalloc() and vPortFree() that permits
- * allocated blocks to be freed, but does not combine adjacent free blocks
- * into a single larger block (and so will fragment memory). See heap_4.c for
- * an aquivalent that does combine adjacent blocks into single larger blocks.
- *
- * See heap_1.c, heap_3.c and heap_4.c for alternative implementations, and the
- * memory management pages of http://www.FreeRTOS.org for more information.
- */
-#include
-
-/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
-all the API functions to use the MPU wrappers. That should only be done when
-task.h is included from an application file. */
-#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-#include "FreeRTOS.h"
-#include "task.h"
-
-#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-/* Allocate the memory for the heap. The struct is used to force byte
-alignment without using any non-portable code. */
-static union xRTOS_HEAP
-{
- #if portBYTE_ALIGNMENT == 8
- volatile portDOUBLE dDummy;
- #else
- volatile unsigned long ulDummy;
- #endif
- unsigned char ucHeap[ configTOTAL_HEAP_SIZE ];
-} xHeap;
-
-/* Define the linked list structure. This is used to link free blocks in order
-of their size. */
-typedef struct A_BLOCK_LINK
-{
- struct A_BLOCK_LINK *pxNextFreeBlock; /*<< The next free block in the list. */
- size_t xBlockSize; /*<< The size of the free block. */
-} xBlockLink;
-
-
-static const unsigned short heapSTRUCT_SIZE = ( sizeof( xBlockLink ) + portBYTE_ALIGNMENT - ( sizeof( xBlockLink ) % portBYTE_ALIGNMENT ) );
-#define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( heapSTRUCT_SIZE * 2 ) )
-
-/* Create a couple of list links to mark the start and end of the list. */
-static xBlockLink xStart, xEnd;
-
-/* Keeps track of the number of free bytes remaining, but says nothing about
-fragmentation. */
-static size_t xFreeBytesRemaining = configTOTAL_HEAP_SIZE;
-
-/* STATIC FUNCTIONS ARE DEFINED AS MACROS TO MINIMIZE THE FUNCTION CALL DEPTH. */
-
-/*
- * Insert a block into the list of free blocks - which is ordered by size of
- * the block. Small blocks at the start of the list and large blocks at the end
- * of the list.
- */
-#define prvInsertBlockIntoFreeList( pxBlockToInsert ) \
-{ \
-xBlockLink *pxIterator; \
-size_t xBlockSize; \
- \
- xBlockSize = pxBlockToInsert->xBlockSize; \
- \
- /* Iterate through the list until a block is found that has a larger size */ \
- /* than the block we are inserting. */ \
- for( pxIterator = &xStart; pxIterator->pxNextFreeBlock->xBlockSize < xBlockSize; pxIterator = pxIterator->pxNextFreeBlock ) \
- { \
- /* There is nothing to do here - just iterate to the correct position. */ \
- } \
- \
- /* Update the list to include the block being inserted in the correct */ \
- /* position. */ \
- pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; \
- pxIterator->pxNextFreeBlock = pxBlockToInsert; \
-}
-/*-----------------------------------------------------------*/
-
-#define prvHeapInit() \
-{ \
-xBlockLink *pxFirstFreeBlock; \
- \
- /* xStart is used to hold a pointer to the first item in the list of free */ \
- /* blocks. The void cast is used to prevent compiler warnings. */ \
- xStart.pxNextFreeBlock = ( void * ) xHeap.ucHeap; \
- xStart.xBlockSize = ( size_t ) 0; \
- \
- /* xEnd is used to mark the end of the list of free blocks. */ \
- xEnd.xBlockSize = configTOTAL_HEAP_SIZE; \
- xEnd.pxNextFreeBlock = NULL; \
- \
- /* To start with there is a single free block that is sized to take up the \
- entire heap space. */ \
- pxFirstFreeBlock = ( void * ) xHeap.ucHeap; \
- pxFirstFreeBlock->xBlockSize = configTOTAL_HEAP_SIZE; \
- pxFirstFreeBlock->pxNextFreeBlock = &xEnd; \
-}
-/*-----------------------------------------------------------*/
-
-void *pvPortMalloc( size_t xWantedSize )
-{
-xBlockLink *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
-static portBASE_TYPE xHeapHasBeenInitialised = pdFALSE;
-void *pvReturn = NULL;
-
- vTaskSuspendAll();
- {
- /* If this is the first call to malloc then the heap will require
- initialisation to setup the list of free blocks. */
- if( xHeapHasBeenInitialised == pdFALSE )
- {
- prvHeapInit();
- xHeapHasBeenInitialised = pdTRUE;
- }
-
- /* The wanted size is increased so it can contain a xBlockLink
- structure in addition to the requested amount of bytes. */
- if( xWantedSize > 0 )
- {
- xWantedSize += heapSTRUCT_SIZE;
-
- /* Ensure that blocks are always aligned to the required number of bytes. */
- if( xWantedSize & portBYTE_ALIGNMENT_MASK )
- {
- /* Byte alignment required. */
- xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
- }
- }
-
- if( ( xWantedSize > 0 ) && ( xWantedSize < configTOTAL_HEAP_SIZE ) )
- {
- /* Blocks are stored in byte order - traverse the list from the start
- (smallest) block until one of adequate size is found. */
- pxPreviousBlock = &xStart;
- pxBlock = xStart.pxNextFreeBlock;
- while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
- {
- pxPreviousBlock = pxBlock;
- pxBlock = pxBlock->pxNextFreeBlock;
- }
-
- /* If we found the end marker then a block of adequate size was not found. */
- if( pxBlock != &xEnd )
- {
- /* Return the memory space - jumping over the xBlockLink structure
- at its start. */
- pvReturn = ( void * ) ( ( ( unsigned char * ) pxPreviousBlock->pxNextFreeBlock ) + heapSTRUCT_SIZE );
-
- /* This block is being returned for use so must be taken out of the
- list of free blocks. */
- pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
-
- /* If the block is larger than required it can be split into two. */
- if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
- {
- /* This block is to be split into two. Create a new block
- following the number of bytes requested. The void cast is
- used to prevent byte alignment warnings from the compiler. */
- pxNewBlockLink = ( void * ) ( ( ( unsigned char * ) pxBlock ) + xWantedSize );
-
- /* Calculate the sizes of two blocks split from the single
- block. */
- pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
- pxBlock->xBlockSize = xWantedSize;
-
- /* Insert the new block into the list of free blocks. */
- prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
- }
-
- xFreeBytesRemaining -= pxBlock->xBlockSize;
- }
- }
- }
- xTaskResumeAll();
-
- #if( configUSE_MALLOC_FAILED_HOOK == 1 )
- {
- if( pvReturn == NULL )
- {
- extern void vApplicationMallocFailedHook( void );
- vApplicationMallocFailedHook();
- }
- }
- #endif
-
- return pvReturn;
-}
-/*-----------------------------------------------------------*/
-
-void vPortFree( void *pv )
-{
-unsigned char *puc = ( unsigned char * ) pv;
-xBlockLink *pxLink;
-
- if( pv != NULL )
- {
- /* The memory being freed will have an xBlockLink structure immediately
- before it. */
- puc -= heapSTRUCT_SIZE;
-
- /* This casting is to keep the compiler from issuing warnings. */
- pxLink = ( void * ) puc;
-
- vTaskSuspendAll();
- {
- /* Add this block to the list of free blocks. */
- prvInsertBlockIntoFreeList( ( ( xBlockLink * ) pxLink ) );
- xFreeBytesRemaining += pxLink->xBlockSize;
- }
- xTaskResumeAll();
- }
-}
-/*-----------------------------------------------------------*/
-
-size_t xPortGetFreeHeapSize( void )
-{
- return xFreeBytesRemaining;
-}
-/*-----------------------------------------------------------*/
-
-void vPortInitialiseBlocks( void )
-{
- /* This just exists to keep the linker quiet. */
-}
diff --git a/vendor/freertos/freertos/Source/portable/MemMang/heap_3.c b/vendor/freertos/freertos/Source/portable/MemMang/heap_3.c
deleted file mode 100644
index 04e218b1e..000000000
--- a/vendor/freertos/freertos/Source/portable/MemMang/heap_3.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.
-
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
- ***************************************************************************
- * *
- * FreeRTOS tutorial books are available in pdf and paperback. *
- * Complete, revised, and edited pdf reference manuals are also *
- * available. *
- * *
- * Purchasing FreeRTOS documentation will not only help you, by *
- * ensuring you get running as quickly as possible and with an *
- * in-depth knowledge of how to use FreeRTOS, it will also help *
- * the FreeRTOS project to continue with its mission of providing *
- * professional grade, cross platform, de facto standard solutions *
- * for microcontrollers - completely free of charge! *
- * *
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
- * *
- * Thank you for using FreeRTOS, and thank you for your support! *
- * *
- ***************************************************************************
-
-
- This file is part of the FreeRTOS distribution.
-
- FreeRTOS is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License (version 2) as published by the
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
- >>>NOTE<<< The modification to the GPL is included to allow you to
- distribute a combined work that includes FreeRTOS without being obliged to
- provide the source code for proprietary components outside of the FreeRTOS
- kernel. FreeRTOS is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details. You should have received a copy of the GNU General Public
- License and the FreeRTOS license exception along with FreeRTOS; if not it
- can be viewed here: http://www.freertos.org/a00114.html and also obtained
- by writing to Richard Barry, contact details for whom are available on the
- FreeRTOS WEB site.
-
- 1 tab == 4 spaces!
-
- ***************************************************************************
- * *
- * Having a problem? Start by reading the FAQ "My application does *
- * not run, what could be wrong?" *
- * *
- * http://www.FreeRTOS.org/FAQHelp.html *
- * *
- ***************************************************************************
-
-
- http://www.FreeRTOS.org - Documentation, training, latest versions, license
- and contact details.
-
- http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
- including FreeRTOS+Trace - an indispensable productivity tool.
-
- Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
- the code with commercial support, indemnification, and middleware, under
- the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
- provide a safety engineered and independently SIL3 certified version under
- the SafeRTOS brand: http://www.SafeRTOS.com.
-*/
-
-
-/*
- * Implementation of pvPortMalloc() and vPortFree() that relies on the
- * compilers own malloc() and free() implementations.
- *
- * This file can only be used if the linker is configured to to generate
- * a heap memory area.
- *
- * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the
- * memory management pages of http://www.FreeRTOS.org for more information.
- */
-
-#include
-
-/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
-all the API functions to use the MPU wrappers. That should only be done when
-task.h is included from an application file. */
-#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-#include "FreeRTOS.h"
-#include "task.h"
-
-#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-/*-----------------------------------------------------------*/
-
-void *pvPortMalloc( size_t xWantedSize )
-{
-void *pvReturn;
-
- vTaskSuspendAll();
- {
- pvReturn = malloc( xWantedSize );
- }
- xTaskResumeAll();
-
- #if( configUSE_MALLOC_FAILED_HOOK == 1 )
- {
- if( pvReturn == NULL )
- {
- extern void vApplicationMallocFailedHook( void );
- vApplicationMallocFailedHook();
- }
- }
- #endif
-
- return pvReturn;
-}
-/*-----------------------------------------------------------*/
-
-void vPortFree( void *pv )
-{
- if( pv )
- {
- vTaskSuspendAll();
- {
- free( pv );
- }
- xTaskResumeAll();
- }
-}
-
-
-