From: rtel Date: Wed, 25 May 2016 11:47:42 +0000 (+0000) Subject: Final check in before tagging V9.0.0. X-Git-Tag: V9.0.0 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=abe3cef8e063a086b84eea9aa8bc7bcad1a20fb8;p=freertos Final check in before tagging V9.0.0. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2463 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c index a07e648dd..12935c525 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c @@ -85,12 +85,16 @@ * !!! IMPORTANT NOTE !!! * The GCC libraries that ship with the Xilinx SDK make use of the floating * point registers. To avoid this causing corruption it is necessary to avoid - * their use. For this reason main.c contains very basic C implementations of - * the standard C library functions memset(), memcpy() and memcmp(), which are - * are used by FreeRTOS itself. Defining these functions in the project - * prevents the linker pulling them in from the library. Any other standard C - * library functions that are used by the application must likewise be defined - * in C. + * their use unless a task has been given a floating point context. See + * http://www.freertos.org/Using-FreeRTOS-on-Cortex-A-Embedded-Processors.html + * for information on how to give a task a floating point context, and how to + * handle floating point operations in interrupts. As this demo does not give + * all tasks a floating point context main.c contains very basic C + * implementations of the standard C library functions memset(), memcpy() and + * memcmp(), which are are used by FreeRTOS itself. Defining these functions in + * the project prevents the linker pulling them in from the library. Any other + * standard C library functions that are used by the application must likewise + * be defined in C. * * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/CreateRepoDirectoryStructure.bat b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/CreateRepoDirectoryStructure.bat deleted file mode 100644 index 7ff380081..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/CreateRepoDirectoryStructure.bat +++ /dev/null @@ -1,9 +0,0 @@ -REM Copy the FreeRTOS source files, including the Cortex-A9 and Microblaze port -REM layers into the repository directory structure. - -copy ..\..\Source\*.c .\repo\bsp\freertos822_xilinx_v1_0\src\Source -copy ..\..\Source\include\*.h .\repo\bsp\freertos822_xilinx_v1_0\src\Source\include -copy ..\..\Source\portable\GCC\ARM_CA9\*.* .\repo\bsp\freertos822_xilinx_v1_0\src\Source\portable\GCC\ARM_CA9 -copy ..\..\Source\portable\GCC\MicroBlazeV8\*.* .\repo\bsp\freertos822_xilinx_v1_0\src\Source\portable\GCC\MicroBlazeV8 -copy ..\..\Source\portable\MemMang\heap_4.c .\repo\bsp\freertos822_xilinx_v1_0\src\Source\portable\MemMang - diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.mld b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.mld deleted file mode 100644 index d8529ce65..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.mld +++ /dev/null @@ -1,82 +0,0 @@ -# -# Copyright (C) 2015 Xilinx, Inc. -# -# This file is part of the FreeRTOS port. -# -# 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. Full license text is available on the following -# link: http://www.freertos.org/a00114.html -# - -OPTION psf_version = 2.1.0 ; -BEGIN OS freertos822_xilinx - -OPTION DRC = FreeRTOS_drc ; -# _RB_ Not sure if line below is valid. -OPTION supported_peripherals = ps7_cortexa9 microblaze -OPTION COPYFILES = all; -OPTION NAME = freertos822_xilinx; -OPTION VERSION = 1.0; -OPTION DEPENDS = (standalone_v5_0); -OPTION APP_LINKER_FLAGS = "-Wl,--start-group,-lxil,-lfreertos,-lgcc,-lc,--end-group"; -OPTION DESC = "FreeRTOS is a market leading open source RTOS"; - -# STDIN/STDOUT -PARAM name = stdin, desc = "stdin peripheral", type = peripheral_instance, requires_interface = stdin, default=none, range = (ps7_uart, ps7_coresight_comp, iomodule, axi_uartlite, axi_uart16550, mdm); -PARAM name = stdout, desc = "stdout peripheral", type = peripheral_instance, requires_interface = stdout, default=none, range = (ps7_uart, ps7_coresight_comp, iomodule, axi_uartlite, axi_uart16550, mdm); - -BEGIN CATEGORY kernel_behavior - PARAM name = kernel_behavior, type = bool, default = true, desc = "Parameters relating to the kernel behavior", permit = none; - PARAM name = max_api_call_interrupt_priority, type = int, default = 18, desc = "The maximum interrupt priority from which interrupt safe FreeRTOS API calls can be made."; - PARAM name = use_preemption, type = bool, default = true, desc = "Set to true to use the preemptive scheduler, or false to use the cooperative scheduler."; - PARAM name = tick_rate, type = int, default = 100, desc = "Number of RTOS ticks per sec"; - PARAM name = idle_yield, type = bool, default = true, desc = "Set to true if the Idle task should yield if another idle priority task is able to run, or false if the idle task should always use its entire time slice unless it is preempted."; - PARAM name = max_priorities, type = int, default = 4, desc = "The number of task priorities that will be available. Priorities can be assigned from zero to (max_priorities - 1)"; - PARAM name = minimal_stack_size, type = int, default = 180, desc = "The size of the stack allocated to the Idle task. Also used by standard demo and test tasks found in the main FreeRTOS download."; - PARAM name = total_heap_size, type = int, default = 32768, desc = "Sets the amount of RAM reserved for use by FreeRTOS - used when tasks, queues, semaphores and event groups are created."; - PARAM name = max_task_name_len, type = int, default = 8, desc = "The maximum number of characters that can be in the name of a task."; - PARAM name = use_timeslicing, type = bool, default = true, desc = "When true equal priority ready tasks will share CPU time with a context switch on each tick interrupt."; - PARAM name = use_port_optimized_task_selection, type = bool, default = true, desc ="When true task selection will be faster at the cost of limiting the maximum number of unique priorities to 32."; -END CATEGORY - -BEGIN CATEGORY kernel_features - PARAM name = kernel_features, type = bool, default = true, desc = "Include or exclude kernel features", permit = none; - PARAM name = use_freertos_asserts, type = bool, default = true, desc = "Defines configASSERT() to assist development and debugging. The application can override the default implementation of vApplicationAssert( char *pcFile, uint32_t ulLine )"; - PARAM name = use_mutexes, type = bool, default = true, desc = "Set to true to include mutex functionality, or false to exclude mutex functionality."; - PARAM name = use_recursive_mutexes, type = bool, default = true, desc = "Set to true to include recursive mutex functionality, or false to exclude recursive mutex functionality."; - PARAM name = use_counting_semaphores, type = bool, default = true, desc = "Set to true to include counting semaphore functionality, or false to exclude recursive mutex functionality."; - PARAM name = queue_registry_size, type = int, default = 10, desc = "The maximum number of queues that can be registered at any one time. Only registered queues can be viewed in the Eclipse/GDB kernel aware debugger plug-in."; - PARAM name = use_trace_facility, type = bool, default = true, desc = "Set to true to include the legacy trace functionality, and a few other features. traceMACROS are the preferred method of tracing now."; - PARAM name = use_newlib_reent, type = bool, default = false, desc = "When true each task will have its own Newlib reent structure."; - PARAM name = use_queue_sets, type = bool, default = false, desc = "Set to true to include queue set functionality."; - PARAM name = use_task_notifications, type = bool, default = true, desc = "Set to true to include direct to task notification functionality."; - PARAM name = check_for_stack_overflow, type = int, default = 2, desc = "Set to 0 for no overflow checking. Set to 1 to include basic run time task stack checking. Set to 2 to include more comprehensive run time task stack checking."; - PARAM name = use_stats_formatting_functions, type = bool, default = true, desc = "Set to 1 to include the vTaskList() and vTaskGetRunTimeStats() functions, which format run-time data into human readable text."; - PARAM name = num_thread_local_storage_pointers, type = int, default = 0, desc ="Sets the number of pointers each task has to store thread local values."; -END CATEGORY - -BEGIN CATEGORY hook_functions - PARAM name = hook_functions, type = bool, default = true, desc = "Include or exclude application defined hook (callback) functions. Callback functions must be defined by the application that is using FreeRTOS", permit = none; - PARAM name = use_idle_hook, type = bool, default = false, desc = "Set to true for the kernel to call vApplicationIdleHook() on each iteration of the idle task. The application must provide an implementation of vApplicationIdleHook()."; - PARAM name = use_tick_hook, type = bool, default = false, desc = "Set to true for the kernel to call vApplicationTickHook() during each tick interrupt. The application must provide an implementation of vApplicationTickHook()."; - PARAM name = use_malloc_failed_hook, type = bool, default = true, desc = "Only used if a FreeRTOS memory manager (heap_n.c) is included in the project. Set to true for the kernel to call vApplicationMallocFailedHookHook() if there is insufficient FreeRTOS heap available for a task, queue or semaphore to be created. The application can override the default implementation of vApplicationMallocFailedHook()."; -END CATEGORY - -BEGIN CATEGORY software_timers - PARAM name = software_timers, type = bool, default = true, desc = "Options relating to the software timers functionality", permit = user; - PARAM name = use_timers, type = bool, default = true, desc = "Set to true to include software timer functionality, or false to exclude software timer functionality"; - PARAM name = timer_task_priority, type = string, default = "(configMAX_PRIORITIES - 1)", desc = "The priority at which the software timer service/daemon task will execute."; - PARAM name = timer_command_queue_length, type = int, default = 10, desc = "The number of commands the timer command queue can hold at any one time."; - PARAM name = timer_task_stack_depth, type = string, default = "(configMINIMAL_STACK_SIZE), desc = "The size of the stack allocated to the timer service/daemon task."; -END CATEGORY - -END OS diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.mss b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.mss deleted file mode 100644 index ed1ab460d..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.mss +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2015 Xilinx, Inc. -# -# This file is part of the FreeRTOS port. -# -# 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. Full license text is available on the following -# link: http://www.freertos.org/a00114.html -# - -PARAMETER VERSION = 2.2.0 - -BEGIN OS - PARAMETER OS_NAME = freertos822_xilinx - PARAMETER STDIN = * - PARAMETER STDOUT = * - PARAMETER SYSTMR_SPEC = true - PARAMETER SYSTMR_DEV = * - PARAMETER SYSINTC_SPEC = * -END diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.tcl b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.tcl deleted file mode 100644 index 27451fced..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/data/freertos822_xilinx.tcl +++ /dev/null @@ -1,766 +0,0 @@ -# -# Copyright (C) 2015 Xilinx, Inc. -# -# This file is part of the FreeRTOS port. -# -# 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. Full license text is available on the following -# link: http://www.freertos.org/a00114.html -# - - -# standalone bsp version. set this to the latest "ACTIVE" version. -set standalone_version standalone_v5_0 - -proc FreeRTOS_drc {os_handle} { - - global env - - set sw_proc_handle [hsi::get_sw_processor] - set hw_proc_handle [hsi::get_cells [common::get_property HW_INSTANCE $sw_proc_handle] ] - set proctype [common::get_property IPNAME $hw_proc_handle] - - if { $proctype == "microblaze" } { - mb_drc_checks - } -} - -proc generate {os_handle} { - - variable standalone_version - set have_tick_timer 0 - set sw_proc_handle [hsi::get_sw_processor] - set hw_proc_handle [hsi::get_cells [common::get_property HW_INSTANCE $sw_proc_handle] ] - set proctype [common::get_property IP_NAME $hw_proc_handle] - set need_config_file "false" - - set commonsrcdir "../${standalone_version}/src/common" - set mbsrcdir "../${standalone_version}/src/microblaze" - set arma9srcdir "../${standalone_version}/src/cortexa9" - set arma9gccdir "../${standalone_version}/src/cortexa9/gcc" - set arma9armccdir "../${standalone_version}/src/cortexa9/armcc" - set arma9iarccdir "../${standalone_version}/src/cortexa9/iarcc" - - foreach entry [glob -nocomplain [file join $commonsrcdir *]] { - file copy -force $entry [file join ".." "${standalone_version}" "src"] - } - - switch $proctype { - - "ps7_cortexa9" { - puts "In start copy ps7_cortexa9" - file copy -force "./src/Makefile_ps7_cortexa9" "./src/Makefile" - file copy -force "./src/Makefile" "./src/Makefile_dep" - - foreach entry [glob -nocomplain [file join $arma9srcdir *]] { - file copy -force $entry [file join ".." "${standalone_version}" "src"] - } - - foreach entry [glob -nocomplain [file join $arma9gccdir *]] { - file copy -force $entry [file join ".." "${standalone_version}" "src"] - } - - file delete -force "../${standalone_version}/src/gcc" - - set need_config_file "true" - - set file_handle [::hsi::utils::open_include_file "xparameters.h"] - puts $file_handle "#include \"xparameters_ps.h\"" - puts $file_handle "" - close $file_handle - } - - "microblaze" { - puts "In start copy microblaze" - file copy -force "./src/Makefile_microblaze" "./src/Makefile" - file copy -force "./src/Makefile" "./src/Makefile_dep" - - foreach entry [glob -nocomplain [file join $mbsrcdir *]] { - if { [string first "microblaze_interrupt_handler" $entry] == -1 } { ;# Do not copy over the Standalone BSP exception handler - file copy -force $entry [file join ".." "${standalone_version}" "src"] - } - } - - set need_config_file "true" - } - - "default" { - puts "processor type $proctype not supported\n" - } - } - - # Write the Config.make file - set makeconfig [open "../${standalone_version}/src/config.make" w] - file rename -force -- "../${standalone_version}/src/Makefile" "../${standalone_version}/src/Makefile_depends" - - if { $proctype == "ps7_cortexa9" || $proctype == "microblaze" } { - puts $makeconfig "LIBSOURCES = *.c *.S" - puts $makeconfig "LIBS = standalone_libs" - } - - close $makeconfig - - # Remove arm directory... - file delete -force $arma9srcdir - file delete -force $mbsrcdir - - # Copy core kernel files to the main src directory - file copy -force [file join src Source tasks.c] ./src - file copy -force [file join src Source queue.c] ./src - file copy -force [file join src Source list.c] ./src - file copy -force [file join src Source timers.c] ./src - file copy -force [file join src Source event_groups.c] ./src - file copy -force [file join src Source portable MemMang heap_4.c] ./src - - if { $proctype == "ps7_cortexa9" } { - file copy -force [file join src Source portable GCC ARM_CA9 port.c] ./src - file copy -force [file join src Source portable GCC ARM_CA9 portASM.S] ./src - file copy -force [file join src Source portable GCC ARM_CA9 port_asm_vectors.S] ./src - file copy -force [file join src Source portable GCC ARM_CA9 portmacro.h] ./src - file copy -force [file join src Source portable GCC ARM_CA9 portZynq7000.c] ./src - } - - if { $proctype == "microblaze" } { - file copy -force [file join src Source portable GCC MicroBlazeV8 port.c] ./src - file copy -force [file join src Source portable GCC MicroBlazeV8 port_exceptions.c] ./src - file copy -force [file join src Source portable GCC MicroBlazeV8 portasm.S] ./src - file copy -force [file join src Source portable GCC MicroBlazeV8 portmacro.h] ./src - file copy -force [file join src Source portable GCC MicroBlazeV8 portmicroblaze.c] ./src - - # Create config file for microblaze interrupt handling - if {[string compare -nocase $need_config_file "true"] == 0} { - xhandle_mb_interrupts - } - - # Create config files for Microblaze exception handling - if { [mb_has_exceptions $hw_proc_handle] } { - xcreate_mb_exc_config_file - } - - # Create bspconfig file - set bspcfg_fn [file join ".." "${standalone_version}" "src" "bspconfig.h"] - file delete $bspcfg_fn - set bspcfg_fh [open $bspcfg_fn w] - xprint_generated_header $bspcfg_fh "Configurations for Standalone BSP" - - if { [mb_has_pvr $hw_proc_handle] } { - - set pvr [get_property CONFIG.C_PVR $hw_proc_handle] - - switch $pvr { - "0" { - puts $bspcfg_fh "#define MICROBLAZE_PVR_NONE" - } - "1" { - puts $bspcfg_fh "#define MICROBLAZE_PVR_BASIC" - } - "2" { - puts $bspcfg_fh "#define MICROBLAZE_PVR_FULL" - } - "default" { - puts $bspcfg_fh "#define MICROBLAZE_PVR_NONE" - } - } - } - - close $bspcfg_fh - } - - set headers [glob -join ./src/Source/include *.\[h\]] - foreach header $headers { - file copy -force $header src - } - - file delete -force [file join src Source] - - # Remove microblaze, cortexa9 and common directories... - file delete -force $mbsrcdir - file delete -force $commonsrcdir - file delete -force $arma9srcdir - file delete -force $arma9gccdir - file delete -force $arma9armccdir - file delete -force $arma9iarccdir - - # Handle stdin and stdout - ::hsi::utils::handle_stdin $os_handle - ::hsi::utils::handle_stdout $os_handle - - file copy -force "./src/outbyte.c" "../${standalone_version}/src/" - file copy -force "./src/inbyte.c" "../${standalone_version}/src/" - - set file_handle [::hsi::utils::open_include_file "xparameters.h"] - puts $file_handle "\n/******************************************************************/\n" - close $file_handle - - ############################################################################ - ## Add constants common to all architectures to the configuration file. - ############################################################################ - - set config_file [xopen_new_include_file "./src/FreeRTOSConfig.h" "FreeRTOS Configuration parameters"] - puts $config_file "\#include \"xparameters.h\" \n" - - set val [common::get_property CONFIG.use_preemption $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_PREEMPTION" "0" - } else { - xput_define $config_file "configUSE_PREEMPTION" "1" - } - - set val [common::get_property CONFIG.use_mutexes $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_MUTEXES" "0" - } else { - xput_define $config_file "configUSE_MUTEXES" "1" - } - - set val [common::get_property CONFIG.use_recursive_mutexes $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_RECURSIVE_MUTEXES" "0" - } else { - xput_define $config_file "configUSE_RECURSIVE_MUTEXES" "1" - } - - set val [common::get_property CONFIG.use_counting_semaphores $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_COUNTING_SEMAPHORES" "0" - } else { - xput_define $config_file "configUSE_COUNTING_SEMAPHORES" "1" - } - - set val [common::get_property CONFIG.use_timers $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_TIMERS" "0" - } else { - xput_define $config_file "configUSE_TIMERS" "1" - } - - set val [common::get_property CONFIG.use_idle_hook $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_IDLE_HOOK" "0" - } else { - xput_define $config_file "configUSE_IDLE_HOOK" "1" - } - - set val [common::get_property CONFIG.use_tick_hook $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_TICK_HOOK" "0" - } else { - xput_define $config_file "configUSE_TICK_HOOK" "1" - } - - set val [common::get_property CONFIG.use_malloc_failed_hook $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_MALLOC_FAILED_HOOK" "0" - } else { - xput_define $config_file "configUSE_MALLOC_FAILED_HOOK" "1" - } - - set val [common::get_property CONFIG.use_trace_facility $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_TRACE_FACILITY" "0" - } else { - xput_define $config_file "configUSE_TRACE_FACILITY" "1" - } - - set val [common::get_property CONFIG.use_task_notifications $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_TASK_NOTIFICATIONS" "0" - } else { - xput_define $config_file "configUSE_TASK_NOTIFICATIONS" "1" - } - - xput_define $config_file "configUSE_16_BIT_TICKS" "0" - xput_define $config_file "configUSE_APPLICATION_TASK_TAG" "0" - xput_define $config_file "configUSE_CO_ROUTINES" "0" - - set tick_rate [common::get_property CONFIG.tick_rate $os_handle] - xput_define $config_file "configTICK_RATE_HZ" "($tick_rate)" - - set max_priorities [common::get_property CONFIG.max_priorities $os_handle] - xput_define $config_file "configMAX_PRIORITIES" "($max_priorities)" - xput_define $config_file "configMAX_CO_ROUTINE_PRIORITIES" "2" - - set min_stack [common::get_property CONFIG.minimal_stack_size $os_handle] - set min_stack [expr [expr $min_stack + 3] & 0xFFFFFFFC] - xput_define $config_file "configMINIMAL_STACK_SIZE" "( ( unsigned short ) $min_stack)" - - set total_heap_size [common::get_property CONFIG.total_heap_size $os_handle] - xput_define $config_file "configTOTAL_HEAP_SIZE" "( ( size_t ) ( $total_heap_size ) )" - - set max_task_name_len [common::get_property CONFIG.max_task_name_len $os_handle] - xput_define $config_file "configMAX_TASK_NAME_LEN" $max_task_name_len - - set val [common::get_property CONFIG.idle_yield $os_handle] - if {$val == "false"} { - xput_define $config_file "configIDLE_SHOULD_YIELD" "0" - } else { - xput_define $config_file "configIDLE_SHOULD_YIELD" "1" - } - - set val [common::get_property CONFIG.timer_task_priority $os_handle] - if {$val == "false"} { - xput_define $config_file "configTIMER_TASK_PRIORITY" "0" - } else { - xput_define $config_file "configTIMER_TASK_PRIORITY" "1" - } - - set val [common::get_property CONFIG.timer_command_queue_length $os_handle] - if {$val == "false"} { - xput_define $config_file "configTIMER_QUEUE_LENGTH" "0" - } else { - xput_define $config_file "configTIMER_QUEUE_LENGTH" "10" - } - - set val [common::get_property CONFIG.timer_task_stack_depth $os_handle] - if {$val == "false"} { - xput_define $config_file "configTIMER_TASK_STACK_DEPTH" "0" - } else { - xput_define $config_file "configTIMER_TASK_STACK_DEPTH" $min_stack - } - - set val [common::get_property CONFIG.use_newlib_reent $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_NEWLIB_REENTRANT" "0" - } else { - xput_define $config_file "configUSE_NEWLIB_REENTRANT" "1" - } - - set val [common::get_property CONFIG.use_timeslicing $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_TIME_SLICING" "0" - } else { - xput_define $config_file "configUSE_TIME_SLICING" "1" - } - - set val [get_property CONFIG.use_freertos_asserts $os_handle] - if {$val == "true"} { - puts $config_file "#define configASSERT( x ) if( ( x ) == 0 ) vApplicationAssert( __FILE__, __LINE__ )\n" - } - - set val [common::get_property CONFIG.use_queue_sets $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_QUEUE_SETS" "0" - } else { - xput_define $config_file "configUSE_QUEUE_SETS" "1" - } - - set val [common::get_property CONFIG.check_for_stack_overflow $os_handle] - if {$val == "false"} { - xput_define $config_file "configCHECK_FOR_STACK_OVERFLOW" "0" - } else { - if { $val > 2 } { - error "ERROR: check_for_stack_overflow must be between 0 and 2" - } else { - xput_define $config_file "configCHECK_FOR_STACK_OVERFLOW" $val - } - } - - - set val [common::get_property CONFIG.queue_registry_size $os_handle] - if {$val == "false"} { - xput_define $config_file "configQUEUE_REGISTRY_SIZE" "0" - } else { - xput_define $config_file "configQUEUE_REGISTRY_SIZE" $val - } - - - set val [common::get_property CONFIG.use_stats_formatting_functions $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_STATS_FORMATTING_FUNCTIONS" "0" - } else { - xput_define $config_file "configUSE_STATS_FORMATTING_FUNCTIONS" "1" - } - - set val [common::get_property CONFIG.num_thread_local_storage_pointers $os_handle] - if {$val == "false"} { - xput_define $config_file "configNUM_THREAD_LOCAL_STORAGE_POINTERS" "0" - } else { - xput_define $config_file "configNUM_THREAD_LOCAL_STORAGE_POINTERS" $val - } - - puts $config_file "#define configTASK_RETURN_ADDRESS NULL" - - puts $config_file "#define INCLUDE_vTaskPrioritySet 1" - puts $config_file "#define INCLUDE_uxTaskPriorityGet 1" - puts $config_file "#define INCLUDE_vTaskDelete 1" - puts $config_file "#define INCLUDE_vTaskCleanUpResources 0" - puts $config_file "#define INCLUDE_vTaskSuspend 1" - puts $config_file "#define INCLUDE_vTaskDelayUntil 1" - puts $config_file "#define INCLUDE_vTaskDelay 1" - puts $config_file "#define INCLUDE_uxTaskGetStackHighWaterMark 1" - puts $config_file "#define INCLUDE_xTaskGetSchedulerState 1" - puts $config_file "#define INCLUDE_xTimerGetTimerTaskHandle 1" - puts $config_file "#define INCLUDE_xTaskGetIdleTaskHandle 1" - puts $config_file "#define INCLUDE_xQueueGetMutexHolder 1" - puts $config_file "#define INCLUDE_eTaskGetState 1" - puts $config_file "#define INCLUDE_xEventGroupSetBitsFromISR 1" - puts $config_file "#define INCLUDE_xTimerPendFunctionCall 1" - puts $config_file "#define INCLUDE_pcTaskGetTaskName 1" - puts $config_file "#define INCLUDE_xTaskResumeFromISR 1" - puts $config_file "#define INCLUDE_xTaskGetCurrentTaskHandle 1" - puts $config_file "#define INCLUDE_xSemaphoreGetMutexHolder 1" - - - ############################################################################ - ## Add constants specific to the ps7_cortexa9 - ############################################################################ - if { $proctype == "ps7_cortexa9" } { - set max_api_call_interrupt_priority [common::get_property CONFIG.max_api_call_interrupt_priority $os_handle] - xput_define $config_file "configMAX_API_CALL_INTERRUPT_PRIORITY" "($max_api_call_interrupt_priority)" - - set val [common::get_property CONFIG.use_port_optimized_task_selection $os_handle] - if {$val == "false"} { - xput_define $config_file "configUSE_PORT_OPTIMISED_TASK_SELECTION" "0" - } else { - xput_define $config_file "configUSE_PORT_OPTIMISED_TASK_SELECTION" "1" - } - - puts $config_file "#define configINTERRUPT_CONTROLLER_BASE_ADDRESS ( XPAR_PS7_SCUGIC_0_DIST_BASEADDR )" - puts $config_file "#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ( -0xf00 )" - puts $config_file "#define configUNIQUE_INTERRUPT_PRIORITIES 32" - - # Function prototypes cannot be in the common code as some compilers or - # ports require pre-processor guards to ensure they are not visible from - # assembly files. - puts $config_file "void vApplicationAssert( const char *pcFile, uint32_t ulLine );" - puts $config_file "void FreeRTOS_SetupTickInterrupt( void );" - puts $config_file "#define configSETUP_TICK_INTERRUPT() FreeRTOS_SetupTickInterrupt()\n" - puts $config_file "void FreeRTOS_ClearTickInterrupt( void );" - puts $config_file "#define configCLEAR_TICK_INTERRUPT() FreeRTOS_ClearTickInterrupt()\n" - } - # end of if $proctype == "ps7_cortexa9" - - - - ############################################################################ - ## Add constants specific to the microblaze - ############################################################################ - if { $proctype == "microblaze" } { - # Interrupt controller setting assumes only one is in use. - puts $config_file "#define configINTERRUPT_CONTROLLER_TO_USE XPAR_INTC_SINGLE_DEVICE_ID" - puts $config_file "#define configINSTALL_EXCEPTION_HANDLERS 1" - - # Avoid non #define statements getting included in assembly files. - puts $config_file "#ifndef __ASSEMBLER__" - puts $config_file "void vApplicationAssert( const char *pcFile, uint32_t ulLine );" - puts $config_file "#endif" - } - # end of if $proctype == "microblaze" - - - # complete the header protectors - puts $config_file "\#endif" - close $config_file -} - -proc xopen_new_include_file { filename description } { - set inc_file [open $filename w] - xprint_generated_header $inc_file $description - set newfname [string map {. _} [lindex [split $filename {\/}] end]] - puts $inc_file "\#ifndef _[string toupper $newfname]" - puts $inc_file "\#define _[string toupper $newfname]\n\n" - return $inc_file -} - -proc xput_define { config_file parameter param_value } { - puts $config_file "#define $parameter $param_value\n" -} - -proc xhandle_mb_interrupts {} { - - set default_interrupt_handler "XNullHandler" - set default_arg "XNULL" - - set source_interrupt_handler $default_interrupt_handler - set source_handler_arg $default_arg - - # Handle the interrupt pin - set sw_proc_handle [get_sw_processor] - set periph [get_cells $sw_proc_handle] - set source_ports [xget_interrupt_sources $periph] - if {[llength $source_ports] > 1} { - error "Too many interrupting ports on the MicroBlaze. Should only find 1" "" "error" - return - } - - if {[llength $source_ports] == 1} { - set source_port [lindex $source_ports 0] - if {[llength $source_port] != 0} { - set source_port_name [get_property NAME $source_port] - set source_periph [get_cells -of_objects $source_port] - set source_name [get_property NAME $source_periph] - set source_driver [get_drivers $source_name] - - if {[string compare -nocase $source_driver ""] != 0} { - set int_array [get_arrays -of_objects $source_driver] - if {[llength $int_array] != 0} { - set size [get_property PROPERTY.size $int_array] - for {set i 0 } { $i < $size } { incr $i } { - set int_port [lindex [get_property PARAM.int_port $int_array] $i] - if {[llength $int_port] != 0} { - if {[string compare -nocase $int_port $source_port_name] == 0 } { - set source_interrupt_handler [lindex [get_property PARAM.int_handler $int_array] $i ] - set source_handler_arg [lindex [get_property PARAM.int_handler_arg $int_array] $i ] - if {[string compare -nocase $source_handler_arg DEVICE_ID] == 0 } { - set source_handler_arg [xget_name $source_periph "DEVICE_ID"] - } else { - if {[llength $source_periph] == 0} { - set source_handler_arg $default_arg - } else { - set source_handler_arg [xget_name $source_periph "C_BASEADDR"] - } - } - break - } - } - } - } - } - } - } - - # Generate microblaze_interrupts_g.c file... - xcreate_mb_intr_config_file $source_interrupt_handler $source_handler_arg -} - -proc xcreate_mb_intr_config_file {handler arg} { - - set mb_table "MB_InterruptVectorTable" - variable standalone_version - - set filename [file join ".." "${standalone_version}" "src" "microblaze_interrupts_g.c"] - file delete $filename - set config_file [open $filename w] - - xprint_generated_header $config_file "Interrupt Handler Table for MicroBlaze Processor" - - puts $config_file "#include \"microblaze_interrupts_i.h\"" - puts $config_file "#include \"xparameters.h\"" - puts $config_file "\n" - puts $config_file [format "extern void %s (void *);" $handler] - puts $config_file "\n/*" - puts $config_file "* The interrupt handler table for microblaze processor" - puts $config_file "*/\n" - puts $config_file [format "%sEntry %s\[\] =" $mb_table $mb_table] - puts $config_file "\{" - puts -nonewline $config_file [format "\{\t%s" $handler] - puts -nonewline $config_file [format ",\n\t(void*) %s\}" $arg] - puts -nonewline $config_file "\n\};" - puts $config_file "\n" - close $config_file -} - -# -------------------------------------- -# Return true if this MB has -# exception handling support -# -------------------------------------- -proc mb_has_exceptions { hw_proc_handle } { - - # Check if the following parameters exist on this MicroBlaze's MPD - set ee [get_property CONFIG.C_UNALIGNED_EXCEPTIONS $hw_proc_handle] - if { $ee != "" } { - return true - } - - set ee [get_property CONFIG.C_ILL_OPCODE_EXCEPTION $hw_proc_handle] - if { $ee != "" } { - return true - } - set ee [get_property CONFIG.C_IOPB_BUS_EXCEPTION $hw_proc_handle] - if { $ee != "" } { - return true - } - set ee [get_property CONFIG.C_DOPB_BUS_EXCEPTION $hw_proc_handle] - if { $ee != "" } { - return true - } - set ee [get_property CONFIG.C_DIV_BY_ZERO_EXCEPTION $hw_proc_handle] - if { $ee != "" } { - return true - } - set ee [get_property CONFIG.C_DIV_ZERO_EXCEPTION $hw_proc_handle] - if { $ee != "" } { - return true - } - set ee [get_property CONFIG.C_FPU_EXCEPTION $hw_proc_handle] - if { $ee != "" } { - return true - } - set ee [get_property CONFIG.C_USE_MMU $hw_proc_handle] - if { $ee != "" } { - return true - } - return false -} - -# ------------------------------------------- -# Tcl procedure xcreate_mb_exc_config file -# ------------------------------------------- -proc xcreate_mb_exc_config_file { } { - - set hfilename [file join "src" "microblaze_exceptions_g.h"] - file delete $hfilename - set hconfig_file [open $hfilename w] - - xprint_generated_header $hconfig_file "Exception Handling Header for MicroBlaze Processor" - - puts $hconfig_file "\n" - - set sw_proc_handle [get_sw_processor] - set hw_proc_handle [get_cells [get_property HW_INSTANCE $sw_proc_handle] ] - set proctype [get_property IP_NAME $hw_proc_handle] - set procver [get_ip_version $hw_proc_handle] - - if { ![mb_has_exceptions $hw_proc_handle]} { ;# NO exceptions are enabled - close $hconfig_file ;# Do not generate any info in either the header or the C file - return - } - - puts $hconfig_file "\#define MICROBLAZE_EXCEPTIONS_ENABLED 1" - if { [mb_can_handle_exceptions_in_delay_slots $procver] } { - puts $hconfig_file "#define MICROBLAZE_CAN_HANDLE_EXCEPTIONS_IN_DELAY_SLOTS" - } - - close $hconfig_file -} - -# -------------------------------------- -# Return true if MB ver 'procver' has -# support for handling exceptions in -# delay slots -# -------------------------------------- -proc mb_can_handle_exceptions_in_delay_slots { procver } { - - if { [string compare -nocase $procver "5.00.a"] >= 0 } { - return true - } else { - return false - } -} - -# -------------------------------------- -# Return true if this MB has PVR support -# -------------------------------------- -proc mb_has_pvr { hw_proc_handle } { - - # Check if the following parameters exist on this MicroBlaze's MPD - set pvr [get_property CONFIG.C_PVR $hw_proc_handle] - if { $pvr != "" } { - return true - } - - return false -} - -# -------------------------------------- -# Microblaze config checks -# -------------------------------------- -proc mb_drc_checks { } { - set compiler [common::get_property CONFIG.compiler $sw_proc_handle] - - # check for valid compiler - if { [string first "mb-gcc" $compiler] == 0 && [string first "mb-g++" $compiler] == 0} { - error "Wrong compiler requested. FreeRTOS can be compiled only with the GNU compiler for MicroBlaze." "" "mdt_error" - } - - # check for valid stdio parameters - set stdin [common::get_property CONFIG.stdin $os_handle] - set stdout [common::get_property CONFIG.stdout $os_handle] - if { $stdin == "none" || $stdout == "none" } { - error "The STDIN/STDOUT parameters are not set. FreeRTOS requires stdin/stdout to be set." "" "mdt_error" - } - - # check if the design has a intc - set intr_port [hsi::get_pins -of_objects $hw_proc_handle Interrupt] - set intr_flag 1 - if { [llength $intr_port] == 0 } { - set intr_flag 0 - } else { - set intr_net [hsi::get_nets -of_objects $intr_port] - if { [llength $intr_port] == 0 } { - set intr_flag 0 - } - } - - if {$intr_flag == 0 } { - error "CPU has no connection to Interrupt controller." "" "mdt_error" - } - - # support only AXI/PLB - set bus_name "" - set interconnect [common::get_property CONFIG.C_INTERCONNECT $hw_proc_handle] - puts [format "hw_proc_handle is %s" $hw_proc_handle] - if { $interconnect == 2 } { - set intf_pin [hsi::get_intf_pins -of_objects $hw_proc_handle "M_AXI_DP"] - if { [llength $intf_pin] } { - set bus_name [hsi::get_intf_nets -of_objects $intf_pin] - } - } else { - error "FreeRTOS supports Microblaze with only a AXI interconnect" "" "mdt_error" - } - - if { [llength $bus_name] == 0 } { - error "Microblaze M_AXI_DP is not connected to slave peripherals" - } - - # obtain handles to all the peripherals in the design - set slave_ifs [hsi::get_intf_pins -of_objects $bus_name -filter "TYPE==SLAVE"] - puts [format "slave_ifs %s bus_name %s" $slave_ifs $bus_name] - set timer_count 0 - set timer_has_intr 0 - - # check for a valid timer - foreach if $slave_ifs { - set ip_handle [hsi::get_cells -of_objects $if] - - if {$ip_handle != $hw_proc_handle} { - set type [common::get_property IP_NAME $ip_handle] - if { $type == "axi_timer" } { - incr timer_count - - # check if the timer interrupts are enabled - set intr_port [hsi::get_pins -of_objects $ip_handle interrupt] - if { [llength $intr_port] != 0 } { - set intr_net [hsi::get_nets -of_objects $intr_port] - if { [llength $intr_net] != 0 } { - set timer_has_intr 1 - } - } - } - } - } - - if { $timer_count == 0 } { - error "FreeRTOS for Microblaze requires an axi_timer or xps_timer. The HW platform doesn't have a valid timer." "" "mdt_error" - } - - if { $timer_has_intr == 0 } { - error "FreeRTOS for Microblaze requires interrupts enabled for a timer." "" "mdt_error" - } - - set systmr_interval_ms [common::get_property CONFIG.systmr_interval $os_handle] - if { $systmr_interval_ms <= 0 } { - error "Invalid value for parameter systmr_interval specified. Please specify a positive value." "" "mdt_error" - } -} - - - - - - - - - - - - diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_microblaze b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_microblaze deleted file mode 100644 index fc249303b..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_microblaze +++ /dev/null @@ -1,165 +0,0 @@ -# -# Copyright (C) 2012-2013 Xilinx, Inc. -# -# This file is part of the port for FreeRTOS made by Xilinx to allow FreeRTOS -# to operate with Xilinx Zynq devices. -# -# This file 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 -# (see text further below). -# -# This file 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; if not it -# can be viewed here: -# -# The following exception language was found at -# http://www.freertos.org/a00114.html on May 8, 2012. -# -# GNU General Public License Exception -# -# Any FreeRTOS source code, whether modified or in its original release form, -# or whether in whole or in part, can only be distributed by you under the -# terms of the GNU General Public License plus this exception. An independent -# module is a module which is not derived from or based on FreeRTOS. -# -# EXCEPTION TEXT: -# -# Clause 1 -# -# Linking FreeRTOS statically or dynamically with other modules is making a -# combined work based on FreeRTOS. Thus, the terms and conditions of the -# GNU General Public License cover the whole combination. -# -# As a special exception, the copyright holder of FreeRTOS gives you permission -# to link FreeRTOS with independent modules that communicate with FreeRTOS -# solely through the FreeRTOS API interface, regardless of the license terms -# of these independent modules, and to copy and distribute the resulting -# combined work under terms of your choice, provided that -# -# Every copy of the combined work is accompanied by a written statement that -# details to the recipient the version of FreeRTOS used and an offer by -# yourself to provide the FreeRTOS source code (including any modifications -# you may have made) should the recipient request it. -# The combined work is not itself an RTOS, scheduler, kernel or related product. -# The independent modules add significant and primary functionality to FreeRTOS -# and do not merely extend the existing functionality already present -# in FreeRTOS. -# -# Clause 2 -# -# FreeRTOS may not be used for any competitive or comparative purpose, -# including the publication of any form of run time or compile time metric, -# without the express permission of Real Time Engineers Ltd. (this is the norm -# within the industry and is intended to ensure information accuracy). -# - -# -# Processor architecture -# microblaze -# -ARCH = microblaze - -SYSTEMDIR = ../../.. - -TOPDIR = . - -ARCH_PREFIX = mb - -# -# gnu tools for Makefile -# -CC = $(ARCH_PREFIX)-gcc -AS = $(ARCH_PREFIX)-as -AR = $(ARCH_PREFIX)-ar -CP = cp - -# -# Compiler, linker and other options. -# -CFLAGS = ${COMPILER_FLAGS} ${EXTRA_COMPILER_FLAGS} - -# -# System project directories. -# -LIBDIR = $(SYSTEMDIR)/lib -INCLUDEDIR = $(SYSTEMDIR)/include - -# Kernel library. -LIBFREERTOS = ${LIBDIR}/libfreertos.a -LIBXIL = ${LIBDIR}/libxil.a - -INCLUDEFILES = ${TOPDIR}/*.h - -INCLUDES = -I$(INCLUDEDIR) \ - -I${TOPDIR} - -KERNEL_AR_OBJS = *.c *.S - -OUTS = *.o - -libs: $(KERNEL_AR_OBJS) - $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src libs - @echo "Compiling FreeRTOS" - @$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $^ - @$(ARCHIVER) -r ${LIBFREERTOS} ${OUTS} - @$(ARCHIVER) -d ${LIBXIL} asm_vectors.o - @$(ARCHIVER) -s ${LIBXIL} - - make clean - - - - -include_standalone: - @echo "includes" - $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src include - $(CP) -rf $(INCLUDEFILES) $(INCLUDEDIR) - - -.PHONY: include -include: - @echo "include" - $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src include - ${CP} ${INCLUDEFILES} ${INCLUDEDIR} - -clean: - rm -rf ${OUTS} - - - - - -#PROCESSOR = microblaze_0 -#LIBRARIES = ${PROCESSOR}/lib/libxil.a -#BSP_MAKEFILES := $(wildcard $(PROCESSOR)/libsrc/*/src/Makefile) -#SUBDIRS := $(patsubst %/Makefile, %, $(BSP_MAKEFILES)) -# -#ifneq (,$(findstring win,$(RDI_PLATFORM))) -# SHELL = CMD -#endif -# -#all: libs -# @echo 'Finished building libraries' -# -#include: $(addsuffix /make.include,$(SUBDIRS)) -# -#libs: $(addsuffix /make.libs,$(SUBDIRS)) -# -#$(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a -# cp -f $< $@ -# -#%/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,) -# @echo "Running Make include in $(subst /make.include,,$@)" -# $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v9.4 -mhard-float -mlittle-endian #-mno-xl-soft-div -mno-xl-soft-mul -mxl-barrel-shift -mxl-float-convert -mxl-float-sqrt -mxl-multiply-high -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections #-fdata-sections" -# -#%/make.libs: include -# @echo "Running Make libs in $(subst /make.libs,,$@)" -# $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v9.4 -mhard-float -mlittle-endian #-mno-xl-soft-div -mno-xl-soft-mul -mxl-barrel-shift -mxl-float-convert -mxl-float-sqrt -mxl-multiply-high -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections #-fdata-sections" -# -#clean: -# rm -f ${PROCESSOR}/lib/libxil.a diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_ps7_cortexa9 b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_ps7_cortexa9 deleted file mode 100644 index 60c63f47c..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_ps7_cortexa9 +++ /dev/null @@ -1,133 +0,0 @@ -# -# Copyright (C) 2012-2013 Xilinx, Inc. -# -# This file is part of the port for FreeRTOS made by Xilinx to allow FreeRTOS -# to operate with Xilinx Zynq devices. -# -# This file 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 -# (see text further below). -# -# This file 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; if not it -# can be viewed here: -# -# The following exception language was found at -# http://www.freertos.org/a00114.html on May 8, 2012. -# -# GNU General Public License Exception -# -# Any FreeRTOS source code, whether modified or in its original release form, -# or whether in whole or in part, can only be distributed by you under the -# terms of the GNU General Public License plus this exception. An independent -# module is a module which is not derived from or based on FreeRTOS. -# -# EXCEPTION TEXT: -# -# Clause 1 -# -# Linking FreeRTOS statically or dynamically with other modules is making a -# combined work based on FreeRTOS. Thus, the terms and conditions of the -# GNU General Public License cover the whole combination. -# -# As a special exception, the copyright holder of FreeRTOS gives you permission -# to link FreeRTOS with independent modules that communicate with FreeRTOS -# solely through the FreeRTOS API interface, regardless of the license terms -# of these independent modules, and to copy and distribute the resulting -# combined work under terms of your choice, provided that -# -# Every copy of the combined work is accompanied by a written statement that -# details to the recipient the version of FreeRTOS used and an offer by -# yourself to provide the FreeRTOS source code (including any modifications -# you may have made) should the recipient request it. -# The combined work is not itself an RTOS, scheduler, kernel or related product. -# The independent modules add significant and primary functionality to FreeRTOS -# and do not merely extend the existing functionality already present -# in FreeRTOS. -# -# Clause 2 -# -# FreeRTOS may not be used for any competitive or comparative purpose, -# including the publication of any form of run time or compile time metric, -# without the express permission of Real Time Engineers Ltd. (this is the norm -# within the industry and is intended to ensure information accuracy). -# - -# -# Processor architecture -# ps7_cortexa9 -# -ARCH = ps7_cortexa9 - -SYSTEMDIR = ../../.. - -TOPDIR = . - -ARCH_PREFIX = arm-none-eabi - -# -# gnu tools for Makefile -# -CC = $(ARCH_PREFIX)-gcc -AS = arm-none-eabi-as -AR = $(ARCH_PREFIX)-ar -CP = cp - -# -# Compiler, linker and other options. -# -CFLAGS = ${COMPILER_FLAGS} ${EXTRA_COMPILER_FLAGS} - -# -# System project directories. -# -LIBDIR = $(SYSTEMDIR)/lib -INCLUDEDIR = $(SYSTEMDIR)/include - -# Kernel library. -LIBFREERTOS = ${LIBDIR}/libfreertos.a -LIBXIL = ${LIBDIR}/libxil.a - -INCLUDEFILES = ${TOPDIR}/*.h - -INCLUDES = -I$(INCLUDEDIR) \ - -I${TOPDIR} - -KERNEL_AR_OBJS = *.c *.S *.s - -OUTS = *.o - - - -libs: $(KERNEL_AR_OBJS) - $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src libs - @echo "Compiling FreeRTOS" - @$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $^ - @$(ARCHIVER) -r ${LIBFREERTOS} ${OUTS} - @$(ARCHIVER) -d ${LIBXIL} asm_vectors.o - @$(ARCHIVER) -s ${LIBXIL} - - make clean - - - - -include_standalone: - @echo "includes" - $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src include - $(CP) -rf $(INCLUDEFILES) $(INCLUDEDIR) - - -.PHONY: include -include: - @echo "include" - $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src include - ${CP} ${INCLUDEFILES} ${INCLUDEDIR} - -clean: - rm -rf ${OUTS} diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/portZynq7000.c b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/portZynq7000.c deleted file mode 100644 index faa8a1f48..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/portZynq7000.c +++ /dev/null @@ -1,275 +0,0 @@ -/* - FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - 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. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* Xilinx includes. */ -#include "xscutimer.h" -#include "xscugic.h" - -#define XSCUTIMER_CLOCK_HZ ( XPAR_CPU_CORTEXA9_0_CPU_CLK_FREQ_HZ / 2UL ) - -/* - * Some FreeRTOSConfig.h settings require the application writer to provide the - * implementation of a callback function that has a specific name, and a linker - * error will result if the application does not provide the required function. - * To avoid the risk of a configuration file setting resulting in a linker error - * this file provides default implementations of each callback that might be - * required. The default implementations are declared as weak symbols to allow - * the application writer to override the default implementation by providing - * their own implementation in the application itself. - */ -void vApplicationAssert( const char *pcFileName, uint32_t ulLine ) __attribute__((weak)); -void vApplicationTickHook( void ) __attribute__((weak)); -void vApplicationIdleHook( void ) __attribute__((weak)); -void vApplicationMallocFailedHook( void ) __attribute((weak)); -void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName ) __attribute__((weak)); - -/* Timer used to generate the tick interrupt. */ -static XScuTimer xTimer; - -/* The IRQ handler, which is also aliased to the name used in standalone -projects. */ -void FreeRTOS_ApplicationIRQHandler( uint32_t ulICCIAR ); -void vApplicationIRQHandler( uint32_t ulICCIAR ) __attribute__ ( ( weak, alias ("FreeRTOS_ApplicationIRQHandler") ) ); - -/* The function that sets up the tick is declared week to allow it to be -overridden by the application. */ -void FreeRTOS_SetupTickInterrupt( void ) __attribute__ ( ( weak ) ); -void FreeRTOS_ClearTickInterrupt( void ) __attribute__ ( ( weak ) ); - -/* The interrupt controller used when the tick interrupt is installed is made -global so the application code can use the same object. The object must not be -used until either it has been initialised using XScuGic_CfgInitialize(), or the -scheduler has been started. */ -XScuGic xFreeRTOSInterruptController; /* Interrupt controller instance */ -/*-----------------------------------------------------------*/ - -void FreeRTOS_SetupTickInterrupt( void ) -{ -BaseType_t xStatus; -extern void FreeRTOS_Tick_Handler( void ); -XScuTimer_Config *pxTimerConfig; -XScuGic_Config *pxGICConfig; -const uint8_t ucRisingEdge = 3; - - /* This function is called with the IRQ interrupt disabled, and the IRQ - interrupt should be left disabled. It is enabled automatically when the - scheduler is started. */ - - /* Ensure XScuGic_CfgInitialize() has been called. In this demo it has - already been called from prvSetupHardware() in main(). */ - pxGICConfig = XScuGic_LookupConfig( XPAR_SCUGIC_SINGLE_DEVICE_ID ); - xStatus = XScuGic_CfgInitialize( &xFreeRTOSInterruptController, pxGICConfig, pxGICConfig->CpuBaseAddress ); - configASSERT( xStatus == XST_SUCCESS ); - ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */ - - /* The priority must be the lowest possible. */ - XScuGic_SetPriorityTriggerType( &xFreeRTOSInterruptController, XPAR_SCUTIMER_INTR, portLOWEST_USABLE_INTERRUPT_PRIORITY << portPRIORITY_SHIFT, ucRisingEdge ); - - /* Install the FreeRTOS tick handler. */ - xStatus = XScuGic_Connect( &xFreeRTOSInterruptController, XPAR_SCUTIMER_INTR, (Xil_ExceptionHandler) FreeRTOS_Tick_Handler, ( void * ) &xTimer ); - configASSERT( xStatus == XST_SUCCESS ); - ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */ - - /* Initialise the timer. */ - pxTimerConfig = XScuTimer_LookupConfig( XPAR_SCUTIMER_DEVICE_ID ); - xStatus = XScuTimer_CfgInitialize( &xTimer, pxTimerConfig, pxTimerConfig->BaseAddr ); - configASSERT( xStatus == XST_SUCCESS ); - ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */ - - /* Enable Auto reload mode. */ - XScuTimer_EnableAutoReload( &xTimer ); - - /* Ensure there is no prescale. */ - XScuTimer_SetPrescaler( &xTimer, 0 ); - - /* Load the timer counter register. */ - XScuTimer_LoadTimer( &xTimer, XSCUTIMER_CLOCK_HZ / configTICK_RATE_HZ ); - - /* Start the timer counter and then wait for it to timeout a number of - times. */ - XScuTimer_Start( &xTimer ); - - /* Enable the interrupt for the xTimer in the interrupt controller. */ - XScuGic_Enable( &xFreeRTOSInterruptController, XPAR_SCUTIMER_INTR ); - - /* Enable the interrupt in the xTimer itself. */ - FreeRTOS_ClearTickInterrupt(); - XScuTimer_EnableInterrupt( &xTimer ); -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_ClearTickInterrupt( void ) -{ - XScuTimer_ClearInterruptStatus( &xTimer ); -} -/*-----------------------------------------------------------*/ - -void FreeRTOS_ApplicationIRQHandler( uint32_t ulICCIAR ) -{ -extern const XScuGic_Config XScuGic_ConfigTable[]; -static const XScuGic_VectorTableEntry *pxVectorTable = XScuGic_ConfigTable[ XPAR_SCUGIC_SINGLE_DEVICE_ID ].HandlerTable; -uint32_t ulInterruptID; -const XScuGic_VectorTableEntry *pxVectorEntry; - - /* The ID of the interrupt is obtained by bitwise anding the ICCIAR value - with 0x3FF. */ - ulInterruptID = ulICCIAR & 0x3FFUL; - if( ulInterruptID < XSCUGIC_MAX_NUM_INTR_INPUTS ) - { - /* Call the function installed in the array of installed handler functions. */ - pxVectorEntry = &( pxVectorTable[ ulInterruptID ] ); - pxVectorEntry->Handler( pxVectorEntry->CallBackRef ); - } -} -/*-----------------------------------------------------------*/ - -/* This version of vApplicationAssert() is declared as a weak symbol to allow it -to be overridden by a version implemented within the application that is using -this BSP. */ -void vApplicationAssert( const char *pcFileName, uint32_t ulLine ) -{ -volatile uint32_t ul = 0; -volatile const char *pcLocalFileName = pcFileName; /* To prevent pcFileName being optimized away. */ -volatile uint32_t ulLocalLine = ulLine; /* To prevent ulLine being optimized away. */ - - /* Prevent compile warnings about the following two variables being set but - not referenced. They are intended for viewing in the debugger. */ - ( void ) pcLocalFileName; - ( void ) ulLocalLine; - - xil_printf( "Assert failed in file %s, line %lu\r\n", pcLocalFileName, ulLocalLine ); - - /* If this function is entered then a call to configASSERT() failed in the - FreeRTOS code because of a fatal error. The pcFileName and ulLine - parameters hold the file name and line number in that file of the assert - that failed. Additionally, if using the debugger, the function call stack - can be viewed to find which line failed its configASSERT() test. Finally, - the debugger can be used to set ul to a non-zero value, then step out of - this function to find where the assert function was entered. */ - taskENTER_CRITICAL(); - { - while( ul == 0 ) - { - __asm volatile( "NOP" ); - } - } - taskEXIT_CRITICAL(); -} -/*-----------------------------------------------------------*/ - -/* This default tick hook does nothing and is declared as a weak symbol to allow -the application writer to override this default by providing their own -implementation in the application code. */ -void vApplicationTickHook( void ) -{ -} -/*-----------------------------------------------------------*/ - -/* This default idle hook does nothing and is declared as a weak symbol to allow -the application writer to override this default by providing their own -implementation in the application code. */ -void vApplicationIdleHook( void ) -{ -} -/*-----------------------------------------------------------*/ - -/* This default malloc failed hook does nothing and is declared as a weak symbol -to allow the application writer to override this default by providing their own -implementation in the application code. */ -void vApplicationMallocFailedHook( void ) -{ - xil_printf( "vApplicationMallocFailedHook() called\n" ); -} -/*-----------------------------------------------------------*/ - -/* This default stack overflow hook will stop the application for executing. It -is declared as a weak symbol to allow the application writer to override this -default by providing their own implementation in the application code. */ -void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName ) -{ -/* Attempt to prevent the handle and name of the task that overflowed its stack -from being optimised away because they are not used. */ -volatile TaskHandle_t xOverflowingTaskHandle = xTask; -volatile char *pcOverflowingTaskName = pcTaskName; - - ( void ) xOverflowingTaskHandle; - ( void ) pcOverflowingTaskName; - - xil_printf( "HALT: Task %s overflowed its stack.", pcOverflowingTaskName ); - portDISABLE_INTERRUPTS(); - for( ;; ); -} - - - - diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/port_asm_vectors.S b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/port_asm_vectors.S deleted file mode 100644 index 5824033d1..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/ARM_CA9/port_asm_vectors.S +++ /dev/null @@ -1,146 +0,0 @@ -/****************************************************************************** -* -* (c) Copyright 2009-13 Xilinx, Inc. All rights reserved. -* -* This file contains confidential and proprietary information of Xilinx, Inc. -* and is protected under U.S. and international copyright and other -* intellectual property laws. -* -* DISCLAIMER -* This disclaimer is not a license and does not grant any rights to the -* materials distributed herewith. Except as otherwise provided in a valid -* license issued to you by Xilinx, and to the maximum extent permitted by -* applicable law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL -* FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, -* IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF -* MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; -* and (2) Xilinx shall not be liable (whether in contract or tort, including -* negligence, or under any other theory of liability) for any loss or damage -* of any kind or nature related to, arising under or in connection with these -* materials, including for any direct, or any indirect, special, incidental, -* or consequential loss or damage (including loss of data, profits, goodwill, -* or any type of loss or damage suffered as a result of any action brought by -* a third party) even if such damage or loss was reasonably foreseeable or -* Xilinx had been advised of the possibility of the same. -* -* CRITICAL APPLICATIONS -* Xilinx products are not designed or intended to be fail-safe, or for use in -* any application requiring fail-safe performance, such as life-support or -* safety devices or systems, Class III medical devices, nuclear facilities, -* applications related to the deployment of airbags, or any other applications -* that could lead to death, personal injury, or severe property or -* environmental damage (individually and collectively, "Critical -* Applications"). Customer assumes the sole risk and liability of any use of -* Xilinx products in Critical Applications, subject only to applicable laws -* and regulations governing limitations on product liability. -* -* THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE -* AT ALL TIMES. -* -******************************************************************************/ -/*****************************************************************************/ -/** -* @file asm_vectors.s -* -* This file contains the initial vector table for the Cortex A9 processor -* -*
-* MODIFICATION HISTORY:
-*
-* Ver   Who     Date     Changes
-* ----- ------- -------- ---------------------------------------------------
-* 1.00a ecm/sdm 10/20/09 Initial version
-* 3.05a sdm	02/02/12 Save lr when profiling is enabled
-* 3.10a srt     04/18/13 Implemented ARM Erratas. Please refer to file
-*			 'xil_errata.h' for errata description
-* 
-* -* @note -* -* None. -* -******************************************************************************/ - -#include "xil_errata.h" - -.org 0 -.text -.arm - -.global _boot -.global _freertos_vector_table -.global _vector_table - -.global FIQInterrupt -.global DataAbortInterrupt -.global PrefetchAbortInterrupt -.global vPortInstallFreeRTOSVectorTable - -.extern FreeRTOS_IRQ_Handler -.extern FreeRTOS_SWI_Handler - -.section .vectors -_vector_table: -_freertos_vector_table: - B _boot - B FreeRTOS_Undefined - ldr pc, _swi - B FreeRTOS_PrefetchAbortHandler - B FreeRTOS_DataAbortHandler - NOP /* Placeholder for address exception vector*/ - LDR PC, _irq - B FreeRTOS_FIQHandler - -_irq: .word FreeRTOS_IRQ_Handler -_swi: .word FreeRTOS_SWI_Handler - - -.align 4 -FreeRTOS_FIQHandler: /* FIQ vector handler */ - stmdb sp!,{r0-r3,r12,lr} /* state save from compiled code */ -FIQLoop: - blx FIQInterrupt /* FIQ vector */ - ldmia sp!,{r0-r3,r12,lr} /* state restore from compiled code */ - subs pc, lr, #4 /* adjust return */ - -.align 4 -FreeRTOS_Undefined: /* Undefined handler */ - b . - -.align 4 -FreeRTOS_DataAbortHandler: /* Data Abort handler */ -#ifdef CONFIG_ARM_ERRATA_775420 - dsb -#endif - stmdb sp!,{r0-r3,r12,lr} /* state save from compiled code */ - blx DataAbortInterrupt /*DataAbortInterrupt :call C function here */ - ldmia sp!,{r0-r3,r12,lr} /* state restore from compiled code */ - subs pc, lr, #4 /* adjust return */ - -.align 4 -FreeRTOS_PrefetchAbortHandler: /* Prefetch Abort handler */ -#ifdef CONFIG_ARM_ERRATA_775420 - dsb -#endif - stmdb sp!,{r0-r3,r12,lr} /* state save from compiled code */ - blx PrefetchAbortInterrupt /* PrefetchAbortInterrupt: call C function here */ - ldmia sp!,{r0-r3,r12,lr} /* state restore from compiled code */ - subs pc, lr, #4 /* adjust return */ - -.align 4 -.type vPortInstallFreeRTOSVectorTable, %function -vPortInstallFreeRTOSVectorTable: - - /* Set VBAR to the vector table that contains the FreeRTOS handlers. */ - ldr r0, =_freertos_vector_table - mcr p15, 0, r0, c12, c0, 0 - dsb - isb - bx lr - - -.end - - - - diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/MicroBlazeV8/portmicroblaze.c b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/MicroBlazeV8/portmicroblaze.c deleted file mode 100644 index 327b2ac13..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Source/portable/GCC/MicroBlazeV8/portmicroblaze.c +++ /dev/null @@ -1,274 +0,0 @@ -/* - FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - 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. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" - -/* Xilinx includes. */ -#include "xil_printf.h" -#include "xparameters.h" - -#if defined( XPAR_XTMRCTR_NUM_INSTANCES ) - #if( XPAR_XTMRCTR_NUM_INSTANCES > 0 ) - #include "xtmrctr.h" - /* The timer is used to generate the RTOS tick interrupt. */ - static XTmrCtr xTickTimerInstance; - #endif -#endif - -/* - * Some FreeRTOSConfig.h settings require the application writer to provide the - * implementation of a callback function that has a specific name, and a linker - * error will result if the application does not provide the required function. - * To avoid the risk of a configuration file setting resulting in a linker error - * this file provides default implementations of each callback that might be - * required. The default implementations are declared as weak symbols to allow - * the application writer to override the default implementation by providing - * their own implementation in the application itself. - */ -void vApplicationAssert( const char *pcFileName, uint32_t ulLine ) __attribute__((weak)); -void vApplicationTickHook( void ) __attribute__((weak)); -void vApplicationIdleHook( void ) __attribute__((weak)); -void vApplicationMallocFailedHook( void ) __attribute((weak)); -void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName ) __attribute__((weak)); -void vApplicationSetupTimerInterrupt( void ) __attribute__((weak)); -void vApplicationClearTimerInterrupt( void ) __attribute__((weak)); - -/*-----------------------------------------------------------*/ - - -/* This version of vApplicationAssert() is declared as a weak symbol to allow it -to be overridden by a version implemented within the application that is using -this BSP. */ -void vApplicationAssert( const char *pcFileName, uint32_t ulLine ) -{ -volatile uint32_t ul = 0; -volatile const char *pcLocalFileName = pcFileName; /* To prevent pcFileName being optimized away. */ -volatile uint32_t ulLocalLine = ulLine; /* To prevent ulLine being optimized away. */ - - /* Prevent compile warnings about the following two variables being set but - not referenced. They are intended for viewing in the debugger. */ - ( void ) pcLocalFileName; - ( void ) ulLocalLine; - - xil_printf( "Assert failed in file %s, line %lu\r\n", pcLocalFileName, ulLocalLine ); - - /* If this function is entered then a call to configASSERT() failed in the - FreeRTOS code because of a fatal error. The pcFileName and ulLine - parameters hold the file name and line number in that file of the assert - that failed. Additionally, if using the debugger, the function call stack - can be viewed to find which line failed its configASSERT() test. Finally, - the debugger can be used to set ul to a non-zero value, then step out of - this function to find where the assert function was entered. */ - taskENTER_CRITICAL(); - { - while( ul == 0 ) - { - __asm volatile( "NOP" ); - } - } - taskEXIT_CRITICAL(); -} -/*-----------------------------------------------------------*/ - -/* This default tick hook does nothing and is declared as a weak symbol to allow -the application writer to override this default by providing their own -implementation in the application code. */ -void vApplicationTickHook( void ) -{ -} -/*-----------------------------------------------------------*/ - -/* This default idle hook does nothing and is declared as a weak symbol to allow -the application writer to override this default by providing their own -implementation in the application code. */ -void vApplicationIdleHook( void ) -{ -} -/*-----------------------------------------------------------*/ - -/* This default malloc failed hook does nothing and is declared as a weak symbol -to allow the application writer to override this default by providing their own -implementation in the application code. */ -void vApplicationMallocFailedHook( void ) -{ - xil_printf( "vApplicationMallocFailedHook() called\n" ); -} -/*-----------------------------------------------------------*/ - -/* This default stack overflow hook will stop the application for executing. It -is declared as a weak symbol to allow the application writer to override this -default by providing their own implementation in the application code. */ -void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName ) -{ -/* Attempt to prevent the handle and name of the task that overflowed its stack -from being optimised away because they are not used. */ -volatile TaskHandle_t xOverflowingTaskHandle = xTask; -volatile char *pcOverflowingTaskName = pcTaskName; - - ( void ) xOverflowingTaskHandle; - ( void ) pcOverflowingTaskName; - - xil_printf( "HALT: Task %s overflowed its stack.", pcOverflowingTaskName ); - portDISABLE_INTERRUPTS(); - for( ;; ); -} -/*-----------------------------------------------------------*/ - -#if defined( XPAR_XTMRCTR_NUM_INSTANCES ) - #if( XPAR_XTMRCTR_NUM_INSTANCES > 0 ) - /* This is a default implementation of what is otherwise an application defined - callback function used to install the tick interrupt handler. It is provided as - an application callback because the kernel will run on lots of different - MicroBlaze and FPGA configurations - not all of which will have the same timer - peripherals defined or available. vApplicationSetupTimerInterrupt() is declared - as a weak symbol, allowing the application writer to provide their own - implementation, if this default implementation is not suitable. */ - void vApplicationSetupTimerInterrupt( void ) - { - portBASE_TYPE xStatus; - const unsigned char ucTickTimerCounterNumber = ( unsigned char ) 0U; - const unsigned char ucRunTimeStatsCounterNumber = ( unsigned char ) 1U; - const unsigned long ulCounterValue = ( ( XPAR_TMRCTR_0_CLOCK_FREQ_HZ / configTICK_RATE_HZ ) - 1UL ); - extern void vPortTickISR( void *pvUnused ); - - /* Initialise the timer/counter. */ - xStatus = XTmrCtr_Initialize( &xTickTimerInstance, XPAR_TMRCTR_0_DEVICE_ID ); - - if( xStatus == XST_SUCCESS ) - { - /* Install the tick interrupt handler as the timer ISR. - *NOTE* The xPortInstallInterruptHandler() API function must be used for - this purpose. */ - xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vPortTickISR, NULL ); - } - - if( xStatus == pdPASS ) - { - /* Enable the timer interrupt in the interrupt controller. - *NOTE* The vPortEnableInterrupt() API function must be used for this - purpose. */ - vPortEnableInterrupt( XPAR_INTC_0_TMRCTR_0_VEC_ID ); - - /* Configure the timer interrupt handler. This installs the handler - directly, rather than through the Xilinx driver. This is done for - efficiency. */ - XTmrCtr_SetHandler( &xTickTimerInstance, ( void * ) vPortTickISR, NULL ); - - /* Set the correct period for the timer. */ - XTmrCtr_SetResetValue( &xTickTimerInstance, ucTickTimerCounterNumber, ulCounterValue ); - - /* Enable the interrupts. Auto-reload mode is used to generate a - periodic tick. Note that interrupts are disabled when this function is - called, so interrupts will not start to be processed until the first - task has started to run. */ - XTmrCtr_SetOptions( &xTickTimerInstance, ucTickTimerCounterNumber, ( XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION | XTC_DOWN_COUNT_OPTION ) ); - - /* Start the timer. */ - XTmrCtr_Start( &xTickTimerInstance, ucTickTimerCounterNumber ); - - - - - /* The second timer is used as the time base for the run time stats. - Auto-reload mode is used to ensure the timer does not stop. */ - XTmrCtr_SetOptions( &xTickTimerInstance, ucRunTimeStatsCounterNumber, XTC_AUTO_RELOAD_OPTION ); - - /* Start the timer. */ - XTmrCtr_Start( &xTickTimerInstance, ucRunTimeStatsCounterNumber ); - } - - /* Sanity check that the function executed as expected. */ - configASSERT( ( xStatus == pdPASS ) ); - } - #endif /* XPAR_XTMRCTR_NUM_INSTANCES > 0 */ -#endif /* XPAR_XTMRCTR_NUM_INSTANCES */ -/*-----------------------------------------------------------*/ - -#if defined( XPAR_XTMRCTR_NUM_INSTANCES ) - #if( XPAR_XTMRCTR_NUM_INSTANCES > 0 ) - /* This is a default implementation of what is otherwise an application defined - callback function used to clear whichever timer interrupt is used to generate - the tick interrupt. It is provided as an application callback because the - kernel will run on lots of different MicroBlaze and FPGA configurations - not - all of which will have the same timer peripherals defined or available. - vApplicationSetupTimerInterrupt() is declared as a weak symbol, allowing the - application writer to provide their own implementation, if this default - implementation is not suitable. */ - void vApplicationClearTimerInterrupt( void ) - { - unsigned long ulCSR; - - /* Clear the timer interrupt */ - ulCSR = XTmrCtr_GetControlStatusReg( XPAR_TMRCTR_0_BASEADDR, 0 ); - XTmrCtr_SetControlStatusReg( XPAR_TMRCTR_0_BASEADDR, 0, ulCSR ); - } - #endif /* XPAR_XTMRCTR_NUM_INSTANCES > 0 */ -#endif /* XPAR_XTMRCTR_NUM_INSTANCES */ diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/data/freertos_hello_world.mss b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/data/freertos_hello_world.mss deleted file mode 100644 index 012862aea..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/data/freertos_hello_world.mss +++ /dev/null @@ -1,40 +0,0 @@ -#/****************************************************************************** -#* -#* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -#* -#* Permission is hereby granted, free of charge, to any person obtaining a copy -#* of this software and associated documentation files (the "Software"), to deal -#* in the Software without restriction, including without limitation the rights -#* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -#* copies of the Software, and to permit persons to whom the Software is -#* furnished to do so, subject to the following conditions: -#* -#* The above copyright notice and this permission notice shall be included in -#* all copies or substantial portions of the Software. -#* -#* Use of the Software is limited solely to applications: -#* (a) running on a Xilinx device, or -#* (b) that interact with a Xilinx device through a bus or interconnect. -#* -#* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -#* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -#* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -#* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -#* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -#* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -#* SOFTWARE. -#* -#* Except as contained in this notice, the name of the Xilinx shall not be used -#* in advertising or otherwise to promote the sale, use or other dealings in -#* this Software without prior written authorization from Xilinx. -#* -#******************************************************************************/ - -PARAMETER VERSION = 2.2.0 - - -BEGIN OS - PARAMETER OS_NAME = freertos822_xilinx - PARAMETER STDIN = * - PARAMETER STDOUT = * -END \ No newline at end of file diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/data/freertos_hello_world.tcl b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/data/freertos_hello_world.tcl deleted file mode 100644 index 97bf5731e..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/data/freertos_hello_world.tcl +++ /dev/null @@ -1,91 +0,0 @@ -#/****************************************************************************** -#* -#* Copyright (C) 2015 Xilinx, Inc. All rights reserved. -#* -#* Permission is hereby granted, free of charge, to any person obtaining a copy -#* of this software and associated documentation files (the "Software"), to deal -#* in the Software without restriction, including without limitation the rights -#* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -#* copies of the Software, and to permit persons to whom the Software is -#* furnished to do so, subject to the following conditions: -#* -#* The above copyright notice and this permission notice shall be included in -#* all copies or substantial portions of the Software. -#* -#* Use of the Software is limited solely to applications: -#* (a) running on a Xilinx device, or -#* (b) that interact with a Xilinx device through a bus or interconnect. -#* -#* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -#* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -#* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -#* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -#* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -#* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -#* SOFTWARE. -#* -#* Except as contained in this notice, the name of the Xilinx shall not be used -#* in advertising or otherwise to promote the sale, use or other dealings in -#* this Software without prior written authorization from Xilinx. -#* -#******************************************************************************/ - -proc swapp_get_name {} { - return "FreeRTOS Hello World"; -} - -proc swapp_get_description {} { - return " FreeRTOS Hello World application"; -} - -proc check_freertos_os {} { - set oslist [get_os]; - - if { [llength $oslist] != 1 } { - return 0; - } - set os [lindex $oslist 0]; - - if { $os != "freertos822_xilinx" } { - error "This application is supported only on the freertos822_xilinx."; - } -} - -proc swapp_is_supported_sw {} { - - check_freertos_os - - return 1; -} - -proc swapp_is_supported_hw {} { - - # check processor type - set proc_instance [get_sw_processor]; - set hw_processor [common::get_property HW_INSTANCE $proc_instance] - - set proc_type [common::get_property IP_NAME [get_cells $hw_processor]]; - - if { $proc_type != "ps7_cortexa9" && $proc_type != "microblaze" } { - error "This application is supported only for ps7_cortexa9 and microblaze processors."; - } - - return 1; -} - - -proc get_stdout {} { - return; -} - -proc check_stdout_hw {} { - return; -} - -proc swapp_generate {} { - return; -} - -proc swapp_get_linker_constraints {} { - return ""; -} diff --git a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/src/freertos_hello_world.c b/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/src/freertos_hello_world.c deleted file mode 100644 index 820c3564b..000000000 --- a/FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/sw_apps/freertos_hello_world/src/freertos_hello_world.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - 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. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ - -/* - * This is a very simply blinky style example that can be generated - * automatically by the Xilinx SDK. - * - * The example generates a Tx task, an Rx task, and a queue. The Tx task - * simply uses the queue to send a value to the Rx task every 500ms. The Rx - * prints out a message each time it receives the value. - * - * The demo does little in the way of hardware configuration. Separate projects - * are provided that include comprehensive demos which demonstrate additional - * hardware configuration, and additional FreeRTOS features. See the following - * link for more details: http://www.freertos.org/a00090.html#XILINX - */ - -/* FreeRTOS includes. */ -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" - -/* Xilinx includes. */ -#include "xil_printf.h" -#include "xparameters.h" - -/*-----------------------------------------------------------*/ - -/* The Tx and Rx tasks as described at the top of this file. */ -static void prvTxTask( void *pvParameters ); -static void prvRxTask( void *pvParameters ); - -/*-----------------------------------------------------------*/ - -/* The queue used by the Tx and Rx tasks, as described at the top of this -file. */ -static QueueHandle_t xQueue = NULL; - -int main( void ) -{ - xil_printf( "Hello from Freertos\r\n" ); - - /* Create the two tasks. The Tx task is given a lower priority than the - Rx task, so the Rx task will leave the Blocked state and pre-empt the Tx - task as soon as the Tx task places an item in the queue. */ - xTaskCreate( prvTxTask, /* The function that implements the task. */ - ( const char * ) "Tx", /* Text name for the task, provided to assist debugging only. */ - configMINIMAL_STACK_SIZE, /* The stack allocated to the task. */ - NULL, /* The task parameter is not used, so set to NULL. */ - tskIDLE_PRIORITY, /* The task runs at the idle priority. */ - NULL ); - - xTaskCreate( prvRxTask, ( const char * ) "GB", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); - - /* Create the queue used by the tasks. The Rx task has a higher priority - than the Tx task, so will preempt the Tx task and remove values from the - queue as soon as the Tx task writes to the queue - therefore the queue can - never have more than one item in it. */ - xQueue = xQueueCreate( 1, /* There is only one space in the queue. */ - sizeof( uint32_t ) ); /* Each space in the queue is large enough to hold a uint32_t. */ - - /* Check the queue was created. */ - configASSERT( xQueue ); - - /* Start the tasks and timer running. */ - vTaskStartScheduler(); - - /* If all is well, the scheduler will now be running, and the following line - will never be reached. If the following line does execute, then there was - insufficient FreeRTOS heap memory available for the idle and/or timer tasks - to be created. See the memory management section on the FreeRTOS web site - for more details. */ - for( ;; ); -} -/*-----------------------------------------------------------*/ - -static void prvTxTask( void *pvParameters ) -{ -const TickType_t x500ms = pdMS_TO_TICKS( 500UL ); -uint32_t ulValueToSend = 0; - - for( ;; ) - { - /* Delay for 500ms. */ - vTaskDelay( x500ms ); - - /* Send the next value on the queue. The queue should always be - empty at this point so a block time of 0 is used. */ - xQueueSend( xQueue, /* The queue being written to. */ - &ulValueToSend, /* The address of the data being sent. */ - 0UL ); /* The block time. */ - - ulValueToSend++; - } -} -/*-----------------------------------------------------------*/ - -static void prvRxTask( void *pvParameters ) -{ -uint32_t ulValueReceived; - - for( ;; ) - { - /* Block to wait for data arriving on the queue. */ - xQueueReceive( xQueue, /* The queue being read. */ - &ulValueReceived, /* Data is read into this address. */ - portMAX_DELAY ); /* Wait without a timeout for data. */ - - /* Print the received data. */ - xil_printf( "Rx task received %d\r\n", ( int ) ulValueReceived ); - } -} - -