mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Remove obsolete MPU demos.
Separate the MPU wrappers into their own file so they can be used from future MPU ports.
This commit is contained in:
parent
afd4b432f6
commit
0b5906d404
|
@ -1,137 +0,0 @@
|
||||||
/*
|
|
||||||
FreeRTOS V9.0.0rc2 - 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!
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FREERTOS_CONFIG_H
|
|
||||||
#define FREERTOS_CONFIG_H
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
|
||||||
* Application specific definitions.
|
|
||||||
*
|
|
||||||
* These definitions should be adjusted for your particular hardware and
|
|
||||||
* application requirements.
|
|
||||||
*
|
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
|
||||||
*
|
|
||||||
* See http://www.freertos.org/a00110.html.
|
|
||||||
*----------------------------------------------------------*/
|
|
||||||
|
|
||||||
#define configUSE_PREEMPTION 1
|
|
||||||
#define configUSE_IDLE_HOOK 1
|
|
||||||
#define configUSE_TICK_HOOK 1
|
|
||||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 )
|
|
||||||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
|
||||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
|
|
||||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2560 ) )
|
|
||||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
|
||||||
#define configUSE_TRACE_FACILITY 0
|
|
||||||
#define configUSE_16_BIT_TICKS 0
|
|
||||||
#define configIDLE_SHOULD_YIELD 0
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configUSE_MUTEXES 0
|
|
||||||
#define configUSE_COUNTING_SEMAPHORES 0
|
|
||||||
#define configCHECK_FOR_STACK_OVERFLOW 0
|
|
||||||
#define configUSE_RECURSIVE_MUTEXES 0
|
|
||||||
#define configQUEUE_REGISTRY_SIZE 0
|
|
||||||
#define configGENERATE_RUN_TIME_STATS 0
|
|
||||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
|
||||||
|
|
||||||
#define configMAX_PRIORITIES ( 5 )
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
|
||||||
to exclude the API function. */
|
|
||||||
|
|
||||||
#define INCLUDE_vTaskPrioritySet 0
|
|
||||||
#define INCLUDE_uxTaskPriorityGet 0
|
|
||||||
#define INCLUDE_vTaskDelete 1
|
|
||||||
#define INCLUDE_vTaskCleanUpResources 0
|
|
||||||
#define INCLUDE_vTaskSuspend 0
|
|
||||||
#define INCLUDE_vTaskDelayUntil 0
|
|
||||||
#define INCLUDE_vTaskDelay 0
|
|
||||||
#define INCLUDE_uxTaskGetStackHighWaterMark 0
|
|
||||||
|
|
||||||
#ifdef __NVIC_PRIO_BITS
|
|
||||||
#define configPRIO_BITS __NVIC_PRIO_BITS
|
|
||||||
#else
|
|
||||||
#define configPRIO_BITS 3
|
|
||||||
#endif
|
|
||||||
#define configUNUSED_PRIO_BITS ( ( unsigned char ) ( 8 - configPRIO_BITS ) )
|
|
||||||
|
|
||||||
#define configKERNEL_INTERRUPT_PRIORITY ( ( unsigned char ) 7 << configUNUSED_PRIO_BITS ) /* Priority 7, or 255 as only the top three bits are implemented. This is the lowest priority. */
|
|
||||||
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
|
|
||||||
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
|
|
||||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( ( unsigned char ) 5 << configUNUSED_PRIO_BITS ) /* Priority 5, or 160 as only the top three bits are implemented. */
|
|
||||||
|
|
||||||
/* The debug_printf() function uses RAM that is outside of the control of the
|
|
||||||
application writer. Therefore the application_defined_privileged_functions.h
|
|
||||||
header file is used to provide a version that executes with privileges. */
|
|
||||||
#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 1
|
|
||||||
|
|
||||||
#endif /* FREERTOS_CONFIG_H */
|
|
|
@ -1,196 +0,0 @@
|
||||||
/*****************************************************************************
|
|
||||||
* Copyright (c) 2006 Rowley Associates Limited. *
|
|
||||||
* *
|
|
||||||
* This file may be distributed under the terms of the License Agreement *
|
|
||||||
* provided with this software. *
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE *
|
|
||||||
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* Preprocessor Definitions
|
|
||||||
* ------------------------
|
|
||||||
*
|
|
||||||
* STARTUP_FROM_RESET
|
|
||||||
*
|
|
||||||
* If defined, the program will startup from power-on/reset. If not defined
|
|
||||||
* the program will just loop endlessly from power-on/reset.
|
|
||||||
*
|
|
||||||
* This definition is not defined by default on this target because the
|
|
||||||
* debugger is unable to reset this target and maintain control of it over the
|
|
||||||
* JTAG interface. The advantage of doing this is that it allows the debugger
|
|
||||||
* to reset the CPU and run programs from a known reset CPU state on each run.
|
|
||||||
* It also acts as a safety net if you accidently download a program in FLASH
|
|
||||||
* that crashes and prevents the debugger from taking control over JTAG
|
|
||||||
* rendering the target unusable over JTAG. The obvious disadvantage of doing
|
|
||||||
* this is that your application will not startup without the debugger.
|
|
||||||
*
|
|
||||||
* We advise that on this target you keep STARTUP_FROM_RESET undefined whilst
|
|
||||||
* you are developing and only define STARTUP_FROM_RESET when development is
|
|
||||||
* complete.
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
.extern xPortPendSVHandler
|
|
||||||
.extern xPortSysTickHandler
|
|
||||||
.extern vPortSVCHandler
|
|
||||||
|
|
||||||
.global reset_handler
|
|
||||||
|
|
||||||
.macro DEFAULT_ISR_HANDLER name=
|
|
||||||
.thumb_func
|
|
||||||
.weak \name
|
|
||||||
\name:
|
|
||||||
1: b 1b /* endless loop */
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.section .vectors, "ax"
|
|
||||||
.code 16
|
|
||||||
.align 0
|
|
||||||
.global _vectors
|
|
||||||
|
|
||||||
_vectors:
|
|
||||||
.word __stack_end__
|
|
||||||
#ifdef STARTUP_FROM_RESET
|
|
||||||
.word reset_handler
|
|
||||||
#else
|
|
||||||
.word reset_wait
|
|
||||||
#endif /* STARTUP_FROM_RESET */
|
|
||||||
.word Nmi_ISR
|
|
||||||
.word Fault_ISR
|
|
||||||
.word MPU_Fault_ISR
|
|
||||||
.word 0 /* Populate if using Bus fault */
|
|
||||||
.word 0 /* Populate if using Usage fault */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word vPortSVCHandler
|
|
||||||
.word 0 /* Populate if using a debug monitor */
|
|
||||||
.word 0 /* Reserved */
|
|
||||||
.word xPortPendSVHandler
|
|
||||||
.word xPortSysTickHandler
|
|
||||||
.word GPIO_Port_A_ISR
|
|
||||||
.word GPIO_Port_B_ISR
|
|
||||||
.word GPIO_Port_C_ISR
|
|
||||||
.word GPIO_Port_D_ISR
|
|
||||||
.word GPIO_Port_E_ISR
|
|
||||||
.word UART0_ISR
|
|
||||||
.word UART1_ISR
|
|
||||||
.word SSI_ISR
|
|
||||||
.word I2C_ISR
|
|
||||||
.word PWM_Fault_ISR
|
|
||||||
.word PWM_Generator_0_ISR
|
|
||||||
.word PWM_Generator_1_ISR
|
|
||||||
.word PWM_Generator_2_ISR
|
|
||||||
.word QEI_ISR
|
|
||||||
.word ADC_Sequence_0_ISR
|
|
||||||
.word ADC_Sequence_1_ISR
|
|
||||||
.word ADC_Sequence_2_ISR
|
|
||||||
.word ADC_Sequence_3_ISR
|
|
||||||
.word Watchdog_Timer_ISR
|
|
||||||
.word Timer0A_ISR
|
|
||||||
.word Timer0B_ISR
|
|
||||||
.word Timer1A_ISR
|
|
||||||
.word Timer1B_ISR
|
|
||||||
.word Timer2A_ISR
|
|
||||||
.word Timer2B_ISR
|
|
||||||
.word Analog_Comparator_0_ISR
|
|
||||||
.word Analog_Comparator_1_ISR
|
|
||||||
.word Analog_Comparator_2_ISR
|
|
||||||
.word System_Control_ISR
|
|
||||||
.word FLASH_Control_ISR
|
|
||||||
.word GPIO_Port_F_ISR
|
|
||||||
.word GPIO_Port_G_ISR
|
|
||||||
.word GPIO_Port_H_ISR
|
|
||||||
.word UART2_ISR
|
|
||||||
.word SSI1_ISR
|
|
||||||
.word Timer3A_ISR
|
|
||||||
.word Timer3B_ISR
|
|
||||||
.word I2C1_ISR
|
|
||||||
.word QEI1_ISR
|
|
||||||
.word CAN0_ISR
|
|
||||||
.word CAN1_ISR
|
|
||||||
.word CAN2_ISR
|
|
||||||
.word EMAC_ISR
|
|
||||||
.word HIBERNATE_ISR
|
|
||||||
.word USB0_ISR
|
|
||||||
.word PWM_Generator_3_ISR
|
|
||||||
.word uDMA_Software_Transfer_ISR
|
|
||||||
.word uDMA_Error_ISR
|
|
||||||
_vectors_end:
|
|
||||||
|
|
||||||
.section .init, "ax"
|
|
||||||
.thumb_func
|
|
||||||
|
|
||||||
reset_handler:
|
|
||||||
#ifdef __RAM_BUILD
|
|
||||||
/* If this is a RAM build, configure vector table offset register to point
|
|
||||||
to the RAM vector table. */
|
|
||||||
ldr r0, =0xE000ED08
|
|
||||||
ldr r1, =_vectors
|
|
||||||
str r1, [r0]
|
|
||||||
#endif
|
|
||||||
b _start
|
|
||||||
|
|
||||||
DEFAULT_ISR_HANDLER Nmi_ISR
|
|
||||||
/*DEFAULT_ISR_HANDLER Fault_ISR*/
|
|
||||||
/*DEFAULT_ISR_HANDLER MPU_Fault_ISR*/
|
|
||||||
DEFAULT_ISR_HANDLER SVCall_ISR
|
|
||||||
DEFAULT_ISR_HANDLER SysTick_ISR
|
|
||||||
DEFAULT_ISR_HANDLER PendSV_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_A_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_B_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_C_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_D_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_E_ISR
|
|
||||||
DEFAULT_ISR_HANDLER UART0_ISR
|
|
||||||
DEFAULT_ISR_HANDLER UART1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER SSI_ISR
|
|
||||||
DEFAULT_ISR_HANDLER I2C_ISR
|
|
||||||
DEFAULT_ISR_HANDLER PWM_Fault_ISR
|
|
||||||
DEFAULT_ISR_HANDLER PWM_Generator_0_ISR
|
|
||||||
DEFAULT_ISR_HANDLER PWM_Generator_1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER PWM_Generator_2_ISR
|
|
||||||
DEFAULT_ISR_HANDLER QEI_ISR
|
|
||||||
DEFAULT_ISR_HANDLER ADC_Sequence_0_ISR
|
|
||||||
DEFAULT_ISR_HANDLER ADC_Sequence_1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER ADC_Sequence_2_ISR
|
|
||||||
DEFAULT_ISR_HANDLER ADC_Sequence_3_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Watchdog_Timer_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer0A_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer0B_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer1A_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer1B_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer2A_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer2B_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Analog_Comparator_0_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Analog_Comparator_1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Analog_Comparator_2_ISR
|
|
||||||
DEFAULT_ISR_HANDLER System_Control_ISR
|
|
||||||
DEFAULT_ISR_HANDLER FLASH_Control_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_F_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_G_ISR
|
|
||||||
DEFAULT_ISR_HANDLER GPIO_Port_H_ISR
|
|
||||||
DEFAULT_ISR_HANDLER UART2_ISR
|
|
||||||
DEFAULT_ISR_HANDLER SSI1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer3A_ISR
|
|
||||||
DEFAULT_ISR_HANDLER Timer3B_ISR
|
|
||||||
DEFAULT_ISR_HANDLER I2C1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER QEI1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER CAN0_ISR
|
|
||||||
DEFAULT_ISR_HANDLER CAN1_ISR
|
|
||||||
DEFAULT_ISR_HANDLER CAN2_ISR
|
|
||||||
DEFAULT_ISR_HANDLER ETHERNET_ISR
|
|
||||||
DEFAULT_ISR_HANDLER HIBERNATE_ISR
|
|
||||||
DEFAULT_ISR_HANDLER USB0_ISR
|
|
||||||
DEFAULT_ISR_HANDLER PWM_Generator_3_ISR
|
|
||||||
DEFAULT_ISR_HANDLER uDMA_Software_Transfer_ISR
|
|
||||||
DEFAULT_ISR_HANDLER uDMA_Error_ISR
|
|
||||||
DEFAULT_ISR_HANDLER EMAC_ISR
|
|
||||||
|
|
||||||
#ifndef STARTUP_FROM_RESET
|
|
||||||
DEFAULT_ISR_HANDLER reset_wait
|
|
||||||
#endif /* STARTUP_FROM_RESET */
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
Target Script for LM3S.
|
|
||||||
|
|
||||||
Copyright (c) 2006 Rowley Associates Limited.
|
|
||||||
|
|
||||||
This file may be distributed under the terms of the License Agreement
|
|
||||||
provided with this software.
|
|
||||||
|
|
||||||
THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
function Reset()
|
|
||||||
{
|
|
||||||
TargetInterface.resetAndStop(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
function RAMReset()
|
|
||||||
{
|
|
||||||
Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
function FLASHReset()
|
|
||||||
{
|
|
||||||
Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
<!DOCTYPE CrossStudio_Project_File>
|
|
||||||
<solution Name="RTOSDemo" target="8" version="2">
|
|
||||||
<project Name="RTOSDemo">
|
|
||||||
<configuration Name="Common" Target="LM3S8962" arm_architecture="v7M" arm_core_type="Cortex-M3" arm_linker_fiq_stack_size="0" arm_linker_heap_size="0" arm_linker_irq_stack_size="0" arm_linker_process_stack_size="0" arm_linker_stack_size="400" arm_simulator_memory_simulation_filename="$(PackagesDir)/targets/Luminary_LM3S/LM3SSimulatorMemory.dll" arm_simulator_memory_simulation_parameter="0x40000;0x10000" arm_target_debug_interface_type="ADIv5" arm_target_flash_loader_type="LIBMEM RPC Loader" arm_use_gcc_libraries="No" build_remove_unused_symbols="No" c_only_additional_options="-Wall;-Wextra" c_preprocessor_definitions="sprintf=usprintf;snprintf=usnprintf;printf=uipprintf" c_user_include_directories="..\\..\\Source\\include;..\\..\\Source\\portable\\GCC\\ARM_CM3_MPU;..\\Common\\include;..\\Common\\drivers\\LuminaryMicro;.;$(SamplesDir)/Luminary_Stellaris_Driver_Library" gcc_optimization_level="None" link_IOLibraryName="none" linker_additional_files="" linker_memory_map_file="$(PackagesDir)/targets/Luminary_LM3S/LM3S8962_MemoryMap.xml" linker_output_format="None" linker_printf_fmt_level="int" linker_printf_width_precision_supported="No" linker_scanf_fmt_level="int" project_directory="" project_type="Executable" property_groups_file_path="$(PackagesDir)/targets/Luminary_LM3S/propertyGroups.xml"/>
|
|
||||||
<configuration Name="Flash" Placement="Flash" arm_target_flash_loader_file_path="$(PackagesDir)/targets/Luminary_LM3S/Release/Loader.elf" linker_section_placement_file="$(ProjectDir)/flash_placement.xml" target_reset_script="FLASHReset()"/>
|
|
||||||
<configuration Name="RAM" Placement="RAM" linker_section_placement_file="$(PackagesDir)/targets/Luminary_LM3S/ram_placement.xml" target_reset_script="RAMReset()"/>
|
|
||||||
<folder Name="Source Files">
|
|
||||||
<configuration Name="Common" filter="c;cpp;cxx;cc;h;s;asm;inc"/>
|
|
||||||
<folder Name="FreeRTOS MPU">
|
|
||||||
<folder Name="include" file_name="">
|
|
||||||
<file file_name="../../Source/include/task.h"/>
|
|
||||||
<file file_name="../../Source/include/FreeRTOS.h"/>
|
|
||||||
<file file_name="../../Source/include/list.h"/>
|
|
||||||
<file file_name="../../Source/include/portable.h"/>
|
|
||||||
<file file_name="../../Source/include/projdefs.h"/>
|
|
||||||
<file file_name="../../Source/include/queue.h"/>
|
|
||||||
<file file_name="../../Source/include/semphr.h"/>
|
|
||||||
<file file_name="../../Source/include/StackMacros.h"/>
|
|
||||||
<file file_name="../../Source/include/mpu_wrappers.h"/>
|
|
||||||
<file file_name="../../Source/portable/GCC/ARM_CM3_MPU/portmacro.h"/>
|
|
||||||
</folder>
|
|
||||||
<file file_name="../../Source/tasks.c"/>
|
|
||||||
<file file_name="../../Source/list.c"/>
|
|
||||||
<file file_name="../../Source/queue.c"/>
|
|
||||||
<file file_name="../../Source/portable/MemMang/heap_2.c"/>
|
|
||||||
<file file_name="../../Source/portable/GCC/ARM_CM3_MPU/port.c"/>
|
|
||||||
</folder>
|
|
||||||
<file file_name="main.c"/>
|
|
||||||
<folder Name="include">
|
|
||||||
<file file_name="FreeRTOSConfig.h"/>
|
|
||||||
</folder>
|
|
||||||
<folder Name="Libraries">
|
|
||||||
<file file_name="../Common/drivers/LuminaryMicro/Rowley/libdriver.a"/>
|
|
||||||
</folder>
|
|
||||||
<file file_name="../Common/drivers/LuminaryMicro/ustdlib.c"/>
|
|
||||||
</folder>
|
|
||||||
<folder Name="System Files">
|
|
||||||
<file file_name="thumb_crt0.s"/>
|
|
||||||
<file file_name="LM3S_Startup.s"/>
|
|
||||||
<file file_name="LM3S_Target.js">
|
|
||||||
<configuration Name="Common" build_exclude_from_build="Yes" file_type="Reset Script"/>
|
|
||||||
<configuration Name="THUMB Flash Debug" build_exclude_from_build="No"/>
|
|
||||||
</file>
|
|
||||||
</folder>
|
|
||||||
</project>
|
|
||||||
<configuration Name="THUMB Flash Debug" inherited_configurations="THUMB;Flash;Debug"/>
|
|
||||||
<configuration Name="THUMB" Platform="ARM" arm_instruction_set="THUMB" arm_library_instruction_set="THUMB" c_preprocessor_definitions="__THUMB" hidden="Yes"/>
|
|
||||||
<configuration Name="Flash" c_preprocessor_definitions="__FLASH_BUILD" hidden="Yes"/>
|
|
||||||
<configuration Name="Debug" build_debug_information="Yes" c_preprocessor_definitions="DEBUG" gcc_optimization_level="None" hidden="Yes" link_include_startup_code="No"/>
|
|
||||||
<configuration Name="THUMB Flash Release" inherited_configurations="THUMB;Flash;Release"/>
|
|
||||||
<configuration Name="Release" build_debug_information="No" c_additional_options="-g1" c_preprocessor_definitions="NDEBUG" gcc_optimization_level="Level 1" hidden="Yes" link_include_startup_code="No"/>
|
|
||||||
</solution>
|
|
|
@ -1,60 +0,0 @@
|
||||||
<!DOCTYPE CrossStudio_for_ARM_Session_File>
|
|
||||||
<session>
|
|
||||||
<Bookmarks/>
|
|
||||||
<Breakpoints/>
|
|
||||||
<ExecutionProfileWindow/>
|
|
||||||
<FrameBufferWindow>
|
|
||||||
<FrameBufferWindow addressText="" bufferWidth="-1" bufferHeight="-1" addressSpace="" />
|
|
||||||
</FrameBufferWindow>
|
|
||||||
<Memory1>
|
|
||||||
<MemoryWindow autoEvaluate="0" addressText="0x200002d0" numColumns="8" sizeText="120" dataSize="1" radix="16" name="RTOSDemo" addressSpace="" />
|
|
||||||
</Memory1>
|
|
||||||
<Memory2>
|
|
||||||
<MemoryWindow autoEvaluate="0" addressText="" numColumns="8" sizeText="" dataSize="1" radix="16" name="RTOSDemo" addressSpace="" />
|
|
||||||
</Memory2>
|
|
||||||
<Memory3>
|
|
||||||
<MemoryWindow autoEvaluate="0" addressText="" numColumns="8" sizeText="" dataSize="1" radix="16" name="RTOSDemo" addressSpace="" />
|
|
||||||
</Memory3>
|
|
||||||
<Memory4>
|
|
||||||
<MemoryWindow autoEvaluate="0" addressText="" numColumns="8" sizeText="" dataSize="1" radix="16" name="RTOSDemo" addressSpace="" />
|
|
||||||
</Memory4>
|
|
||||||
<Project>
|
|
||||||
<ProjectSessionItem path="RTOSDemo" name="unnamed" />
|
|
||||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo" name="unnamed" />
|
|
||||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files" name="unnamed" />
|
|
||||||
</Project>
|
|
||||||
<Register1>
|
|
||||||
<RegisterWindow openNodes="CPU;CPU/xPSR;CPU/CFBP;CPU/CFBP/CONTROL[0];CPU/CFBP/CONTROL[1];Interrupt_Type" binaryNodes="" unsignedNodes="" decimalNodes="" octalNodes="" asciiNodes="" visibleNodes="" name="RTOSDemo" />
|
|
||||||
</Register1>
|
|
||||||
<Register2>
|
|
||||||
<RegisterWindow openNodes="MPU;MPU/MPU_Control;MPU/MPU_Region_Number;MPU/MPU_Region_Base_Address;MPU/MPU_Attribute_and_Size" binaryNodes="MPU/MPU_Attribute_and_Size/SIZE" unsignedNodes="" decimalNodes="" octalNodes="" asciiNodes="" visibleNodes="" name="RTOSDemo" />
|
|
||||||
</Register2>
|
|
||||||
<Register3>
|
|
||||||
<RegisterWindow openNodes="System_Control_Block;System_Control_Block/System_Handlers_8_11_Priority;System_Control_Block/System_Handler_Control_and_State" binaryNodes="" unsignedNodes="" decimalNodes="" octalNodes="" asciiNodes="" visibleNodes="" name="RTOSDemo" />
|
|
||||||
</Register3>
|
|
||||||
<Register4>
|
|
||||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" decimalNodes="" octalNodes="" asciiNodes="" visibleNodes="" name="RTOSDemo" />
|
|
||||||
</Register4>
|
|
||||||
<TargetWindow programAction="" uploadFileType="" programLoadAddress="" programSize="" uploadFileName="" uploadMemoryInterface="" programFileName="" uploadStartAddress="" programFileType="" uploadSize="" programMemoryInterface="" />
|
|
||||||
<TraceWindow>
|
|
||||||
<Trace enabled="Yes" />
|
|
||||||
</TraceWindow>
|
|
||||||
<Watch1>
|
|
||||||
<Watches active="0" update="Never" />
|
|
||||||
</Watch1>
|
|
||||||
<Watch2>
|
|
||||||
<Watches active="0" update="Never" />
|
|
||||||
</Watch2>
|
|
||||||
<Watch3>
|
|
||||||
<Watches active="1" update="Never" >
|
|
||||||
<Watchpoint linenumber="0" radix="-1" name="xTickCount" expression="xTickCount" filename="" />
|
|
||||||
</Watches>
|
|
||||||
</Watch3>
|
|
||||||
<Watch4>
|
|
||||||
<Watches active="0" update="Never" />
|
|
||||||
</Watch4>
|
|
||||||
<Files>
|
|
||||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:/E/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c" y="100" path="C:/E/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c" left="0" selected="1" name="unnamed" top="60" />
|
|
||||||
</Files>
|
|
||||||
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="Luminary USB Debug" debugSearchFileMap="" fileDialogInitialDirectory="C:/E/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU" fileDialogDefaultFilter="*.*" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Flash Debug" />
|
|
||||||
</session>
|
|
3
FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/ReadMe.txt
Normal file
3
FreeRTOS/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/ReadMe.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
If you need the demo that used to be in this directory then download FreeRTOS V8.2.3
|
||||||
|
from http://sourceforge.net/projects/freertos/files/FreeRTOS/
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
/*
|
|
||||||
FreeRTOS V9.0.0rc2 - 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!
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS_H
|
|
||||||
#define APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS_H
|
|
||||||
|
|
||||||
/* The Rowley library function debug_printf() uses data that is out of the
|
|
||||||
control of the kernel, so run the function in a privileged mode. */
|
|
||||||
int MPU_debug_printf( const char *pcMessage )
|
|
||||||
{
|
|
||||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
|
||||||
|
|
||||||
debug_printf( pcMessage );
|
|
||||||
|
|
||||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS_H */
|
|
|
@ -1,24 +0,0 @@
|
||||||
<!DOCTYPE Linker_Placement_File>
|
|
||||||
<Root name="FLASH Section Placement">
|
|
||||||
<MemorySegment name="FLASH">
|
|
||||||
<ProgramSection load="Yes" inputsections="*(.vectors .vectors.*)" name=".vectors"/>
|
|
||||||
<ProgramSection alignment="4" size="16K - 0x100" load="Yes" inputsections="*(privileged_functions)" name="privileged_functions"/>
|
|
||||||
<ProgramSection alignment="4" load="Yes" inputsections="*(.init .init.*)" name=".init"/>
|
|
||||||
<ProgramSection alignment="4" load="Yes" inputsections="*(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table)" name=".text"/>
|
|
||||||
<ProgramSection alignment="4" load="Yes" inputsections="KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors))" name=".dtors"/>
|
|
||||||
<ProgramSection alignment="4" load="Yes" inputsections="KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors))" name=".ctors"/>
|
|
||||||
<ProgramSection alignment="4" load="Yes" inputsections="*(.rodata .rodata.* .gnu.linkonce.r.*)" name=".rodata"/>
|
|
||||||
<ProgramSection alignment="4" load="Yes" runin=".data_run" inputsections="*(.data .data.* .gnu.linkonce.d.*)" name=".data"/>
|
|
||||||
<ProgramSection alignment="4" load="Yes" runin=".fast_run" inputsections="*(.fast .fast.*)" name=".fast"/>
|
|
||||||
</MemorySegment>
|
|
||||||
<MemorySegment name="SRAM">
|
|
||||||
<ProgramSection alignment="4" size="256" alignment="256" load="No" inputsections="*(privileged_data)" name="privileged_data"/>
|
|
||||||
<ProgramSection name=".vectors_ram" size="" alignment="0x100" load="No"/>
|
|
||||||
<ProgramSection alignment="4" load="No" name=".data_run"/>
|
|
||||||
<ProgramSection alignment="4" load="No" inputsections="*(.bss .bss.* .gnu.linkonce.b.*) *(COMMON)" name=".bss"/>
|
|
||||||
<ProgramSection alignment="4" load="No" inputsections="*(.non_init .non_init.*)" name=".non_init"/>
|
|
||||||
<ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap"/>
|
|
||||||
<ProgramSection alignment="4" size="__STACKSIZE__" load="No" name=".stack"/>
|
|
||||||
<ProgramSection alignment="4" load="No" name=".fast_run"/>
|
|
||||||
</MemorySegment>
|
|
||||||
</Root>
|
|
|
@ -1,990 +0,0 @@
|
||||||
/*
|
|
||||||
FreeRTOS V9.0.0rc2 - 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 file demonstrates the use of FreeRTOS-MPU. It creates tasks in both
|
|
||||||
* User mode and Privileged mode, and using both the original xTaskCreate() and
|
|
||||||
* the new xTaskCreateRestricted() API functions. The purpose of each created
|
|
||||||
* task is documented in the comments above the task function prototype (in
|
|
||||||
* this file), with the task behaviour demonstrated and documented within the
|
|
||||||
* task function itself. In addition a queue is used to demonstrate passing
|
|
||||||
* data between protected/restricted tasks as well as passing data between an
|
|
||||||
* interrupt and a protected/restricted task.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Standard includes. */
|
|
||||||
#include <string.h>
|
|
||||||
#include <__cross_studio_io.h>
|
|
||||||
|
|
||||||
/* Scheduler includes. */
|
|
||||||
#include "FreeRTOS.h"
|
|
||||||
#include "task.h"
|
|
||||||
#include "queue.h"
|
|
||||||
#include "semphr.h"
|
|
||||||
|
|
||||||
/* Hardware library includes. */
|
|
||||||
#include "hw_types.h"
|
|
||||||
#include "hw_sysctl.h"
|
|
||||||
#include "sysctl.h"
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* Misc constants. */
|
|
||||||
#define mainDONT_BLOCK ( 0 )
|
|
||||||
|
|
||||||
/* Definitions for the messages that can be sent to the check task. */
|
|
||||||
#define mainREG_TEST_1_STILL_EXECUTING ( 0 )
|
|
||||||
#define mainREG_TEST_2_STILL_EXECUTING ( 1 )
|
|
||||||
#define mainPRINT_SYSTEM_STATUS ( 2 )
|
|
||||||
|
|
||||||
/* GCC specifics. */
|
|
||||||
#define mainALIGN_TO( x ) __attribute__((aligned(x)))
|
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
/* Prototypes for functions that implement tasks. -----------*/
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Prototype for the reg test tasks. Amongst other things, these fill the CPU
|
|
||||||
* registers with known values before checking that the registers still contain
|
|
||||||
* the expected values. Each of the two tasks use different values so an error
|
|
||||||
* in the context switch mechanism can be caught. Both reg test tasks execute
|
|
||||||
* at the idle priority so will get preempted regularly. Each task repeatedly
|
|
||||||
* sends a message on a queue so long as it remains functioning correctly. If
|
|
||||||
* an error is detected within the task the task is simply deleted.
|
|
||||||
*/
|
|
||||||
static void prvRegTest1Task( void *pvParameters );
|
|
||||||
static void prvRegTest2Task( void *pvParameters );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Prototype for the check task. The check task demonstrates various features
|
|
||||||
* of the MPU before entering a loop where it waits for messages to arrive on a
|
|
||||||
* queue.
|
|
||||||
*
|
|
||||||
* Two types of messages can be processes:
|
|
||||||
*
|
|
||||||
* 1) "I'm Alive" messages sent from the reg test tasks, indicating that the
|
|
||||||
* task is still operational.
|
|
||||||
*
|
|
||||||
* 2) "Print Status commands" sent periodically by the tick hook function (and
|
|
||||||
* therefore from within an interrupt) which command the check task to write
|
|
||||||
* either pass or fail to the terminal, depending on the status of the reg
|
|
||||||
* test tasks.
|
|
||||||
*/
|
|
||||||
static void prvCheckTask( void *pvParameters );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Prototype for a task created in User mode using the original vTaskCreate()
|
|
||||||
* API function. The task demonstrates the characteristics of such a task,
|
|
||||||
* before simply deleting itself.
|
|
||||||
*/
|
|
||||||
static void prvOldStyleUserModeTask( void *pvParameters );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Prototype for a task created in Privileged mode using the original
|
|
||||||
* vTaskCreate() API function. The task demonstrates the characteristics of
|
|
||||||
* such a task, before simply deleting itself.
|
|
||||||
*/
|
|
||||||
static void prvOldStylePrivilegedModeTask( void *pvParameters );
|
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
/* Prototypes for other misc functions. --------------------*/
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Just configures any clocks and IO necessary.
|
|
||||||
*/
|
|
||||||
static void prvSetupHardware( void );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Simply deletes the calling task. The function is provided only because it
|
|
||||||
* is simpler to call from asm code than the normal vTaskDelete() API function.
|
|
||||||
* It has the noinline attribute because it is called from asm code.
|
|
||||||
*/
|
|
||||||
static void prvDeleteMe( void ) __attribute__((noinline));
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Used by both reg test tasks to send messages to the check task. The message
|
|
||||||
* just lets the check task know that the task is still functioning correctly.
|
|
||||||
* If a reg test task detects an error it will delete itself, and in so doing
|
|
||||||
* prevent itself from sending any more 'I'm Alive' messages to the check task.
|
|
||||||
*/
|
|
||||||
static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber );
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The check task is created with access to three memory regions (plus its
|
|
||||||
* stack). Each memory region is configured with different parameters and
|
|
||||||
* prvTestMemoryRegions() demonstrates what can and cannot be accessed for each
|
|
||||||
* region. prvTestMemoryRegions() also demonstrates a task that was created
|
|
||||||
* as a privileged task settings its own privilege level down to that of a user
|
|
||||||
* task.
|
|
||||||
*/
|
|
||||||
static void prvTestMemoryRegions( void );
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* The handle of the queue used to communicate between tasks and between tasks
|
|
||||||
and interrupts. Note that this is a file scope variable that falls outside of
|
|
||||||
any MPU region. As such other techniques have to be used to allow the tasks
|
|
||||||
to gain access to the queue. See the comments in the tasks themselves for
|
|
||||||
further information. */
|
|
||||||
static QueueHandle_t xFileScopeCheckQueue = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
/* Data used by the 'check' task. ---------------------------*/
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* Define the constants used to allocate the check task stack. Note that the
|
|
||||||
stack size is defined in words, not bytes. */
|
|
||||||
#define mainCHECK_TASK_STACK_SIZE_WORDS 128
|
|
||||||
#define mainCHECK_TASK_STACK_ALIGNMENT ( mainCHECK_TASK_STACK_SIZE_WORDS * sizeof( portSTACK_TYPE ) )
|
|
||||||
|
|
||||||
/* Declare the stack that will be used by the check task. The kernel will
|
|
||||||
automatically create an MPU region for the stack. The stack alignment must
|
|
||||||
match its size, so if 128 words are reserved for the stack then it must be
|
|
||||||
aligned to ( 128 * 4 ) bytes. */
|
|
||||||
static portSTACK_TYPE xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] mainALIGN_TO( mainCHECK_TASK_STACK_ALIGNMENT );
|
|
||||||
|
|
||||||
/* Declare three arrays - an MPU region will be created for each array
|
|
||||||
using the TaskParameters_t structure below. THIS IS JUST TO DEMONSTRATE THE
|
|
||||||
MPU FUNCTIONALITY, the data is not used by the check tasks primary function
|
|
||||||
of monitoring the reg test tasks and printing out status information.
|
|
||||||
|
|
||||||
Note that the arrays allocate slightly more RAM than is actually assigned to
|
|
||||||
the MPU region. This is to permit writes off the end of the array to be
|
|
||||||
detected even when the arrays are placed in adjacent memory locations (with no
|
|
||||||
gaps between them). The align size must be a power of two. */
|
|
||||||
#define mainREAD_WRITE_ARRAY_SIZE 130
|
|
||||||
#define mainREAD_WRITE_ALIGN_SIZE 128
|
|
||||||
char cReadWriteArray[ mainREAD_WRITE_ARRAY_SIZE ] mainALIGN_TO( mainREAD_WRITE_ALIGN_SIZE );
|
|
||||||
|
|
||||||
#define mainREAD_ONLY_ARRAY_SIZE 260
|
|
||||||
#define mainREAD_ONLY_ALIGN_SIZE 256
|
|
||||||
char cReadOnlyArray[ mainREAD_ONLY_ARRAY_SIZE ] mainALIGN_TO( mainREAD_ONLY_ALIGN_SIZE );
|
|
||||||
|
|
||||||
#define mainPRIVILEGED_ONLY_ACCESS_ARRAY_SIZE 130
|
|
||||||
#define mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE 128
|
|
||||||
char cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] mainALIGN_TO( mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE );
|
|
||||||
|
|
||||||
/* Fill in a TaskParameters_t structure to define the check task - this is the
|
|
||||||
structure passed to the xTaskCreateRestricted() function. */
|
|
||||||
static const TaskParameters_t xCheckTaskParameters =
|
|
||||||
{
|
|
||||||
prvCheckTask, /* pvTaskCode - the function that implements the task. */
|
|
||||||
"Check", /* pcName */
|
|
||||||
mainCHECK_TASK_STACK_SIZE_WORDS, /* usStackDepth - defined in words, not bytes. */
|
|
||||||
( void * ) 0x12121212, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */
|
|
||||||
( tskIDLE_PRIORITY + 1 ) | portPRIVILEGE_BIT,/* uxPriority - this is the highest priority task in the system. The task is created in privileged mode to demonstrate accessing the privileged only data. */
|
|
||||||
xCheckTaskStack, /* puxStackBuffer - the array to use as the task stack, as declared above. */
|
|
||||||
|
|
||||||
/* xRegions - In this case the xRegions array is used to create MPU regions
|
|
||||||
for all three of the arrays declared directly above. Each MPU region is
|
|
||||||
created with different parameters. Again, THIS IS JUST TO DEMONSTRATE THE
|
|
||||||
MPU FUNCTIONALITY, the data is not used by the check tasks primary function
|
|
||||||
of monitoring the reg test tasks and printing out status information.*/
|
|
||||||
{
|
|
||||||
/* Base address Length Parameters */
|
|
||||||
{ cReadWriteArray, mainREAD_WRITE_ALIGN_SIZE, portMPU_REGION_READ_WRITE },
|
|
||||||
{ cReadOnlyArray, mainREAD_ONLY_ALIGN_SIZE, portMPU_REGION_READ_ONLY },
|
|
||||||
{ cPrivilegedOnlyAccessArray, mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE, portMPU_REGION_PRIVILEGED_READ_WRITE }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
/* Data used by the 'reg test' tasks. -----------------------*/
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* Define the constants used to allocate the reg test task stacks. Note that
|
|
||||||
that stack size is defined in words, not bytes. */
|
|
||||||
#define mainREG_TEST_STACK_SIZE_WORDS 128
|
|
||||||
#define mainREG_TEST_STACK_ALIGNMENT ( mainREG_TEST_STACK_SIZE_WORDS * sizeof( portSTACK_TYPE ) )
|
|
||||||
|
|
||||||
/* Declare the stacks that will be used by the reg test tasks. The kernel will
|
|
||||||
automatically create an MPU region for the stack. The stack alignment must
|
|
||||||
match its size, so if 128 words are reserved for the stack then it must be
|
|
||||||
aligned to ( 128 * 4 ) bytes. */
|
|
||||||
static portSTACK_TYPE xRegTest1Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );
|
|
||||||
static portSTACK_TYPE xRegTest2Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );
|
|
||||||
|
|
||||||
/* Fill in a TaskParameters_t structure per reg test task to define the tasks. */
|
|
||||||
static const TaskParameters_t xRegTest1Parameters =
|
|
||||||
{
|
|
||||||
prvRegTest1Task, /* pvTaskCode - the function that implements the task. */
|
|
||||||
"RegTest1", /* pcName */
|
|
||||||
mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */
|
|
||||||
( void * ) 0x12345678, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */
|
|
||||||
tskIDLE_PRIORITY | portPRIVILEGE_BIT, /* uxPriority - note that this task is created with privileges to demonstrate one method of passing a queue handle into the task. */
|
|
||||||
xRegTest1Stack, /* puxStackBuffer - the array to use as the task stack, as declared above. */
|
|
||||||
{ /* xRegions - this task does not use any non-stack data hence all members are zero. */
|
|
||||||
/* Base address Length Parameters */
|
|
||||||
{ 0x00, 0x00, 0x00 },
|
|
||||||
{ 0x00, 0x00, 0x00 },
|
|
||||||
{ 0x00, 0x00, 0x00 }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static TaskParameters_t xRegTest2Parameters =
|
|
||||||
{
|
|
||||||
prvRegTest2Task, /* pvTaskCode - the function that implements the task. */
|
|
||||||
"RegTest2", /* pcName */
|
|
||||||
mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */
|
|
||||||
( void * ) NULL, /* pvParameters - this task uses the parameter to pass in a queue handle, but the queue is not created yet. */
|
|
||||||
tskIDLE_PRIORITY, /* uxPriority */
|
|
||||||
xRegTest2Stack, /* puxStackBuffer - the array to use as the task stack, as declared above. */
|
|
||||||
{ /* xRegions - this task does not use any non-stack data hence all members are zero. */
|
|
||||||
/* Base address Length Parameters */
|
|
||||||
{ 0x00, 0x00, 0x00 },
|
|
||||||
{ 0x00, 0x00, 0x00 },
|
|
||||||
{ 0x00, 0x00, 0x00 }
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
int main( void )
|
|
||||||
{
|
|
||||||
prvSetupHardware();
|
|
||||||
|
|
||||||
/* Create the queue used to pass "I'm alive" messages to the check task. */
|
|
||||||
xFileScopeCheckQueue = xQueueCreate( 1, sizeof( unsigned long ) );
|
|
||||||
|
|
||||||
/* One check task uses the task parameter to receive the queue handle.
|
|
||||||
This allows the file scope variable to be accessed from within the task.
|
|
||||||
The pvParameters member of xRegTest2Parameters can only be set after the
|
|
||||||
queue has been created so is set here. */
|
|
||||||
xRegTest2Parameters.pvParameters = xFileScopeCheckQueue;
|
|
||||||
|
|
||||||
/* Create the three test tasks. Handles to the created tasks are not
|
|
||||||
required, hence the second parameter is NULL. */
|
|
||||||
xTaskCreateRestricted( &xRegTest1Parameters, NULL );
|
|
||||||
xTaskCreateRestricted( &xRegTest2Parameters, NULL );
|
|
||||||
xTaskCreateRestricted( &xCheckTaskParameters, NULL );
|
|
||||||
|
|
||||||
/* Create the tasks that are created using the original xTaskCreate() API
|
|
||||||
function. */
|
|
||||||
xTaskCreate( prvOldStyleUserModeTask, /* The function that implements the task. */
|
|
||||||
"Task1", /* Text name for the task. */
|
|
||||||
100, /* Stack depth in words. */
|
|
||||||
NULL, /* Task parameters. */
|
|
||||||
3, /* Priority and mode (user in this case). */
|
|
||||||
NULL /* Handle. */
|
|
||||||
);
|
|
||||||
|
|
||||||
xTaskCreate( prvOldStylePrivilegedModeTask, /* The function that implements the task. */
|
|
||||||
"Task2", /* Text name for the task. */
|
|
||||||
100, /* Stack depth in words. */
|
|
||||||
NULL, /* Task parameters. */
|
|
||||||
( 3 | portPRIVILEGE_BIT ), /* Priority and mode. */
|
|
||||||
NULL /* Handle. */
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Start the scheduler. */
|
|
||||||
vTaskStartScheduler();
|
|
||||||
|
|
||||||
/* Will only get here if there was insufficient memory to create the idle
|
|
||||||
task. */
|
|
||||||
for( ;; );
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvCheckTask( void *pvParameters )
|
|
||||||
{
|
|
||||||
/* This task is created in privileged mode so can access the file scope
|
|
||||||
queue variable. Take a stack copy of this before the task is set into user
|
|
||||||
mode. Once that task is in user mode the file scope queue variable will no
|
|
||||||
longer be accessible but the stack copy will. */
|
|
||||||
QueueHandle_t xQueue = xFileScopeCheckQueue;
|
|
||||||
long lMessage;
|
|
||||||
unsigned long ulStillAliveCounts[ 2 ] = { 0 };
|
|
||||||
const char *pcStatusMessage = "PASS\r\n";
|
|
||||||
|
|
||||||
/* The debug_printf() function uses RAM that is outside of the control of the
|
|
||||||
application writer. Therefore the application_defined_privileged_functions.h
|
|
||||||
header file is used to provide a version that executes with privileges. */
|
|
||||||
extern int MPU_debug_printf( const char *pcMessage );
|
|
||||||
|
|
||||||
/* Just to remove compiler warning. */
|
|
||||||
( void ) pvParameters;
|
|
||||||
|
|
||||||
/* Demonstrate how the various memory regions can and can't be accessed.
|
|
||||||
The task privilege level is set down to user mode within this function. */
|
|
||||||
prvTestMemoryRegions();
|
|
||||||
|
|
||||||
/* Tests are done so lower the privilege status. */
|
|
||||||
portSWITCH_TO_USER_MODE();
|
|
||||||
|
|
||||||
/* This loop performs the main function of the task, which is blocking
|
|
||||||
on a message queue then processing each message as it arrives. */
|
|
||||||
for( ;; )
|
|
||||||
{
|
|
||||||
/* Wait for the next message to arrive. */
|
|
||||||
xQueueReceive( xQueue, &lMessage, portMAX_DELAY );
|
|
||||||
|
|
||||||
switch( lMessage )
|
|
||||||
{
|
|
||||||
case mainREG_TEST_1_STILL_EXECUTING :
|
|
||||||
/* Message from task 1, so task 1 must still be executing. */
|
|
||||||
( ulStillAliveCounts[ 0 ] )++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mainREG_TEST_2_STILL_EXECUTING :
|
|
||||||
/* Message from task 2, so task 2 must still be executing. */
|
|
||||||
( ulStillAliveCounts[ 1 ] )++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mainPRINT_SYSTEM_STATUS :
|
|
||||||
/* Message from tick hook, time to print out the system
|
|
||||||
status. If messages has stopped arriving from either reg
|
|
||||||
test task then the status must be set to fail. */
|
|
||||||
if( ( ulStillAliveCounts[ 0 ] == 0 ) || ( ulStillAliveCounts[ 1 ] == 0 ) )
|
|
||||||
{
|
|
||||||
/* One or both of the test tasks are no longer sending
|
|
||||||
'still alive' messages. */
|
|
||||||
pcStatusMessage = "FAIL\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print a pass/fail message to the terminal. This will be
|
|
||||||
visible in the CrossWorks IDE. */
|
|
||||||
MPU_debug_printf( pcStatusMessage );
|
|
||||||
|
|
||||||
/* Reset the count of 'still alive' messages. */
|
|
||||||
memset( ulStillAliveCounts, 0x00, sizeof( ulStillAliveCounts ) );
|
|
||||||
break;
|
|
||||||
|
|
||||||
default :
|
|
||||||
/* Something unexpected happened. Delete this task so the
|
|
||||||
error is apparent (no output will be displayed). */
|
|
||||||
prvDeleteMe();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvTestMemoryRegions( void )
|
|
||||||
{
|
|
||||||
long l;
|
|
||||||
char cTemp;
|
|
||||||
|
|
||||||
/* The check task (from which this function is called) is created in the
|
|
||||||
Privileged mode. The privileged array can be both read from and written
|
|
||||||
to while this task is privileged. */
|
|
||||||
cPrivilegedOnlyAccessArray[ 0 ] = 'a';
|
|
||||||
if( cPrivilegedOnlyAccessArray[ 0 ] != 'a' )
|
|
||||||
{
|
|
||||||
/* Something unexpected happened. Delete this task so the error is
|
|
||||||
apparent (no output will be displayed). */
|
|
||||||
prvDeleteMe();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Writing off the end of the RAM allocated to this task will *NOT* cause a
|
|
||||||
protection fault because the task is still executing in a privileged mode.
|
|
||||||
Uncomment the following to test. */
|
|
||||||
/*cPrivilegedOnlyAccessArray[ mainPRIVILEGED_ONLY_ACCESS_ALIGN_SIZE ] = 'a';*/
|
|
||||||
|
|
||||||
/* Now set the task into user mode. */
|
|
||||||
portSWITCH_TO_USER_MODE();
|
|
||||||
|
|
||||||
/* Accessing the privileged only array will now cause a fault. Uncomment
|
|
||||||
the following line to test. */
|
|
||||||
/*cPrivilegedOnlyAccessArray[ 0 ] = 'a';*/
|
|
||||||
|
|
||||||
/* The read/write array can still be successfully read and written. */
|
|
||||||
for( l = 0; l < mainREAD_WRITE_ALIGN_SIZE; l++ )
|
|
||||||
{
|
|
||||||
cReadWriteArray[ l ] = 'a';
|
|
||||||
if( cReadWriteArray[ l ] != 'a' )
|
|
||||||
{
|
|
||||||
/* Something unexpected happened. Delete this task so the error is
|
|
||||||
apparent (no output will be displayed). */
|
|
||||||
prvDeleteMe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* But attempting to read or write off the end of the RAM allocated to this
|
|
||||||
task will cause a fault. Uncomment either of the following two lines to
|
|
||||||
test. */
|
|
||||||
/* cReadWriteArray[ 0 ] = cReadWriteArray[ -1 ]; */
|
|
||||||
/* cReadWriteArray[ mainREAD_WRITE_ALIGN_SIZE ] = 0x00; */
|
|
||||||
|
|
||||||
/* The read only array can be successfully read... */
|
|
||||||
for( l = 0; l < mainREAD_ONLY_ALIGN_SIZE; l++ )
|
|
||||||
{
|
|
||||||
cTemp = cReadOnlyArray[ l ];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ...but cannot be written. Uncomment the following line to test. */
|
|
||||||
/* cReadOnlyArray[ 0 ] = 'a'; */
|
|
||||||
|
|
||||||
/* Writing to the first and last locations in the stack array should not
|
|
||||||
cause a protection fault. Note that doing this will cause the kernel to
|
|
||||||
detect a stack overflow if configCHECK_FOR_STACK_OVERFLOW is greater than
|
|
||||||
1. */
|
|
||||||
xCheckTaskStack[ 0 ] = 0;
|
|
||||||
xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS - 1 ] = 0;
|
|
||||||
|
|
||||||
/* Writing off either end of the stack array should cause a protection
|
|
||||||
fault, uncomment either of the following two lines to test. */
|
|
||||||
/* xCheckTaskStack[ -1 ] = 0; */
|
|
||||||
/* xCheckTaskStack[ mainCHECK_TASK_STACK_SIZE_WORDS ] = 0; */
|
|
||||||
|
|
||||||
( void ) cTemp;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvRegTest1Task( void *pvParameters )
|
|
||||||
{
|
|
||||||
/* This task is created in privileged mode so can access the file scope
|
|
||||||
queue variable. Take a stack copy of this before the task is set into user
|
|
||||||
mode. Once this task is in user mode the file scope queue variable will no
|
|
||||||
longer be accessible but the stack copy will. */
|
|
||||||
QueueHandle_t xQueue = xFileScopeCheckQueue;
|
|
||||||
|
|
||||||
/* Now the queue handle has been obtained the task can switch to user
|
|
||||||
mode. This is just one method of passing a handle into a protected
|
|
||||||
task, the other reg test task uses the task parameter instead. */
|
|
||||||
portSWITCH_TO_USER_MODE();
|
|
||||||
|
|
||||||
/* First check that the parameter value is as expected. */
|
|
||||||
if( pvParameters != ( void * ) 0x12345678 )
|
|
||||||
{
|
|
||||||
/* Error detected. Delete the task so it stops communicating with
|
|
||||||
the check task. */
|
|
||||||
prvDeleteMe();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for( ;; )
|
|
||||||
{
|
|
||||||
/* This task tests the kernel context switch mechanism by reading and
|
|
||||||
writing directly to registers - which requires the test to be written
|
|
||||||
in assembly code. */
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" MOV R4, #104 \n" /* Set registers to a known value. R0 to R1 are done in the loop below. */
|
|
||||||
" MOV R5, #105 \n"
|
|
||||||
" MOV R6, #106 \n"
|
|
||||||
" MOV R8, #108 \n"
|
|
||||||
" MOV R9, #109 \n"
|
|
||||||
" MOV R10, #110 \n"
|
|
||||||
" MOV R11, #111 \n"
|
|
||||||
"reg1loop: \n"
|
|
||||||
" MOV R0, #100 \n" /* Set the scratch registers to known values - done inside the loop as they get clobbered. */
|
|
||||||
" MOV R1, #101 \n"
|
|
||||||
" MOV R2, #102 \n"
|
|
||||||
" MOV R3, #103 \n"
|
|
||||||
" MOV R12, #112 \n"
|
|
||||||
" SVC #1 \n" /* Yield just to increase test coverage. */
|
|
||||||
" CMP R0, #100 \n" /* Check all the registers still contain their expected values. */
|
|
||||||
" BNE prvDeleteMe \n" /* Value was not as expected, delete the task so it stops communicating with the check task. */
|
|
||||||
" CMP R1, #101 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R2, #102 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R3, #103 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R4, #104 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R5, #105 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R6, #106 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R8, #108 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R9, #109 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R10, #110 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R11, #111 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R12, #112 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
:::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12"
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Send mainREG_TEST_1_STILL_EXECUTING to the check task to indicate that this
|
|
||||||
task is still functioning. */
|
|
||||||
prvSendImAlive( xQueue, mainREG_TEST_1_STILL_EXECUTING );
|
|
||||||
|
|
||||||
/* Go back to check all the register values again. */
|
|
||||||
__asm volatile( " B reg1loop " );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvRegTest2Task( void *pvParameters )
|
|
||||||
{
|
|
||||||
/* The queue handle is passed in as the task parameter. This is one method of
|
|
||||||
passing data into a protected task, the other reg test task uses a different
|
|
||||||
method. */
|
|
||||||
QueueHandle_t xQueue = ( QueueHandle_t ) pvParameters;
|
|
||||||
|
|
||||||
for( ;; )
|
|
||||||
{
|
|
||||||
/* This task tests the kernel context switch mechanism by reading and
|
|
||||||
writing directly to registers - which requires the test to be written
|
|
||||||
in assembly code. */
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" MOV R4, #4 \n" /* Set registers to a known value. R0 to R1 are done in the loop below. */
|
|
||||||
" MOV R5, #5 \n"
|
|
||||||
" MOV R6, #6 \n"
|
|
||||||
" MOV R8, #8 \n" /* Frame pointer is omitted as it must not be changed. */
|
|
||||||
" MOV R9, #9 \n"
|
|
||||||
" MOV R10, 10 \n"
|
|
||||||
" MOV R11, #11 \n"
|
|
||||||
"reg2loop: \n"
|
|
||||||
" MOV R0, #13 \n" /* Set the scratch registers to known values - done inside the loop as they get clobbered. */
|
|
||||||
" MOV R1, #1 \n"
|
|
||||||
" MOV R2, #2 \n"
|
|
||||||
" MOV R3, #3 \n"
|
|
||||||
" MOV R12, #12 \n"
|
|
||||||
" CMP R0, #13 \n" /* Check all the registers still contain their expected values. */
|
|
||||||
" BNE prvDeleteMe \n" /* Value was not as expected, delete the task so it stops communicating with the check task */
|
|
||||||
" CMP R1, #1 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R2, #2 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R3, #3 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R4, #4 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R5, #5 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R6, #6 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R8, #8 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R9, #9 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R10, #10 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R11, #11 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
" CMP R12, #12 \n"
|
|
||||||
" BNE prvDeleteMe \n"
|
|
||||||
:::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12"
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Send mainREG_TEST_2_STILL_EXECUTING to the check task to indicate that this
|
|
||||||
task is still functioning. */
|
|
||||||
prvSendImAlive( xQueue, mainREG_TEST_2_STILL_EXECUTING );
|
|
||||||
|
|
||||||
/* Go back to check all the register values again. */
|
|
||||||
__asm volatile( " B reg2loop " );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
|
||||||
{
|
|
||||||
extern unsigned long __SRAM_segment_end__[];
|
|
||||||
extern unsigned long __privileged_data_start__[];
|
|
||||||
extern unsigned long __privileged_data_end__[];
|
|
||||||
extern unsigned long __FLASH_segment_start__[];
|
|
||||||
extern unsigned long __FLASH_segment_end__[];
|
|
||||||
volatile unsigned long *pul;
|
|
||||||
volatile unsigned long ulReadData;
|
|
||||||
|
|
||||||
/* The idle task, and therefore this function, run in Supervisor mode and
|
|
||||||
can therefore access all memory. Try reading from corners of flash and
|
|
||||||
RAM to ensure a memory fault does not occur.
|
|
||||||
|
|
||||||
Start with the edges of the privileged data area. */
|
|
||||||
pul = __privileged_data_start__;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __privileged_data_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* Next the standard SRAM area. */
|
|
||||||
pul = __SRAM_segment_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* And the standard Flash area - the start of which is marked for
|
|
||||||
privileged access only. */
|
|
||||||
pul = __FLASH_segment_start__;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __FLASH_segment_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* Reading off the end of Flash or SRAM space should cause a fault.
|
|
||||||
Uncomment one of the following two pairs of lines to test. */
|
|
||||||
|
|
||||||
/* pul = __FLASH_segment_end__ + 4;
|
|
||||||
ulReadData = *pul; */
|
|
||||||
|
|
||||||
/* pul = __SRAM_segment_end__ + 1;
|
|
||||||
ulReadData = *pul; */
|
|
||||||
|
|
||||||
( void ) ulReadData;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvOldStyleUserModeTask( void *pvParameters )
|
|
||||||
{
|
|
||||||
extern unsigned long __privileged_data_start__[];
|
|
||||||
extern unsigned long __privileged_data_end__[];
|
|
||||||
extern unsigned long __SRAM_segment_end__[];
|
|
||||||
extern unsigned long __privileged_functions_end__[];
|
|
||||||
extern unsigned long __FLASH_segment_start__[];
|
|
||||||
extern unsigned long __FLASH_segment_end__[];
|
|
||||||
const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigned long * ) 0x400FC0C4; /* PCONP */
|
|
||||||
volatile unsigned long *pul;
|
|
||||||
volatile unsigned long ulReadData;
|
|
||||||
|
|
||||||
/* The following lines are commented out to prevent the unused variable
|
|
||||||
compiler warnings when the tests that use the variable are also commented out.
|
|
||||||
extern unsigned long __privileged_functions_start__[];
|
|
||||||
const volatile unsigned long *pulSystemPeripheralRegister = ( volatile unsigned long * ) 0xe000e014; */
|
|
||||||
|
|
||||||
( void ) pvParameters;
|
|
||||||
|
|
||||||
/* This task is created in User mode using the original xTaskCreate() API
|
|
||||||
function. It should have access to all Flash and RAM except that marked
|
|
||||||
as Privileged access only. Reading from the start and end of the non-
|
|
||||||
privileged RAM should not cause a problem (the privileged RAM is the first
|
|
||||||
block at the bottom of the RAM memory). */
|
|
||||||
pul = __privileged_data_end__ + 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __SRAM_segment_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* Likewise reading from the start and end of the non-privileged Flash
|
|
||||||
should not be a problem (the privileged Flash is the first block at the
|
|
||||||
bottom of the Flash memory). */
|
|
||||||
pul = __privileged_functions_end__ + 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __FLASH_segment_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* Standard peripherals are accessible. */
|
|
||||||
ulReadData = *pulStandardPeripheralRegister;
|
|
||||||
|
|
||||||
/* System peripherals are not accessible. Uncomment the following line
|
|
||||||
to test. Also uncomment the declaration of pulSystemPeripheralRegister
|
|
||||||
at the top of this function. */
|
|
||||||
/* ulReadData = *pulSystemPeripheralRegister; */
|
|
||||||
|
|
||||||
/* Reading from anywhere inside the privileged Flash or RAM should cause a
|
|
||||||
fault. This can be tested by uncommenting any of the following pairs of
|
|
||||||
lines. Also uncomment the declaration of __privileged_functions_start__
|
|
||||||
at the top of this function. */
|
|
||||||
|
|
||||||
/* pul = __privileged_functions_start__;
|
|
||||||
ulReadData = *pul; */
|
|
||||||
|
|
||||||
/* pul = __privileged_functions_end__ - 1;
|
|
||||||
ulReadData = *pul; */
|
|
||||||
|
|
||||||
/* pul = __privileged_data_start__;
|
|
||||||
ulReadData = *pul; */
|
|
||||||
|
|
||||||
/* pul = __privileged_data_end__ - 1;
|
|
||||||
ulReadData = *pul; */
|
|
||||||
|
|
||||||
/* Must not just run off the end of a task function, so delete this task.
|
|
||||||
Note that because this task was created using xTaskCreate() the stack was
|
|
||||||
allocated dynamically and I have not included any code to free it again. */
|
|
||||||
vTaskDelete( NULL );
|
|
||||||
|
|
||||||
( void ) ulReadData;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvOldStylePrivilegedModeTask( void *pvParameters )
|
|
||||||
{
|
|
||||||
extern unsigned long __privileged_data_start__[];
|
|
||||||
extern unsigned long __privileged_data_end__[];
|
|
||||||
extern unsigned long __SRAM_segment_end__[];
|
|
||||||
extern unsigned long __privileged_functions_start__[];
|
|
||||||
extern unsigned long __privileged_functions_end__[];
|
|
||||||
extern unsigned long __FLASH_segment_start__[];
|
|
||||||
extern unsigned long __FLASH_segment_end__[];
|
|
||||||
volatile unsigned long *pul;
|
|
||||||
volatile unsigned long ulReadData;
|
|
||||||
const volatile unsigned long *pulSystemPeripheralRegister = ( volatile unsigned long * ) 0xe000e014; /* Systick */
|
|
||||||
const volatile unsigned long *pulStandardPeripheralRegister = ( volatile unsigned long * ) 0x400FC0C4; /* PCONP */
|
|
||||||
|
|
||||||
( void ) pvParameters;
|
|
||||||
|
|
||||||
/* This task is created in Privileged mode using the original xTaskCreate()
|
|
||||||
API function. It should have access to all Flash and RAM including that
|
|
||||||
marked as Privileged access only. So reading from the start and end of the
|
|
||||||
non-privileged RAM should not cause a problem (the privileged RAM is the
|
|
||||||
first block at the bottom of the RAM memory). */
|
|
||||||
pul = __privileged_data_end__ + 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __SRAM_segment_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* Likewise reading from the start and end of the non-privileged Flash
|
|
||||||
should not be a problem (the privileged Flash is the first block at the
|
|
||||||
bottom of the Flash memory). */
|
|
||||||
pul = __privileged_functions_end__ + 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __FLASH_segment_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* Reading from anywhere inside the privileged Flash or RAM should also
|
|
||||||
not be a problem. */
|
|
||||||
pul = __privileged_functions_start__;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __privileged_functions_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __privileged_data_start__;
|
|
||||||
ulReadData = *pul;
|
|
||||||
pul = __privileged_data_end__ - 1;
|
|
||||||
ulReadData = *pul;
|
|
||||||
|
|
||||||
/* Finally, accessing both System and normal peripherals should both be
|
|
||||||
possible. */
|
|
||||||
ulReadData = *pulSystemPeripheralRegister;
|
|
||||||
ulReadData = *pulStandardPeripheralRegister;
|
|
||||||
|
|
||||||
/* Must not just run off the end of a task function, so delete this task.
|
|
||||||
Note that because this task was created using xTaskCreate() the stack was
|
|
||||||
allocated dynamically and I have not included any code to free it again. */
|
|
||||||
vTaskDelete( NULL );
|
|
||||||
|
|
||||||
( void ) ulReadData;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvDeleteMe( void )
|
|
||||||
{
|
|
||||||
vTaskDelete( NULL );
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvSendImAlive( QueueHandle_t xHandle, unsigned long ulTaskNumber )
|
|
||||||
{
|
|
||||||
if( xHandle != NULL )
|
|
||||||
{
|
|
||||||
xQueueSend( xHandle, &ulTaskNumber, mainDONT_BLOCK );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
static void prvSetupHardware( void )
|
|
||||||
{
|
|
||||||
/* If running on Rev A2 silicon, turn the LDO voltage up to 2.75V. This is
|
|
||||||
a workaround to allow the PLL to operate reliably. */
|
|
||||||
if( DEVICE_IS_REVA2 )
|
|
||||||
{
|
|
||||||
SysCtlLDOSet( SYSCTL_LDO_2_75V );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the clocking to run from the PLL at 50 MHz */
|
|
||||||
SysCtlClockSet( SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ );
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
void vApplicationTickHook( void )
|
|
||||||
{
|
|
||||||
static unsigned long ulCallCount;
|
|
||||||
const unsigned long ulCallsBetweenSends = 5000 / portTICK_PERIOD_MS;
|
|
||||||
const unsigned long ulMessage = mainPRINT_SYSTEM_STATUS;
|
|
||||||
portBASE_TYPE xDummy;
|
|
||||||
|
|
||||||
/* If configUSE_TICK_HOOK is set to 1 then this function will get called
|
|
||||||
from each RTOS tick. It is called from the tick interrupt and therefore
|
|
||||||
will be executing in the privileged state. */
|
|
||||||
|
|
||||||
ulCallCount++;
|
|
||||||
|
|
||||||
/* Is it time to print out the pass/fail message again? */
|
|
||||||
if( ulCallCount >= ulCallsBetweenSends )
|
|
||||||
{
|
|
||||||
ulCallCount = 0;
|
|
||||||
|
|
||||||
/* Send a message to the check task to command it to check that all
|
|
||||||
the tasks are still running then print out the status.
|
|
||||||
|
|
||||||
This is running in an ISR so has to use the "FromISR" version of
|
|
||||||
xQueueSend(). Because it is in an ISR it is running with privileges
|
|
||||||
so can access xFileScopeCheckQueue directly. */
|
|
||||||
xQueueSendFromISR( xFileScopeCheckQueue, &ulMessage, &xDummy );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
|
|
||||||
{
|
|
||||||
/* If configCHECK_FOR_STACK_OVERFLOW is set to either 1 or 2 then this
|
|
||||||
function will automatically get called if a task overflows its stack. */
|
|
||||||
( void ) pxTask;
|
|
||||||
( void ) pcTaskName;
|
|
||||||
for( ;; );
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
void vApplicationMallocFailedHook( void )
|
|
||||||
{
|
|
||||||
/* If configUSE_MALLOC_FAILED_HOOK is set to 1 then this function will
|
|
||||||
be called automatically if a call to pvPortMalloc() fails. pvPortMalloc()
|
|
||||||
is called automatically when a task, queue or semaphore is created. */
|
|
||||||
for( ;; );
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* Just to keep the linker happy. */
|
|
||||||
void __error__( char *pcFilename, unsigned long ulLine )
|
|
||||||
{
|
|
||||||
( void ) pcFilename;
|
|
||||||
( void ) ulLine;
|
|
||||||
for( ;; );
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* Just to keep the linker happy. */
|
|
||||||
int uipprintf( const char *fmt, ... )
|
|
||||||
{
|
|
||||||
( void ) fmt;
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
void hard_fault_handler(unsigned int * hardfault_args)
|
|
||||||
{
|
|
||||||
volatile unsigned int stacked_r0;
|
|
||||||
volatile unsigned int stacked_r1;
|
|
||||||
volatile unsigned int stacked_r2;
|
|
||||||
volatile unsigned int stacked_r3;
|
|
||||||
volatile unsigned int stacked_r12;
|
|
||||||
volatile unsigned int stacked_lr;
|
|
||||||
volatile unsigned int stacked_pc;
|
|
||||||
volatile unsigned int stacked_psr;
|
|
||||||
|
|
||||||
stacked_r0 = ((unsigned long) hardfault_args[0]);
|
|
||||||
stacked_r1 = ((unsigned long) hardfault_args[1]);
|
|
||||||
stacked_r2 = ((unsigned long) hardfault_args[2]);
|
|
||||||
stacked_r3 = ((unsigned long) hardfault_args[3]);
|
|
||||||
|
|
||||||
stacked_r12 = ((unsigned long) hardfault_args[4]);
|
|
||||||
stacked_lr = ((unsigned long) hardfault_args[5]);
|
|
||||||
stacked_pc = ((unsigned long) hardfault_args[6]);
|
|
||||||
stacked_psr = ((unsigned long) hardfault_args[7]);
|
|
||||||
|
|
||||||
/* Inspect stacked_pc to locate the offending instruction. */
|
|
||||||
for( ;; );
|
|
||||||
|
|
||||||
( void ) stacked_psr;
|
|
||||||
( void ) stacked_pc;
|
|
||||||
( void ) stacked_lr;
|
|
||||||
( void ) stacked_r12;
|
|
||||||
( void ) stacked_r0;
|
|
||||||
( void ) stacked_r1;
|
|
||||||
( void ) stacked_r2;
|
|
||||||
( void ) stacked_r3;
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
void Fault_ISR( void ) __attribute__((naked));
|
|
||||||
void Fault_ISR( void )
|
|
||||||
{
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" tst lr, #4 \n"
|
|
||||||
" ite eq \n"
|
|
||||||
" mrseq r0, msp \n"
|
|
||||||
" mrsne r0, psp \n"
|
|
||||||
" ldr r1, [r0, #24] \n"
|
|
||||||
" ldr r2, handler_address_const \n"
|
|
||||||
" bx r2 \n"
|
|
||||||
" handler_address_const: .word hard_fault_handler \n"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MPU_Fault_ISR( void ) __attribute__((naked));
|
|
||||||
void MPU_Fault_ISR( void )
|
|
||||||
{
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" tst lr, #4 \n"
|
|
||||||
" ite eq \n"
|
|
||||||
" mrseq r0, msp \n"
|
|
||||||
" mrsne r0, psp \n"
|
|
||||||
" ldr r1, [r0, #24] \n"
|
|
||||||
" ldr r2, handler_address_const \n"
|
|
||||||
" bx r2 \n"
|
|
||||||
" handler2_address_const: .word hard_fault_handler \n"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
/*-----------------------------------------------------------*/
|
|
|
@ -1,233 +0,0 @@
|
||||||
/*****************************************************************************
|
|
||||||
* Copyright (c) 2009 Rowley Associates Limited. *
|
|
||||||
* *
|
|
||||||
* This file may be distributed under the terms of the License Agreement *
|
|
||||||
* provided with this software. *
|
|
||||||
* *
|
|
||||||
* THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE *
|
|
||||||
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* Preprocessor Definitions
|
|
||||||
* ------------------------
|
|
||||||
* APP_ENTRY_POINT
|
|
||||||
*
|
|
||||||
* Defines the application entry point function, if undefined this setting
|
|
||||||
* defaults to "main".
|
|
||||||
*
|
|
||||||
* USE_PROCESS_STACK
|
|
||||||
*
|
|
||||||
* If defined, thread mode will be configured to use the process stack if
|
|
||||||
* the size of the process stack is greater than zero bytes in length.
|
|
||||||
*
|
|
||||||
* INITIALIZE_STACK
|
|
||||||
*
|
|
||||||
* If defined, the contents of the stack will be initialized to a the
|
|
||||||
* value 0xCC.
|
|
||||||
*
|
|
||||||
* FULL_LIBRARY
|
|
||||||
*
|
|
||||||
* If defined then
|
|
||||||
* - argc, argv are setup by the debug_getargs.
|
|
||||||
* - the exit symbol is defined and executes on return from main.
|
|
||||||
* - the exit symbol calls destructors, atexit functions and then debug_exit.
|
|
||||||
*
|
|
||||||
* If not defined then
|
|
||||||
* - argc and argv are zero.
|
|
||||||
* - no exit symbol, code loops on return from main.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef APP_ENTRY_POINT
|
|
||||||
#define APP_ENTRY_POINT main
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ARGSSPACE
|
|
||||||
#define ARGSSPACE 128
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.global _start
|
|
||||||
.syntax unified
|
|
||||||
.extern APP_ENTRY_POINT
|
|
||||||
#ifdef FULL_LIBRARY
|
|
||||||
.global exit
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.section .init, "ax"
|
|
||||||
.code 16
|
|
||||||
.align 2
|
|
||||||
.thumb_func
|
|
||||||
|
|
||||||
_start:
|
|
||||||
#ifdef __RAM_BUILD
|
|
||||||
ldr r1, =__stack_end__
|
|
||||||
mov sp, r1
|
|
||||||
#endif
|
|
||||||
#ifdef INITIALIZE_STACK
|
|
||||||
mov r2, #0xCC
|
|
||||||
ldr r0, =__stack_start__
|
|
||||||
#ifndef __RAM_BUILD
|
|
||||||
mov r1, sp
|
|
||||||
#endif
|
|
||||||
bl memory_set
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_PROCESS_STACK
|
|
||||||
/* Set up process stack if size > 0 */
|
|
||||||
ldr r1, =__stack_process_end__
|
|
||||||
ldr r0, =__stack_process_start__
|
|
||||||
subs r2, r1, r0
|
|
||||||
beq 1f
|
|
||||||
msr psp, r1
|
|
||||||
mov r2, #2
|
|
||||||
msr control, r2
|
|
||||||
#ifdef INITIALIZE_STACK
|
|
||||||
mov r2, #0xCC
|
|
||||||
bl memory_set
|
|
||||||
#endif
|
|
||||||
1:
|
|
||||||
#endif
|
|
||||||
/* Copy initialised memory sections into RAM (if necessary). */
|
|
||||||
ldr r0, =__data_load_start__
|
|
||||||
ldr r1, =__data_start__
|
|
||||||
ldr r2, =__data_end__
|
|
||||||
bl memory_copy
|
|
||||||
ldr r0, =__text_load_start__
|
|
||||||
ldr r1, =__text_start__
|
|
||||||
ldr r2, =__text_end__
|
|
||||||
bl memory_copy
|
|
||||||
ldr r0, =__fast_load_start__
|
|
||||||
ldr r1, =__fast_start__
|
|
||||||
ldr r2, =__fast_end__
|
|
||||||
bl memory_copy
|
|
||||||
ldr r0, =__ctors_load_start__
|
|
||||||
ldr r1, =__ctors_start__
|
|
||||||
ldr r2, =__ctors_end__
|
|
||||||
bl memory_copy
|
|
||||||
ldr r0, =__dtors_load_start__
|
|
||||||
ldr r1, =__dtors_start__
|
|
||||||
ldr r2, =__dtors_end__
|
|
||||||
bl memory_copy
|
|
||||||
ldr r0, =__rodata_load_start__
|
|
||||||
ldr r1, =__rodata_start__
|
|
||||||
ldr r2, =__rodata_end__
|
|
||||||
bl memory_copy
|
|
||||||
|
|
||||||
/* Zero the bss. */
|
|
||||||
ldr r0, =__bss_start__
|
|
||||||
ldr r1, =__bss_end__
|
|
||||||
mov r2, #0
|
|
||||||
bl memory_set
|
|
||||||
|
|
||||||
/* Zero the privileged data. */
|
|
||||||
ldr r0, =__privileged_data_start__
|
|
||||||
ldr r1, =__privileged_data_end__
|
|
||||||
mov r2, #0
|
|
||||||
bl memory_set
|
|
||||||
|
|
||||||
/* Initialise the heap */
|
|
||||||
ldr r0, = __heap_start__
|
|
||||||
ldr r1, = __heap_end__
|
|
||||||
sub r1, r1, r0
|
|
||||||
mov r2, #0
|
|
||||||
str r2, [r0]
|
|
||||||
add r0, r0, #4
|
|
||||||
str r1, [r0]
|
|
||||||
|
|
||||||
/* Call constructors */
|
|
||||||
ldr r0, =__ctors_start__
|
|
||||||
ldr r1, =__ctors_end__
|
|
||||||
ctor_loop:
|
|
||||||
cmp r0, r1
|
|
||||||
beq ctor_end
|
|
||||||
ldr r2, [r0]
|
|
||||||
add r0, #4
|
|
||||||
push {r0-r1}
|
|
||||||
blx r2
|
|
||||||
pop {r0-r1}
|
|
||||||
b ctor_loop
|
|
||||||
ctor_end:
|
|
||||||
|
|
||||||
/* Setup initial call frame */
|
|
||||||
mov r0, #0
|
|
||||||
mov lr, r0
|
|
||||||
mov r12, sp
|
|
||||||
|
|
||||||
start:
|
|
||||||
/* Jump to application entry point */
|
|
||||||
#ifdef FULL_LIBRARY
|
|
||||||
mov r0, #ARGSSPACE
|
|
||||||
ldr r1, =args
|
|
||||||
ldr r2, =debug_getargs
|
|
||||||
blx r2
|
|
||||||
ldr r1, =args
|
|
||||||
#else
|
|
||||||
mov r0, #0
|
|
||||||
mov r1, #0
|
|
||||||
#endif
|
|
||||||
ldr r2, =APP_ENTRY_POINT
|
|
||||||
blx r2
|
|
||||||
|
|
||||||
#ifdef FULL_LIBRARY
|
|
||||||
.thumb_func
|
|
||||||
exit:
|
|
||||||
mov r5, r0 // save the exit parameter/return result
|
|
||||||
|
|
||||||
/* Call destructors */
|
|
||||||
ldr r0, =__dtors_start__
|
|
||||||
ldr r1, =__dtors_end__
|
|
||||||
dtor_loop:
|
|
||||||
cmp r0, r1
|
|
||||||
beq dtor_end
|
|
||||||
ldr r2, [r0]
|
|
||||||
add r0, #4
|
|
||||||
push {r0-r1}
|
|
||||||
blx r2
|
|
||||||
pop {r0-r1}
|
|
||||||
b dtor_loop
|
|
||||||
dtor_end:
|
|
||||||
|
|
||||||
/* Call atexit functions */
|
|
||||||
ldr r2, =_execute_at_exit_fns
|
|
||||||
blx r2
|
|
||||||
|
|
||||||
/* Call debug_exit with return result/exit parameter */
|
|
||||||
mov r0, r5
|
|
||||||
ldr r2, =debug_exit
|
|
||||||
blx r2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Returned from application entry point, loop forever. */
|
|
||||||
exit_loop:
|
|
||||||
b exit_loop
|
|
||||||
|
|
||||||
memory_copy:
|
|
||||||
cmp r0, r1
|
|
||||||
beq 2f
|
|
||||||
subs r2, r2, r1
|
|
||||||
beq 2f
|
|
||||||
1:
|
|
||||||
ldrb r3, [r0]
|
|
||||||
add r0, r0, #1
|
|
||||||
strb r3, [r1]
|
|
||||||
add r1, r1, #1
|
|
||||||
subs r2, r2, #1
|
|
||||||
bne 1b
|
|
||||||
2:
|
|
||||||
bx lr
|
|
||||||
|
|
||||||
memory_set:
|
|
||||||
cmp r0, r1
|
|
||||||
beq 1f
|
|
||||||
strb r2, [r0]
|
|
||||||
add r0, r0, #1
|
|
||||||
b memory_set
|
|
||||||
1:
|
|
||||||
bx lr
|
|
||||||
|
|
||||||
#ifdef FULL_LIBRARY
|
|
||||||
.bss
|
|
||||||
args:
|
|
||||||
.space ARGSSPACE
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,918 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<?fileVersion 4.0.0?>
|
|
||||||
|
|
||||||
<cproject>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
|
||||||
<cconfiguration id="com.crt.advproject.config.exe.debug.358435974">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.358435974" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
|
||||||
<externalSettings/>
|
|
||||||
<extensions>
|
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
</extensions>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<configuration artifactExtension="axf" artifactName="RTOSDemo_RDB1768" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Debug build" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.debug.358435974" name="Debug" parent="com.crt.advproject.config.exe.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size ${BuildArtifactFileName}; # arm-none-eabi-objdump -h -S ${BuildArtifactFileName} >${BuildArtifactFileBaseName}.lss" preannouncebuildStep="" prebuildStep="">
|
|
||||||
<folderInfo id="com.crt.advproject.config.exe.debug.358435974." name="/" resourcePath="">
|
|
||||||
<toolChain id="com.crt.advproject.toolchain.exe.debug.1213183249" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug">
|
|
||||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug.1952563323" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug"/>
|
|
||||||
<builder buildPath="${workspace_loc:/RTOSDemo_RDB1768/Debug}" id="com.crt.advproject.builder.exe.debug.154784167" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.debug"/>
|
|
||||||
<tool id="com.crt.advproject.cpp.exe.debug.1468083840" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.debug"/>
|
|
||||||
<tool id="com.crt.advproject.gcc.exe.debug.496871390" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.debug">
|
|
||||||
<option id="com.crt.advproject.gcc.arch.256789448" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
|
|
||||||
<option id="com.crt.advproject.gcc.thumb.1065817733" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
|
|
||||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1930899580" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
|
||||||
<listOptionValue builtIn="false" value="__CODE_RED"/>
|
|
||||||
</option>
|
|
||||||
<option id="gnu.c.compiler.option.misc.other.644577272" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -Wextra" valueType="string"/>
|
|
||||||
<option id="gnu.c.compiler.option.preprocessor.nostdinc.242908842" name="Do not search system directories (-nostdinc)" superClass="gnu.c.compiler.option.preprocessor.nostdinc"/>
|
|
||||||
<option id="gnu.c.compiler.option.preprocessor.preprocess.2055050196" name="Preprocess only (-E)" superClass="gnu.c.compiler.option.preprocessor.preprocess"/>
|
|
||||||
<option id="gnu.c.compiler.option.preprocessor.undef.symbol.415279897" name="Undefined symbols (-U)" superClass="gnu.c.compiler.option.preprocessor.undef.symbol"/>
|
|
||||||
<option id="gnu.c.compiler.option.include.paths.383148579" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/RTOSDemo_MPU_RDB1768/src/FreeRTOS/include}""/>
|
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/RTOSDemo_MPU_RDB1768/src/LCD}""/>
|
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/RTOSDemo_MPU_RDB1768/src}""/>
|
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/RTOSDemo_MPU_RDB1768/src/FreeRTOS/portable/GCC/ARM_CM3_MPU}""/>
|
|
||||||
</option>
|
|
||||||
<option id="com.crt.advproject.gcc.exe.debug.option.optimization.level.352418875" name="Optimization Level" superClass="com.crt.advproject.gcc.exe.debug.option.optimization.level"/>
|
|
||||||
<option id="gnu.c.compiler.option.optimization.flags.1797615292" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags"/>
|
|
||||||
<option id="com.crt.advproject.gcc.exe.debug.option.debugging.level.44032959" name="Debug Level" superClass="com.crt.advproject.gcc.exe.debug.option.debugging.level"/>
|
|
||||||
<option id="gnu.c.compiler.option.debugging.other.1827557228" name="Other debugging flags" superClass="gnu.c.compiler.option.debugging.other"/>
|
|
||||||
<option id="gnu.c.compiler.option.debugging.gprof.297254854" name="Generate gprof information (-pg)" superClass="gnu.c.compiler.option.debugging.gprof"/>
|
|
||||||
<option id="gnu.c.compiler.option.debugging.prof.502744652" name="Generate prof information (-p)" superClass="gnu.c.compiler.option.debugging.prof"/>
|
|
||||||
<option id="gnu.c.compiler.option.warnings.syntax.302195319" name="Check syntax only (-fsyntax-only)" superClass="gnu.c.compiler.option.warnings.syntax"/>
|
|
||||||
<option id="gnu.c.compiler.option.warnings.pedantic.1413123641" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic"/>
|
|
||||||
<option id="gnu.c.compiler.option.warnings.pedantic.error.23507721" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error"/>
|
|
||||||
<option id="gnu.c.compiler.option.warnings.nowarn.1931884804" name="Inhibit all warnings (-w)" superClass="gnu.c.compiler.option.warnings.nowarn"/>
|
|
||||||
<option id="gnu.c.compiler.option.warnings.allwarn.166624136" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn"/>
|
|
||||||
<option id="gnu.c.compiler.option.warnings.toerrors.915552336" name="Warnings as errors (-Werror)" superClass="gnu.c.compiler.option.warnings.toerrors"/>
|
|
||||||
<option id="gnu.c.compiler.option.misc.verbose.1204107040" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose"/>
|
|
||||||
<option id="gnu.c.compiler.option.misc.ansi.581770468" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi"/>
|
|
||||||
<option id="com.crt.advproject.gcc.thumbinterwork.1368180127" name="Enable Thumb interworking" superClass="com.crt.advproject.gcc.thumbinterwork"/>
|
|
||||||
<option id="com.crt.advproject.gcc.hdrlib.721600979" name="Use headers for C library" superClass="com.crt.advproject.gcc.hdrlib" value="com.crt.advproject.gcc.hdrlib.newlib" valueType="enumerated"/>
|
|
||||||
<option id="com.crt.advproject.gcc.config.1169701529" name="%crt.mcu.configname" superClass="com.crt.advproject.gcc.config"/>
|
|
||||||
<option id="com.crt.advproject.gcc.store.95863954" name="%crt.mcu.storename" superClass="com.crt.advproject.gcc.store"/>
|
|
||||||
<inputType id="com.crt.advproject.compiler.input.40206634" superClass="com.crt.advproject.compiler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.crt.advproject.gas.exe.debug.152194393" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug">
|
|
||||||
<option id="com.crt.advproject.gas.arch.856827611" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
|
|
||||||
<option id="com.crt.advproject.gas.thumb.1906562556" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
|
|
||||||
<option id="gnu.both.asm.option.flags.crt.638939077" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -DDEBUG -D__CODE_RED" valueType="string"/>
|
|
||||||
<inputType id="com.crt.advproject.assembler.input.1954791986" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.crt.advproject.link.cpp.exe.debug.696640668" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.debug"/>
|
|
||||||
<tool id="com.crt.advproject.link.exe.debug.1514106711" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug">
|
|
||||||
<option id="com.crt.advproject.link.arch.420484637" name="Architecture" superClass="com.crt.advproject.link.arch" value="com.crt.advproject.link.target.cm3" valueType="enumerated"/>
|
|
||||||
<option id="com.crt.advproject.link.thumb.1827721661" name="Thumb mode" superClass="com.crt.advproject.link.thumb" value="true" valueType="boolean"/>
|
|
||||||
<option id="com.crt.advproject.link.script.285435470" name="Linker script" superClass="com.crt.advproject.link.script" value=""${workspace_loc:/RTOSDemo_MPU_RDB1768/src/rtosdemo_rdb1768_Debug.ld}"" valueType="string"/>
|
|
||||||
<option id="com.crt.advproject.link.manage.913993351" name="Manage linker script" superClass="com.crt.advproject.link.manage" value="false" valueType="boolean"/>
|
|
||||||
<option id="gnu.c.link.option.nostdlibs.1027293252" name="No startup or default libs (-nostdlib)" superClass="gnu.c.link.option.nostdlibs" value="true" valueType="boolean"/>
|
|
||||||
<option id="gnu.c.link.option.other.762506621" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" valueType="stringList">
|
|
||||||
<listOptionValue builtIn="false" value="--gc-sections"/>
|
|
||||||
<listOptionValue builtIn="false" value="-Map=${BuildArtifactFileBaseName}.map"/>
|
|
||||||
</option>
|
|
||||||
<option id="gnu.c.link.option.nostart.1381612580" name="Do not use standard start files (-nostartfiles)" superClass="gnu.c.link.option.nostart"/>
|
|
||||||
<option id="gnu.c.link.option.nodeflibs.638645680" name="Do not use default libraries (-nodefaultlibs)" superClass="gnu.c.link.option.nodeflibs"/>
|
|
||||||
<option id="gnu.c.link.option.strip.195880545" name="Omit all symbol information (-s)" superClass="gnu.c.link.option.strip"/>
|
|
||||||
<option id="gnu.c.link.option.noshared.2075727134" name="No shared libraries (-static)" superClass="gnu.c.link.option.noshared"/>
|
|
||||||
<option id="gnu.c.link.option.libs.103012550" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
|
|
||||||
<option id="gnu.c.link.option.paths.1400704377" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
|
|
||||||
<option id="gnu.c.link.option.ldflags.1447780175" name="Linker flags" superClass="gnu.c.link.option.ldflags"/>
|
|
||||||
<option id="gnu.c.link.option.userobjs.1395709820" name="Other objects" superClass="gnu.c.link.option.userobjs"/>
|
|
||||||
<option id="gnu.c.link.option.shared.2052162401" name="Shared (-shared)" superClass="gnu.c.link.option.shared"/>
|
|
||||||
<option id="gnu.c.link.option.soname.1795621625" name="Shared object name (-Wl,-soname=)" superClass="gnu.c.link.option.soname"/>
|
|
||||||
<option id="gnu.c.link.option.implname.939745637" name="Import Library name (-Wl,--out-implib=)" superClass="gnu.c.link.option.implname"/>
|
|
||||||
<option id="gnu.c.link.option.defname.905674991" name="DEF file name (-Wl,--output-def=)" superClass="gnu.c.link.option.defname"/>
|
|
||||||
<option id="com.crt.advproject.link.gcc.hdrlib.284228451" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib"/>
|
|
||||||
<option id="com.crt.advproject.link.config.2135715637" name="%crt.mcu.configname" superClass="com.crt.advproject.link.config"/>
|
|
||||||
<option id="com.crt.advproject.link.store.1260276895" name="%crt.mcu.storename" superClass="com.crt.advproject.link.store"/>
|
|
||||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.150124411" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
|
||||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
||||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
||||||
</inputType>
|
|
||||||
</tool>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
<sourceEntries>
|
|
||||||
<entry excluding="webserver/httpd-fsdata.c|FreeRTOS/portable/MemMang/heap_3.c|FreeRTOS/portable/MemMang/heap_1.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
|
||||||
</sourceEntries>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="scannerConfiguration">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-c++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GASManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-x assembler-with-cpp -E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="makefileGenerator">
|
|
||||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.358435974;com.crt.advproject.config.exe.debug.358435974.;com.crt.advproject.gas.exe.debug.152194393;com.crt.advproject.assembler.input.1954791986">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-c++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GASManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-x assembler-with-cpp -E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="makefileGenerator">
|
|
||||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.358435974;com.crt.advproject.config.exe.debug.358435974.;com.crt.advproject.gcc.exe.debug.496871390;com.crt.advproject.compiler.input.40206634">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-c++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GASManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-x assembler-with-cpp -E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="makefileGenerator">
|
|
||||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
|
||||||
</cconfiguration>
|
|
||||||
<cconfiguration id="com.crt.advproject.config.exe.release.429003282">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.release.429003282" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
|
||||||
<externalSettings/>
|
|
||||||
<extensions>
|
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
</extensions>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<configuration artifactExtension="axf" artifactName="RTOSDemo_RDB1768" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Release build" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.release.429003282" name="Release" parent="com.crt.advproject.config.exe.release" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size ${BuildArtifactFileName}; # arm-none-eabi-objdump -h -S ${BuildArtifactFileName} >${BuildArtifactFileBaseName}.lss">
|
|
||||||
<folderInfo id="com.crt.advproject.config.exe.release.429003282." name="/" resourcePath="">
|
|
||||||
<toolChain id="com.crt.advproject.toolchain.exe.release.880950854" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.release">
|
|
||||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.release.1422592318" name="ARM-based MCU (Release)" superClass="com.crt.advproject.platform.exe.release"/>
|
|
||||||
<builder buildPath="${workspace_loc:/RTOSDemo_RDB1768/Release}" id="com.crt.advproject.builder.exe.release.2027495818" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.release"/>
|
|
||||||
<tool id="com.crt.advproject.cpp.exe.release.1199012411" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.release"/>
|
|
||||||
<tool id="com.crt.advproject.gcc.exe.release.660269152" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.release">
|
|
||||||
<option id="com.crt.advproject.gcc.arch.1587182028" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
|
|
||||||
<option id="com.crt.advproject.gcc.thumb.1829358809" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
|
|
||||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1242089509" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="NDEBUG"/>
|
|
||||||
<listOptionValue builtIn="false" value="__CODE_RED"/>
|
|
||||||
</option>
|
|
||||||
<option id="gnu.c.compiler.option.misc.other.1084357971" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections" valueType="string"/>
|
|
||||||
<inputType id="com.crt.advproject.compiler.input.1760064385" superClass="com.crt.advproject.compiler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.crt.advproject.gas.exe.release.340210131" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.release">
|
|
||||||
<option id="com.crt.advproject.gas.arch.1089759047" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
|
|
||||||
<option id="com.crt.advproject.gas.thumb.147071109" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
|
|
||||||
<option id="gnu.both.asm.option.flags.crt.2019607838" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -DNDEBUG -D__CODE_RED" valueType="string"/>
|
|
||||||
<inputType id="com.crt.advproject.assembler.input.1748919550" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.crt.advproject.link.cpp.exe.release.116216997" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.release"/>
|
|
||||||
<tool id="com.crt.advproject.link.exe.release.1686532392" name="MCU Linker" superClass="com.crt.advproject.link.exe.release">
|
|
||||||
<option id="com.crt.advproject.link.arch.1717419953" name="Architecture" superClass="com.crt.advproject.link.arch" value="com.crt.advproject.link.target.cm3" valueType="enumerated"/>
|
|
||||||
<option id="com.crt.advproject.link.thumb.1483839948" name="Thumb mode" superClass="com.crt.advproject.link.thumb" value="true" valueType="boolean"/>
|
|
||||||
<option id="com.crt.advproject.link.script.1512636887" name="Linker script" superClass="com.crt.advproject.link.script" value=""rtosdemo_rdb1768_Release.ld" " valueType="string"/>
|
|
||||||
<option id="com.crt.advproject.link.manage.1635592390" name="Manage linker script" superClass="com.crt.advproject.link.manage" value="true" valueType="boolean"/>
|
|
||||||
<option id="gnu.c.link.option.nostdlibs.464135975" name="No startup or default libs (-nostdlib)" superClass="gnu.c.link.option.nostdlibs" value="true" valueType="boolean"/>
|
|
||||||
<option id="gnu.c.link.option.other.1143120921" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" valueType="stringList">
|
|
||||||
<listOptionValue builtIn="false" value="--gc-sections"/>
|
|
||||||
<listOptionValue builtIn="false" value="-Map=${BuildArtifactFileBaseName}.map"/>
|
|
||||||
</option>
|
|
||||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1457924481" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
|
||||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
||||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
||||||
</inputType>
|
|
||||||
</tool>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
<sourceEntries>
|
|
||||||
<entry excluding="webserver/httpd-fsdata.c|FreeRTOS/portable/MemMang/heap_3.c|FreeRTOS/portable/MemMang/heap_1.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
|
||||||
</sourceEntries>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="scannerConfiguration">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-c++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GASManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-x assembler-with-cpp -E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="makefileGenerator">
|
|
||||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.358435974;com.crt.advproject.config.exe.debug.358435974.;com.crt.advproject.gas.exe.debug.152194393;com.crt.advproject.assembler.input.1954791986">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-c++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GASManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-x assembler-with-cpp -E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="makefileGenerator">
|
|
||||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.358435974;com.crt.advproject.config.exe.debug.358435974.;com.crt.advproject.gcc.exe.debug.496871390;com.crt.advproject.compiler.input.40206634">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-c++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="com.crt.advproject.GASManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="false" filePath=""/>
|
|
||||||
<parser enabled="false"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="com.crt.advproject.specsFile">
|
|
||||||
<runAction arguments="-x assembler-with-cpp -E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-none-eabi-gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="makefileGenerator">
|
|
||||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
|
||||||
<buildOutputProvider>
|
|
||||||
<openAction enabled="true" filePath=""/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</buildOutputProvider>
|
|
||||||
<scannerInfoProvider id="specsFile">
|
|
||||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
|
||||||
<parser enabled="true"/>
|
|
||||||
</scannerInfoProvider>
|
|
||||||
</profile>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
|
||||||
</cconfiguration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<project id="RTOSDemo_RDB1768.com.crt.advproject.projecttype.exe.469488889" name="Executable" projectType="com.crt.advproject.projecttype.exe"/>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="com.crt.config">
|
|
||||||
<projectStorage><?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<TargetConfig>
|
|
||||||
<Properties property_0="" property_1="" property_2="" property_3="NXP" property_4="LPC1768" property_count="5" version="1"/>
|
|
||||||
<infoList vendor="NXP"><info chip="LPC1768" match_id="0x00013f37,0x26013F37" name="LPC1768" package="lpc17_lqfp100.xml"><chip><name>LPC1768</name>
|
|
||||||
<family>LPC17xx</family>
|
|
||||||
<vendor>NXP (formerly Philips)</vendor>
|
|
||||||
<reset board="None" core="Real" sys="Real"/>
|
|
||||||
<clock changeable="TRUE" freq="20MHz" is_accurate="TRUE"/>
|
|
||||||
<memory can_program="true" id="Flash" is_ro="true" type="Flash"/>
|
|
||||||
<memory id="RAM" type="RAM"/>
|
|
||||||
<memory id="Periph" is_volatile="true" type="Peripheral"/>
|
|
||||||
<memoryInstance derived_from="Flash" id="MFlash512" location="0x00000000" size="0x80000"/>
|
|
||||||
<memoryInstance derived_from="RAM" id="RamLoc32" location="0x10000000" size="0x8000"/>
|
|
||||||
<memoryInstance derived_from="RAM" id="RamAHB32" location="0x2007c000" size="0x8000"/>
|
|
||||||
<prog_flash blocksz="0x1000" location="0" maxprgbuff="0x1000" progwithcode="TRUE" size="0x10000"/>
|
|
||||||
<prog_flash blocksz="0x8000" location="0x10000" maxprgbuff="0x1000" progwithcode="TRUE" size="0x70000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_NVIC" determined="infoFile" id="NVIC" location="0xE000E000"/>
|
|
||||||
<peripheralInstance derived_from="TIMER" determined="infoFile" enable="SYSCTL.PCONP.PCTIM0&amp;0x1" id="TIMER0" location="0x40004000"/>
|
|
||||||
<peripheralInstance derived_from="TIMER" determined="infoFile" enable="SYSCTL.PCONP.PCTIM1&amp;0x1" id="TIMER1" location="0x40008000"/>
|
|
||||||
<peripheralInstance derived_from="TIMER" determined="infoFile" enable="SYSCTL.PCONP.PCTIM2&amp;0x1" id="TIMER2" location="0x40090000"/>
|
|
||||||
<peripheralInstance derived_from="TIMER" determined="infoFile" enable="SYSCTL.PCONP.PCTIM3&amp;0x1" id="TIMER3" location="0x40094000"/>
|
|
||||||
<peripheralInstance derived_from="FGPIO" determined="infoFile" enable="SYSCTL.PCONP.PCGPIO&amp;0x1" id="GPIO0" location="0x2009C000"/>
|
|
||||||
<peripheralInstance derived_from="FGPIO" determined="infoFile" enable="SYSCTL.PCONP.PCGPIO&amp;0x1" id="GPIO1" location="0x2009C020"/>
|
|
||||||
<peripheralInstance derived_from="FGPIO" determined="infoFile" enable="SYSCTL.PCONP.PCGPIO&amp;0x1" id="GPIO2" location="0x2009C040"/>
|
|
||||||
<peripheralInstance derived_from="FGPIO" determined="infoFile" enable="SYSCTL.PCONP.PCGPIO&amp;0x1" id="GPIO3" location="0x2009C060"/>
|
|
||||||
<peripheralInstance derived_from="FGPIO" determined="infoFile" enable="SYSCTL.PCONP.PCGPIO&amp;0x1" id="GPIO4" location="0x2009C080"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_I2S" determined="infoFile" enable="SYSCTL.PCONP&amp;0x08000000" id="I2S" location="0x400A8000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_SYSCTL" determined="infoFile" id="SYSCTL" location="0x400FC000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_DAC" determined="infoFile" enable="PCB.PINSEL1.P0_26&amp;0x2=2" id="DAC" location="0x4008C000"/>
|
|
||||||
<peripheralInstance derived_from="LPC1xxx_UART" determined="infoFile" enable="SYSCTL.PCONP.PCUART0&amp;0x1" id="UART0" location="0x4000C000"/>
|
|
||||||
<peripheralInstance derived_from="LPC1xxx_UART_MODEM" determined="infoFile" enable="SYSCTL.PCONP.PCUART1&amp;0x1" id="UART1" location="0x40010000"/>
|
|
||||||
<peripheralInstance derived_from="LPC1xxx_UART" determined="infoFile" enable="SYSCTL.PCONP.PCUART2&amp;0x1" id="UART2" location="0x40098000"/>
|
|
||||||
<peripheralInstance derived_from="LPC1xxx_UART" determined="infoFile" enable="SYSCTL.PCONP.PCAURT3&amp;0x1" id="UART3" location="0x4009C000"/>
|
|
||||||
<peripheralInstance derived_from="SPI" determined="infoFile" enable="SYSCTL.PCONP.PCSPI&amp;0x1" id="SPI" location="0x40020000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_SSP" determined="infoFile" enable="SYSCTL.PCONP.PCSSP0&amp;0x1" id="SSP0" location="0x40088000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_SSP" determined="infoFile" enable="SYSCTL.PCONP.PCSSP1&amp;0x1" id="SSP1" location="0x40030000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_ADC" determined="infoFile" enable="SYSCTL.PCONP.PCAD&amp;0x1" id="ADC" location="0x40034000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_USBINTST" determined="infoFile" enable="USBCLKCTL.USBClkCtrl&amp;0x12" id="USBINTSTAT" location="0x400fc1c0"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_USB_CLK_CTL" determined="infoFile" id="USBCLKCTL" location="0x5000cff4"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_USBDEV" determined="infoFile" enable="USBCLKCTL.USBClkSt&amp;0x12=0x12" id="USBDEV" location="0x5000C200"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_PWM" determined="infoFile" enable="SYSCTL.PCONP.PWM1&amp;0x1" id="PWM" location="0x40018000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_I2C" determined="infoFile" enable="SYSCTL.PCONP.PCI2C0&amp;0x1" id="I2C0" location="0x4001C000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_I2C" determined="infoFile" enable="SYSCTL.PCONP.PCI2C1&amp;0x1" id="I2C1" location="0x4005C000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_I2C" determined="infoFile" enable="SYSCTL.PCONP.PCI2C2&amp;0x1" id="I2C2" location="0x400A0000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_DMA" determined="infoFile" enable="SYSCTL.PCONP.PCGPDMA&amp;0x1" id="DMA" location="0x50004000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_ENET" determined="infoFile" enable="SYSCTL.PCONP.PCENET&amp;0x1" id="ENET" location="0x50000000"/>
|
|
||||||
<peripheralInstance derived_from="CM3_DCR" determined="infoFile" id="DCR" location="0xE000EDF0"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_PCB" determined="infoFile" id="PCB" location="0x4002c000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_QEI" determined="infoFile" enable="SYSCTL.PCONP.PCQEI&amp;0x1" id="QEI" location="0x400bc000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_USBHOST" determined="infoFile" enable="USBCLKCTL.USBClkSt&amp;0x11=0x11" id="USBHOST" location="0x5000C000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_USBOTG" determined="infoFile" enable="USBCLKCTL.USBClkSt&amp;0x1c=0x1c" id="USBOTG" location="0x5000C000"/>
|
|
||||||
<peripheralInstance derived_from="LPC17_RTC" determined="infoFile" enable="SYSCTL.PCONP.PCRTC&amp;0x1" id="RTC" location="0x40024000"/>
|
|
||||||
<peripheralInstance derived_from="MPU" determined="infoFile" id="MPU" location="0xE000ED90"/>
|
|
||||||
<peripheralInstance derived_from="LPC1x_WDT" determined="infoFile" id="WDT" location="0x40000000"/>
|
|
||||||
</chip>
|
|
||||||
<processor><name gcc_name="cortex-m3">Cortex-M3</name>
|
|
||||||
<family>Cortex-M</family>
|
|
||||||
</processor>
|
|
||||||
<link href="nxp_lpcxxxx_peripheral.xme" show="embed" type="simple"/>
|
|
||||||
</info>
|
|
||||||
</infoList>
|
|
||||||
</TargetConfig></projectStorage>
|
|
||||||
</storageModule>
|
|
||||||
</cproject>
|
|
|
@ -1,81 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>RTOSDemo_MPU_RDB1768</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
|
||||||
<triggers>clean,full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
|
||||||
<value>clean</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>?name?</key>
|
|
||||||
<value></value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
|
||||||
<value>make</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.contents</key>
|
|
||||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
|
||||||
<value>${workspace_loc:/RTOSDemo_RDB1768/Debug}</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
|
||||||
<value>false</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
|
||||||
<value>all</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
|
||||||
<value></value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
|
||||||
<value>all</value>
|
|
||||||
</dictionary>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
|
||||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,34 +0,0 @@
|
||||||
REM This file should be executed from the command line prior to the first
|
|
||||||
REM build. It will be necessary to refresh the Eclipse project once the
|
|
||||||
REM .bat file has been executed (normally just press F5 to refresh).
|
|
||||||
|
|
||||||
REM Copies all the required files from their location within the standard
|
|
||||||
REM FreeRTOS directory structure to under the Eclipse project directory.
|
|
||||||
REM This permits the Eclipse project to be used in 'managed' mode and without
|
|
||||||
REM having to setup any linked resources.
|
|
||||||
|
|
||||||
REM Have the files already been copied?
|
|
||||||
IF EXIST src\FreeRTOS Goto END
|
|
||||||
|
|
||||||
REM Create the required directory structure.
|
|
||||||
MD src\FreeRTOS
|
|
||||||
MD src\FreeRTOS\include
|
|
||||||
MD src\FreeRTOS\portable\GCC\ARM_CM3_MPU
|
|
||||||
MD src\FreeRTOS\portable\MemMang
|
|
||||||
|
|
||||||
REM Copy the core kernel files.
|
|
||||||
copy ..\..\Source\tasks.c src\FreeRTOS
|
|
||||||
copy ..\..\Source\queue.c src\FreeRTOS
|
|
||||||
copy ..\..\Source\list.c src\FreeRTOS
|
|
||||||
|
|
||||||
REM Copy the common header files
|
|
||||||
|
|
||||||
copy ..\..\Source\include\*.* src\FreeRTOS\include
|
|
||||||
|
|
||||||
REM Copy the portable layer files
|
|
||||||
copy ..\..\Source\portable\GCC\ARM_CM3_MPU\*.* src\FreeRTOS\portable\GCC\ARM_CM3_MPU
|
|
||||||
|
|
||||||
REM Copy the basic memory allocation files
|
|
||||||
copy ..\..\Source\portable\MemMang\heap_2.c src\FreeRTOS\portable\MemMang
|
|
||||||
|
|
||||||
: END
|
|
3
FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/ReadMe.txt
Normal file
3
FreeRTOS/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/ReadMe.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
If you need the demo that used to be in this directory then download FreeRTOS V8.2.3
|
||||||
|
from http://sourceforge.net/projects/freertos/files/FreeRTOS/
|
||||||
|
|
|
@ -1,146 +0,0 @@
|
||||||
/*
|
|
||||||
FreeRTOS V9.0.0rc2 - 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!
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FREERTOS_CONFIG_H
|
|
||||||
#define FREERTOS_CONFIG_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The following #error directive is to remind users that a batch file must be
|
|
||||||
* executed prior to this project being built. The batch file *cannot* be
|
|
||||||
* executed from within the IDE! Once it has been executed, re-open or refresh
|
|
||||||
* the Eclipse project and remove the #error line below.
|
|
||||||
*/
|
|
||||||
#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
|
|
||||||
|
|
||||||
#include "LPC17xx.h"
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
|
||||||
* Application specific definitions.
|
|
||||||
*
|
|
||||||
* These definitions should be adjusted for your particular hardware and
|
|
||||||
* application requirements.
|
|
||||||
*
|
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
|
||||||
*----------------------------------------------------------*/
|
|
||||||
|
|
||||||
#define configUSE_PREEMPTION 1
|
|
||||||
#define configUSE_IDLE_HOOK 1
|
|
||||||
#define configMAX_PRIORITIES ( 5 )
|
|
||||||
#define configUSE_TICK_HOOK 1
|
|
||||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 )
|
|
||||||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
|
||||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
|
|
||||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 2560 ) )
|
|
||||||
#define configMAX_TASK_NAME_LEN ( 12 )
|
|
||||||
#define configUSE_TRACE_FACILITY 0
|
|
||||||
#define configUSE_16_BIT_TICKS 0
|
|
||||||
#define configIDLE_SHOULD_YIELD 0
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configUSE_MUTEXES 0
|
|
||||||
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
#define configUSE_COUNTING_SEMAPHORES 0
|
|
||||||
#define configUSE_ALTERNATIVE_API 0
|
|
||||||
#define configCHECK_FOR_STACK_OVERFLOW 0
|
|
||||||
#define configUSE_RECURSIVE_MUTEXES 0
|
|
||||||
#define configQUEUE_REGISTRY_SIZE 0
|
|
||||||
#define configGENERATE_RUN_TIME_STATS 0
|
|
||||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
|
||||||
to exclude the API function. */
|
|
||||||
|
|
||||||
#define INCLUDE_vTaskPrioritySet 0
|
|
||||||
#define INCLUDE_uxTaskPriorityGet 0
|
|
||||||
#define INCLUDE_vTaskDelete 1
|
|
||||||
#define INCLUDE_vTaskCleanUpResources 0
|
|
||||||
#define INCLUDE_vTaskSuspend 0
|
|
||||||
#define INCLUDE_vTaskDelayUntil 0
|
|
||||||
#define INCLUDE_vTaskDelay 0
|
|
||||||
#define INCLUDE_uxTaskGetStackHighWaterMark 0
|
|
||||||
|
|
||||||
/* Use the system definition, if there is one */
|
|
||||||
#ifdef __NVIC_PRIO_BITS
|
|
||||||
#define configPRIO_BITS __NVIC_PRIO_BITS
|
|
||||||
#else
|
|
||||||
#define configPRIO_BITS 5 /* 32 priority levels */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The lowest priority. */
|
|
||||||
#define configKERNEL_INTERRUPT_PRIORITY ( 31 << (8 - configPRIO_BITS) )
|
|
||||||
/* Priority 5, or 160 as only the top three bits are implemented. */
|
|
||||||
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
|
|
||||||
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
|
|
||||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( 5 << (8 - configPRIO_BITS) )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* FREERTOS_CONFIG_H */
|
|
|
@ -1,33 +0,0 @@
|
||||||
//*****************************************************************************
|
|
||||||
// +--+
|
|
||||||
// | ++----+
|
|
||||||
// +-++ |
|
|
||||||
// | |
|
|
||||||
// +-+--+ |
|
|
||||||
// | +--+--+
|
|
||||||
// +----+ Copyright (c) 2009 Code Red Technologies Ltd.
|
|
||||||
//
|
|
||||||
// font.h - header file for font data contained in system_fixed_be_8_15.c
|
|
||||||
//
|
|
||||||
// Software License Agreement
|
|
||||||
//
|
|
||||||
// The software is owned by Code Red Technologies and/or its suppliers, and is
|
|
||||||
// protected under applicable copyright laws. All rights are reserved. Any
|
|
||||||
// use in violation of the foregoing restrictions may subject the user to criminal
|
|
||||||
// sanctions under applicable laws, as well as to civil liability for the breach
|
|
||||||
// of the terms and conditions of this license.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
|
|
||||||
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
|
|
||||||
// CODE RED TECHNOLOGIES LTD.
|
|
||||||
|
|
||||||
#ifndef FONT_H_
|
|
||||||
#define FONT_H_
|
|
||||||
|
|
||||||
extern const unsigned char font_data_table[];
|
|
||||||
extern const unsigned char font_index_table[];
|
|
||||||
|
|
||||||
#endif /*FONT_H_*/
|
|
|
@ -1,308 +0,0 @@
|
||||||
//*****************************************************************************
|
|
||||||
// +--+
|
|
||||||
// | ++----+
|
|
||||||
// +-++ |
|
|
||||||
// | |
|
|
||||||
// +-+--+ |
|
|
||||||
// | +--+--+
|
|
||||||
// +----+ Copyright (c) 2009 Code Red Technologies Ltd.
|
|
||||||
//
|
|
||||||
// lcd.c contains various routines to plot to the LCD display on the RDB1768
|
|
||||||
// development board.
|
|
||||||
//
|
|
||||||
// Software License Agreement
|
|
||||||
//
|
|
||||||
// The software is owned by Code Red Technologies and/or its suppliers, and is
|
|
||||||
// protected under applicable copyright laws. All rights are reserved. Any
|
|
||||||
// use in violation of the foregoing restrictions may subject the user to criminal
|
|
||||||
// sanctions under applicable laws, as well as to civil liability for the breach
|
|
||||||
// of the terms and conditions of this license.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
|
|
||||||
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
|
|
||||||
// CODE RED TECHNOLOGIES LTD.
|
|
||||||
|
|
||||||
#include "lcd_commands.h"
|
|
||||||
#include "lcd.h"
|
|
||||||
#include "lcd_driver.h"
|
|
||||||
#include "font.h"
|
|
||||||
|
|
||||||
#include <stdlib.h> // to provice abs() function
|
|
||||||
|
|
||||||
// Routine to draw a filled rectangle to the LCD.
|
|
||||||
// Two corners of rectangle are at (xmin,ymin) and (xmax,ymax).
|
|
||||||
// The Rectangle is filled with the RGB565 color specified
|
|
||||||
void LCD_FilledRect(int xmin,int xmax,int ymin,int ymax,int color)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
// Specify to LCD controller coordinates we are writing to...
|
|
||||||
LCDdriver_WriteCom(DD_CASET); // Set the column address
|
|
||||||
LCDdriver_WriteData(xmin); // min address
|
|
||||||
LCDdriver_WriteData(xmax); // max address
|
|
||||||
LCDdriver_WriteCom(DD_RASET); // Set the row address
|
|
||||||
LCDdriver_WriteData(ymin + 1); // min address
|
|
||||||
LCDdriver_WriteData(ymax + 1); // max address
|
|
||||||
LCDdriver_WriteCom(DD_RAMWR); // RAM Write command
|
|
||||||
|
|
||||||
// Plot the color data to the LCD buffer
|
|
||||||
for(i = ((xmax - xmin + 1) * (ymax - ymin + 1)); i > 0; i--)
|
|
||||||
{
|
|
||||||
LCDdriver_WriteData(color >> 8); // top 8 bits of RGB565 color
|
|
||||||
LCDdriver_WriteData(color); // bottom 8 bits of RGB565 color
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine to draw an unfilled rectangle to the LCD.
|
|
||||||
// Two corners of rectangle are at (xmin,ymin) and (xmax,ymax).
|
|
||||||
// The Rectangle is drawn in the RGB565 color specified
|
|
||||||
void LCD_Rect(int xmin,int xmax,int ymin,int ymax,int color)
|
|
||||||
{
|
|
||||||
// Draw 4 lines of rectange as 4 filled rectanges, each of 1 pixel wide
|
|
||||||
LCD_FilledRect(xmin,xmin,ymin,ymax,color);
|
|
||||||
LCD_FilledRect(xmax,xmax,ymin,ymax,color);
|
|
||||||
LCD_FilledRect(xmin,xmax,ymin,ymin,color);
|
|
||||||
LCD_FilledRect(xmin,xmax,ymax,ymax,color);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Plot a point on the screen in the 6:5:6 color format
|
|
||||||
void LCD_PlotPoint(int x,int y,int color)
|
|
||||||
{
|
|
||||||
LCDdriver_WriteCom(DD_CASET); // Set the column address
|
|
||||||
LCDdriver_WriteData(x); // min address
|
|
||||||
LCDdriver_WriteData(x); // max address
|
|
||||||
LCDdriver_WriteCom(DD_RASET); // Set the row address
|
|
||||||
LCDdriver_WriteData(y + 1); // min address
|
|
||||||
LCDdriver_WriteData(y + 1); // max address
|
|
||||||
LCDdriver_WriteCom(DD_RAMWR); // RAM Write command
|
|
||||||
LCDdriver_WriteData(color >> 8); // top 8 bits of RGB565 color
|
|
||||||
LCDdriver_WriteData(color); // top 8 bits of RGB565 color
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine to draw a filled circle to the LCD.
|
|
||||||
// The centre of the circle is at (x0,y0) and the circle has the
|
|
||||||
// specifed radius. The circle is filled with the RGB565 color
|
|
||||||
// The circle is drawn using the "Midpoint circle algorithm",
|
|
||||||
// also known as "Bresenham's circle algorithm". In order to fill
|
|
||||||
// the circle, the algorithm has been modifed to draw a line between
|
|
||||||
// each two points, rather than plotting the two points individually.
|
|
||||||
void LCD_FilledCircle (int x0, int y0, int radius, int color)
|
|
||||||
{
|
|
||||||
int f = 1 - radius;
|
|
||||||
int ddF_x = 1;
|
|
||||||
int ddF_y = -2 * radius;
|
|
||||||
int x = 0;
|
|
||||||
int y = radius;
|
|
||||||
|
|
||||||
LCD_FilledRect(x0, x0 ,y0 - radius,y0 + radius, color);
|
|
||||||
LCD_FilledRect(x0 - radius, x0 + radius ,y0,y0, color);
|
|
||||||
|
|
||||||
while(x < y)
|
|
||||||
{
|
|
||||||
if(f >= 0)
|
|
||||||
{
|
|
||||||
y--;
|
|
||||||
ddF_y += 2;
|
|
||||||
f += ddF_y;
|
|
||||||
}
|
|
||||||
x++;
|
|
||||||
ddF_x += 2;
|
|
||||||
f += ddF_x;
|
|
||||||
|
|
||||||
LCD_FilledRect(x0-x, x0+x ,y0 +y, y0 + y, color);
|
|
||||||
LCD_FilledRect(x0-x, x0+x ,y0 - y, y0 - y, color);
|
|
||||||
LCD_FilledRect(x0-y, x0+y ,y0 + x, y0 + x, color);
|
|
||||||
LCD_FilledRect(x0-y, x0+y ,y0 - x, y0 - x, color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine to draw an unfilled circle to the LCD.
|
|
||||||
// The centre of the circle is at (x0,y0) and the circle has the
|
|
||||||
// specifed radius. The circle is drawn in the RGB565 color
|
|
||||||
// The circle is drawn using the "Midpoint circle algorithm",
|
|
||||||
// also known as "Bresenham's circle algorithm".
|
|
||||||
void LCD_Circle (int x0, int y0, int radius, int color)
|
|
||||||
{
|
|
||||||
int f = 1 - radius;
|
|
||||||
int ddF_x = 1;
|
|
||||||
int ddF_y = -2 * radius;
|
|
||||||
int x = 0;
|
|
||||||
int y = radius;
|
|
||||||
|
|
||||||
LCD_PlotPoint(x0, y0 + radius, color);
|
|
||||||
LCD_PlotPoint(x0, y0 - radius, color);
|
|
||||||
LCD_PlotPoint(x0 + radius, y0, color);
|
|
||||||
LCD_PlotPoint(x0 - radius, y0, color);
|
|
||||||
|
|
||||||
while(x < y)
|
|
||||||
{
|
|
||||||
if(f >= 0)
|
|
||||||
{
|
|
||||||
y--;
|
|
||||||
ddF_y += 2;
|
|
||||||
f += ddF_y;
|
|
||||||
}
|
|
||||||
x++;
|
|
||||||
ddF_x += 2;
|
|
||||||
f += ddF_x;
|
|
||||||
LCD_PlotPoint(x0 + x, y0 + y, color);
|
|
||||||
LCD_PlotPoint(x0 - x, y0 + y, color);
|
|
||||||
LCD_PlotPoint(x0 + x, y0 - y, color);
|
|
||||||
LCD_PlotPoint(x0 - x, y0 - y, color);
|
|
||||||
LCD_PlotPoint(x0 + y, y0 + x, color);
|
|
||||||
LCD_PlotPoint(x0 - y, y0 + x, color);
|
|
||||||
LCD_PlotPoint(x0 + y, y0 - x, color);
|
|
||||||
LCD_PlotPoint(x0 - y, y0 - x, color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine to draw a line in the RGB565 color to the LCD.
|
|
||||||
// The line is drawn from (xmin,ymin) to (xmax,ymax).
|
|
||||||
// The algorithm used to draw the line is "Bresenham's line
|
|
||||||
// algorithm".
|
|
||||||
#define SWAP(a, b) a ^= b; b ^= a; a ^= b;
|
|
||||||
|
|
||||||
void LCD_Line (int xmin,int xmax,int ymin,int ymax,int color)
|
|
||||||
{
|
|
||||||
int Dx = xmax - xmin;
|
|
||||||
int Dy = ymax - ymin;
|
|
||||||
int steep = (abs(Dy) >= abs(Dx));
|
|
||||||
if (steep) {
|
|
||||||
SWAP(xmin, ymin);
|
|
||||||
SWAP(xmax, ymax);
|
|
||||||
// recompute Dx, Dy after swap
|
|
||||||
Dx = xmax - xmin;
|
|
||||||
Dy = ymax - ymin;
|
|
||||||
}
|
|
||||||
int xstep = 1;
|
|
||||||
if (Dx < 0) {
|
|
||||||
xstep = -1;
|
|
||||||
Dx = -Dx;
|
|
||||||
}
|
|
||||||
int ystep = 1;
|
|
||||||
if (Dy < 0) {
|
|
||||||
ystep = -1;
|
|
||||||
Dy = -Dy;
|
|
||||||
}
|
|
||||||
int TwoDy = 2*Dy;
|
|
||||||
int TwoDyTwoDx = TwoDy - 2*Dx; // 2*Dy - 2*Dx
|
|
||||||
int E = TwoDy - Dx; //2*Dy - Dx
|
|
||||||
int y = ymin;
|
|
||||||
int xDraw, yDraw;
|
|
||||||
int x;
|
|
||||||
for (x = xmin; x != xmax; x += xstep) {
|
|
||||||
if (steep) {
|
|
||||||
xDraw = y;
|
|
||||||
yDraw = x;
|
|
||||||
} else {
|
|
||||||
xDraw = x;
|
|
||||||
yDraw = y;
|
|
||||||
}
|
|
||||||
// plot
|
|
||||||
LCD_PlotPoint(xDraw, yDraw, color);
|
|
||||||
// next
|
|
||||||
if (E > 0) {
|
|
||||||
E += TwoDyTwoDx; //E += 2*Dy - 2*Dx;
|
|
||||||
y = y + ystep;
|
|
||||||
} else {
|
|
||||||
E += TwoDy; //E += 2*Dy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine to clear the LCD.
|
|
||||||
// Implemented by drawing a black rectangle across the whole screen
|
|
||||||
void LCD_ClearScreen(void)
|
|
||||||
{
|
|
||||||
LCD_FilledRect (0,LCD_MAX_X,0 , LCD_MAX_Y, COLOR_BLACK);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Routine to write a single character to screen in the font pointed
|
|
||||||
// to by pBitMap. This routine is intended to be used via the
|
|
||||||
// LCD_PrintChar() and LCD_PrintString() routines, rather than called
|
|
||||||
// directly from user code.
|
|
||||||
void LCD_WriteBitMap8x15(int x, int y, int height, int width, unsigned char *pBitMap, int color)
|
|
||||||
{
|
|
||||||
int xmax = x + width - 1; // start at zero
|
|
||||||
int ymax = y + height - 1; // start at zero
|
|
||||||
int iRow, iCol;
|
|
||||||
unsigned char ucRowData;
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_CASET); // Column address set
|
|
||||||
LCDdriver_WriteData(x); // Start column
|
|
||||||
LCDdriver_WriteData(xmax); // End column
|
|
||||||
LCDdriver_WriteCom(DD_RASET); // Row address set
|
|
||||||
LCDdriver_WriteData(y); // Start row
|
|
||||||
LCDdriver_WriteData(ymax); // End row
|
|
||||||
LCDdriver_WriteCom(DD_RAMWR); // Memory write
|
|
||||||
|
|
||||||
|
|
||||||
for(iRow=0;iRow<height;iRow++)
|
|
||||||
{
|
|
||||||
ucRowData = *pBitMap++;
|
|
||||||
|
|
||||||
for(iCol=0;iCol<width;iCol++)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Look at each input bitmap bit
|
|
||||||
// and write as a black-pixel or
|
|
||||||
// a color-pixel.
|
|
||||||
|
|
||||||
if(ucRowData & 0x80) // 'color pixel'
|
|
||||||
{
|
|
||||||
LCDdriver_WriteData(color >> 8);
|
|
||||||
LCDdriver_WriteData(color);
|
|
||||||
}
|
|
||||||
else // black pixel
|
|
||||||
{
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
}
|
|
||||||
|
|
||||||
ucRowData = ucRowData<<1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Prints the character 'c' to the LCD in the appropriate color.
|
|
||||||
void LCD_PrintChar(int x, int y, unsigned char c, int color )
|
|
||||||
{
|
|
||||||
const unsigned char index = font_index_table[c];
|
|
||||||
const unsigned int offset = index * 15;
|
|
||||||
unsigned char *pData = (unsigned char *)&font_data_table[offset];
|
|
||||||
|
|
||||||
LCD_WriteBitMap8x15(x, y, 15, 8, pData, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prints the string to the LCD in the appropriate color.
|
|
||||||
void LCD_PrintString(int x, int y, char *pcString, int iStrLen, int color)
|
|
||||||
{
|
|
||||||
unsigned char index;
|
|
||||||
unsigned int offset;
|
|
||||||
unsigned char *pData;
|
|
||||||
unsigned char c;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for(i=0;i<iStrLen;i++)
|
|
||||||
{
|
|
||||||
c = pcString[i];
|
|
||||||
if(c==0)
|
|
||||||
break;
|
|
||||||
index = font_index_table[c];
|
|
||||||
offset = index * 15;
|
|
||||||
pData = (unsigned char *)&font_data_table[offset];
|
|
||||||
|
|
||||||
LCD_WriteBitMap8x15(x, y, 15, 8, pData, color);
|
|
||||||
x += 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,92 +0,0 @@
|
||||||
//*****************************************************************************
|
|
||||||
// +--+
|
|
||||||
// | ++----+
|
|
||||||
// +-++ |
|
|
||||||
// | |
|
|
||||||
// +-+--+ |
|
|
||||||
// | +--+--+
|
|
||||||
// +----+ Copyright (c) 2009 Code Red Technologies Ltd.
|
|
||||||
//
|
|
||||||
// lcd.h - Routines containing primitives for writing to the LCD
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Software License Agreement
|
|
||||||
//
|
|
||||||
// The software is owned by Code Red Technologies and/or its suppliers, and is
|
|
||||||
// protected under applicable copyright laws. All rights are reserved. Any
|
|
||||||
// use in violation of the foregoing restrictions may subject the user to criminal
|
|
||||||
// sanctions under applicable laws, as well as to civil liability for the breach
|
|
||||||
// of the terms and conditions of this license.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
|
|
||||||
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
|
|
||||||
// CODE RED TECHNOLOGIES LTD.
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef LCD_H_
|
|
||||||
#define LCD_H_
|
|
||||||
|
|
||||||
// Define size of LCD screen.
|
|
||||||
|
|
||||||
#define LCD_MAX_X 128
|
|
||||||
#define LCD_MAX_Y 128
|
|
||||||
|
|
||||||
// Translates a 24-bit RGB color to RGB565
|
|
||||||
#define TRANSLATE24BIT_TO_RGB565(c) ((((c) & 0x00ff0000) >> 19) | \
|
|
||||||
((((c) & 0x0000ff00) >> 5) & 0x000007e0) | \
|
|
||||||
((((c) & 0x000000ff) << 8) & 0x0000f800))
|
|
||||||
|
|
||||||
// Define a basic set of 24bit colors, based on the standard "websafe" set
|
|
||||||
#define COLOR24_AQUA 0x00FFFF
|
|
||||||
#define COLOR24_GREY 0x808080
|
|
||||||
#define COLOR24_NAVY 0x000080
|
|
||||||
#define COLOR24_SILVER 0xC0C0C0
|
|
||||||
#define COLOR24_BLACK 0x000000
|
|
||||||
#define COLOR24_GREEN 0x008000
|
|
||||||
#define COLOR24_OLIVE 0x808000
|
|
||||||
#define COLOR24_TEAL 0x008080
|
|
||||||
#define COLOR24_BLUE 0x0000FF
|
|
||||||
#define COLOR24_LIME 0x00FF00
|
|
||||||
#define COLOR24_PURPLE 0x800080
|
|
||||||
#define COLOR24_WHITE 0xFFFFFF
|
|
||||||
#define COLOR24_FUCHSIA 0xFF00FF
|
|
||||||
#define COLOR24_MAROON 0x800000
|
|
||||||
#define COLOR24_RED 0xFF0000
|
|
||||||
#define COLOR24_YELLOW 0xFFFF00
|
|
||||||
|
|
||||||
// Create a set of RGB565 colors that can be used directly within code
|
|
||||||
#define COLOR_AQUA TRANSLATE24BIT_TO_RGB565(COLOR24_AQUA)
|
|
||||||
#define COLOR_GREY TRANSLATE24BIT_TO_RGB565(COLOR24_GREY)
|
|
||||||
#define COLOR_NAVY TRANSLATE24BIT_TO_RGB565(COLOR24_NAVY)
|
|
||||||
#define COLOR_SILVER TRANSLATE24BIT_TO_RGB565(COLOR24_SILVER)
|
|
||||||
#define COLOR_BLACK TRANSLATE24BIT_TO_RGB565(COLOR24_BLACK)
|
|
||||||
#define COLOR_GREEN TRANSLATE24BIT_TO_RGB565(COLOR24_GREEN)
|
|
||||||
#define COLOR_OLIVE TRANSLATE24BIT_TO_RGB565(COLOR24_OLIVE)
|
|
||||||
#define COLOR_TEAL TRANSLATE24BIT_TO_RGB565(COLOR24_TEAL)
|
|
||||||
#define COLOR_BLUE TRANSLATE24BIT_TO_RGB565(COLOR24_BLUE)
|
|
||||||
#define COLOR_LIME TRANSLATE24BIT_TO_RGB565(COLOR24_LIME)
|
|
||||||
#define COLOR_PURPLE TRANSLATE24BIT_TO_RGB565(COLOR24_PURPLE)
|
|
||||||
#define COLOR_WHITE TRANSLATE24BIT_TO_RGB565(COLOR24_WHITE)
|
|
||||||
#define COLOR_FUCHSIA TRANSLATE24BIT_TO_RGB565(COLOR24_FUCHSIA)
|
|
||||||
#define COLOR_MAROON TRANSLATE24BIT_TO_RGB565(COLOR24_MAROON)
|
|
||||||
#define COLOR_RED TRANSLATE24BIT_TO_RGB565(COLOR24_RED)
|
|
||||||
#define COLOR_YELLOW TRANSLATE24BIT_TO_RGB565(COLOR24_YELLOW)
|
|
||||||
|
|
||||||
|
|
||||||
void LCD_Line (int xmin,int xmax,int ymin,int ymax,int color);
|
|
||||||
void LCD_FilledRect(int xmin,int xmax,int ymin,int ymax,int color);
|
|
||||||
void LCD_Rect(int xmin,int xmax,int ymin,int ymax,int color);
|
|
||||||
void LCD_WriteBitMap8x15(int x, int y, int height, int width, unsigned char *pBitMap, int color);
|
|
||||||
void LCD_PlotPoint(int x,int y,int color);
|
|
||||||
void LCD_Circle (int x0, int y0, int radius, int color);
|
|
||||||
void LCD_FilledCircle (int x0, int y0, int radius, int color);
|
|
||||||
void LCD_ClearScreen(void);
|
|
||||||
void LCD_WriteBitMap8x15(int x, int y, int height, int width, unsigned char *pBitMap, int color);
|
|
||||||
void LCD_PrintChar(int x, int y, unsigned char c, int color );
|
|
||||||
void LCD_PrintString(int x, int y, char *pcString, int iStrLen, int color);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*LCD_H_*/
|
|
|
@ -1,53 +0,0 @@
|
||||||
//*****************************************************************************
|
|
||||||
// +--+
|
|
||||||
// | ++----+
|
|
||||||
// +-++ |
|
|
||||||
// | |
|
|
||||||
// +-+--+ |
|
|
||||||
// | +--+--+
|
|
||||||
// +----+ Copyright (c) 2009 Code Red Technologies Ltd.
|
|
||||||
//
|
|
||||||
// lcd_commands.h contains defines mapping onto the commands accepted by the
|
|
||||||
// Sitronix ST7637 LCD Controller/driver used on the RDB1768 development board.//
|
|
||||||
//
|
|
||||||
// Software License Agreement
|
|
||||||
//
|
|
||||||
// The software is owned by Code Red Technologies and/or its suppliers, and is
|
|
||||||
// protected under applicable copyright laws. All rights are reserved. Any
|
|
||||||
// use in violation of the foregoing restrictions may subject the user to criminal
|
|
||||||
// sanctions under applicable laws, as well as to civil liability for the breach
|
|
||||||
// of the terms and conditions of this license.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
|
|
||||||
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
|
|
||||||
// CODE RED TECHNOLOGIES LTD.
|
|
||||||
|
|
||||||
#ifndef LCD_COMMANDS_H_
|
|
||||||
#define LCD_COMMANDS_H_
|
|
||||||
|
|
||||||
#define DD_NOP 0x00
|
|
||||||
#define DD_SWRESET 0x01 //SW reset the display
|
|
||||||
#define DD_SLPIN 0x10 //Sleep in and booster off
|
|
||||||
#define DD_SLPOUT 0x11 //Sleep out and booster on
|
|
||||||
#define DD_NORON 0x13 //Partial mode off (Normal mode on)
|
|
||||||
#define DD_DISPOFF 0x28 //Display Off
|
|
||||||
#define DD_DISPON 0x29 //Display On
|
|
||||||
#define DD_CASET 0x2a //Column address set
|
|
||||||
#define DD_RASET 0x2b //Row address set
|
|
||||||
#define DD_RAMWR 0x2c //Memory write
|
|
||||||
#define DD_MADCTR 0x36 //Memory Data Access Control
|
|
||||||
#define DD_COLORMOD 0x3a //Set the color mode for the display
|
|
||||||
#define DD_ColScanDir 0xb7 //Set the column scanning direction
|
|
||||||
#define DD_VopSet 0xc0 //LCD supply voltage set
|
|
||||||
#define DD_BiasSel 0xc3 //Bias selection
|
|
||||||
#define DD_BstMbpXSel 0xc4 //Booster setting
|
|
||||||
#define DD_AUTOLOADSET 0xd7 //Control auto load of ROM data
|
|
||||||
#define DD_EPCTIN 0xe0 //OTP control RD/WR
|
|
||||||
#define DD_EPREAD 0xe3 //OTP read
|
|
||||||
#define DD_EPCTOUT 0xe1 //OTP control cancel
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*LCD_COMMANDS_H_*/
|
|
|
@ -1,190 +0,0 @@
|
||||||
//*****************************************************************************
|
|
||||||
// +--+
|
|
||||||
// | ++----+
|
|
||||||
// +-++ |
|
|
||||||
// | |
|
|
||||||
// +-+--+ |
|
|
||||||
// | +--+--+
|
|
||||||
// +----+ Copyright (c) 2009 Code Red Technologies Ltd.
|
|
||||||
//
|
|
||||||
// lcd_driver.c contains the lowest level access routines for the Sitronix
|
|
||||||
// ST7637 LCD Controller/driver used on the RDB1768 development board.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Software License Agreement
|
|
||||||
//
|
|
||||||
// The software is owned by Code Red Technologies and/or its suppliers, and is
|
|
||||||
// protected under applicable copyright laws. All rights are reserved. Any
|
|
||||||
// use in violation of the foregoing restrictions may subject the user to criminal
|
|
||||||
// sanctions under applicable laws, as well as to civil liability for the breach
|
|
||||||
// of the terms and conditions of this license.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
|
|
||||||
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
|
|
||||||
// CODE RED TECHNOLOGIES LTD.
|
|
||||||
|
|
||||||
#include "NXP/LPC17xx/LPC17xx.h"
|
|
||||||
#include "lcd_driver.h"
|
|
||||||
#include "lcd_commands.h"
|
|
||||||
|
|
||||||
// Bits within GPIO port 2 used for LCD driver
|
|
||||||
#define LCD_CSB_PIN (1<<13)
|
|
||||||
#define LCD_A0_PIN (1<<8)
|
|
||||||
#define LCD_WR_PIN (1<<11)
|
|
||||||
#define LCD_RD_PIN (1<<12)
|
|
||||||
#define LCD_DATA_PIN 0xff
|
|
||||||
|
|
||||||
// Bit within GPIO port 3 used for LCD driver
|
|
||||||
#define LCD_RESB_PIN (1<<25)
|
|
||||||
|
|
||||||
// Bits to configure as outputs for driving LCD
|
|
||||||
#define LCD_PORT2_DIRECTIONS (LCD_CSB_PIN | LCD_A0_PIN | LCD_WR_PIN | LCD_RD_PIN | LCD_DATA_PIN)
|
|
||||||
#define LCD_PORT3_DIRECTIONS (LCD_RESB_PIN)
|
|
||||||
|
|
||||||
// Define names for GPIO port 2 and 3 registers to better indicate in code
|
|
||||||
// the operation being carried out on the LCD driver hardware.
|
|
||||||
#define LCD_DATA_CLR FIO2CLR
|
|
||||||
#define LCD_DATA_SET FIO2SET
|
|
||||||
|
|
||||||
#define LCD_CSB_CLR FIO2CLR
|
|
||||||
#define LCD_CSB_SET FIO2SET
|
|
||||||
|
|
||||||
#define LCD_RESB_CLR FIO3CLR
|
|
||||||
#define LCD_RESB_SET FIO3SET
|
|
||||||
|
|
||||||
#define LCD_A0_CLR FIO2CLR
|
|
||||||
#define LCD_A0_SET FIO2SET
|
|
||||||
|
|
||||||
#define LCD_WR_CLR FIO2CLR
|
|
||||||
#define LCD_WR_SET FIO2SET
|
|
||||||
|
|
||||||
#define LCD_RD_CLR FIO2CLR
|
|
||||||
#define LCD_RD_SET FIO2SET
|
|
||||||
|
|
||||||
// Routine to write data to LCD driver. Normally called in combination
|
|
||||||
// with LCDdriver_WriteCom() routine
|
|
||||||
void LCDdriver_WriteData(unsigned char LCD_Data)
|
|
||||||
{
|
|
||||||
LCD_DATA_CLR = LCD_DATA_PIN;
|
|
||||||
LCD_DATA_SET = LCD_Data;
|
|
||||||
LCD_CSB_CLR = LCD_CSB_PIN;
|
|
||||||
LCD_WR_CLR = LCD_WR_PIN;
|
|
||||||
LCD_WR_SET = LCD_WR_PIN;
|
|
||||||
LCD_CSB_SET = LCD_CSB_PIN;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine to configure set LCD driver to accept particular command.
|
|
||||||
// A call to this routine will normally be followed by a call
|
|
||||||
// to LCDdriver_WriteData() to transfer appropriate parameters to driver.
|
|
||||||
void LCDdriver_WriteCom(unsigned char LCD_Command)
|
|
||||||
{
|
|
||||||
LCD_DATA_CLR = LCD_DATA_PIN;
|
|
||||||
LCD_DATA_SET = LCD_Command;
|
|
||||||
LCD_A0_CLR = LCD_A0_PIN;
|
|
||||||
LCD_CSB_CLR = LCD_CSB_PIN;
|
|
||||||
LCD_WR_CLR = LCD_WR_PIN;
|
|
||||||
LCD_WR_SET = LCD_WR_PIN;
|
|
||||||
LCD_CSB_SET = LCD_CSB_PIN;
|
|
||||||
LCD_A0_SET = LCD_A0_PIN;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to add short delays in writing things to the LCD.
|
|
||||||
void ms_delay(int n)
|
|
||||||
{
|
|
||||||
volatile int d;
|
|
||||||
for (d=0; d<n*3000; d++){}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Initialize GPIO connection to the LCD driver
|
|
||||||
void LCDdriver_ConfigGPIOtoLCD(void)
|
|
||||||
{
|
|
||||||
// set direction to outputs
|
|
||||||
FIO2DIR |= LCD_PORT2_DIRECTIONS;
|
|
||||||
FIO3DIR |= LCD_PORT3_DIRECTIONS;
|
|
||||||
|
|
||||||
// Set GPIO outputs connected to LCD to default values
|
|
||||||
LCD_CSB_SET = LCD_CSB_PIN;
|
|
||||||
LCD_A0_SET = LCD_A0_PIN;
|
|
||||||
LCD_WR_SET = LCD_WR_PIN;
|
|
||||||
LCD_RD_SET = LCD_RD_PIN;
|
|
||||||
LCD_RESB_SET = LCD_RESB_PIN;
|
|
||||||
LCD_DATA_CLR = 0xff; // data bus to zero
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Initialisation routine to set up LCD
|
|
||||||
void LCDdriver_initialisation(void)
|
|
||||||
{
|
|
||||||
int i; // temp loop variable
|
|
||||||
|
|
||||||
LCDdriver_ConfigGPIOtoLCD(); // Initialize the GPIO for the display
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_SWRESET); // SW reset
|
|
||||||
ms_delay(120); // Small delay
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_AUTOLOADSET); // disable auto loading of mask rom data
|
|
||||||
LCDdriver_WriteData(0xBF);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_EPCTIN); // OTP control mode=read
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
ms_delay(10); // Small delay
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_EPREAD); // Start the OTP read.
|
|
||||||
ms_delay(20); // Small delay
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_EPCTOUT); // Cancel the OTP read (20ms should have been enough)
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_DISPOFF); // display off
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_SLPOUT); // Exit sleep mode.
|
|
||||||
ms_delay(50); // Small delay
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_VopSet); // set LCD operating voltage to 14V.
|
|
||||||
LCDdriver_WriteData(0x04);
|
|
||||||
LCDdriver_WriteData(0x01);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_BiasSel); // Select an LCD bias voltage ratio of 1/12.
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_BstMbpXSel); // x8 booster circuit on
|
|
||||||
LCDdriver_WriteData(0x07);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_ColScanDir); // Invert the column scan direction for the panel.
|
|
||||||
LCDdriver_WriteData(0xC0);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_COLORMOD); // 16bpp, 5-6-5 data input mode.
|
|
||||||
LCDdriver_WriteData(0x05);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_MADCTR); // mem scan direction
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_DISPON); // display on
|
|
||||||
|
|
||||||
// Now Clear the Screen
|
|
||||||
LCDdriver_WriteCom(DD_CASET);
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
LCDdriver_WriteData(0x7F);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_RASET);
|
|
||||||
LCDdriver_WriteData(0x01);
|
|
||||||
LCDdriver_WriteData(0x80);
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_RAMWR);
|
|
||||||
for(i = 0; i < (128 * 128); i++)
|
|
||||||
{
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
LCDdriver_WriteData(0x00);
|
|
||||||
}
|
|
||||||
|
|
||||||
LCDdriver_WriteCom(DD_NORON); // normal operation mode
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
//*****************************************************************************
|
|
||||||
// +--+
|
|
||||||
// | ++----+
|
|
||||||
// +-++ |
|
|
||||||
// | |
|
|
||||||
// +-+--+ |
|
|
||||||
// | +--+--+
|
|
||||||
// +----+ Copyright (c) 2009 Code Red Technologies Ltd.
|
|
||||||
//
|
|
||||||
// lcd_driver.h - Header file for driver for the lowest level access routines
|
|
||||||
// for the Sitronix ST7637 LCD Controller/driver used on the RDB1768
|
|
||||||
// development board.
|
|
||||||
//
|
|
||||||
// Software License Agreement
|
|
||||||
//
|
|
||||||
// The software is owned by Code Red Technologies and/or its suppliers, and is
|
|
||||||
// protected under applicable copyright laws. All rights are reserved. Any
|
|
||||||
// use in violation of the foregoing restrictions may subject the user to criminal
|
|
||||||
// sanctions under applicable laws, as well as to civil liability for the breach
|
|
||||||
// of the terms and conditions of this license.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
|
|
||||||
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
|
|
||||||
// CODE RED TECHNOLOGIES LTD.
|
|
||||||
|
|
||||||
#ifndef LCD_DRIVER_H_
|
|
||||||
#define LCD_DRIVER_H_
|
|
||||||
|
|
||||||
void LCDdriver_WriteData(unsigned char LCD_Data);
|
|
||||||
void LCDdriver_WriteCom(unsigned char LCD_Command);
|
|
||||||
void LCDdriver_initialisation(void);
|
|
||||||
|
|
||||||
#endif /*LCD_DRIVER_H_*/
|
|
|
@ -1,673 +0,0 @@
|
||||||
/*******************************************************************************************
|
|
||||||
Data table provides the bitmap data of each character.
|
|
||||||
|
|
||||||
To get the starting data offset of character 'A', you can use the following expression:
|
|
||||||
|
|
||||||
const unsigned char index = index_table['A'];
|
|
||||||
const unsigned int offset = offset_table[index];
|
|
||||||
const unsigned char *pData = data_table[offset];
|
|
||||||
|
|
||||||
*******************************************************************************************/
|
|
||||||
const unsigned char font_data_table[] = {
|
|
||||||
|
|
||||||
/* character 0x0020 (' '): (width=8, offset=0) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0021 ('!'): (width=8, offset=15) */
|
|
||||||
0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x3C, 0x18,
|
|
||||||
0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0022 ('"'): (width=8, offset=30) */
|
|
||||||
0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0023 ('#'): (width=8, offset=45) */
|
|
||||||
0x00, 0x00, 0x00, 0x36, 0x36, 0x7F, 0x36, 0x36,
|
|
||||||
0x36, 0x7F, 0x36, 0x36, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0024 ('$'): (width=8, offset=60) */
|
|
||||||
0x00, 0x18, 0x18, 0x3C, 0x66, 0x60, 0x30, 0x18,
|
|
||||||
0x0C, 0x06, 0x66, 0x3C, 0x18, 0x18, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0025 ('%'): (width=8, offset=75) */
|
|
||||||
0x00, 0x00, 0x70, 0xD8, 0xDA, 0x76, 0x0C, 0x18,
|
|
||||||
0x30, 0x6E, 0x5B, 0x1B, 0x0E, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0026 ('&'): (width=8, offset=90) */
|
|
||||||
0x00, 0x00, 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x60,
|
|
||||||
0x6F, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0027 ('''): (width=8, offset=105) */
|
|
||||||
0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0028 ('('): (width=8, offset=120) */
|
|
||||||
0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x30, 0x30,
|
|
||||||
0x30, 0x30, 0x30, 0x18, 0x18, 0x0C, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0029 (')'): (width=8, offset=135) */
|
|
||||||
0x00, 0x00, 0x00, 0x30, 0x18, 0x18, 0x0C, 0x0C,
|
|
||||||
0x0C, 0x0C, 0x0C, 0x18, 0x18, 0x30, 0x00,
|
|
||||||
|
|
||||||
/* character 0x002A ('*'): (width=8, offset=150) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x1C, 0x7F,
|
|
||||||
0x1C, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x002B ('+'): (width=8, offset=165) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7E,
|
|
||||||
0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x002C (','): (width=8, offset=180) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x1C, 0x1C, 0x0C, 0x18, 0x00,
|
|
||||||
|
|
||||||
/* character 0x002D ('-'): (width=8, offset=195) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x002E ('.'): (width=8, offset=210) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x002F ('/'): (width=8, offset=225) */
|
|
||||||
0x00, 0x00, 0x00, 0x06, 0x06, 0x0C, 0x0C, 0x18,
|
|
||||||
0x18, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0030 ('0'): (width=8, offset=240) */
|
|
||||||
0x00, 0x00, 0x00, 0x1E, 0x33, 0x37, 0x37, 0x33,
|
|
||||||
0x3B, 0x3B, 0x33, 0x1E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0031 ('1'): (width=8, offset=255) */
|
|
||||||
0x00, 0x00, 0x00, 0x0C, 0x1C, 0x7C, 0x0C, 0x0C,
|
|
||||||
0x0C, 0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0032 ('2'): (width=8, offset=270) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x06, 0x0C,
|
|
||||||
0x18, 0x30, 0x60, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0033 ('3'): (width=8, offset=285) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x06, 0x1C,
|
|
||||||
0x06, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0034 ('4'): (width=8, offset=300) */
|
|
||||||
0x00, 0x00, 0x00, 0x30, 0x30, 0x36, 0x36, 0x36,
|
|
||||||
0x66, 0x7F, 0x06, 0x06, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0035 ('5'): (width=8, offset=315) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0x60, 0x60, 0x60, 0x7C,
|
|
||||||
0x06, 0x06, 0x0C, 0x78, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0036 ('6'): (width=8, offset=330) */
|
|
||||||
0x00, 0x00, 0x00, 0x1C, 0x18, 0x30, 0x7C, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0037 ('7'): (width=8, offset=345) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0x06, 0x0C, 0x0C, 0x18,
|
|
||||||
0x18, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0038 ('8'): (width=8, offset=360) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x76, 0x3C,
|
|
||||||
0x6E, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0039 ('9'): (width=8, offset=375) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x66,
|
|
||||||
0x3E, 0x0C, 0x18, 0x38, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x003A (':'): (width=8, offset=390) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00,
|
|
||||||
0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x003B (';'): (width=8, offset=405) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00,
|
|
||||||
0x00, 0x00, 0x1C, 0x1C, 0x0C, 0x18, 0x00,
|
|
||||||
|
|
||||||
/* character 0x003C ('<'): (width=8, offset=420) */
|
|
||||||
0x00, 0x00, 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60,
|
|
||||||
0x30, 0x18, 0x0C, 0x06, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x003D ('='): (width=8, offset=435) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00,
|
|
||||||
0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x003E ('>'): (width=8, offset=450) */
|
|
||||||
0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06,
|
|
||||||
0x0C, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x003F ('?'): (width=8, offset=465) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x0C, 0x18,
|
|
||||||
0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0040 ('@'): (width=8, offset=480) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0xC3, 0xC3, 0xCF, 0xDB,
|
|
||||||
0xDB, 0xCF, 0xC0, 0x7F, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0041 ('A'): (width=8, offset=495) */
|
|
||||||
0x00, 0x00, 0x00, 0x18, 0x3C, 0x66, 0x66, 0x66,
|
|
||||||
0x7E, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0042 ('B'): (width=8, offset=510) */
|
|
||||||
0x00, 0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x7C,
|
|
||||||
0x66, 0x66, 0x66, 0x7C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0043 ('C'): (width=8, offset=525) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x60, 0x60,
|
|
||||||
0x60, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0044 ('D'): (width=8, offset=540) */
|
|
||||||
0x00, 0x00, 0x00, 0x78, 0x6C, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x6C, 0x78, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0045 ('E'): (width=8, offset=555) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0x60, 0x60, 0x60, 0x7C,
|
|
||||||
0x60, 0x60, 0x60, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0046 ('F'): (width=8, offset=570) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0x60, 0x60, 0x60, 0x7C,
|
|
||||||
0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0047 ('G'): (width=8, offset=585) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x60, 0x60,
|
|
||||||
0x6E, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0048 ('H'): (width=8, offset=600) */
|
|
||||||
0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7E,
|
|
||||||
0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0049 ('I'): (width=8, offset=615) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x18,
|
|
||||||
0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x004A ('J'): (width=8, offset=630) */
|
|
||||||
0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06,
|
|
||||||
0x06, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x004B ('K'): (width=8, offset=645) */
|
|
||||||
0x00, 0x00, 0x00, 0x66, 0x66, 0x6C, 0x6C, 0x78,
|
|
||||||
0x6C, 0x6C, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x004C ('L'): (width=8, offset=660) */
|
|
||||||
0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
|
|
||||||
0x60, 0x60, 0x60, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x004D ('M'): (width=8, offset=675) */
|
|
||||||
0x00, 0x00, 0x00, 0x63, 0x63, 0x77, 0x6B, 0x6B,
|
|
||||||
0x6B, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x004E ('N'): (width=8, offset=690) */
|
|
||||||
0x00, 0x00, 0x00, 0x63, 0x63, 0x73, 0x7B, 0x6F,
|
|
||||||
0x67, 0x63, 0x63, 0x63, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x004F ('O'): (width=8, offset=705) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0050 ('P'): (width=8, offset=720) */
|
|
||||||
0x00, 0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x7C,
|
|
||||||
0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0051 ('Q'): (width=8, offset=735) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3C, 0x0C, 0x06, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0052 ('R'): (width=8, offset=750) */
|
|
||||||
0x00, 0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x7C,
|
|
||||||
0x6C, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0053 ('S'): (width=8, offset=765) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x66, 0x60, 0x30, 0x18,
|
|
||||||
0x0C, 0x06, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0054 ('T'): (width=8, offset=780) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0x18, 0x18, 0x18, 0x18,
|
|
||||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0055 ('U'): (width=8, offset=795) */
|
|
||||||
0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0056 ('V'): (width=8, offset=810) */
|
|
||||||
0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x3C, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0057 ('W'): (width=8, offset=825) */
|
|
||||||
0x00, 0x00, 0x00, 0x63, 0x63, 0x63, 0x6B, 0x6B,
|
|
||||||
0x6B, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0058 ('X'): (width=8, offset=840) */
|
|
||||||
0x00, 0x00, 0x00, 0x66, 0x66, 0x34, 0x18, 0x18,
|
|
||||||
0x2C, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0059 ('Y'): (width=8, offset=855) */
|
|
||||||
0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3C,
|
|
||||||
0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x005A ('Z'): (width=8, offset=870) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0x06, 0x06, 0x0C, 0x18,
|
|
||||||
0x30, 0x60, 0x60, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x005B ('['): (width=8, offset=885) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x30, 0x30, 0x30, 0x30,
|
|
||||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3C,
|
|
||||||
|
|
||||||
/* character 0x005C ('\'): (width=8, offset=900) */
|
|
||||||
0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x30, 0x18,
|
|
||||||
0x18, 0x0C, 0x0C, 0x06, 0x06, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x005D (']'): (width=8, offset=915) */
|
|
||||||
0x00, 0x00, 0x00, 0x3C, 0x0C, 0x0C, 0x0C, 0x0C,
|
|
||||||
0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x3C,
|
|
||||||
|
|
||||||
/* character 0x005E ('^'): (width=8, offset=930) */
|
|
||||||
0x00, 0x18, 0x3C, 0x66, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x005F ('_'): (width=8, offset=945) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
|
||||||
|
|
||||||
/* character 0x0060 ('`'): (width=8, offset=960) */
|
|
||||||
0x00, 0x38, 0x18, 0x0C, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0061 ('a'): (width=8, offset=975) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x06, 0x06,
|
|
||||||
0x3E, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0062 ('b'): (width=8, offset=990) */
|
|
||||||
0x00, 0x00, 0x00, 0x60, 0x60, 0x7C, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x7C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0063 ('c'): (width=8, offset=1005) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x60,
|
|
||||||
0x60, 0x60, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0064 ('d'): (width=8, offset=1020) */
|
|
||||||
0x00, 0x00, 0x00, 0x06, 0x06, 0x3E, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0065 ('e'): (width=8, offset=1035) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
|
|
||||||
0x7E, 0x60, 0x60, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0066 ('f'): (width=8, offset=1050) */
|
|
||||||
0x00, 0x00, 0x00, 0x1E, 0x30, 0x30, 0x30, 0x7E,
|
|
||||||
0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0067 ('g'): (width=8, offset=1065) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x7C,
|
|
||||||
|
|
||||||
/* character 0x0068 ('h'): (width=8, offset=1080) */
|
|
||||||
0x00, 0x00, 0x00, 0x60, 0x60, 0x7C, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0069 ('i'): (width=8, offset=1095) */
|
|
||||||
0x00, 0x00, 0x18, 0x18, 0x00, 0x78, 0x18, 0x18,
|
|
||||||
0x18, 0x18, 0x18, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x006A ('j'): (width=8, offset=1110) */
|
|
||||||
0x00, 0x00, 0x0C, 0x0C, 0x00, 0x3C, 0x0C, 0x0C,
|
|
||||||
0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x78,
|
|
||||||
|
|
||||||
/* character 0x006B ('k'): (width=8, offset=1125) */
|
|
||||||
0x00, 0x00, 0x00, 0x60, 0x60, 0x66, 0x66, 0x6C,
|
|
||||||
0x78, 0x6C, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x006C ('l'): (width=8, offset=1140) */
|
|
||||||
0x00, 0x00, 0x00, 0x78, 0x18, 0x18, 0x18, 0x18,
|
|
||||||
0x18, 0x18, 0x18, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x006D ('m'): (width=8, offset=1155) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x6B, 0x6B,
|
|
||||||
0x6B, 0x6B, 0x6B, 0x63, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x006E ('n'): (width=8, offset=1170) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x006F ('o'): (width=8, offset=1185) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0070 ('p'): (width=8, offset=1200) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x60,
|
|
||||||
|
|
||||||
/* character 0x0071 ('q'): (width=8, offset=1215) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x06,
|
|
||||||
|
|
||||||
/* character 0x0072 ('r'): (width=8, offset=1230) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x6E, 0x70,
|
|
||||||
0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0073 ('s'): (width=8, offset=1245) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x60, 0x60,
|
|
||||||
0x3C, 0x06, 0x06, 0x7C, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0074 ('t'): (width=8, offset=1260) */
|
|
||||||
0x00, 0x00, 0x00, 0x30, 0x30, 0x7E, 0x30, 0x30,
|
|
||||||
0x30, 0x30, 0x30, 0x1E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0075 ('u'): (width=8, offset=1275) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0076 ('v'): (width=8, offset=1290) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x3C, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0077 ('w'): (width=8, offset=1305) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x6B, 0x6B,
|
|
||||||
0x6B, 0x6B, 0x36, 0x36, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0078 ('x'): (width=8, offset=1320) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x3C,
|
|
||||||
0x18, 0x3C, 0x66, 0x66, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x0079 ('y'): (width=8, offset=1335) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66,
|
|
||||||
0x66, 0x66, 0x66, 0x3C, 0x0C, 0x18, 0xF0,
|
|
||||||
|
|
||||||
/* character 0x007A ('z'): (width=8, offset=1350) */
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x06, 0x0C,
|
|
||||||
0x18, 0x30, 0x60, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x007B ('{'): (width=8, offset=1365) */
|
|
||||||
0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x18, 0x30,
|
|
||||||
0x60, 0x30, 0x18, 0x18, 0x18, 0x0C, 0x00,
|
|
||||||
|
|
||||||
/* character 0x007C ('|'): (width=8, offset=1380) */
|
|
||||||
0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18,
|
|
||||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
|
||||||
|
|
||||||
/* character 0x007D ('}'): (width=8, offset=1395) */
|
|
||||||
0x00, 0x00, 0x00, 0x30, 0x18, 0x18, 0x18, 0x0C,
|
|
||||||
0x06, 0x0C, 0x18, 0x18, 0x18, 0x30, 0x00,
|
|
||||||
|
|
||||||
/* character 0x007E ('~'): (width=8, offset=1410) */
|
|
||||||
0x00, 0x00, 0x00, 0x71, 0xDB, 0x8E, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
/* character 0x007F (''): (width=8, offset=1425) */
|
|
||||||
0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E,
|
|
||||||
0x7E, 0x7E, 0x7E, 0x7E, 0x00, 0x00, 0x00,
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************************
|
|
||||||
Index table is used to find the mapping index of a character.
|
|
||||||
|
|
||||||
If you can find a simple mathematical expression for index mapping, you can use that.
|
|
||||||
If you do not have such a mathematical expression, this index table is just for you.
|
|
||||||
|
|
||||||
To get the index of character 'A', you can use the following expression:
|
|
||||||
|
|
||||||
const unsigned char index = index_table['A'];
|
|
||||||
|
|
||||||
*******************************************************************************************/
|
|
||||||
const unsigned char font_index_table[] = {
|
|
||||||
/* index hexcode decimal char */
|
|
||||||
/* ===== ======= ======= ==== */
|
|
||||||
0, /* 00 0 . */
|
|
||||||
0, /* 01 1 . */
|
|
||||||
0, /* 02 2 . */
|
|
||||||
0, /* 03 3 . */
|
|
||||||
0, /* 04 4 . */
|
|
||||||
0, /* 05 5 . */
|
|
||||||
0, /* 06 6 . */
|
|
||||||
0, /* 07 7 . */
|
|
||||||
0, /* 08 8 . */
|
|
||||||
0, /* 09 9 . */
|
|
||||||
0, /* 0A 10 . */
|
|
||||||
0, /* 0B 11 . */
|
|
||||||
0, /* 0C 12 . */
|
|
||||||
0, /* 0D 13 . */
|
|
||||||
0, /* 0E 14 . */
|
|
||||||
0, /* 0F 15 . */
|
|
||||||
0, /* 10 16 . */
|
|
||||||
0, /* 11 17 . */
|
|
||||||
0, /* 12 18 . */
|
|
||||||
0, /* 13 19 . */
|
|
||||||
0, /* 14 20 . */
|
|
||||||
0, /* 15 21 . */
|
|
||||||
0, /* 16 22 . */
|
|
||||||
0, /* 17 23 . */
|
|
||||||
0, /* 18 24 . */
|
|
||||||
0, /* 19 25 . */
|
|
||||||
0, /* 1A 26 . */
|
|
||||||
0, /* 1B 27 . */
|
|
||||||
0, /* 1C 28 . */
|
|
||||||
0, /* 1D 29 . */
|
|
||||||
0, /* 1E 30 . */
|
|
||||||
0, /* 1F 31 . */
|
|
||||||
0, /* 20 32 */
|
|
||||||
1, /* 21 33 ! */
|
|
||||||
2, /* 22 34 " */
|
|
||||||
3, /* 23 35 # */
|
|
||||||
4, /* 24 36 $ */
|
|
||||||
5, /* 25 37 % */
|
|
||||||
6, /* 26 38 & */
|
|
||||||
7, /* 27 39 ' */
|
|
||||||
8, /* 28 40 ( */
|
|
||||||
9, /* 29 41 ) */
|
|
||||||
10, /* 2A 42 * */
|
|
||||||
11, /* 2B 43 + */
|
|
||||||
12, /* 2C 44 , */
|
|
||||||
13, /* 2D 45 - */
|
|
||||||
14, /* 2E 46 . */
|
|
||||||
15, /* 2F 47 / */
|
|
||||||
16, /* 30 48 0 */
|
|
||||||
17, /* 31 49 1 */
|
|
||||||
18, /* 32 50 2 */
|
|
||||||
19, /* 33 51 3 */
|
|
||||||
20, /* 34 52 4 */
|
|
||||||
21, /* 35 53 5 */
|
|
||||||
22, /* 36 54 6 */
|
|
||||||
23, /* 37 55 7 */
|
|
||||||
24, /* 38 56 8 */
|
|
||||||
25, /* 39 57 9 */
|
|
||||||
26, /* 3A 58 : */
|
|
||||||
27, /* 3B 59 ; */
|
|
||||||
28, /* 3C 60 < */
|
|
||||||
29, /* 3D 61 = */
|
|
||||||
30, /* 3E 62 > */
|
|
||||||
31, /* 3F 63 ? */
|
|
||||||
32, /* 40 64 @ */
|
|
||||||
33, /* 41 65 A */
|
|
||||||
34, /* 42 66 B */
|
|
||||||
35, /* 43 67 C */
|
|
||||||
36, /* 44 68 D */
|
|
||||||
37, /* 45 69 E */
|
|
||||||
38, /* 46 70 F */
|
|
||||||
39, /* 47 71 G */
|
|
||||||
40, /* 48 72 H */
|
|
||||||
41, /* 49 73 I */
|
|
||||||
42, /* 4A 74 J */
|
|
||||||
43, /* 4B 75 K */
|
|
||||||
44, /* 4C 76 L */
|
|
||||||
45, /* 4D 77 M */
|
|
||||||
46, /* 4E 78 N */
|
|
||||||
47, /* 4F 79 O */
|
|
||||||
48, /* 50 80 P */
|
|
||||||
49, /* 51 81 Q */
|
|
||||||
50, /* 52 82 R */
|
|
||||||
51, /* 53 83 S */
|
|
||||||
52, /* 54 84 T */
|
|
||||||
53, /* 55 85 U */
|
|
||||||
54, /* 56 86 V */
|
|
||||||
55, /* 57 87 W */
|
|
||||||
56, /* 58 88 X */
|
|
||||||
57, /* 59 89 Y */
|
|
||||||
58, /* 5A 90 Z */
|
|
||||||
59, /* 5B 91 [ */
|
|
||||||
60, /* 5C 92 \ */
|
|
||||||
61, /* 5D 93 ] */
|
|
||||||
62, /* 5E 94 ^ */
|
|
||||||
63, /* 5F 95 _ */
|
|
||||||
64, /* 60 96 ` */
|
|
||||||
65, /* 61 97 a */
|
|
||||||
66, /* 62 98 b */
|
|
||||||
67, /* 63 99 c */
|
|
||||||
68, /* 64 100 d */
|
|
||||||
69, /* 65 101 e */
|
|
||||||
70, /* 66 102 f */
|
|
||||||
71, /* 67 103 g */
|
|
||||||
72, /* 68 104 h */
|
|
||||||
73, /* 69 105 i */
|
|
||||||
74, /* 6A 106 j */
|
|
||||||
75, /* 6B 107 k */
|
|
||||||
76, /* 6C 108 l */
|
|
||||||
77, /* 6D 109 m */
|
|
||||||
78, /* 6E 110 n */
|
|
||||||
79, /* 6F 111 o */
|
|
||||||
80, /* 70 112 p */
|
|
||||||
81, /* 71 113 q */
|
|
||||||
82, /* 72 114 r */
|
|
||||||
83, /* 73 115 s */
|
|
||||||
84, /* 74 116 t */
|
|
||||||
85, /* 75 117 u */
|
|
||||||
86, /* 76 118 v */
|
|
||||||
87, /* 77 119 w */
|
|
||||||
88, /* 78 120 x */
|
|
||||||
89, /* 79 121 y */
|
|
||||||
90, /* 7A 122 z */
|
|
||||||
91, /* 7B 123 { */
|
|
||||||
92, /* 7C 124 | */
|
|
||||||
93, /* 7D 125 } */
|
|
||||||
94, /* 7E 126 ~ */
|
|
||||||
95, /* 7F 127 */
|
|
||||||
0, /* 80 128 ? */
|
|
||||||
0, /* 81 129 <20> */
|
|
||||||
0, /* 82 130 ? */
|
|
||||||
0, /* 83 131 ? */
|
|
||||||
0, /* 84 132 ? */
|
|
||||||
0, /* 85 133 ? */
|
|
||||||
0, /* 86 134 ? */
|
|
||||||
0, /* 87 135 ? */
|
|
||||||
0, /* 88 136 ? */
|
|
||||||
0, /* 89 137 ? */
|
|
||||||
0, /* 8A 138 ? */
|
|
||||||
0, /* 8B 139 ? */
|
|
||||||
0, /* 8C 140 ? */
|
|
||||||
0, /* 8D 141 <20> */
|
|
||||||
0, /* 8E 142 ? */
|
|
||||||
0, /* 8F 143 <20> */
|
|
||||||
0, /* 90 144 <20> */
|
|
||||||
0, /* 91 145 ? */
|
|
||||||
0, /* 92 146 ? */
|
|
||||||
0, /* 93 147 ? */
|
|
||||||
0, /* 94 148 ? */
|
|
||||||
0, /* 95 149 ? */
|
|
||||||
0, /* 96 150 ? */
|
|
||||||
0, /* 97 151 ? */
|
|
||||||
0, /* 98 152 ? */
|
|
||||||
0, /* 99 153 ? */
|
|
||||||
0, /* 9A 154 ? */
|
|
||||||
0, /* 9B 155 ? */
|
|
||||||
0, /* 9C 156 ? */
|
|
||||||
0, /* 9D 157 <20> */
|
|
||||||
0, /* 9E 158 ? */
|
|
||||||
0, /* 9F 159 ? */
|
|
||||||
0, /* A0 160 <20> */
|
|
||||||
0, /* A1 161 <20> */
|
|
||||||
0, /* A2 162 <20> */
|
|
||||||
0, /* A3 163 <20> */
|
|
||||||
0, /* A4 164 <20> */
|
|
||||||
0, /* A5 165 <20> */
|
|
||||||
0, /* A6 166 <20> */
|
|
||||||
0, /* A7 167 <20> */
|
|
||||||
0, /* A8 168 <20> */
|
|
||||||
0, /* A9 169 <20> */
|
|
||||||
0, /* AA 170 <20> */
|
|
||||||
0, /* AB 171 <20> */
|
|
||||||
0, /* AC 172 <20> */
|
|
||||||
0, /* AD 173 <20> */
|
|
||||||
0, /* AE 174 <20> */
|
|
||||||
0, /* AF 175 <20> */
|
|
||||||
0, /* B0 176 <20> */
|
|
||||||
0, /* B1 177 <20> */
|
|
||||||
0, /* B2 178 <20> */
|
|
||||||
0, /* B3 179 <20> */
|
|
||||||
0, /* B4 180 <20> */
|
|
||||||
0, /* B5 181 <20> */
|
|
||||||
0, /* B6 182 <20> */
|
|
||||||
0, /* B7 183 <20> */
|
|
||||||
0, /* B8 184 <20> */
|
|
||||||
0, /* B9 185 <20> */
|
|
||||||
0, /* BA 186 <20> */
|
|
||||||
0, /* BB 187 <20> */
|
|
||||||
0, /* BC 188 <20> */
|
|
||||||
0, /* BD 189 <20> */
|
|
||||||
0, /* BE 190 <20> */
|
|
||||||
0, /* BF 191 <20> */
|
|
||||||
0, /* C0 192 <20> */
|
|
||||||
0, /* C1 193 <20> */
|
|
||||||
0, /* C2 194 <20> */
|
|
||||||
0, /* C3 195 <20> */
|
|
||||||
0, /* C4 196 <20> */
|
|
||||||
0, /* C5 197 <20> */
|
|
||||||
0, /* C6 198 <20> */
|
|
||||||
0, /* C7 199 <20> */
|
|
||||||
0, /* C8 200 <20> */
|
|
||||||
0, /* C9 201 <20> */
|
|
||||||
0, /* CA 202 <20> */
|
|
||||||
0, /* CB 203 <20> */
|
|
||||||
0, /* CC 204 <20> */
|
|
||||||
0, /* CD 205 <20> */
|
|
||||||
0, /* CE 206 <20> */
|
|
||||||
0, /* CF 207 <20> */
|
|
||||||
0, /* D0 208 <20> */
|
|
||||||
0, /* D1 209 <20> */
|
|
||||||
0, /* D2 210 <20> */
|
|
||||||
0, /* D3 211 <20> */
|
|
||||||
0, /* D4 212 <20> */
|
|
||||||
0, /* D5 213 <20> */
|
|
||||||
0, /* D6 214 <20> */
|
|
||||||
0, /* D7 215 <20> */
|
|
||||||
0, /* D8 216 <20> */
|
|
||||||
0, /* D9 217 <20> */
|
|
||||||
0, /* DA 218 <20> */
|
|
||||||
0, /* DB 219 <20> */
|
|
||||||
0, /* DC 220 <20> */
|
|
||||||
0, /* DD 221 <20> */
|
|
||||||
0, /* DE 222 <20> */
|
|
||||||
0, /* DF 223 <20> */
|
|
||||||
0, /* E0 224 <20> */
|
|
||||||
0, /* E1 225 <20> */
|
|
||||||
0, /* E2 226 <20> */
|
|
||||||
0, /* E3 227 <20> */
|
|
||||||
0, /* E4 228 <20> */
|
|
||||||
0, /* E5 229 <20> */
|
|
||||||
0, /* E6 230 <20> */
|
|
||||||
0, /* E7 231 <20> */
|
|
||||||
0, /* E8 232 <20> */
|
|
||||||
0, /* E9 233 <20> */
|
|
||||||
0, /* EA 234 <20> */
|
|
||||||
0, /* EB 235 <20> */
|
|
||||||
0, /* EC 236 <20> */
|
|
||||||
0, /* ED 237 <20> */
|
|
||||||
0, /* EE 238 <20> */
|
|
||||||
0, /* EF 239 <20> */
|
|
||||||
0, /* F0 240 <20> */
|
|
||||||
0, /* F1 241 <20> */
|
|
||||||
0, /* F2 242 <20> */
|
|
||||||
0, /* F3 243 <20> */
|
|
||||||
0, /* F4 244 <20> */
|
|
||||||
0, /* F5 245 <20> */
|
|
||||||
0, /* F6 246 <20> */
|
|
||||||
0, /* F7 247 <20> */
|
|
||||||
0, /* F8 248 <20> */
|
|
||||||
0, /* F9 249 <20> */
|
|
||||||
0, /* FA 250 <20> */
|
|
||||||
0, /* FB 251 <20> */
|
|
||||||
0, /* FC 252 <20> */
|
|
||||||
0, /* FD 253 <20> */
|
|
||||||
0, /* FE 254 <20> */
|
|
||||||
0, /* FF 255 <20> */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,361 +0,0 @@
|
||||||
//*****************************************************************************
|
|
||||||
// +--+
|
|
||||||
// | ++----+
|
|
||||||
// +-++ |
|
|
||||||
// | |
|
|
||||||
// +-+--+ |
|
|
||||||
// | +--+--+
|
|
||||||
// +----+ Copyright (c) 2009 Code Red Technologies Ltd.
|
|
||||||
//
|
|
||||||
// Microcontroller Startup code for use with Red Suite
|
|
||||||
//
|
|
||||||
// Software License Agreement
|
|
||||||
//
|
|
||||||
// The software is owned by Code Red Technologies and/or its suppliers, and is
|
|
||||||
// protected under applicable copyright laws. All rights are reserved. Any
|
|
||||||
// use in violation of the foregoing restrictions may subject the user to criminal
|
|
||||||
// sanctions under applicable laws, as well as to civil liability for the breach
|
|
||||||
// of the terms and conditions of this license.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
|
|
||||||
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
|
|
||||||
// CODE RED TECHNOLOGIES LTD.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
#define WEAK __attribute__ ((weak))
|
|
||||||
#define ALIAS(f) __attribute__ ((weak, alias (#f)))
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// Forward declaration of the default handlers.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
void Reset_Handler(void);
|
|
||||||
void ResetISR(void) ALIAS(Reset_Handler);
|
|
||||||
static void NMI_Handler(void);
|
|
||||||
static void HardFault_Handler(void);
|
|
||||||
static void MemManage_Handler(void) __attribute__((naked));
|
|
||||||
static void BusFault_Handler(void) __attribute__((naked));
|
|
||||||
static void UsageFault_Handler(void) __attribute__((naked));
|
|
||||||
static void DebugMon_Handler(void);
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// Forward declaration of the specific IRQ handlers. These are aliased
|
|
||||||
// to the IntDefaultHandler, which is a 'forever' loop. When the application
|
|
||||||
// defines a handler (with the same name), this will automatically take
|
|
||||||
// precedence over these weak definitions
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
void WDT_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void TIMER0_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void TIMER1_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void TIMER2_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void TIMER3_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void UART0_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void UART1_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void UART2_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void UART3_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void PWM1_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void I2C0_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void I2C1_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void I2C2_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void SPI_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void SSP0_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void SSP1_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void PLL0_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void RTC_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void EINT0_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void EINT1_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void EINT2_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void EINT3_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void ADC_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void BOD_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void USB_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void CAN_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void DMA_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void I2S_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void ENET_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void RIT_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void MCPWM_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void QEI_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
void PLL1_IRQHandler(void) ALIAS(IntDefaultHandler);
|
|
||||||
|
|
||||||
extern void xPortSysTickHandler(void);
|
|
||||||
extern void xPortPendSVHandler(void);
|
|
||||||
extern void vPortSVCHandler( void );
|
|
||||||
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// The entry point for the C++ library startup
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
extern WEAK void __libc_init_array(void);
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// The entry point for the application.
|
|
||||||
// __main() is the entry point for redlib based applications
|
|
||||||
// main() is the entry point for newlib based applications
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
extern WEAK void __main(void);
|
|
||||||
extern WEAK void main(void);
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// External declaration for the pointer to the stack top from the Linker Script
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
extern void _vStackTop;
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// The vector table.
|
|
||||||
// This relies on the linker script to place at correct location in memory.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
__attribute__ ((section(".isr_vector")))
|
|
||||||
void (* const g_pfnVectors[])(void) =
|
|
||||||
{
|
|
||||||
// Core Level - CM3
|
|
||||||
(void *)&_vStackTop, // The initial stack pointer
|
|
||||||
Reset_Handler, // The reset handler
|
|
||||||
NMI_Handler, // The NMI handler
|
|
||||||
HardFault_Handler, // The hard fault handler
|
|
||||||
MemManage_Handler, // The MPU fault handler
|
|
||||||
BusFault_Handler, // The bus fault handler
|
|
||||||
UsageFault_Handler, // The usage fault handler
|
|
||||||
0, // Reserved
|
|
||||||
0, // Reserved
|
|
||||||
0, // Reserved
|
|
||||||
0, // Reserved
|
|
||||||
vPortSVCHandler, // SVCall handler
|
|
||||||
DebugMon_Handler, // Debug monitor handler
|
|
||||||
0, // Reserved
|
|
||||||
xPortPendSVHandler, // The PendSV handler
|
|
||||||
xPortSysTickHandler, // The SysTick handler
|
|
||||||
|
|
||||||
// Chip Level - LPC17
|
|
||||||
WDT_IRQHandler, // 16, 0x40 - WDT
|
|
||||||
TIMER0_IRQHandler, // 17, 0x44 - TIMER0
|
|
||||||
TIMER1_IRQHandler, // 18, 0x48 - TIMER1
|
|
||||||
TIMER2_IRQHandler, // 19, 0x4c - TIMER2
|
|
||||||
TIMER3_IRQHandler, // 20, 0x50 - TIMER3
|
|
||||||
UART0_IRQHandler, // 21, 0x54 - UART0
|
|
||||||
UART1_IRQHandler, // 22, 0x58 - UART1
|
|
||||||
UART2_IRQHandler, // 23, 0x5c - UART2
|
|
||||||
UART3_IRQHandler, // 24, 0x60 - UART3
|
|
||||||
PWM1_IRQHandler, // 25, 0x64 - PWM1
|
|
||||||
I2C0_IRQHandler, // 26, 0x68 - I2C0
|
|
||||||
I2C1_IRQHandler, // 27, 0x6c - I2C1
|
|
||||||
I2C2_IRQHandler, // 28, 0x70 - I2C2
|
|
||||||
SPI_IRQHandler, // 29, 0x74 - SPI
|
|
||||||
SSP0_IRQHandler, // 30, 0x78 - SSP0
|
|
||||||
SSP1_IRQHandler, // 31, 0x7c - SSP1
|
|
||||||
PLL0_IRQHandler, // 32, 0x80 - PLL0 (Main PLL)
|
|
||||||
RTC_IRQHandler, // 33, 0x84 - RTC
|
|
||||||
EINT0_IRQHandler, // 34, 0x88 - EINT0
|
|
||||||
EINT1_IRQHandler, // 35, 0x8c - EINT1
|
|
||||||
EINT2_IRQHandler, // 36, 0x90 - EINT2
|
|
||||||
EINT3_IRQHandler, // 37, 0x94 - EINT3
|
|
||||||
ADC_IRQHandler, // 38, 0x98 - ADC
|
|
||||||
BOD_IRQHandler, // 39, 0x9c - BOD
|
|
||||||
USB_IRQHandler, // 40, 0xA0 - USB
|
|
||||||
CAN_IRQHandler, // 41, 0xa4 - CAN
|
|
||||||
DMA_IRQHandler, // 42, 0xa8 - GP DMA
|
|
||||||
I2S_IRQHandler, // 43, 0xac - I2S
|
|
||||||
ENET_IRQHandler, // Ethernet.
|
|
||||||
RIT_IRQHandler, // 45, 0xb4 - RITINT
|
|
||||||
MCPWM_IRQHandler, // 46, 0xb8 - Motor Control PWM
|
|
||||||
QEI_IRQHandler, // 47, 0xbc - Quadrature Encoder
|
|
||||||
PLL1_IRQHandler, // 48, 0xc0 - PLL1 (USB PLL)
|
|
||||||
};
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// The following are constructs created by the linker, indicating where the
|
|
||||||
// the "data" and "bss" segments reside in memory. The initializers for the
|
|
||||||
// for the "data" segment resides immediately following the "text" segment.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
extern unsigned long _etext;
|
|
||||||
extern unsigned long _data;
|
|
||||||
extern unsigned long _edata;
|
|
||||||
extern unsigned long _bss;
|
|
||||||
extern unsigned long _ebss;
|
|
||||||
extern unsigned long __privileged_data_start__;
|
|
||||||
extern unsigned long __privileged_data_end__;
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
// Reset entry point for your code.
|
|
||||||
// Sets up a simple runtime environment and initializes the C/C++
|
|
||||||
// library.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
void Reset_Handler(void)
|
|
||||||
{
|
|
||||||
unsigned long *pulSrc, *pulDest;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Copy the data segment initializers from flash to SRAM.
|
|
||||||
//
|
|
||||||
pulSrc = &_etext;
|
|
||||||
for(pulDest = &_data; pulDest < &_edata; )
|
|
||||||
{
|
|
||||||
*pulDest++ = *pulSrc++;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Zero fill the bss segment. This is done with inline assembly since this
|
|
||||||
// will clear the value of pulDest if it is not kept in a register.
|
|
||||||
//
|
|
||||||
__asm(" ldr r0, =_bss\n"
|
|
||||||
" ldr r1, =_ebss\n"
|
|
||||||
" mov r2, #0\n"
|
|
||||||
" .thumb_func\n"
|
|
||||||
"zero_loop_bss:\n"
|
|
||||||
" cmp r0, r1\n"
|
|
||||||
" it lt\n"
|
|
||||||
" strlt r2, [r0], #4\n"
|
|
||||||
" blt zero_loop_bss");
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Call C++ library initilisation, if present
|
|
||||||
//
|
|
||||||
if (__libc_init_array)
|
|
||||||
__libc_init_array() ;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Call the application's entry point.
|
|
||||||
// __main() is the entry point for redlib based applications (which calls main())
|
|
||||||
// main() is the entry point for newlib based applications
|
|
||||||
//
|
|
||||||
if (__main)
|
|
||||||
__main() ;
|
|
||||||
else
|
|
||||||
main() ;
|
|
||||||
|
|
||||||
//
|
|
||||||
// main() shouldn't return, but if it does, we'll just enter an infinite loop
|
|
||||||
//
|
|
||||||
while (1) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// This is the code that gets called when the processor receives a NMI. This
|
|
||||||
// simply enters an infinite loop, preserving the system state for examination
|
|
||||||
// by a debugger.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
static void NMI_Handler(void)
|
|
||||||
{
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void HardFault_Handler(void)
|
|
||||||
{
|
|
||||||
for( ;; );
|
|
||||||
}
|
|
||||||
|
|
||||||
void pop_registers_from_fault_stack(unsigned int * hardfault_args)
|
|
||||||
{
|
|
||||||
unsigned int stacked_r0;
|
|
||||||
unsigned int stacked_r1;
|
|
||||||
unsigned int stacked_r2;
|
|
||||||
unsigned int stacked_r3;
|
|
||||||
unsigned int stacked_r12;
|
|
||||||
unsigned int stacked_lr;
|
|
||||||
unsigned int stacked_pc;
|
|
||||||
unsigned int stacked_psr;
|
|
||||||
|
|
||||||
stacked_r0 = ((unsigned long) hardfault_args[0]);
|
|
||||||
stacked_r1 = ((unsigned long) hardfault_args[1]);
|
|
||||||
stacked_r2 = ((unsigned long) hardfault_args[2]);
|
|
||||||
stacked_r3 = ((unsigned long) hardfault_args[3]);
|
|
||||||
|
|
||||||
stacked_r12 = ((unsigned long) hardfault_args[4]);
|
|
||||||
stacked_lr = ((unsigned long) hardfault_args[5]);
|
|
||||||
stacked_pc = ((unsigned long) hardfault_args[6]);
|
|
||||||
stacked_psr = ((unsigned long) hardfault_args[7]);
|
|
||||||
|
|
||||||
/* Inspect stacked_pc to locate the offending instruction. */
|
|
||||||
for( ;; );
|
|
||||||
}
|
|
||||||
|
|
||||||
static void MemManage_Handler(void)
|
|
||||||
{
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" tst lr, #4 \n"
|
|
||||||
" ite eq \n"
|
|
||||||
" mrseq r0, msp \n"
|
|
||||||
" mrsne r0, psp \n"
|
|
||||||
" ldr r1, [r0, #24] \n"
|
|
||||||
" ldr r2, handler2_address_const \n"
|
|
||||||
" bx r2 \n"
|
|
||||||
" handler2_address_const: .word pop_registers_from_fault_stack \n"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void BusFault_Handler(void)
|
|
||||||
{
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" tst lr, #4 \n"
|
|
||||||
" ite eq \n"
|
|
||||||
" mrseq r0, msp \n"
|
|
||||||
" mrsne r0, psp \n"
|
|
||||||
" ldr r1, [r0, #24] \n"
|
|
||||||
" ldr r2, handler3_address_const \n"
|
|
||||||
" bx r2 \n"
|
|
||||||
" handler3_address_const: .word pop_registers_from_fault_stack \n"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void UsageFault_Handler(void)
|
|
||||||
{
|
|
||||||
__asm volatile
|
|
||||||
(
|
|
||||||
" tst lr, #4 \n"
|
|
||||||
" ite eq \n"
|
|
||||||
" mrseq r0, msp \n"
|
|
||||||
" mrsne r0, psp \n"
|
|
||||||
" ldr r1, [r0, #24] \n"
|
|
||||||
" ldr r2, handler4_address_const \n"
|
|
||||||
" bx r2 \n"
|
|
||||||
" handler4_address_const: .word pop_registers_from_fault_stack \n"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void DebugMon_Handler(void)
|
|
||||||
{
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// Processor ends up here if an unexpected interrupt occurs or a handler
|
|
||||||
// is not present in the application code.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
static void IntDefaultHandler(void)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Go into an infinite loop.
|
|
||||||
//
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,293 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright 2001, 2002 Georges Menie (www.menie.org)
|
|
||||||
stdarg version contributed by Christian Ettinger
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program 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 Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
putchar is the only external dependency for this file,
|
|
||||||
if you have a working putchar, leave it commented out.
|
|
||||||
If not, uncomment the define below and
|
|
||||||
replace outbyte(c) by your own function call.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define putchar(c) c
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
static void printchar(char **str, int c)
|
|
||||||
{
|
|
||||||
//extern int putchar(int c);
|
|
||||||
|
|
||||||
if (str) {
|
|
||||||
**str = (char)c;
|
|
||||||
++(*str);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(void)putchar(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define PAD_RIGHT 1
|
|
||||||
#define PAD_ZERO 2
|
|
||||||
|
|
||||||
static int prints(char **out, const char *string, int width, int pad)
|
|
||||||
{
|
|
||||||
register int pc = 0, padchar = ' ';
|
|
||||||
|
|
||||||
if (width > 0) {
|
|
||||||
register int len = 0;
|
|
||||||
register const char *ptr;
|
|
||||||
for (ptr = string; *ptr; ++ptr) ++len;
|
|
||||||
if (len >= width) width = 0;
|
|
||||||
else width -= len;
|
|
||||||
if (pad & PAD_ZERO) padchar = '0';
|
|
||||||
}
|
|
||||||
if (!(pad & PAD_RIGHT)) {
|
|
||||||
for ( ; width > 0; --width) {
|
|
||||||
printchar (out, padchar);
|
|
||||||
++pc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for ( ; *string ; ++string) {
|
|
||||||
printchar (out, *string);
|
|
||||||
++pc;
|
|
||||||
}
|
|
||||||
for ( ; width > 0; --width) {
|
|
||||||
printchar (out, padchar);
|
|
||||||
++pc;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* the following should be enough for 32 bit int */
|
|
||||||
#define PRINT_BUF_LEN 12
|
|
||||||
|
|
||||||
static int printi(char **out, int i, int b, int sg, int width, int pad, int letbase)
|
|
||||||
{
|
|
||||||
char print_buf[PRINT_BUF_LEN];
|
|
||||||
register char *s;
|
|
||||||
register int t, neg = 0, pc = 0;
|
|
||||||
register unsigned int u = (unsigned int)i;
|
|
||||||
|
|
||||||
if (i == 0) {
|
|
||||||
print_buf[0] = '0';
|
|
||||||
print_buf[1] = '\0';
|
|
||||||
return prints (out, print_buf, width, pad);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sg && b == 10 && i < 0) {
|
|
||||||
neg = 1;
|
|
||||||
u = (unsigned int)-i;
|
|
||||||
}
|
|
||||||
|
|
||||||
s = print_buf + PRINT_BUF_LEN-1;
|
|
||||||
*s = '\0';
|
|
||||||
|
|
||||||
while (u) {
|
|
||||||
t = (unsigned int)u % b;
|
|
||||||
if( t >= 10 )
|
|
||||||
t += letbase - '0' - 10;
|
|
||||||
*--s = (char)(t + '0');
|
|
||||||
u /= b;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (neg) {
|
|
||||||
if( width && (pad & PAD_ZERO) ) {
|
|
||||||
printchar (out, '-');
|
|
||||||
++pc;
|
|
||||||
--width;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
*--s = '-';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return pc + prints (out, s, width, pad);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int print( char **out, const char *format, va_list args )
|
|
||||||
{
|
|
||||||
register int width, pad;
|
|
||||||
register int pc = 0;
|
|
||||||
char scr[2];
|
|
||||||
|
|
||||||
for (; *format != 0; ++format) {
|
|
||||||
if (*format == '%') {
|
|
||||||
++format;
|
|
||||||
width = pad = 0;
|
|
||||||
if (*format == '\0') break;
|
|
||||||
if (*format == '%') goto out;
|
|
||||||
if (*format == '-') {
|
|
||||||
++format;
|
|
||||||
pad = PAD_RIGHT;
|
|
||||||
}
|
|
||||||
while (*format == '0') {
|
|
||||||
++format;
|
|
||||||
pad |= PAD_ZERO;
|
|
||||||
}
|
|
||||||
for ( ; *format >= '0' && *format <= '9'; ++format) {
|
|
||||||
width *= 10;
|
|
||||||
width += *format - '0';
|
|
||||||
}
|
|
||||||
if( *format == 's' ) {
|
|
||||||
register char *s = (char *)va_arg( args, int );
|
|
||||||
pc += prints (out, s?s:"(null)", width, pad);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if( *format == 'd' ) {
|
|
||||||
pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if( *format == 'x' ) {
|
|
||||||
pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if( *format == 'X' ) {
|
|
||||||
pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if( *format == 'u' ) {
|
|
||||||
pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if( *format == 'c' ) {
|
|
||||||
/* char are converted to int then pushed on the stack */
|
|
||||||
scr[0] = (char)va_arg( args, int );
|
|
||||||
scr[1] = '\0';
|
|
||||||
pc += prints (out, scr, width, pad);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
out:
|
|
||||||
printchar (out, *format);
|
|
||||||
++pc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (out) **out = '\0';
|
|
||||||
va_end( args );
|
|
||||||
return pc;
|
|
||||||
}
|
|
||||||
|
|
||||||
int printf(const char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start( args, format );
|
|
||||||
return print( 0, format, args );
|
|
||||||
}
|
|
||||||
|
|
||||||
int sprintf(char *out, const char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start( args, format );
|
|
||||||
return print( &out, format, args );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int snprintf( char *buf, unsigned int count, const char *format, ... )
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
( void ) count;
|
|
||||||
|
|
||||||
va_start( args, format );
|
|
||||||
return print( &buf, format, args );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef TEST_PRINTF
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
char *ptr = "Hello world!";
|
|
||||||
char *np = 0;
|
|
||||||
int i = 5;
|
|
||||||
unsigned int bs = sizeof(int)*8;
|
|
||||||
int mi;
|
|
||||||
char buf[80];
|
|
||||||
|
|
||||||
mi = (1 << (bs-1)) + 1;
|
|
||||||
printf("%s\n", ptr);
|
|
||||||
printf("printf test\n");
|
|
||||||
printf("%s is null pointer\n", np);
|
|
||||||
printf("%d = 5\n", i);
|
|
||||||
printf("%d = - max int\n", mi);
|
|
||||||
printf("char %c = 'a'\n", 'a');
|
|
||||||
printf("hex %x = ff\n", 0xff);
|
|
||||||
printf("hex %02x = 00\n", 0);
|
|
||||||
printf("signed %d = unsigned %u = hex %x\n", -3, -3, -3);
|
|
||||||
printf("%d %s(s)%", 0, "message");
|
|
||||||
printf("\n");
|
|
||||||
printf("%d %s(s) with %%\n", 0, "message");
|
|
||||||
sprintf(buf, "justif: \"%-10s\"\n", "left"); printf("%s", buf);
|
|
||||||
sprintf(buf, "justif: \"%10s\"\n", "right"); printf("%s", buf);
|
|
||||||
sprintf(buf, " 3: %04d zero padded\n", 3); printf("%s", buf);
|
|
||||||
sprintf(buf, " 3: %-4d left justif.\n", 3); printf("%s", buf);
|
|
||||||
sprintf(buf, " 3: %4d right justif.\n", 3); printf("%s", buf);
|
|
||||||
sprintf(buf, "-3: %04d zero padded\n", -3); printf("%s", buf);
|
|
||||||
sprintf(buf, "-3: %-4d left justif.\n", -3); printf("%s", buf);
|
|
||||||
sprintf(buf, "-3: %4d right justif.\n", -3); printf("%s", buf);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* if you compile this file with
|
|
||||||
* gcc -Wall $(YOUR_C_OPTIONS) -DTEST_PRINTF -c printf.c
|
|
||||||
* you will get a normal warning:
|
|
||||||
* printf.c:214: warning: spurious trailing `%' in format
|
|
||||||
* this line is testing an invalid % at the end of the format string.
|
|
||||||
*
|
|
||||||
* this should display (on 32bit int machine) :
|
|
||||||
*
|
|
||||||
* Hello world!
|
|
||||||
* printf test
|
|
||||||
* (null) is null pointer
|
|
||||||
* 5 = 5
|
|
||||||
* -2147483647 = - max int
|
|
||||||
* char a = 'a'
|
|
||||||
* hex ff = ff
|
|
||||||
* hex 00 = 00
|
|
||||||
* signed -3 = unsigned 4294967293 = hex fffffffd
|
|
||||||
* 0 message(s)
|
|
||||||
* 0 message(s) with %
|
|
||||||
* justif: "left "
|
|
||||||
* justif: " right"
|
|
||||||
* 3: 0003 zero padded
|
|
||||||
* 3: 3 left justif.
|
|
||||||
* 3: 3 right justif.
|
|
||||||
* -3: -003 zero padded
|
|
||||||
* -3: -3 left justif.
|
|
||||||
* -3: -3 right justif.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* To keep linker happy. */
|
|
||||||
int write( int i, char* c, int n)
|
|
||||||
{
|
|
||||||
(void)i;
|
|
||||||
(void)n;
|
|
||||||
(void)c;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,122 +0,0 @@
|
||||||
/*
|
|
||||||
* GENERATED FILE - DO NOT EDIT
|
|
||||||
* (C) Code Red Technologies Ltd, 2008-9
|
|
||||||
* Generated C linker script file for LPC1768
|
|
||||||
* (created from nxp_lpc13_c.ld (v2.0.11 (200907061347)) on Thu Jul 09 12:44:31 BST 2009)
|
|
||||||
*/
|
|
||||||
|
|
||||||
GROUP(libgcc.a libc.a)
|
|
||||||
|
|
||||||
MEMORY
|
|
||||||
{
|
|
||||||
FLASH (rx) : ORIGIN = 0x0 LENGTH = 0x80000
|
|
||||||
SRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 0x8000
|
|
||||||
AHBRAM0 : ORIGIN = 0x2007c000, LENGTH = 0x4000
|
|
||||||
AHBRAM1 : ORIGIN = 0x20080000, LENGTH = 0x4000
|
|
||||||
}
|
|
||||||
|
|
||||||
_vRamTop = ORIGIN( SRAM ) + LENGTH( SRAM );
|
|
||||||
|
|
||||||
/* Variables used by FreeRTOS-MPU. */
|
|
||||||
_Privileged_Functions_Region_Size = 16K;
|
|
||||||
_Privileged_Data_Region_Size = 256;
|
|
||||||
|
|
||||||
__FLASH_segment_start__ = ORIGIN( FLASH );
|
|
||||||
__FLASH_segment_end__ = __FLASH_segment_start__ + LENGTH( FLASH );
|
|
||||||
|
|
||||||
__privileged_functions_start__ = ORIGIN( FLASH );
|
|
||||||
__privileged_functions_end__ = __privileged_functions_start__ + _Privileged_Functions_Region_Size;
|
|
||||||
|
|
||||||
__SRAM_segment_start__ = ORIGIN( SRAM );
|
|
||||||
__SRAM_segment_end__ = __SRAM_segment_start__ + LENGTH( SRAM );
|
|
||||||
|
|
||||||
__privileged_data_start__ = ORIGIN( SRAM );
|
|
||||||
__privileged_data_end__ = ORIGIN( SRAM ) + _Privileged_Data_Region_Size;
|
|
||||||
|
|
||||||
ENTRY(ResetISR)
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
/* Privileged section at the start of the flash - vectors must be first
|
|
||||||
whatever. */
|
|
||||||
privileged_functions :
|
|
||||||
{
|
|
||||||
KEEP(*(.isr_vector))
|
|
||||||
*(privileged_functions)
|
|
||||||
} > FLASH
|
|
||||||
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
/* Non privileged code kept out of the first 16K or flash. */
|
|
||||||
. = __privileged_functions_start__ + _Privileged_Functions_Region_Size;
|
|
||||||
|
|
||||||
*(.text*)
|
|
||||||
*(.rodata*)
|
|
||||||
|
|
||||||
} > FLASH
|
|
||||||
|
|
||||||
|
|
||||||
/* for exception handling/unwind - some Newlib functions (in common with C++ and STDC++) use this. */
|
|
||||||
|
|
||||||
.ARM.extab :
|
|
||||||
{
|
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
|
||||||
} > FLASH
|
|
||||||
|
|
||||||
__exidx_start = .;
|
|
||||||
.ARM.exidx :
|
|
||||||
{
|
|
||||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
|
||||||
} > FLASH
|
|
||||||
__exidx_end = .;
|
|
||||||
|
|
||||||
_etext = .;
|
|
||||||
|
|
||||||
/* zero initialized data */
|
|
||||||
privileged_data :
|
|
||||||
{
|
|
||||||
_bss = .;
|
|
||||||
*(privileged_data)
|
|
||||||
/* Non kernel data is kept out of the first 256 bytes of SRAM. */
|
|
||||||
} > SRAM
|
|
||||||
|
|
||||||
. = ORIGIN( SRAM ) + _Privileged_Data_Region_Size;
|
|
||||||
|
|
||||||
.bss :
|
|
||||||
{
|
|
||||||
*(.bss*)
|
|
||||||
*(COMMON)
|
|
||||||
_ebss = .;
|
|
||||||
} > SRAM
|
|
||||||
|
|
||||||
.data : AT (__exidx_end)
|
|
||||||
{
|
|
||||||
_data = .;
|
|
||||||
*(vtable)
|
|
||||||
*(.data*)
|
|
||||||
_edata = .;
|
|
||||||
} > SRAM
|
|
||||||
|
|
||||||
|
|
||||||
/* Where we put the heap with cr_clib */
|
|
||||||
.cr_heap :
|
|
||||||
{
|
|
||||||
end = .;
|
|
||||||
_pvHeapStart = .;
|
|
||||||
} > SRAM
|
|
||||||
|
|
||||||
/*
|
|
||||||
Note: (ref: M0000066)
|
|
||||||
Moving the stack down by 16 is to work around a GDB bug.
|
|
||||||
This space can be reclaimed for Production Builds.
|
|
||||||
*/
|
|
||||||
_vStackTop = _vRamTop - 16;
|
|
||||||
|
|
||||||
.ETHRAM :
|
|
||||||
{
|
|
||||||
} > AHBRAM0
|
|
||||||
|
|
||||||
.USBRAM :
|
|
||||||
{
|
|
||||||
} > AHBRAM1
|
|
||||||
}
|
|
|
@ -1,82 +0,0 @@
|
||||||
/* Don't need anything here. */
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
int _read_r (struct _reent *r, int file, char * ptr, int len)
|
|
||||||
{
|
|
||||||
( void ) r;
|
|
||||||
( void ) file;
|
|
||||||
( void ) ptr;
|
|
||||||
( void ) len;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
int _lseek_r (struct _reent *r, int file, int ptr, int dir)
|
|
||||||
{
|
|
||||||
( void ) r;
|
|
||||||
( void ) file;
|
|
||||||
( void ) ptr;
|
|
||||||
( void ) dir;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
int _write_r (struct _reent *r, int file, char * ptr, int len)
|
|
||||||
{
|
|
||||||
( void ) r;
|
|
||||||
( void ) file;
|
|
||||||
( void ) ptr;
|
|
||||||
( void ) len;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
int _close_r (struct _reent *r, int file)
|
|
||||||
{
|
|
||||||
( void ) r;
|
|
||||||
( void ) file;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
caddr_t _sbrk_r (struct _reent *r, int incr)
|
|
||||||
{
|
|
||||||
( void ) r;
|
|
||||||
( void ) incr;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
int _fstat_r (struct _reent *r, int file, struct stat * st)
|
|
||||||
{
|
|
||||||
( void ) r;
|
|
||||||
( void ) file;
|
|
||||||
( void ) st;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
int _isatty_r(struct _reent *r, int fd)
|
|
||||||
{
|
|
||||||
( void ) r;
|
|
||||||
( void ) fd;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
* @file: system_LPC17xx.h
|
|
||||||
* @purpose: CMSIS Cortex-M3 Device Peripheral Access Layer Header File
|
|
||||||
* for the NXP LPC17xx Device Series
|
|
||||||
* @version: V1.0
|
|
||||||
* @date: 25. Nov. 2008
|
|
||||||
*----------------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 ARM Limited. All rights reserved.
|
|
||||||
*
|
|
||||||
* ARM Limited (ARM) is supplying this software for use with Cortex-M3
|
|
||||||
* processor based microcontrollers. This file can be freely distributed
|
|
||||||
* within development tools that are supporting such ARM based processors.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
|
||||||
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
|
||||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
|
||||||
* ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __SYSTEM_LPC17xx_H
|
|
||||||
#define __SYSTEM_LPC17xx_H
|
|
||||||
|
|
||||||
extern uint32_t SystemFrequency; /*!< System Clock Frequency (Core Clock) */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the system
|
|
||||||
*
|
|
||||||
* @param none
|
|
||||||
* @return none
|
|
||||||
*
|
|
||||||
* @brief Setup the microcontroller system.
|
|
||||||
* Initialize the System and update the SystemFrequency variable.
|
|
||||||
*/
|
|
||||||
extern void SystemInit (void);
|
|
||||||
#endif
|
|
|
@ -93,7 +93,7 @@ build, this configuration file has all options turned on. */
|
||||||
|
|
||||||
#define configUSE_PREEMPTION 1
|
#define configUSE_PREEMPTION 1
|
||||||
#define configTICK_RATE_HZ ( 1000 )
|
#define configTICK_RATE_HZ ( 1000 )
|
||||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||||
#define configUSE_QUEUE_SETS 1
|
#define configUSE_QUEUE_SETS 1
|
||||||
#define configUSE_IDLE_HOOK 1
|
#define configUSE_IDLE_HOOK 1
|
||||||
#define configUSE_TICK_HOOK 1
|
#define configUSE_TICK_HOOK 1
|
||||||
|
@ -162,12 +162,12 @@ to exclude the API function. */
|
||||||
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
|
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
|
||||||
#define configPRIO_BITS __NVIC_PRIO_BITS
|
#define configPRIO_BITS __NVIC_PRIO_BITS
|
||||||
#else
|
#else
|
||||||
#define configPRIO_BITS 3 /* 7 priority levels */
|
#define configPRIO_BITS 4 /* 15 priority levels */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The lowest interrupt priority that can be used in a call to a "set priority"
|
/* The lowest interrupt priority that can be used in a call to a "set priority"
|
||||||
function. */
|
function. */
|
||||||
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x7
|
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0xf
|
||||||
|
|
||||||
/* The highest interrupt priority that can be used by any interrupt service
|
/* The highest interrupt priority that can be used by any interrupt service
|
||||||
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
|
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
|
||||||
|
@ -191,7 +191,7 @@ standard names. */
|
||||||
|
|
||||||
/* Normal assert() semantics without relying on the provision of an assert.h
|
/* Normal assert() semantics without relying on the provision of an assert.h
|
||||||
header file. */
|
header file. */
|
||||||
#define configASSERT( x ) if( ( x ) == 0UL ) { __asm volatile( "cpsid i" ); for( ;; ); }
|
#define configASSERT( x ) if( ( x ) == 0UL ) { taskENTER_CRITICAL(); for( ;; ); }
|
||||||
|
|
||||||
/* LED not used at present, so just increment a variable to keep a count of the
|
/* LED not used at present, so just increment a variable to keep a count of the
|
||||||
number of times the LED would otherwise have been toggled. */
|
number of times the LED would otherwise have been toggled. */
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -149,9 +149,9 @@
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>1170</LineNumber>
|
<LineNumber>1169</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>1</EnabledFlag>
|
||||||
<Address>37552</Address>
|
<Address>38532</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
|
@ -160,23 +160,7 @@
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
<Filename>C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_MPU_Simulator_Keil_GCC\main.c</Filename>
|
<Filename>C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_MPU_Simulator_Keil_GCC\main.c</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\RTOSDemo\../main.c\1170</Expression>
|
<Expression>\\RTOSDemo\../main.c\1169</Expression>
|
||||||
</Bp>
|
|
||||||
<Bp>
|
|
||||||
<Number>1</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>1162</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>0</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>0</BreakIfRCount>
|
|
||||||
<Filename>C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_MPU_Simulator_Keil_GCC\main.c</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression></Expression>
|
|
||||||
</Bp>
|
</Bp>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
|
@ -265,7 +249,7 @@
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>main_and_config</GroupName>
|
<GroupName>main_and_config</GroupName>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
@ -385,6 +369,18 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>3</GroupNumber>
|
||||||
|
<FileNumber>11</FileNumber>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>..\..\..\Source\portable\Common\mpu_wrappers.c</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>mpu_wrappers.c</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
</ProjectOpt>
|
</ProjectOpt>
|
||||||
|
|
|
@ -334,6 +334,11 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\..\Source\portable\GCC\ARM_CM3_MPU\port.c</FilePath>
|
<FilePath>..\..\..\Source\portable\GCC\ARM_CM3_MPU\port.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>mpu_wrappers.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\Source\portable\Common\mpu_wrappers.c</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
</Groups>
|
</Groups>
|
||||||
|
|
|
@ -397,9 +397,10 @@ int main( void )
|
||||||
xTaskCreateRestricted( &xRegTest2Parameters, NULL );
|
xTaskCreateRestricted( &xRegTest2Parameters, NULL );
|
||||||
xTaskCreateRestricted( &xCheckTaskParameters, NULL );
|
xTaskCreateRestricted( &xCheckTaskParameters, NULL );
|
||||||
|
|
||||||
/* Create a task that does nothing but get deleted. This is done for code
|
/* Create a task that does nothing but ensure some of the MPU API functions
|
||||||
coverage test purposes only. The task's handle is saved in xTaskToDelete
|
can be called correctly, then get deleted. This is done for code coverage
|
||||||
so it can get deleted in the idle task hook. */
|
test purposes only. The task's handle is saved in xTaskToDelete so it can
|
||||||
|
get deleted in the idle task hook. */
|
||||||
xTaskCreateRestricted( &xTaskToDeleteParameters, &xTaskToDelete );
|
xTaskCreateRestricted( &xTaskToDeleteParameters, &xTaskToDelete );
|
||||||
|
|
||||||
/* Create the tasks that are created using the original xTaskCreate() API
|
/* Create the tasks that are created using the original xTaskCreate() API
|
||||||
|
@ -844,6 +845,12 @@ static void prvTaskToDelete( void *pvParameters )
|
||||||
/* Remove compiler warnings about unused parameters. */
|
/* Remove compiler warnings about unused parameters. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
/* Check the enter and exit critical macros are working correctly. If the
|
||||||
|
SVC priority is below configMAX_SYSCALL_INTERRUPT_PRIORITY then this will
|
||||||
|
fault. */
|
||||||
|
taskENTER_CRITICAL();
|
||||||
|
taskEXIT_CRITICAL();
|
||||||
|
|
||||||
/* Exercise the API of various RTOS objects. */
|
/* Exercise the API of various RTOS objects. */
|
||||||
prvExerciseEventGroupAPI();
|
prvExerciseEventGroupAPI();
|
||||||
prvExerciseSemaphoreAPI();
|
prvExerciseSemaphoreAPI();
|
||||||
|
|
1140
FreeRTOS/Source/portable/Common/mpu_wrappers.c
Normal file
1140
FreeRTOS/Source/portable/Common/mpu_wrappers.c
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -160,62 +160,169 @@ typedef struct MPU_SETTINGS
|
||||||
/* Scheduler utilities. */
|
/* Scheduler utilities. */
|
||||||
|
|
||||||
#define portYIELD() __asm volatile ( " SVC %0 \n" :: "i" (portSVC_YIELD) )
|
#define portYIELD() __asm volatile ( " SVC %0 \n" :: "i" (portSVC_YIELD) )
|
||||||
#define portYIELD_WITHIN_API() *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET
|
#define portYIELD_WITHIN_API() \
|
||||||
|
{ \
|
||||||
|
/* Set a PendSV to request a context switch. */ \
|
||||||
|
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; \
|
||||||
|
\
|
||||||
|
/* Barriers are normally not required but do ensure the code is completely \
|
||||||
|
within the specified behaviour for the architecture. */ \
|
||||||
|
__asm volatile( "dsb" ); \
|
||||||
|
__asm volatile( "isb" ); \
|
||||||
|
}
|
||||||
|
|
||||||
#define portNVIC_INT_CTRL ( ( volatile uint32_t *) 0xe000ed04 )
|
#define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) )
|
||||||
#define portNVIC_PENDSVSET 0x10000000
|
#define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
|
||||||
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET
|
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET
|
||||||
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
|
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
/* Critical section management. */
|
/* Critical section management. */
|
||||||
|
|
||||||
/*
|
|
||||||
* Set basepri to portMAX_SYSCALL_INTERRUPT_PRIORITY without effecting other
|
|
||||||
* registers. r0 is clobbered.
|
|
||||||
*/
|
|
||||||
#define portSET_INTERRUPT_MASK() \
|
|
||||||
__asm volatile \
|
|
||||||
( \
|
|
||||||
" mov r0, %0 \n" \
|
|
||||||
" msr basepri, r0 \n" \
|
|
||||||
::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY):"r0" \
|
|
||||||
)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set basepri back to 0 without effective other registers.
|
|
||||||
* r0 is clobbered. FAQ: Setting BASEPRI to 0 is not a bug. Please see
|
|
||||||
* http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html before disagreeing.
|
|
||||||
*/
|
|
||||||
#define portCLEAR_INTERRUPT_MASK() \
|
|
||||||
__asm volatile \
|
|
||||||
( \
|
|
||||||
" mov r0, #0 \n" \
|
|
||||||
" msr basepri, r0 \n" \
|
|
||||||
:::"r0" \
|
|
||||||
)
|
|
||||||
|
|
||||||
/* FAQ: Setting BASEPRI to 0 is not a bug. Please see
|
|
||||||
http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html before disagreeing. */
|
|
||||||
#define portSET_INTERRUPT_MASK_FROM_ISR() 0;portSET_INTERRUPT_MASK()
|
|
||||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) portCLEAR_INTERRUPT_MASK();(void)x
|
|
||||||
|
|
||||||
extern void vPortEnterCritical( void );
|
extern void vPortEnterCritical( void );
|
||||||
extern void vPortExitCritical( void );
|
extern void vPortExitCritical( void );
|
||||||
|
#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortRaiseBASEPRI()
|
||||||
#define portDISABLE_INTERRUPTS() portSET_INTERRUPT_MASK()
|
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortSetBASEPRI(x)
|
||||||
#define portENABLE_INTERRUPTS() portCLEAR_INTERRUPT_MASK()
|
#define portDISABLE_INTERRUPTS() vPortRaiseBASEPRI()
|
||||||
|
#define portENABLE_INTERRUPTS() vPortSetBASEPRI(0)
|
||||||
#define portENTER_CRITICAL() vPortEnterCritical()
|
#define portENTER_CRITICAL() vPortEnterCritical()
|
||||||
#define portEXIT_CRITICAL() vPortExitCritical()
|
#define portEXIT_CRITICAL() vPortExitCritical()
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
/* Task function macros as described on the FreeRTOS.org WEB site. These are
|
||||||
|
not necessary for to use this port. They are defined so the common demo files
|
||||||
|
(which build with all the ports) will build. */
|
||||||
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||||
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* Architecture specific optimisations. */
|
||||||
|
#ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
|
||||||
|
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
|
||||||
|
|
||||||
|
/* Generic helper function. */
|
||||||
|
__attribute__( ( always_inline ) ) static inline uint8_t ucPortCountLeadingZeros( uint32_t ulBitmap )
|
||||||
|
{
|
||||||
|
uint8_t ucReturn;
|
||||||
|
|
||||||
|
__asm volatile ( "clz %0, %1" : "=r" ( ucReturn ) : "r" ( ulBitmap ) );
|
||||||
|
return ucReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check the configuration. */
|
||||||
|
#if( configMAX_PRIORITIES > 32 )
|
||||||
|
#error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Store/clear the ready priorities in a bit map. */
|
||||||
|
#define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )
|
||||||
|
#define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31UL - ( uint32_t ) ucPortCountLeadingZeros( ( uxReadyPriorities ) ) )
|
||||||
|
|
||||||
|
#endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifdef configASSERT
|
||||||
|
void vPortValidateInterruptPriority( void );
|
||||||
|
#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() vPortValidateInterruptPriority()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* portNOP() is not required by this port. */
|
||||||
#define portNOP()
|
#define portNOP()
|
||||||
|
|
||||||
|
#define portINLINE __inline
|
||||||
|
|
||||||
|
#ifndef portFORCE_INLINE
|
||||||
|
#define portFORCE_INLINE inline __attribute__(( always_inline))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set the privilege level to user mode if xRunningPrivileged is false. */
|
||||||
|
portFORCE_INLINE static void vPortResetPrivilege( BaseType_t xRunningPrivileged )
|
||||||
|
{
|
||||||
|
if( xRunningPrivileged != pdTRUE )
|
||||||
|
{
|
||||||
|
__asm volatile ( " mrs r0, control \n" \
|
||||||
|
" orr r0, #1 \n" \
|
||||||
|
" msr control, r0 \n" \
|
||||||
|
:::"r0" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void )
|
||||||
|
{
|
||||||
|
uint32_t ulCurrentInterrupt;
|
||||||
|
BaseType_t xReturn;
|
||||||
|
|
||||||
|
/* Obtain the number of the currently executing interrupt. */
|
||||||
|
__asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) );
|
||||||
|
|
||||||
|
if( ulCurrentInterrupt == 0 )
|
||||||
|
{
|
||||||
|
xReturn = pdFALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xReturn = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return xReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
portFORCE_INLINE static void vPortRaiseBASEPRI( void )
|
||||||
|
{
|
||||||
|
uint32_t ulNewBASEPRI;
|
||||||
|
|
||||||
|
__asm volatile
|
||||||
|
(
|
||||||
|
" mov %0, %1 \n" \
|
||||||
|
" msr basepri, %0 \n" \
|
||||||
|
" isb \n" \
|
||||||
|
" dsb \n" \
|
||||||
|
:"=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void )
|
||||||
|
{
|
||||||
|
uint32_t ulOriginalBASEPRI, ulNewBASEPRI;
|
||||||
|
|
||||||
|
__asm volatile
|
||||||
|
(
|
||||||
|
" mrs %0, basepri \n" \
|
||||||
|
" mov %1, %2 \n" \
|
||||||
|
" msr basepri, %1 \n" \
|
||||||
|
" isb \n" \
|
||||||
|
" dsb \n" \
|
||||||
|
:"=r" (ulOriginalBASEPRI), "=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||||
|
);
|
||||||
|
|
||||||
|
/* This return will not be reached but is necessary to prevent compiler
|
||||||
|
warnings. */
|
||||||
|
return ulOriginalBASEPRI;
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )
|
||||||
|
{
|
||||||
|
__asm volatile
|
||||||
|
(
|
||||||
|
" msr basepri, %0 " :: "r" ( ulNewMaskValue )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue