mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-10 13:45:07 -05:00
Fix mpu simulator demo (#805)
* All for the Demo/Cortex_MPU_Simulator_Keil_GCC GCC demo: + Update the linker script so the project builds now the heap is part of the privileged data. + Add simulator.ini to setup the simulator memory map when the debugger starts to prevent invalid access errors. + Set configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY to 1 in FreeRTOSConfig.h, then fix up resultant build errors. + Set configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS to 0 in FreeRTOSConfig.h, then fix up resultant build errors. * Fix compiler warning in Arm startup file. * Update comments in the file headers to pass the git checkin tests. * Update header comments to pass git checkin tests. * Second attempt to get file header comments correct for the check-in tests. * Third attempt to get the header comments correct. * Fix spelling. * Fix manifest check Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: none <> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
fc9396f576
commit
da3a1371db
17 changed files with 146 additions and 98 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 0fbca6ddabe898f9191c8af1f0285b000d492caf
|
||||
Subproject commit c4f04ea87d044b4a95b18aa8ba50a3e707c603f6
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2bd3f79b4e5070a3e3ec500980e86b5013fdcc62
|
||||
Subproject commit 0289b787b745d0c675fb12ef002574d98d4b402e
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -47,7 +47,8 @@ extern "C" {
|
|||
/* The MPU version of port.c includes and excludes functions depending on the
|
||||
settings within this file. Therefore, to ensure all the functions in port.c
|
||||
build, this configuration file has all options turned on. */
|
||||
|
||||
#define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY 1
|
||||
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configTICK_RATE_HZ ( 1000 )
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||
|
|
@ -57,7 +58,7 @@ build, this configuration file has all options turned on. */
|
|||
#define configCPU_CLOCK_HZ 48000000
|
||||
#define configMAX_PRIORITIES ( 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16 * 1024 ) )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 15 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 10 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
|
|
@ -149,7 +150,7 @@ standard names. */
|
|||
|
||||
/* Normal assert() semantics without relying on the provision of an assert.h
|
||||
header file. */
|
||||
#define configASSERT( x ) if( ( x ) == 0UL ) { portDISABLE_INTERRUPTS(); for( ;; ); }
|
||||
#define configASSERT( x ) if( ( x ) == 0 ) { portDISABLE_INTERRUPTS(); for( ;; ); }
|
||||
|
||||
/* 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. */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<aExt></aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
|
|
@ -101,12 +101,14 @@
|
|||
<sRunDeb>0</sRunDeb>
|
||||
<sLrtime>0</sLrtime>
|
||||
<bEvRecOn>1</bEvRecOn>
|
||||
<bSchkAxf>0</bSchkAxf>
|
||||
<bTchkAxf>0</bTchkAxf>
|
||||
<nTsel>0</nTsel>
|
||||
<sDll></sDll>
|
||||
<sDllPa></sDllPa>
|
||||
<sDlgDll></sDlgDll>
|
||||
<sDlgPa></sDlgPa>
|
||||
<sIfile></sIfile>
|
||||
<sIfile>..\simulator.ini</sIfile>
|
||||
<tDll></tDll>
|
||||
<tDllPa></tDllPa>
|
||||
<tDlgDll></tDlgDll>
|
||||
|
|
@ -115,10 +117,15 @@
|
|||
<pMon>BIN\UL2CM3.DLL</pMon>
|
||||
</DebugOpt>
|
||||
<TargetDriverDllRegistry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>UL2CM3</Key>
|
||||
<Name>-UV1115SAE -O2983 -S0 -C0 -P00 -N00("ARM CoreSight JTAG-DP") -D00(4BA00477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO11 -FC1000 -FD20000000</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGDARM</Key>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=1071,201,1536,501,0)</Name>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=120,153,364,701,0)(1012=856,515,1331,829,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
|
|
@ -140,30 +147,8 @@
|
|||
<Key>DLGUARM</Key>
|
||||
<Name>(105=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>UL2CM3</Key>
|
||||
<Name>-UV1115SAE -O2983 -S0 -C0 -P00 -N00("ARM CoreSight JTAG-DP") -D00(4BA00477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO11 -FN1 -FC1000 -FD20000000 -FF0NEW_DEVICE -FL080000 -FS00 -FP0($$Device:ARMCM4_FP$Device\ARM\Flash\NEW_DEVICE.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>614</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>23164</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>C:\Users\ribarry\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Source\stream_buffer.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\RTOSDemo\../../../Source/stream_buffer.c\614</Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<Breakpoint/>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
|
|
@ -173,14 +158,24 @@
|
|||
<Ww>
|
||||
<count>1</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>pcStatusMessage</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>2</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>ulCycleCount</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>3</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>pxCurrentTCB</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<MemoryWindow1>
|
||||
<Mm>
|
||||
<WinNumber>1</WinNumber>
|
||||
<SubType>2</SubType>
|
||||
<ItemText>0x100000</ItemText>
|
||||
<ItemText>0x20000598</ItemText>
|
||||
<AccSizeX>4</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow1>
|
||||
|
|
@ -190,7 +185,7 @@
|
|||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>1</periodic>
|
||||
<aLwin>0</aLwin>
|
||||
<aLwin>1</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
|
|
@ -207,7 +202,7 @@
|
|||
<aLa>0</aLa>
|
||||
<aPa1>0</aPa1>
|
||||
<AscS4>0</AscS4>
|
||||
<aSer4>1</aSer4>
|
||||
<aSer4>0</aSer4>
|
||||
<StkLoc>0</StkLoc>
|
||||
<TrcWin>0</TrcWin>
|
||||
<newCpu>0</newCpu>
|
||||
|
|
@ -226,18 +221,12 @@
|
|||
<pszMrulep></pszMrulep>
|
||||
<pSingCmdsp></pSingCmdsp>
|
||||
<pMultCmdsp></pMultCmdsp>
|
||||
<DebugDescription>
|
||||
<Enable>1</Enable>
|
||||
<EnableLog>0</EnableLog>
|
||||
<Protocol>2</Protocol>
|
||||
<DbgClock>10000000</DbgClock>
|
||||
</DebugDescription>
|
||||
</TargetOption>
|
||||
</Target>
|
||||
|
||||
<Group>
|
||||
<GroupName>System</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
|
@ -257,7 +246,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>application_and_config</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
|
@ -301,7 +290,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>FreeRTOS_Source</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
<TargetCommonOption>
|
||||
<Device>ARMCM4_FP</Device>
|
||||
<Vendor>ARM</Vendor>
|
||||
<PackID>ARM.CMSIS.5.0.1</PackID>
|
||||
<PackID>ARM.CMSIS.5.8.0</PackID>
|
||||
<PackURL>http://www.keil.com/pack/</PackURL>
|
||||
<Cpu>IROM(0x00000000,0x80000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ESEL ELITTLE</Cpu>
|
||||
<Cpu>IRAM(0x20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ESEL ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0NEW_DEVICE -FS00 -FL080000 -FP0($$Device:ARMCM4_FP$Device\ARM\Flash\NEW_DEVICE.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:ARMCM4_FP$Device\ARM\ARMCM4\Include\ARMCM4_FP.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile>$$Device:ARMCM4_FP$Device\ARM\SVD\ARMCM4.svd</SFDFile>
|
||||
<SFDFile></SFDFile>
|
||||
<bCustSvd>0</bCustSvd>
|
||||
<UseEnv>0</UseEnv>
|
||||
<BinPath></BinPath>
|
||||
|
|
@ -168,6 +168,8 @@
|
|||
<hadXRAM>0</hadXRAM>
|
||||
<uocXRam>0</uocXRam>
|
||||
<RvdsVP>2</RvdsVP>
|
||||
<RvdsMve>0</RvdsMve>
|
||||
<RvdsCdeCp>0</RvdsCdeCp>
|
||||
<hadIRAM2>0</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<OnChipMemories>
|
||||
|
|
@ -209,7 +211,7 @@
|
|||
<IROM>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x80000</Size>
|
||||
<Size>0x40000</Size>
|
||||
</IROM>
|
||||
<XRAM>
|
||||
<Type>0</Type>
|
||||
|
|
@ -362,4 +364,13 @@
|
|||
<files/>
|
||||
</RTE>
|
||||
|
||||
<LayerInfo>
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName>RTOSDemo</LayName>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</LayerInfo>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -607,10 +607,10 @@ volatile uint32_t stacked_psr;
|
|||
( void ) stacked_pc;
|
||||
( void ) stacked_lr;
|
||||
( void ) stacked_r12;
|
||||
( void ) stacked_r0;
|
||||
( void ) stacked_r1;
|
||||
( void ) stacked_r2;
|
||||
( void ) stacked_r3;
|
||||
( void ) stacked_r0;
|
||||
( void ) stacked_r1;
|
||||
( void ) stacked_r2;
|
||||
( void ) stacked_r3;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
@ -619,6 +619,7 @@ void HardFault_Handler( void )
|
|||
{
|
||||
__asm volatile
|
||||
(
|
||||
".align 8 \n"
|
||||
" tst lr, #4 \n"
|
||||
" ite eq \n"
|
||||
" mrseq r0, msp \n"
|
||||
|
|
@ -636,6 +637,7 @@ void MemManage_Handler( void )
|
|||
{
|
||||
__asm volatile
|
||||
(
|
||||
".align 8 \n"
|
||||
" tst lr, #4 \n"
|
||||
" ite eq \n"
|
||||
" mrseq r0, msp \n"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ MEMORY
|
|||
|
||||
/* Variables used by FreeRTOS-MPU. */
|
||||
_Privileged_Functions_Region_Size = 32K;
|
||||
_Privileged_Data_Region_Size = 512;
|
||||
_Privileged_Data_Region_Size = 16384;
|
||||
|
||||
__FLASH_segment_start__ = ORIGIN( ROM );
|
||||
__FLASH_segment_end__ = __FLASH_segment_start__ + LENGTH( ROM );
|
||||
|
|
@ -90,6 +90,10 @@ SECTIONS
|
|||
{
|
||||
. = ALIGN(4);
|
||||
|
||||
/* Place the FreeRTOS System Calls first in the unprivileged region. */
|
||||
__syscalls_flash_start__ = .;
|
||||
*(freertos_system_calls)
|
||||
__syscalls_flash_end__ = .;
|
||||
|
||||
/*
|
||||
* This section is here for convenience, to store the
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Version: V2.0
|
||||
* Date: 16 August 2013
|
||||
*
|
||||
/* Copyright (c) 2011 - 2013 ARM LIMITED
|
||||
* Copyright (c) 2011 - 2013 ARM LIMITED
|
||||
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
<TargetName>RTOSDemo</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>ARMCM4_FP</Device>
|
||||
<Vendor>ARM</Vendor>
|
||||
<PackID>ARM.CMSIS.5.6.0</PackID>
|
||||
<PackID>ARM.CMSIS.5.8.0</PackID>
|
||||
<PackURL>http://www.keil.com/pack/</PackURL>
|
||||
<Cpu>IROM(0x00000000,0x80000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ESEL ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
|
|
@ -185,6 +185,7 @@
|
|||
<uocXRam>0</uocXRam>
|
||||
<RvdsVP>2</RvdsVP>
|
||||
<RvdsMve>0</RvdsMve>
|
||||
<RvdsCdeCp>0</RvdsCdeCp>
|
||||
<hadIRAM2>0</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<StupSel>8</StupSel>
|
||||
|
|
@ -351,7 +352,7 @@
|
|||
<NoWarn>0</NoWarn>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<useXO>0</useXO>
|
||||
<uClangAs>0</uClangAs>
|
||||
<ClangAsOpt>4</ClangAsOpt>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
|
|
|
|||
|
|
@ -20,10 +20,11 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://aws.amazon.com/freertos
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -134,8 +134,13 @@ 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.
|
||||
*
|
||||
* It is not possible to use xTaskCreate() to create an unprivileged task since
|
||||
* heap moved to the privileged data section, so the access tests implemented by
|
||||
* this function are now called from an unprivileged register check task created
|
||||
* using the xTaskCreateRestricted() API.
|
||||
*/
|
||||
static void prvOldStyleUserModeTask( void *pvParameters );
|
||||
static void prvOldStyleUserModeTask( void );
|
||||
|
||||
/*
|
||||
* Prototype for a task created in Privileged mode using the original
|
||||
|
|
@ -258,7 +263,7 @@ stack size is defined in words, not bytes. */
|
|||
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 );
|
||||
PRIVILEGED_DATA 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
|
||||
|
|
@ -332,11 +337,13 @@ 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 );
|
||||
static portSTACK_TYPE xRegTest3Stack[ mainREG_TEST_STACK_SIZE_WORDS ] mainALIGN_TO( mainREG_TEST_STACK_ALIGNMENT );
|
||||
static portSTACK_TYPE xRegTest4Stack[ 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 =
|
||||
{
|
||||
vRegTest1Implementation, /* pvTaskCode - the function that implements the task. */
|
||||
vRegTest1Implementation, /* pvTaskCode - the function that implements the task. */
|
||||
"RegTest1", /* pcName */
|
||||
mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */
|
||||
( void * ) configREG_TEST_TASK_1_PARAMETER, /* pvParameters - this value is just to test that the parameter is being passed into the task correctly. */
|
||||
|
|
@ -353,7 +360,7 @@ static const TaskParameters_t xRegTest1Parameters =
|
|||
|
||||
static TaskParameters_t xRegTest2Parameters =
|
||||
{
|
||||
vRegTest2Implementation, /* pvTaskCode - the function that implements the task. */
|
||||
vRegTest2Implementation, /* 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. */
|
||||
|
|
@ -366,6 +373,40 @@ static TaskParameters_t xRegTest2Parameters =
|
|||
{ 0x00, 0x00, 0x00 }
|
||||
}
|
||||
};
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static const TaskParameters_t xRegTest3Parameters =
|
||||
{
|
||||
prvRegTest3Task, /* pvTaskCode - the function that implements the task. */
|
||||
"RegTest3", /* pcName */
|
||||
mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */
|
||||
( void * ) configREG_TEST_TASK_3_PARAMETER, /* 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. */
|
||||
xRegTest3Stack, /* 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 const TaskParameters_t xRegTest4Parameters =
|
||||
{
|
||||
prvRegTest4Task, /* pvTaskCode - the function that implements the task. */
|
||||
"RegTest4", /* pcName */
|
||||
mainREG_TEST_STACK_SIZE_WORDS, /* usStackDepth */
|
||||
( void * ) configREG_TEST_TASK_4_PARAMETER, /* 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. */
|
||||
xRegTest4Stack, /* 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 }
|
||||
}
|
||||
};
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
/* Configures the task that is deleted. ---------------------*/
|
||||
|
|
@ -419,7 +460,7 @@ int main( void )
|
|||
/* Create three test tasks. Handles to the created tasks are not required,
|
||||
hence the second parameter is NULL. */
|
||||
xTaskCreateRestricted( &xRegTest1Parameters, NULL );
|
||||
xTaskCreateRestricted( &xRegTest2Parameters, NULL );
|
||||
xTaskCreateRestricted( &xRegTest2Parameters, NULL );
|
||||
xTaskCreateRestricted( &xCheckTaskParameters, NULL );
|
||||
|
||||
/* Create a task that does nothing but ensure some of the MPU API functions
|
||||
|
|
@ -428,16 +469,6 @@ int main( void )
|
|||
get deleted in the idle task hook. */
|
||||
xTaskCreateRestricted( &xTaskToDeleteParameters, &xTaskToDelete );
|
||||
|
||||
/* 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. */
|
||||
|
|
@ -448,8 +479,8 @@ int main( void )
|
|||
|
||||
/* Create the third and fourth register check tasks, as described at the top
|
||||
of this file. */
|
||||
xTaskCreate( prvRegTest3Task, "Reg3", configMINIMAL_STACK_SIZE, configREG_TEST_TASK_3_PARAMETER, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTest4Task, "Reg4", configMINIMAL_STACK_SIZE, configREG_TEST_TASK_4_PARAMETER, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreateRestricted( &xRegTest3Parameters, NULL );
|
||||
xTaskCreateRestricted( &xRegTest4Parameters, NULL );
|
||||
|
||||
/* Create and start the software timer. */
|
||||
xTimer = xTimerCreate( "Timer", /* Test name for the timer. */
|
||||
|
|
@ -762,8 +793,12 @@ static void prvTaskToDelete( 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();
|
||||
#if( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 )
|
||||
{
|
||||
taskENTER_CRITICAL();
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Exercise the API of various RTOS objects. */
|
||||
prvExerciseEventGroupAPI();
|
||||
|
|
@ -940,7 +975,7 @@ volatile uint32_t ulReadData;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvOldStyleUserModeTask( void *pvParameters )
|
||||
static void prvOldStyleUserModeTask( void )
|
||||
{
|
||||
/*const volatile uint32_t *pulStandardPeripheralRegister = ( volatile uint32_t * ) 0x40000000;*/
|
||||
volatile const uint32_t *pul;
|
||||
|
|
@ -951,8 +986,6 @@ compiler warnings when the tests that use the variable are also commented out. *
|
|||
/* extern uint32_t __privileged_functions_start__[]; */
|
||||
/* const volatile uint32_t *pulSystemPeripheralRegister = ( volatile uint32_t * ) 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-
|
||||
|
|
@ -996,11 +1029,6 @@ compiler warnings when the tests that use the variable are also commented out. *
|
|||
/*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;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
@ -1199,6 +1227,12 @@ static void prvRegTest3Task( void *pvParameters )
|
|||
in correctly. */
|
||||
if( pvParameters == configREG_TEST_TASK_3_PARAMETER )
|
||||
{
|
||||
/* Run the unprivileged mode access tests that used to be executed
|
||||
form an unprivileged task created using the xTaskCreate() API.
|
||||
Since the heap moved to the privileged data section xTaskCreate() can
|
||||
no longer be used to create unprivileged tasks. */
|
||||
prvOldStyleUserModeTask();
|
||||
|
||||
/* Start the part of the test that is written in assembler. */
|
||||
vRegTest3Implementation();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
MAP 0x00000000, 0x00FFFFFF CLEAR
|
||||
MAP 0x20000000, 0x20FFFFFF CLEAR
|
||||
MAP 0x00000000, 0x0007FFFF READ EXEC
|
||||
MAP 0x20000000, 0x20007FFF READ WRITE EXEC
|
||||
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 475d942d06bc38007e266ce42686842649047041
|
||||
Subproject commit e21b617e4c0516fd64ac7cb1352a7cde81b571bc
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit dfb7cc9b9c680218eef040ac31e31df86b0b57bc
|
||||
Subproject commit 109ef4d0f8973aa4e624cc3a4048c88ea048e0a4
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit d5a10e45958148d437ae5096835a118be58e6df9
|
||||
Subproject commit 356fff8028734dc50a46972b2e315e2871b0a12e
|
||||
10
manifest.yml
10
manifest.yml
|
|
@ -4,7 +4,7 @@ description: "This is the standard distribution of FreeRTOS."
|
|||
|
||||
dependencies:
|
||||
- name: "FreeRTOS-Kernel"
|
||||
version: "d5a10e459"
|
||||
version: "356fff802"
|
||||
repository:
|
||||
type: "git"
|
||||
url: "https://github.com/FreeRTOS/FreeRTOS-Kernel.git"
|
||||
|
|
@ -32,7 +32,7 @@ dependencies:
|
|||
path: "FreeRTOS-Plus/Source/AWS/sigv4"
|
||||
|
||||
- name: "coreHTTP"
|
||||
version: "0fbca6d"
|
||||
version: "v2.1.0"
|
||||
repository:
|
||||
type: "git"
|
||||
url: "https://github.com/FreeRTOS/coreHTTP.git"
|
||||
|
|
@ -116,21 +116,21 @@ dependencies:
|
|||
path: "FreeRTOS-Plus/Source/Application-Protocols/coreSNTP"
|
||||
|
||||
- name: "FreeRTOS-Community-Supported-Demos"
|
||||
version: "475d942"
|
||||
version: "e21b617"
|
||||
repository:
|
||||
type: "git"
|
||||
url: "https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos"
|
||||
path: "FreeRTOS/Demo/ThirdParty/Community-Supported-Demos"
|
||||
|
||||
- name: "FreeRTOS-Partner-Supported-Demos"
|
||||
version: "dfb7cc9"
|
||||
version: "109ef4d"
|
||||
repository:
|
||||
type: "git"
|
||||
url: "https://github.com/FreeRTOS/FreeRTOS-Partner-Supported-Demos"
|
||||
path: "FreeRTOS/Demo/ThirdParty/Partner-Supported-Demos"
|
||||
|
||||
- name: "FreeRTOS-Cellular-Interface"
|
||||
version: "2bd3f79"
|
||||
version: "v1.2.0"
|
||||
repository:
|
||||
type: "git"
|
||||
url: "https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface.git"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue