lwip: Add support for the latest freertos821
This patch makes changes to add support for the latest freertos821 by making changes in mld, tcl and sys_arch.c files. Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com> Reviewed-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
This commit is contained in:
parent
76b6be7e99
commit
931b7746a4
3 changed files with 15 additions and 20 deletions
|
@ -6,7 +6,7 @@ BEGIN LIBRARY lwip141
|
|||
OPTION copyfiles = all;
|
||||
OPTION desc = "lwIP TCP/IP Stack library: lwIP v1.4.1";
|
||||
OPTION app_linker_flags = "-Wl,--start-group,-lxil,-llwip4,-lgcc,-lc,--end-group";
|
||||
OPTION requires_os = (standalone xilkernel freertos_zynq);
|
||||
OPTION requires_os = (standalone xilkernel freertos821_xilinx);
|
||||
OPTION VERSION = 1.2;
|
||||
OPTION NAME = lwip141;
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ proc lwip_sw_drc {libhandle emacs_list} {
|
|||
set os_handle [hsi::get_os]
|
||||
set os_name [common::get_property NAME $os_handle]
|
||||
if { [string compare -nocase "xilkernel" $os_name] != 0} {
|
||||
if { [string compare -nocase "freertos_zynq" $os_name] != 0} {
|
||||
if { [string compare -nocase "freertos821_xilinx" $os_name] != 0} {
|
||||
error "ERROR: lwIP with Sockets requires \"xilkernel or freertos\" OS" "" "mdt_error"
|
||||
}
|
||||
}
|
||||
|
@ -421,10 +421,10 @@ proc generate_lwip_opts {libhandle} {
|
|||
puts $lwipopts_fd "\#define OS_IS_XILKERNEL"
|
||||
puts $lwipopts_fd "\#define TCPIP_THREAD_PRIO $thread_prio"
|
||||
puts $lwipopts_fd "\#define DEFAULT_THREAD_PRIO $thread_prio"
|
||||
puts $lwipopts_fd "\#define TCPIP_THREAD_STACKSIZE 32768"
|
||||
puts $lwipopts_fd "\#define TCPIP_THREAD_STACKSIZE 4096"
|
||||
puts $lwipopts_fd ""
|
||||
}
|
||||
if { [string compare -nocase "freertos_zynq" $os_name] == 0} {
|
||||
if { [string compare -nocase "freertos821_xilinx" $os_name] == 0} {
|
||||
puts $lwipopts_fd "\#define OS_IS_FREERTOS"
|
||||
puts $lwipopts_fd "\#define DEFAULT_THREAD_PRIO $thread_prio"
|
||||
puts $lwipopts_fd "\#define TCPIP_THREAD_PRIO (DEFAULT_THREAD_PRIO+1)"
|
||||
|
|
|
@ -551,7 +551,7 @@ void sys_mbox_post( sys_mbox_t *pxMailBox, void *pxMessageToPost )
|
|||
if( xInsideISR != pdFALSE ) {
|
||||
xQueueSendToBackFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -580,7 +580,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
{
|
||||
xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,7 +653,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
xElapsed = ( xEndTime - xStartTime ) * portTICK_RATE_MS;
|
||||
ulReturn = xElapsed;
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -682,7 +682,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
if( xInsideISR != pdFALSE ) {
|
||||
xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -731,7 +731,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
{
|
||||
lResult = xQueueReceiveFromISR( *pxMailBox, &( *ppvBuffer ), &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -768,15 +768,10 @@ err_t sys_sem_new( sys_sem_t *pxSemaphore, u8_t ucCount )
|
|||
{
|
||||
err_t xReturn = ERR_MEM;
|
||||
|
||||
vSemaphoreCreateBinary( ( *pxSemaphore ) );
|
||||
*pxSemaphore = xSemaphoreCreateBinary();
|
||||
|
||||
if( *pxSemaphore != NULL )
|
||||
{
|
||||
if( ucCount == 0U )
|
||||
{
|
||||
xSemaphoreTake( *pxSemaphore, 1UL );
|
||||
}
|
||||
|
||||
xReturn = ERR_OK;
|
||||
SYS_STATS_INC_USED( sem );
|
||||
}
|
||||
|
@ -829,7 +824,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS;
|
||||
ulReturn = xElapsed;
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -854,7 +849,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
if( xInsideISR != pdFALSE ) {
|
||||
xSemaphoreTakeFromISR( *pxSemaphore, &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -904,7 +899,7 @@ void sys_mutex_lock( sys_mutex_t *pxMutex )
|
|||
if( xInsideISR != pdFALSE ) {
|
||||
xSemaphoreTakeFromISR( *pxMutex, &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -919,7 +914,7 @@ void sys_mutex_unlock(sys_mutex_t *pxMutex )
|
|||
if( xInsideISR != pdFALSE ) {
|
||||
xSemaphoreGiveFromISR( *pxMutex, &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE)
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
else
|
||||
xSemaphoreGive( *pxMutex );
|
||||
|
@ -951,7 +946,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
{
|
||||
xSemaphoreGiveFromISR( *pxSemaphore, &xHigherPriorityTaskWoken );
|
||||
if (xHigherPriorityTaskWoken == pdTRUE) {
|
||||
portYIELD_FROM_ISR();
|
||||
taskYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue