From: richardbarry Date: Fri, 13 Aug 2010 17:37:36 +0000 (+0000) Subject: Continue work on RX600 port - work in progress. X-Git-Tag: V6.1.0~92 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2626713aa4624dde95cdab7ea1c98dc6d71cfebb;p=freertos Continue work on RX600 port - work in progress. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1043 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/RX600_RX62N_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp b/Demo/RX600_RX62N_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp index 6c68f4ef5..d21ff15d2 100644 Binary files a/Demo/RX600_RX62N_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp and b/Demo/RX600_RX62N_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp differ diff --git a/Demo/RX600_RX62N_Renesas/RTOSDemo/FreeRTOSConfig.h b/Demo/RX600_RX62N_Renesas/RTOSDemo/FreeRTOSConfig.h index b7490a9db..7d3e46e5a 100644 --- a/Demo/RX600_RX62N_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -75,7 +75,7 @@ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 36 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) -#define configUSE_TRACE_FACILITY 1 +#define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 #define configIDLE_SHOULD_YIELD 1 #define configUSE_CO_ROUTINES 0 @@ -90,6 +90,20 @@ #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) +/* The interrupt priority used by the kernel itself for the tick interrupt and +the pended interrupt. This would normally be the lowest priority. */ +#define configKERNEL_INTERRUPT_PRIORITY 1 + +/* The maximum interrupt priority from which FreeRTOS API calls can be made. +Interrupts that use a priority above this will not be effected by anything the +kernel is doing. */ +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4 + +/* The peripheral used to generate the tick interrupt is configured as part of +the application code. This constant should be set to the vector number of the +peripheral chosen. As supplied this is TMR0. */ +#define configTICK_VECTOR 174 + /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ diff --git a/Demo/RX600_RX62N_Renesas/RTOSDemo/RTOSDemo.nav b/Demo/RX600_RX62N_Renesas/RTOSDemo/RTOSDemo.nav index 775e4e25e..e5cb41337 100644 Binary files a/Demo/RX600_RX62N_Renesas/RTOSDemo/RTOSDemo.nav and b/Demo/RX600_RX62N_Renesas/RTOSDemo/RTOSDemo.nav differ diff --git a/Demo/RX600_RX62N_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf b/Demo/RX600_RX62N_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf index 09eb4da6e..2ef1908eb 100644 --- a/Demo/RX600_RX62N_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf +++ b/Demo/RX600_RX62N_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf @@ -8,6 +8,7 @@ "" [GENERAL_DATA] "FIRST_CONNECTION_TAG" "NO" +"MRULABELS_DATAMANAGER_KEY" "FFFFFFFF|00000000|18b8" "RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_TRUE_STORE_TAG" "{228DB593-0AB2-4EBE-A098-A2CABF094E46}RamMonitorCtrlViews" "0" "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" "" @@ -29,9 +30,9 @@ "{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" "" "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_END_ADDRESS" "" "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_START_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_END_ADDRESS" "" -"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_START_ADDRESS" "" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "18b8" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_END_ADDRESS" "FFFFFFFF" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_START_ADDRESS" "00000000" "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_END_ADDRESS" "" "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_START_ADDRESS" "" "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_MOVE_END_ADDRESS" "" @@ -42,6 +43,44 @@ "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_END_ADDRESS" "" "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_START_ADDRESS" "" "{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryCtrlViews" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0AutoRefreshEnableTopPane" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0AutoRefreshIntervalTopPane" "100" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DataLength" "1" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispAddressTopPane" "6312" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispCode" "42208" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispColumnCount" "16" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispCode" "1" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispFloat" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispLabel" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispRegister" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsRegFollowEnableTopPane" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0LabelWidth" "96" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0Radix" "16" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0RegFollowRegTblIDTopPane" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0RegisterWidth" "96" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0ScrollEndAddress" "-1" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0ScrollStartAddress" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0StartUpSymbolTopPane" "" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewAInstanceKey0" "{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0AutoRefreshEnableTopPane" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0AutoRefreshIntervalTopPane" "100" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DataLength" "1" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispAddressTopPane" "6328" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispCode" "42208" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispColumnCount" "16" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispCode" "1" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispFloat" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispLabel" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispRegister" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsRegFollowEnableTopPane" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0LabelWidth" "96" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0Radix" "16" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0RegFollowRegTblIDTopPane" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0RegisterWidth" "96" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0ScrollEndAddress" "-1" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0ScrollStartAddress" "0" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0StartUpSymbolTopPane" "" +"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewBInstanceKey0" "{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEMViewB" "{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlSaveFileDir" "" "{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlSaveFileName" "" "{4F025ABC-BE66-4CB6-9CEE-06C61418278E}Trace2CtrlViews" "0" @@ -50,32 +89,32 @@ "{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlViews" "0" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "16777216" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "768" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "000000000000AA88" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "00000000FFFF803F" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000AA88" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "000000000000AB8C" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000130000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFFF8CF9" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "000000000008C003" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFFF8498" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "00000000000018B8" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "00000000AAAAAAAA" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "00000000BBBBBBBB" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000CCCCCCCC" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000DDDDDDDD" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "00000000EEEEEEEE" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "00000000FFFFFFFF" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "00000000000018B8" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "000000000000AB84" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030003" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFFF9D04" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000022222222" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFFF84A8" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_24" "0000000000000100" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_25" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "000000000008C006" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "000000000008C007" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "000000000008C000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_25" "1234567887650000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000001630" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000030003" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000066666666" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000077777777" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000088888888" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000099999999" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "26" "{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" "{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" "" @@ -87,7 +126,23 @@ "{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_COMB_BUFFER" ",,,," "{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_SAMPLING_RATE" "1000" "{8A898260-6F1D-11D5-8EB6-00004CC34E9D}WaveformCtrlViews" "0" -"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersCtrlViews" "0" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersCtrlViews" "1" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ColumnWidth" "47,153,52" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_COUNT" "33" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_DISPLAYED" "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0HideFLAGs" "0" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0HideRadix" "0" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0LastFileName" "" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0RadixList" "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,2,16,16,16,16,16,16,16," +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndInstanceKey0" "{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0ColumnWidth" "47,153,35" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0ECX_REGISTER_COUNT" "33" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0ECX_REGISTER_DISPLAYED" "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0HideFLAGs" "0" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0HideRadix" "0" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0LastFileName" "" +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewB0RadixList" "16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,2,16,16,16,16,16,16,16," +"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWndViewBInstanceKey0" "{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEMViewB" "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_ADDRESS_NAME" "" "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_BUFFER" "00000000,00000000,0,0" "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_COLOR" "0,0,0,0" @@ -141,9 +196,11 @@ [WINDOW_POSITION_STATE_DATA_VD1] "Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" "{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 289 0 0 100 100 17 0 "32771|32772|32778|<>|32773|32774|<>" "0.0" -"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 317 0 0 350 200 17 0 "57634|57637|57633|<>|32781|32782|<>|32780|32785|32787" "0.0" -"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 -4 -23 1376 571 9 0 "" "0.0" +"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 307 0 0 350 200 17 0 "57634|57637|57633|<>|32781|32782|<>|32780|32785|32787" "0.0" +"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 22 22 1192 368 10 0 "" "0.0" +"{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.38" 289 0 0 350 200 2065 0 "42202|42203|42204|42233|<>|42206|42205|42230|42229|42207|<>|42208|42209|42210|49076|42228|42227|<>|42231|42232|42234|42235|<>|42211|<>" "0.0" "{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 289 560 340 350 200 18 0 "36756|36757|36758|36759|<>|36746|36747|<>|39531|<>|39500|39534|<>|36687" "0.0" +"{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 307 0 0 350 200 18 0 "" "0.0" "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 280 560 340 350 200 18 0 "" "0.0" "{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" "{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" @@ -170,12 +227,11 @@ [WINDOW_POSITION_STATE_DATA_VD3] [WINDOW_POSITION_STATE_DATA_VD4] [WINDOW_Z_ORDER] -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\portmacro.h" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\main.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\resetprg.c" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\hwsetup.c" +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\FreeRTOSConfig.h" -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\portmacro.h" +"C:\Documents and Settings\barryri\Disassembly" [TARGET_NAME] "RX600 E1/E20 SYSTEM" "" 0 [STATUSBAR_STATEINFO_VD1] @@ -227,4 +283,5 @@ [FLASH_DETAILS] "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" [BREAKPOINTS] +"c:\e\dev\freertos\workingcopy\demo\rx600_rx62n_renesas\rtosdemo\main.c" 183 -29259 1 "{00000000-0000-0000-C000-000000000046}" "" [END] diff --git a/Demo/RX600_RX62N_Renesas/RTOSDemo/main.c b/Demo/RX600_RX62N_Renesas/RTOSDemo/main.c index edf7b2b8a..b9faa45d8 100644 --- a/Demo/RX600_RX62N_Renesas/RTOSDemo/main.c +++ b/Demo/RX600_RX62N_Renesas/RTOSDemo/main.c @@ -51,6 +51,16 @@ licensing and training services. */ +/* + * NOTE 1: The CPU must be in Supervisor mode when the scheduler is started. + * The PowerON_Reset_PC() supplied in resetprg.c with this demo has + * Change_PSW_PM_to_UserMode() commented out to ensure this is the case. +*/ + +/* Hardware specific includes. */ +#include "iodefine.h" +#include "rskrx62ndef.h" + /* Kernel includes. */ #include "FreeRTOS.h" #include "task.h" @@ -87,26 +97,66 @@ void vApplicationIdleHook( void ); */ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); +/* + * The reg test tasks as described at the top of this file. + */ +void vRegTest1Task( void *pvParameters ); +void vRegTest2Task( void *pvParameters ); + /*-----------------------------------------------------------*/ void main(void) { -unsigned long i = 0; extern void HardwareSetup( void ); /* Renesas provided CPU configuration routine. The clocks are configured in here. */ HardwareSetup(); - for( ;; ) - { - i++; - } + /* Start the reg test tasks which test the context switching mechanism. */ + xTaskCreate( vRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + xTaskCreate( vRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); + + /* Start the tasks running. */ + vTaskStartScheduler(); + + /* If all is well we will never reach here as the scheduler will now be + running. If we do reach here then it is likely that there was insufficient + heap available for the idle task to be created. */ + for( ;; ); } /*-----------------------------------------------------------*/ void vApplicationSetupTimerInterrupt( void ) { + /* Cascade two 8bit timer channels to generate the tick interrupt. */ + + /* Enable the timer. */ + SYSTEM.MSTPCRA.BIT.MSTPA5 = 0; + + /* Enable compare match A interrupt request. */ + TMR0.TCR.BIT.CMIEA = 1; + + /* Clear the timer on compare match A. */ + TMR0.TCR.BIT.CCLR = 1; + + /* Set the compare match value. */ + TMR01.TCORA = ( unsigned short ) ( ( ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) -1 ) / 8 ); + + /* 16 bit operation (count from timer 1). */ + TMR0.TCCR.BIT.CSS = 3; + + /* Use PCLK as the input. */ + TMR1.TCCR.BIT.CSS = 1; + + /* Divide PCLK by 8. */ + TMR1.TCCR.BIT.CKS = 2; + + /* Enable TMR 0 */ + ICU.IER[15].BIT.IEN6 = 1; + + /* Ensure the timer interrupt is using the configured kernel priority. */ + ICU.IPR[68].BIT.IPR = configKERNEL_INTERRUPT_PRIORITY; } /*-----------------------------------------------------------*/ @@ -130,9 +180,34 @@ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName of this file. */ void vApplicationIdleHook( void ) { + taskENTER_CRITICAL(); + taskEXIT_CRITICAL(); } /*-----------------------------------------------------------*/ +void vRegTest1Task( void *pvParameters ) +{ +volatile unsigned long ul = 0; + + for( ;; ) + { + ul += 2; + ul -= 1; + } +} +/*-----------------------------------------------------------*/ + +void vRegTest2Task( void *pvParameters ) +{ +volatile unsigned long ul = 0; + + for( ;; ) + { + ul += 4; + ul -= 2; + } +} + diff --git a/Demo/RX600_RX62N_Renesas/RTOSDemo/resetprg.c b/Demo/RX600_RX62N_Renesas/RTOSDemo/resetprg.c index 965d21c1a..6cdf75a27 100644 --- a/Demo/RX600_RX62N_Renesas/RTOSDemo/resetprg.c +++ b/Demo/RX600_RX62N_Renesas/RTOSDemo/resetprg.c @@ -103,7 +103,8 @@ void PowerON_Reset_PC(void) // _CALL_INIT(); // Remove the comment when you use global class object set_psw(PSW_init); // Set Ubit & Ibit for PSW - Change_PSW_PM_to_UserMode(); // Change PSW PMbit (SuperVisor->User) +// Change_PSW_PM_to_UserMode(); // Change PSW PMbit (SuperVisor->User) + ( void ) Change_PSW_PM_to_UserMode; main();