From 2626713aa4624dde95cdab7ea1c98dc6d71cfebb Mon Sep 17 00:00:00 2001 From: richardbarry Date: Fri, 13 Aug 2010 17:37:36 +0000 Subject: [PATCH] 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 --- .../Debug_RX600_E1_E20_SYSTEM.hdp | Bin 1346 -> 1346 bytes .../RTOSDemo/FreeRTOSConfig.h | 16 ++- .../RX600_RX62N_Renesas/RTOSDemo/RTOSDemo.nav | Bin 56950 -> 59452 bytes .../RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf | 121 +++++++++++++----- Demo/RX600_RX62N_Renesas/RTOSDemo/main.c | 85 +++++++++++- Demo/RX600_RX62N_Renesas/RTOSDemo/resetprg.c | 3 +- 6 files changed, 186 insertions(+), 39 deletions(-) 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 6c68f4ef57e09ec30e6875040acdda80edadc259..d21ff15d2272eab10ba41ee02cf947cf18678e8c 100644 GIT binary patch delta 58 zcmV-A0LA~p3c?DIfB`;{fgY0(0|$}?36mTFHIaaAlTiWRlb-@olQ05rlkozQlkWp7 Qldc0nlY;{*vl;{_0Z`%-(EtDd delta 45 zcmV+|0Mh@$3c?DIfRW^Fk$_~AQ32nRf&y=oFalDO@dA>Q?*l87t^+}ng99tG8U!c- D&1Vtp 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 775e4e25e9e30ae9637609acfa731cb4cfb53d12..e5cb41337c98316851eb44e34a956e7c0c02f80c 100644 GIT binary patch delta 2884 zcmaKuZA?>F7{@s+Z7D*LSy(Y{0beO9_U*pV0V}JZ*3t4j0IhE zYBtfc#KkOb>in|AM0T_63odc{uqDjQ>0D;m7N^OwFN<+6?t^abIj7ue)k~8n=YP)g zd;aISC-+>qH=~}pqSmObwRO9vHH%eFLz5@aCN@WWn>PDGp3c>Id3kDxDF_6S{S{Cy zxH+%_mMDQWssj}zo}ge6iAB^G@Ogx4IV+8;`VcyZr}Ittp}GXUIj;;V+aW5$`6cKu zRs9+ro^w?o5oT*tmNXr#6EIYxNixBgv`g^^`6VjHewt(6fWd_OHNB-Py9Nig$9seB ztzxt@>Tw6~O_vdM)BJauBzg-EYuBi(Z^KZHj?#&Jie?Qu9loVKa$K(~68xSvaSL=G zj>Jh$>et0|PJ=(^WLC;g24n8YP!3L}N+zVw4EHL~2;Js#^-?rQ)N%8RXqYZ><|Qaa zRhQX>l2pB8HliV_E}1LP09AjQ%kYK#3S3q53L4E&HRsa>0gqSox&?Pw-tNhUiey6c zdLt1fN=qnTD5R7x%;bs3rpK6c&a+dKNHq8ukdvn-kti`~S7P!5KCfk?Qnr9(Nxd&a zq@R8@iGlT{g$%63pjn9^^)|OsmNZ}^^(~Z0KjUr?1AEg#26kf5szi`_hes((8gP($ zKOtcMXP*G$UC4kT1}`fSI@m%CH#e_S0<;tet;t@VA75zK|fonhC#J*NK8uU9MXOSBb0*aT=_1+EIec ziVBAY6De2i#2VL16w1!xt|RcVAbfGX9<@`o zq27)x7wvGyJ_-eF7!W}{@o@%JTfrb(kp=7FI8R`PH z7Cv9Z`+7qKnxIP8Sc+m)SsUw7FI5K`jc6xPlGK>YHx@>sZIP|4EhM&2f!(}>bV zQJ)|-`314n-_p8X&cT>-$n90zbE2U0>IwJC?&x@P46YY0AUls-=zeAznxV|f?OU1h?M+f8Gl|zZqXeyRSHOCXlln_hyRg-1&Z9F(`!ee89p`Fs; z_^&GcC$bH`GxK&mH^ z7#T_hvm4A(ba1j9eM;4-$v@JoX-A`xo?f9RnX+cPsi_<|tJ27-m)Ab@iK#{kCw z#{kCw#{kCw#{kCw#{kCw#{$O!#{$O!#{$O!#{$O!#{$Q81IPi$0muQ!0muQ!0muQ! z0muQ!0mlQ!1IGi$1IGi$1IGi$1IP2*wvl6!k4nCvQ_}k%j@M|8LaGDDt~cR{ueHWR zvM;flwGDLlY_Hw1$434I%qAD-Cao;~Wwrw+zPYcje!%@#=9)$8@$g5h@W8h^eCEoj z>}uA)^n^kC>dx>M!=thYd~@d;DbGc1^C+&GYr^R2Z`zsHmK&dQ;X79k$#QtkgM-%# zrP*r_)Y_^0CwDw_;=4E6B-0Pq(EMDwdt(e~jp~2ym$~rp-1m=U5TE?0I9hyzIaL$GUSA2gc&Tn?xFnQt3DrERYIsa^@~E!m zF{y41rBII`YQe`MC$y|Nae&QacVz1etSa|9mDsvYsoR)(Chj3^ekEcOD_xMmG3ItF zwn7ObhhjUFF}kYQ3>B1Q_*4-F<;*QBLZFmUq*4aOjPjMCaFmf-c?gcL<|zk=D&7-F zg7#)`kc)X~N+_hya2(YNu{X^Q78Z%M5m3$OeX0=kS~XO$s7o6NS-gLwO@tFHg7i>2 z2ydS!2BFk+z-)II^UZd%QJ)nZ)4&&$r0)PLAKgs9NDoJg0{l*$tf|e)v1Mjsp3Vw( zuMG6}N?T5Dbc}^oP18J$~TfEj1!XEJ|2N{mUKGU#C~2R(xuxc(qgdP5v2D$*pYlbW%r zp9nR{dlEFb>&{$QQ4uE)2)wuVg4LIxn=IaSDIkf+$MeCz`wH3rS~Co>D1W#U-4Dcg zd*b>!>xWZsEhwAXha;1-;>%FJ{7N&7gA?&MKXp*F8sq3pHt|gV^zj#{BXxBt!(c}F zgpRzKorM3?_qk*c1-+E~7}L-yBR0+BzhM9tFI*6^S_vkUq5920nB7s AD*ylh 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(); -- 2.39.5