diff --git a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h index 249fc9895..c4a7da88c 100644 --- a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/FreeRTOSConfig.h @@ -93,6 +93,12 @@ #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY ( 3 ) +#define configTIMER_QUEUE_LENGTH 5 +#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) + /* 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 @@ -115,6 +121,8 @@ to exclude the API function. */ #define INCLUDE_uxTaskGetStackHighWaterMark 1 #define INCLUDE_xTaskGetSchedulerState 1 +#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } + extern volatile unsigned long ulHighFrequencyTickCount; #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() portNOP() /* Run time stats use the same timer as the high frequency timer test. */ #define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTickCount diff --git a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.hwp b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.hwp index 5d7f002a0..780e1aba3 100644 --- a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.hwp +++ b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.hwp @@ -159,6 +159,7 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "User" "C source file|FreeRTOS Source|Portable Layer" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "User" "C source file|FreeRTOS Source" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "User" "C source file|FreeRTOS Source" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "User" "C source file|FreeRTOS Source" 2 [FOLDER] "C header file" "C header file" "C source file" "C source file" @@ -224,11 +225,12 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "099d5a320aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "099d5a320aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "099d5a320aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0b0cb036c811cc10" 2 "Preprocess Assembly file" "099d5a320aa5bc10" 2 [OPTIONS_Blinky_GNU Library Generator] "Single Shot" "099d5a320aa5bc10" 1 [OPTIONS_Blinky_GNU Linker] -"Single Shot" "099d5a320aa5bc10" 4 +"Single Shot" "083de136c811cc10" 4 [OPTIONS_Blinky] "" 0 "[V|VERSION|2] [B|DOEXTF|1] [S|INCDIR|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03^"|^"$(CONFIGDIR)^"] [B|RSARCH|1] [B|FIXUPLIBS|1] [S|ARCHIVE|lib$(PROJECTNAME).a*libgcc.a] [S|OUTFORM|BOTH] [B|MFILEGEN|1] [S|PLMFILE|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|OUTFILE|^"$(CONFIGDIR)\$(PROJECTNAME).x^"] [S|GROUPDET|.fvectors|0|0||1|0xFFFFFF80|0|1|0|.fvectors|All-files|<>|<>|<>|.text|0|0||1|0xFFF80000|0|0|0|.text|All-files|<>|0|.text.*|All-files|<>|0|P|All-files|<>|1|etext|<>|<>|<>|.rvectors|0|0||0||0|1|1|_rvectors_start|<>|0|.rvectors|All-files|<>|1|_rvectors_end|<>|<>|<>|.init|0|0||0||0|0|0|.init|All-files|<>|<>|<>|.fini|0|0||0||0|0|0|.fini|All-files|<>|<>|<>|.got|0|0||0||0|0|0|.got|All-files|<>|0|.got.plt|All-files|<>|<>|<>|.rodata|0|0||0||0|0|0|.rodata|All-files|<>|0|.rodata.*|All-files|<>|0|C_1|All-files|<>|0|C_2|All-files|<>|0|C|All-files|<>|1|_erodata|<>|<>|<>|.eh_frame_hdr|0|0||0||0|0|0|.eh_frame_hdr|All-files|<>|<>|<>|.eh_frame|0|0||0||0|0|0|.eh_frame|All-files|<>|<>|<>|.jcr|0|0||0||0|0|0|.jcr|All-files|<>|<>|<>|.tors|0|0||0||0|0|1|__CTOR_LIST__|<>|1|___ctors|<>|0|.ctors|All-files|<>|1|___ctors_end|<>|1|__CTOR_END__|<>|1|__DTOR_LIST__|<>|1|___dtors|<>|0|.dtors|All-files|<>|1|___dtors_end|<>|1|__DTOR_END__|<>|1|_mdata|<>|<>|<>|.istack|0|0||1|0x00017FFC|0|0|1|_istack|<>|<>|<>|.ustack|0|0||1|0x000179BC|0|0|1|_ustack|<>|<>|<>|.data|0|2|_mdata|1|0x00001000|0|0|1|_data|<>|0|.data|All-files|<>|0|.data.*|All-files|<>|0|D|All-files|<>|0|D_1|All-files|<>|0|D_2|All-files|<>|1|_edata|<>|<>|<>|.gcc_exc|0|0||0||0|0|0|.gcc_exc|All-files|<>|<>|<>|.bss|0|0||0||0|0|1|_bss|<>|0|.bss|All-files|<>|0|.bss.*|All-files|<>|0|COMMON|All-files|<>|0|B|All-files|<>|0|B_1|All-files|<>|0|B_2|All-files|<>|1|_ebss|<>|1|_end|<>|<>|<>|] [S|APPTXT|^"-e _start^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] [B|DOPROJBUILT|1] @@ -309,11 +311,12 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "0adae9320aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0adae9320aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0adae9320aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0b0cb036c811cc10" 2 "Preprocess Assembly file" "0adae9320aa5bc10" 2 [OPTIONS_Debug_GNU Library Generator] "Single Shot" "0adae9320aa5bc10" 1 [OPTIONS_Debug_GNU Linker] -"Single Shot" "097f0a320aa5bc10" 4 +"Single Shot" "083de136c811cc10" 4 [OPTIONS_Debug] "" 0 "[V|VERSION|2] [B|DOEXTF|1] [S|INCDIR|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03^"|^"$(CONFIGDIR)^"] [B|RSARCH|1] [B|FIXUPLIBS|1] [S|ARCHIVE|libgcc.a*lib$(PROJECTNAME).a] [S|OUTFORM|BOTH] [B|MFILEGEN|1] [S|PLMFILE|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|OUTFILE|^"$(CONFIGDIR)\$(PROJECTNAME).x^"] [S|GROUPDET|.fvectors|0|0||1|0xFFFFFF80|0|1|0|.fvectors|All-files|<>|<>|<>|.text|0|0||1|0xFFF80000|0|0|0|.text|All-files|<>|0|.text.*|All-files|<>|0|P|All-files|<>|1|etext|<>|<>|<>|.rvectors|0|0||0||0|1|1|_rvectors_start|<>|0|.rvectors|All-files|<>|1|_rvectors_end|<>|<>|<>|.init|0|0||0||0|0|0|.init|All-files|<>|<>|<>|.fini|0|0||0||0|0|0|.fini|All-files|<>|<>|<>|.got|0|0||0||0|0|0|.got|All-files|<>|0|.got.plt|All-files|<>|<>|<>|.rodata|0|0||0||0|0|0|.rodata|All-files|<>|0|.rodata.*|All-files|<>|0|C_1|All-files|<>|0|C_2|All-files|<>|0|C|All-files|<>|1|_erodata|<>|<>|<>|.eh_frame_hdr|0|0||0||0|0|0|.eh_frame_hdr|All-files|<>|<>|<>|.eh_frame|0|0||0||0|0|0|.eh_frame|All-files|<>|<>|<>|.jcr|0|0||0||0|0|0|.jcr|All-files|<>|<>|<>|.tors|0|0||0||0|0|1|__CTOR_LIST__|<>|1|___ctors|<>|0|.ctors|All-files|<>|1|___ctors_end|<>|1|__CTOR_END__|<>|1|__DTOR_LIST__|<>|1|___dtors|<>|0|.dtors|All-files|<>|1|___dtors_end|<>|1|__DTOR_END__|<>|1|_mdata|<>|<>|<>|.istack|0|0||1|0x00017FFC|0|0|1|_istack|<>|<>|<>|.ustack|0|0||1|0x000179BC|0|0|1|_ustack|<>|<>|<>|.data|0|2|_mdata|1|0x00001000|0|0|1|_data|<>|0|.data|All-files|<>|0|.data.*|All-files|<>|0|D|All-files|<>|0|D_1|All-files|<>|0|D_2|All-files|<>|1|_edata|<>|<>|<>|.gcc_exc|0|0||0||0|0|0|.gcc_exc|All-files|<>|<>|<>|.bss|0|0||0||0|0|1|_bss|<>|0|.bss|All-files|<>|0|.bss.*|All-files|<>|0|COMMON|All-files|<>|0|B|All-files|<>|0|B_1|All-files|<>|0|B_2|All-files|<>|1|_ebss|<>|1|_end|<>|<>|<>|] [B|WONCEU|1] [B|OUTTRAD|1] [S|APPTXT|^"-e _start^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] [B|DOPROJBUILT|1] @@ -370,11 +373,12 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "08328a320aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "08328a320aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "08328a320aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0b0cb036c811cc10" 2 "Preprocess Assembly file" "08328a320aa5bc10" 2 [OPTIONS_Debug_RX600_E1_E20_SYSTEM_GNU Library Generator] "Single Shot" "08328a320aa5bc10" 1 [OPTIONS_Debug_RX600_E1_E20_SYSTEM_GNU Linker] -"Single Shot" "0849aa320aa5bc10" 4 +"Single Shot" "083de136c811cc10" 4 [OPTIONS_Debug_RX600_E1_E20_SYSTEM] "" 0 "[V|VERSION|2] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [I|DEBUGLV|2] [B|LINCHLS|1] [B|LINCASS|1] [B|LINCSYM|1] [S|LFILE|^"$(CONFIGDIR)\$(FILELEAF).^"] [S|PROJECTTYPE|CAPPPROJECT] [S|INCDIR|^"$(PROJDIR)^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] " 3 @@ -427,11 +431,12 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "020673517aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "020673517aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "020673517aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0b0cb036c811cc10" 2 "Preprocess Assembly file" "020673517aa5bc10" 2 [OPTIONS_Debug_with_optimisation_GNU Library Generator] "Single Shot" "097f0a320aa5bc10" 1 [OPTIONS_Debug_with_optimisation_GNU Linker] -"Single Shot" "09863a320aa5bc10" 4 +"Single Shot" "083de136c811cc10" 4 [OPTIONS_Debug_with_optimisation] "" 0 "[V|VERSION|2] [B|DOEXTF|1] [S|INCDIR|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03^"|^"$(CONFIGDIR)^"] [B|RSARCH|1] [B|FIXUPLIBS|1] [S|ARCHIVE|lib$(PROJECTNAME).a*libgcc.a] [S|OUTFORM|BOTH] [B|MFILEGEN|1] [S|PLMFILE|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|OUTFILE|^"$(CONFIGDIR)\$(PROJECTNAME).x^"] [S|GROUPDET|.fvectors|0|0||1|0xFFFFFF80|0|1|0|.fvectors|All-files|<>|<>|<>|.text|0|0||1|0xFFF80000|0|0|0|.text|All-files|<>|0|.text.*|All-files|<>|0|P|All-files|<>|1|etext|<>|<>|<>|.rvectors|0|0||0||0|1|1|_rvectors_start|<>|0|.rvectors|All-files|<>|1|_rvectors_end|<>|<>|<>|.init|0|0||0||0|0|0|.init|All-files|<>|<>|<>|.fini|0|0||0||0|0|0|.fini|All-files|<>|<>|<>|.got|0|0||0||0|0|0|.got|All-files|<>|0|.got.plt|All-files|<>|<>|<>|.rodata|0|0||0||0|0|0|.rodata|All-files|<>|0|.rodata.*|All-files|<>|0|C_1|All-files|<>|0|C_2|All-files|<>|0|C|All-files|<>|1|_erodata|<>|<>|<>|.eh_frame_hdr|0|0||0||0|0|0|.eh_frame_hdr|All-files|<>|<>|<>|.eh_frame|0|0||0||0|0|0|.eh_frame|All-files|<>|<>|<>|.jcr|0|0||0||0|0|0|.jcr|All-files|<>|<>|<>|.tors|0|0||0||0|0|1|__CTOR_LIST__|<>|1|___ctors|<>|0|.ctors|All-files|<>|1|___ctors_end|<>|1|__CTOR_END__|<>|1|__DTOR_LIST__|<>|1|___dtors|<>|0|.dtors|All-files|<>|1|___dtors_end|<>|1|__DTOR_END__|<>|1|_mdata|<>|<>|<>|.istack|0|0||1|0x00017FFC|0|0|1|_istack|<>|<>|<>|.ustack|0|0||1|0x000179BC|0|0|1|_ustack|<>|<>|<>|.data|0|2|_mdata|1|0x00001000|0|0|1|_data|<>|0|.data|All-files|<>|0|.data.*|All-files|<>|0|D|All-files|<>|0|D_1|All-files|<>|0|D_2|All-files|<>|1|_edata|<>|<>|<>|.gcc_exc|0|0||0||0|0|0|.gcc_exc|All-files|<>|<>|<>|.bss|0|0||0||0|0|1|_bss|<>|0|.bss|All-files|<>|0|.bss.*|All-files|<>|0|COMMON|All-files|<>|0|B|All-files|<>|0|B_1|All-files|<>|0|B_2|All-files|<>|1|_ebss|<>|1|_end|<>|<>|<>|] [S|APPTXT|^"-e _start^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] [B|DOPROJBUILT|1] diff --git a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.nav b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.nav index 31df56a75..f53607514 100644 Binary files a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.nav and b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.nav differ diff --git a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.tps b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.tps index fa61cca1f..dd7288e79 100644 --- a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.tps +++ b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/RTOSDemo.tps @@ -11,7 +11,7 @@ "Debug_RX600_E1_E20_SYSTEM" "Debug_with_optimisation" [CURRENT_CONFIGURATION] -"Debug_with_optimisation" +"Debug" [CURRENT_SESSION] "SessionRX600_E1_E20_SYSTEM" [GENERAL_DATA_PROJECT] @@ -21,7 +21,7 @@ "DefaultSession" "SessionRX600_E1_E20_SYSTEM" [GENERAL_DATA_CONFIGURATION_Debug] -"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE" +"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE" [SESSIONS_Debug] "DefaultSession" "SessionRX600_E1_E20_SYSTEM" diff --git a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf index d84bc7a5e..8f6b59b09 100644 --- a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf +++ b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf @@ -104,32 +104,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" "000000000000B0FC" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "000000000000C504" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "000000000000C518" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "000000000000C514" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "000000000000C510" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "000000000000C50C" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000042900000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "000000000000C51C" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000B0FC" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000017FE0" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "000000000000BBB0" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "000000000000C9BC" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000004" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000041180000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000BBB0" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000017FA0" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF9135E" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF92768" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF8B898" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF8E908" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000080000000" "{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" "1234567887650000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "000000000000BBB0" "{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" "000000000000C508" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "26" "{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" "{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" "" @@ -209,7 +209,7 @@ "{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlPortBaudIndex" "0" "{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlPortName" "" "{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlSendDataTimeout" "50" -"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlViews" "0" +"{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleCtrlViews" "1" "{B39CE26B-928D-4241-BF8F-E15980C81200}DebugConsoleWndInstanceKey0" "{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "{B6AE2E1F-5221-4A44-91C2-8C3097B41A69}StartStopCheckAfter" "0" "{B6AE2E1F-5221-4A44-91C2-8C3097B41A69}StartStopCheckBefore" "0" @@ -222,7 +222,7 @@ "{EEDC9300-6FBE-11D5-8613-00A024591A38}LocalsCtrlViews" "0" "{EEDC9301-6FBE-11D5-8613-00A024591A38}StackTraceCtrlViews" "0" "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlIOFile" "" -"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileDir" "" +"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileDir" "$(CONFIGDIR)" "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileName" "" "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlViews" "0" "{F923CED3-3318-4B43-B931-0AE76B289176}TaskTraceCtrlAnalyzeViews" "0" @@ -240,10 +240,10 @@ 0 [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" 400 0 0 100 100 17 0 "32771|32772|32778|<>|32773|32774|<>" "0.0" +"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 372 0 0 100 100 17 0 "32771|32772|32778|<>|32773|32774|<>" "0.0" "{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 5 0 "1.00" 146 0 0 350 200 17 0 "57634|57637|57633|<>|32781|32782|<>|32780|32785|32787" "0.0" "{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.27" 252 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" 400 560 340 350 200 18 0 "36756|36757|36758|36759|<>|36746|36747|<>|39531|<>|39500|39534|<>|36687" "0.0" +"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 372 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" 413 0 0 350 200 2065 0 "" "0.0" "{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 441 0 0 853 610 17 0 "32781|32783|<>|32771|32829|32772|32827|32773|<>|32786|<>|32810|32811" "0.0" "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 342 560 340 350 200 18 0 "" "0.0" @@ -273,6 +273,7 @@ [WINDOW_POSITION_STATE_DATA_VD4] [WINDOW_Z_ORDER] "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_GNURX\RTOSDemo\main-full.c" +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_GNURX\RTOSDemo\main-blinky.c" [TARGET_NAME] "RX600 Segger J-Link" "" 0 [STATUSBAR_STATEINFO_VD1] diff --git a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c index 1521ef895..847c9cbe3 100644 --- a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c +++ b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/uIP_Task.c @@ -57,7 +57,8 @@ /* Scheduler includes. */ #include "FreeRTOS.h" #include "task.h" -#include "semphr.h" +#include "timers.h" +#include "queue.h" /* uip includes. */ #include "net/uip.h" @@ -81,6 +82,15 @@ /* Standard constant. */ #define uipTOTAL_FRAME_HEADER_SIZE 54 +/* The ARP timer and the periodic timer share a callback function, so the +respective timer IDs are used to determine which timer actually expired. These +constants are assigned to the timer IDs. */ +#define uipARP_TIMER 0 +#define uipPERIODIC_TIMER 1 + +/* A block time of zero ticks simply means, "don't block". */ +#define uipDONT_BLOCK 0UL + /*-----------------------------------------------------------*/ /* @@ -88,25 +98,29 @@ */ static void prvSetMACAddress( void ); +/* + * Perform any uIP initialisation necessary. + */ +static void prvInitialise_uIP( void ); + +/* + * The callback function that is assigned to both the periodic timer and the + * ARP timer. + */ +static void prvUIPTimerCallback( xTimerHandle xTimer ); + /* * Port functions required by the uIP stack. */ -void clock_init( void ); clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ -/* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +/* The queue used to send TCP/IP events to the uIP stack. */ +xQueueHandle xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ -void clock_init(void) -{ - /* This is done when the scheduler starts. */ -} -/*-----------------------------------------------------------*/ - clock_time_t clock_time( void ) { return xTaskGetTickCount(); @@ -115,25 +129,14 @@ clock_time_t clock_time( void ) void vuIP_Task( void *pvParameters ) { -portBASE_TYPE i, xDoneSomething; -uip_ipaddr_t xIPAddr; -struct timer periodic_timer, arp_timer; +portBASE_TYPE i; +unsigned long ulNewEvent = 0UL; +unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ - timer_set( &periodic_timer, configTICK_RATE_HZ / 2 ); - timer_set( &arp_timer, configTICK_RATE_HZ * 10 ); - uip_init(); - uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - uip_sethostaddr( &xIPAddr ); - uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); - uip_setnetmask( &xIPAddr ); - prvSetMACAddress(); - httpd_init(); - - /* Create the semaphore used to wake the uIP task. */ - vSemaphoreCreateBinary( xEMACSemaphore ); + prvInitialise_uIP(); /* Initialise the MAC. */ vInitEmac(); @@ -145,49 +148,51 @@ struct timer periodic_timer, arp_timer; for( ;; ) { - xDoneSomething = pdFALSE; - - /* Is there received data ready to be processed? */ - uip_len = ( unsigned short ) ulEMACRead(); - - if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) - { - /* Standard uIP loop taken from the uIP manual. */ - if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) + if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) + { + /* Is there received data ready to be processed? */ + uip_len = ( unsigned short ) ulEMACRead(); + + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { - uip_arp_ipin(); - uip_input(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) + /* Standard uIP loop taken from the uIP manual. */ + if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) { - uip_arp_out(); - vEMACWrite(); + uip_arp_ipin(); + uip_input(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + uip_arp_out(); + vEMACWrite(); + } + } + else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + { + uip_arp_arpin(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + vEMACWrite(); + } } - - xDoneSomething = pdTRUE; } - else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + else { - uip_arp_arpin(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - vEMACWrite(); - } - - xDoneSomething = pdTRUE; + ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - - if( timer_expired( &periodic_timer ) && ( uip_buf != NULL ) ) + + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { - timer_reset( &periodic_timer ); + ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -201,25 +206,82 @@ struct timer periodic_timer, arp_timer; vEMACWrite(); } } - - /* Call the ARP timer function every 10 seconds. */ - if( timer_expired( &arp_timer ) ) - { - timer_reset( &arp_timer ); - uip_arp_timer(); - } - - xDoneSomething = pdTRUE; } - if( xDoneSomething == pdFALSE ) + /* Call the ARP timer function every 10 seconds. */ + if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { - /* We did not receive a packet, and there was no periodic - processing to perform. Block for a fixed period. If a packet - is received during this period we will be woken by the ISR - giving us the Semaphore. */ - xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 20 ); + ulUIP_Events &= ~uipARP_TIMER_EVENT; + uip_arp_timer(); } + + if( ulUIP_Events == pdFALSE ) + { + xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); + ulUIP_Events |= ulNewEvent; + } + } +} +/*-----------------------------------------------------------*/ + +static void prvInitialise_uIP( void ) +{ +xTimerHandle xARPTimer, xPeriodicTimer; +uip_ipaddr_t xIPAddr; +const unsigned long ul_uIPEventQueueLength = 10UL; + + /* Initialise the uIP stack. */ + uip_init(); + uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); + uip_sethostaddr( &xIPAddr ); + uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); + uip_setnetmask( &xIPAddr ); + prvSetMACAddress(); + httpd_init(); + + /* Create the queue used to sent TCP/IP events to the uIP stack. */ + xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); + + /* Create and start the uIP timers. */ + xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + pdTRUE, /* Autor-reload. */ + ( void * ) uipARP_TIMER, + prvUIPTimerCallback + ); + + xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + ( 500 / portTICK_RATE_MS ), + pdTRUE, /* Autor-reload. */ + ( void * ) uipPERIODIC_TIMER, + prvUIPTimerCallback + ); + + configASSERT( xARPTimer ); + configASSERT( xPeriodicTimer ); + + xTimerStart( xARPTimer, portMAX_DELAY ); + xTimerStart( xPeriodicTimer, portMAX_DELAY ); +} +/*-----------------------------------------------------------*/ + +static void prvUIPTimerCallback( xTimerHandle xTimer ) +{ +static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; +static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; + + /* This is a time callback, so calls to xQueueSend() must not attempt to + block. */ + switch( ( int ) pvTimerGetTimerID( xTimer ) ) + { + case uipARP_TIMER : xQueueSend( xEMACEventQueue, &ulARPTimerExpired, uipDONT_BLOCK ); + break; + + case uipPERIODIC_TIMER : xQueueSend( xEMACEventQueue, &ulPeriodicTimerExpired, uipDONT_BLOCK ); + break; + + default : /* Should not get here. */ + break; } } /*-----------------------------------------------------------*/ diff --git a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c index bf63bb659..945796ab5 100644 --- a/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c +++ b/Demo/RX600_RX62N-RDK_GNURX/RTOSDemo/webserver/EMAC.c @@ -242,23 +242,29 @@ unsigned long ulBytesReceived; if( ulBytesReceived > 0 ) { - pxCurrentRxDesc->status &= ~( FP1 | FP0 ); - pxCurrentRxDesc->status |= ACT; + /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to + the buffer that contains the received data. */ + prvReturnBuffer( uip_buf ); + /* Point uip_buf to the data about ot be processed. */ + uip_buf = ( void * ) pxCurrentRxDesc->buf_p; + + /* Allocate a new buffer to the descriptor, as uip_buf is now using it's + old descriptor. */ + pxCurrentRxDesc->buf_p = ( char * ) prvGetNextBuffer(); + + /* Prepare the descriptor to go again. */ + pxCurrentRxDesc->status &= ~( FP1 | FP0 ); + pxCurrentRxDesc->status |= ACT; + + /* Move onto the next buffer in the ring. */ + pxCurrentRxDesc = pxCurrentRxDesc->next; + if( EDMAC.EDRRR.LONG == 0x00000000L ) { /* Restart Ethernet if it has stopped */ EDMAC.EDRRR.LONG = 0x00000001L; } - - /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to - the buffer that contains the received data. */ - prvReturnBuffer( uip_buf ); - - uip_buf = ( void * ) pxCurrentRxDesc->buf_p; - - /* Move onto the next buffer in the ring. */ - pxCurrentRxDesc = pxCurrentRxDesc->next; } return ulBytesReceived; @@ -517,6 +523,7 @@ static void prvConfigureEtherCAndEDMAC( void ) EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */ EDMAC.FDR.LONG = 0x00000000; /* Transmit fifo & receive fifo is 256 bytes */ EDMAC.RMCR.LONG = 0x00000003; /* Receive function is normal mode(continued) */ + ETHERC.ECMR.BIT.PRM = 0; /* Ensure promiscuous mode is off. */ /* Enable the interrupt... */ _IEN( _ETHER_EINT ) = 1; @@ -527,8 +534,8 @@ void vEMAC_ISR_Handler( void ) { unsigned long ul = EDMAC.EESR.LONG; long lHigherPriorityTaskWoken = pdFALSE; -extern xSemaphoreHandle xEMACSemaphore; -static long ulTxEndInts = 0; +extern xQueueHandle xEMACEventQueue; +const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; /* Re-enabled interrupts. */ __asm volatile( "SETPSW I" ); @@ -536,13 +543,8 @@ static long ulTxEndInts = 0; /* Has a Tx end occurred? */ if( ul & emacTX_END_INTERRUPT ) { - ++ulTxEndInts; - if( ulTxEndInts >= 2 ) - { - /* Only return the buffer to the pool once both Txes have completed. */ - prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); - ulTxEndInts = 0; - } + /* Only return the buffer to the pool once both Txes have completed. */ + prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); EDMAC.EESR.LONG = emacTX_END_INTERRUPT; } @@ -550,7 +552,7 @@ static long ulTxEndInts = 0; if( ul & emacRX_END_INTERRUPT ) { /* Make sure the Ethernet task is not blocked waiting for a packet. */ - xSemaphoreGiveFromISR( xEMACSemaphore, &lHigherPriorityTaskWoken ); + xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken ); portYIELD_FROM_ISR( lHigherPriorityTaskWoken ); EDMAC.EESR.LONG = emacRX_END_INTERRUPT; } diff --git a/Demo/RX600_RX62N-RDK_GNURX/RX600_RX62N_RDK_GNURX.tws b/Demo/RX600_RX62N-RDK_GNURX/RX600_RX62N_RDK_GNURX.tws index be1f60a3f..1b881c695 100644 --- a/Demo/RX600_RX62N-RDK_GNURX/RX600_RX62N_RDK_GNURX.tws +++ b/Demo/RX600_RX62N-RDK_GNURX/RX600_RX62N_RDK_GNURX.tws @@ -7,9 +7,11 @@ [GENERAL_DATA] [BREAKPOINTS] [OPEN_WORKSPACE_FILES] +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_GNURX\RTOSDemo\main-blinky.c" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_GNURX\RTOSDemo\main-full.c" [WORKSPACE_FILE_STATES] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_GNURX\RTOSDemo\main-full.c" -4 -23 1314 460 1 0 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_GNURX\RTOSDemo\main-blinky.c" 66 66 1174 329 0 1 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_GNURX\RTOSDemo\main-full.c" -4 -23 1314 488 1 0 [LOADED_PROJECTS] "RTOSDemo" [END] diff --git a/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h b/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h index 7cb94b7d7..17d4fc2f1 100644 --- a/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N-RDK_IAR/FreeRTOSConfig.h @@ -93,6 +93,11 @@ #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY ( 3 ) +#define configTIMER_QUEUE_LENGTH 5 +#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) /* The interrupt priority used by the kernel itself for the tick interrupt and diff --git a/Demo/RX600_RX62N-RDK_IAR/RTOSDemo.ewp b/Demo/RX600_RX62N-RDK_IAR/RTOSDemo.ewp index b8d0cbc26..6350bd8d7 100644 --- a/Demo/RX600_RX62N-RDK_IAR/RTOSDemo.ewp +++ b/Demo/RX600_RX62N-RDK_IAR/RTOSDemo.ewp @@ -12,7 +12,7 @@ General 2 - 3 + 4 1 1 + ICCRX 3 - 10 + 11 1 1 + + + ARX 2 - 3 + 5 1 1 + + @@ -581,7 +605,7 @@ ILINK 1 - 0 + 1 1 1 + @@ -846,7 +874,7 @@ General 2 - 3 + 4 1 1 + ICCRX 3 - 10 + 11 1 1 + + + ARX 2 - 3 + 5 1 1 + + @@ -1414,7 +1466,7 @@ ILINK 1 - 0 + 1 1 1 + @@ -1679,7 +1735,7 @@ General 2 - 3 + 4 1 1 + ICCRX 3 - 10 + 11 1 1 + + + ARX 2 - 3 + 5 1 1 + + @@ -2248,7 +2328,7 @@ ILINK 1 - 0 + 1 1 1 + @@ -2568,6 +2652,9 @@ $PROJ_DIR$\..\..\Source\tasks.c + + $PROJ_DIR$\..\..\Source\timers.c + FreeTCPIP (based on uIP) diff --git a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.cspy.bat b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.cspy.bat index b5065a38e..90ccab79a 100644 --- a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.cspy.bat +++ b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.cspy.bat @@ -1,33 +1,15 @@ -@REM This bat file has been generated by the IAR Embeddded Workbench -@REM C-SPY interactive debugger,as an aid to preparing a command -@REM line for running the cspybat command line utility with the -@REM appropriate settings. +@REM This batch file has been generated by the IAR Embedded Workbench +@REM C-SPY Debugger, as an aid to preparing a command line for running +@REM the cspybat command line utility using the appropriate settings. @REM -@REM After making some adjustments to this file, you can launch cspybat -@REM by typing the name of this file followed by the name of the debug -@REM file (usually an ubrof file). Note that this file is generated -@REM every time a new debug session is initialized, so you may want to -@REM move or rename the file before making changes. -@REM -@REM Note: some command line arguments cannot be properly generated -@REM by this process. Specifically, the plugin which is responsible -@REM for the Terminal I/O window (and other C runtime functionality) -@REM comes in a special version for cspybat, and the name of that -@REM plugin dll is not known when generating this file. It resides in -@REM the $TOOLKIT_DIR$\bin folder and is usually called XXXbat.dll or -@REM XXXlibsupportbat.dll, where XXX is the name of the corresponding -@REM tool chain. Replace the '' parameter -@REM below with the appropriate file name. Other plugins loaded by -@REM C-SPY are usually not needed by, or will not work in, cspybat -@REM but they are listed at the end of this file for reference. +@REM You can launch cspybat by typing the name of this batch file followed +@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). +@REM Note that this file is generated every time a new debug session +@REM is initialized, so you may want to move or rename the file before +@REM making changes. +@REM -"C:\devtools\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxproc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxemue20.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\" --backend -B "--core" "RX600" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\config\debugger\ior5f562n8.ddf" "--double" "32" "--endian" "l" "--int" "32" "-d" "emue20" "--emu" "jlink" "--drv_communication" "USB" "--verify_download" "all" +"C:\devtools\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxproc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxemue20.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxbat.dll" --backend -B "--core" "RX600" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\config\debugger\ior5f562n8.ddf" "--double" "32" "--endian" "l" "--int" "32" "-d" "emue20" "--emu" "jlink" "--drv_communication" "USB" "--verify_download" "all" -@REM Loaded plugins: -@REM rxLibSupport.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\CodeCoverage\CodeCoverage.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\Profiling\Profiling.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\stack\stack.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\SymList\SymList.dll diff --git a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dbgdt b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dbgdt index d48cbdf65..973cd3fce 100644 --- a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dbgdt +++ b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dbgdt @@ -31,7 +31,7 @@ - + TabID-20000-3827 @@ -43,20 +43,20 @@ - 0TabID-2655-13188Debug LogDebug-Log0 + 0TabID-2655-13188Debug LogDebug-Log0 - TextEditor$WS_DIR$\main-full.c0533048304800100000010000001 + TextEditor$WS_DIR$\main-full.c025112353123530TextEditor$WS_DIR$\FreeRTOSConfig.h011360956104TextEditor$WS_DIR$\webserver\EMAC.c013458335833TextEditor$WS_DIR$\uIP_Task.c022671067106TextEditor$WS_DIR$\main-blinky.c087480448040100000010000001 - iaridepm.enu1debuggergui.enu1-2-2740238-2-212114172024143585142857755601-2-21981682-2-216842001002381203666119048203666 + iaridepm.enu1debuggergui.enu1-2-2740238-2-212114172024143585142857755601-2-21981682-2-216842001002381203666119048203666 diff --git a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dni b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dni index 05ba900d9..48339b9d7 100644 --- a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dni +++ b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.dni @@ -1,7 +1,7 @@ [E20] -TimeConnected=1285248097 -ComuniDllSave=84541440 -FfwnsdDllSave=81330176 +TimeConnected=1305306990 +ComuniDllSave=194838528 +FfwnsdDllSave=194969600 ChipName=R5F562N8 CpuMode=0 InputClock=12.500000 @@ -10,8 +10,18 @@ JtagClock=10 DebugFlags=0,0 EmulatorMode=0 NeedInit=1 +BlockBits=0 +B0=0,0 +B1=0,0 +B2=0,0 +B3=0,0 +TraceMode=0 +TraceOutput=2 +TraceCapacity=0 +TraceRestart=0 +OperatingFrequency=12.500000 [DebugChecksum] -Checksum=188492037 +Checksum=-1259593031 [DisAssemblyWindow] NumStates=_ 1 State 1=_ 1 @@ -31,10 +41,25 @@ UseTrigger=1 TriggerName=main LimitSize=0 ByteLimit=50 -[DriverProfiling] -Enabled=0 -Source=2 -Graph=0 +[Stack] +FillEnabled=0 +OverflowWarningsEnabled=1 +WarningThreshold=90 +SpWarningsEnabled=1 +WarnLogOnly=1 +UseTrigger=1 +TriggerName=main +LimitSize=0 +ByteLimit=50 +[CallStack] +ShowArgs=0 +[PowerLog] +LogEnabled=0 +GraphEnabled=0 +ShowTimeLog=1 +ShowTimeSum=0 +Title0=Power +Setup0=0 1 0 500 2 0 4 1 0 [Log file] LoggingEnabled=_ 0 LogFile=_ "" @@ -42,6 +67,13 @@ Category=_ 0 [TermIOLog] LoggingEnabled=_ 0 LogFile=_ "" +[CallStackLog] +Enabled=0 +[DriverProfiling] +Enabled=0 +Mode=3 +Graph=0 +Symbiont=0 [Breakpoints] Count=0 [Monitor Execution] diff --git a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.wsdt b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.wsdt index 62d2bb0d7..6dd1c2cc6 100644 --- a/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.wsdt +++ b/Demo/RX600_RX62N-RDK_IAR/settings/RTOSDemo.wsdt @@ -3,7 +3,7 @@ - RTOSDemo/Debug-with-optimisation + RTOSDemo/Debug @@ -33,7 +33,7 @@ Workspace - RTOSDemoRTOSDemo/FreeRTOS SourceRTOSDemo/FreeRTOS Source/Portable Layer + RTOSDemo @@ -53,14 +53,14 @@ - TextEditor$WS_DIR$\main-full.c0533048304800100000010000001 + TextEditor$WS_DIR$\main-full.c0441235312353TextEditor$WS_DIR$\main-blinky.c0494804480410100000010000001 - iaridepm.enu1-2-2706351-2-2331284197024289206210119720978-2-22321682-2-216842341002381238289197024289206 + iaridepm.enu1-2-2706351-2-2331284197024289206210119720978-2-22321682-2-216842341002381238289197024289206 diff --git a/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c b/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c index 1521ef895..17a5925a1 100644 --- a/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c +++ b/Demo/RX600_RX62N-RDK_IAR/uIP_Task.c @@ -57,7 +57,8 @@ /* Scheduler includes. */ #include "FreeRTOS.h" #include "task.h" -#include "semphr.h" +#include "timers.h" +#include "queue.h" /* uip includes. */ #include "net/uip.h" @@ -81,6 +82,15 @@ /* Standard constant. */ #define uipTOTAL_FRAME_HEADER_SIZE 54 +/* The ARP timer and the periodic timer share a callback function, so the +respective timer IDs are used to determine which timer actually expired. These +constants are assigned to the timer IDs. */ +#define uipARP_TIMER 0 +#define uipPERIODIC_TIMER 1 + +/* A block time of zero ticks simply means, "don't block". */ +#define uipDONT_BLOCK 0UL + /*-----------------------------------------------------------*/ /* @@ -88,25 +98,29 @@ */ static void prvSetMACAddress( void ); +/* + * Perform any uIP initialisation necessary. + */ +static void prvInitialise_uIP( void ); + +/* + * The callback function that is assigned to both the periodic timer and the + * ARP timer. + */ +static void prvUIPTimerCallback( xTimerHandle xTimer ); + /* * Port functions required by the uIP stack. */ -void clock_init( void ); clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ -/* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +/* The queue used to send TCP/IP events to the uIP stack. */ +xQueueHandle xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ -void clock_init(void) -{ - /* This is done when the scheduler starts. */ -} -/*-----------------------------------------------------------*/ - clock_time_t clock_time( void ) { return xTaskGetTickCount(); @@ -115,25 +129,14 @@ clock_time_t clock_time( void ) void vuIP_Task( void *pvParameters ) { -portBASE_TYPE i, xDoneSomething; -uip_ipaddr_t xIPAddr; -struct timer periodic_timer, arp_timer; +portBASE_TYPE i; +unsigned long ulNewEvent = 0UL; +unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ - timer_set( &periodic_timer, configTICK_RATE_HZ / 2 ); - timer_set( &arp_timer, configTICK_RATE_HZ * 10 ); - uip_init(); - uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - uip_sethostaddr( &xIPAddr ); - uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); - uip_setnetmask( &xIPAddr ); - prvSetMACAddress(); - httpd_init(); - - /* Create the semaphore used to wake the uIP task. */ - vSemaphoreCreateBinary( xEMACSemaphore ); + prvInitialise_uIP(); /* Initialise the MAC. */ vInitEmac(); @@ -145,49 +148,51 @@ struct timer periodic_timer, arp_timer; for( ;; ) { - xDoneSomething = pdFALSE; - - /* Is there received data ready to be processed? */ - uip_len = ( unsigned short ) ulEMACRead(); - - if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) - { - /* Standard uIP loop taken from the uIP manual. */ - if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) + if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) + { + /* Is there received data ready to be processed? */ + uip_len = ( unsigned short ) ulEMACRead(); + + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { - uip_arp_ipin(); - uip_input(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) + /* Standard uIP loop taken from the uIP manual. */ + if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) { - uip_arp_out(); - vEMACWrite(); + uip_arp_ipin(); + uip_input(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + uip_arp_out(); + vEMACWrite(); + } + } + else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + { + uip_arp_arpin(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + vEMACWrite(); + } } - - xDoneSomething = pdTRUE; } - else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + else { - uip_arp_arpin(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - vEMACWrite(); - } - - xDoneSomething = pdTRUE; + ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - - if( timer_expired( &periodic_timer ) && ( uip_buf != NULL ) ) + + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { - timer_reset( &periodic_timer ); + ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -201,25 +206,82 @@ struct timer periodic_timer, arp_timer; vEMACWrite(); } } - - /* Call the ARP timer function every 10 seconds. */ - if( timer_expired( &arp_timer ) ) - { - timer_reset( &arp_timer ); - uip_arp_timer(); - } - - xDoneSomething = pdTRUE; } - if( xDoneSomething == pdFALSE ) + /* Call the ARP timer function every 10 seconds. */ + if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { - /* We did not receive a packet, and there was no periodic - processing to perform. Block for a fixed period. If a packet - is received during this period we will be woken by the ISR - giving us the Semaphore. */ - xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 20 ); + ulUIP_Events &= ~uipARP_TIMER_EVENT; + uip_arp_timer(); } + + if( ulUIP_Events == pdFALSE ) + { + xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); + ulUIP_Events |= ulNewEvent; + } + } +} +/*-----------------------------------------------------------*/ + +static void prvInitialise_uIP( void ) +{ +xTimerHandle xARPTimer, xPeriodicTimer; +uip_ipaddr_t xIPAddr; +const unsigned long ul_uIPEventQueueLength = 10UL; + + /* Initialise the uIP stack. */ + uip_init(); + uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); + uip_sethostaddr( &xIPAddr ); + uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); + uip_setnetmask( &xIPAddr ); + prvSetMACAddress(); + httpd_init(); + + /* Create the queue used to sent TCP/IP events to the uIP stack. */ + xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); + + /* Create and start the uIP timers. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + pdTRUE, /* Autor-reload. */ + ( void * ) uipARP_TIMER, + prvUIPTimerCallback + ); + + xPeriodicTimer = xTimerCreate( "PeriodicTimer", + ( 500 / portTICK_RATE_MS ), + pdTRUE, /* Autor-reload. */ + ( void * ) uipPERIODIC_TIMER, + prvUIPTimerCallback + ); + + configASSERT( xARPTimer ); + configASSERT( xPeriodicTimer ); + + xTimerStart( xARPTimer, portMAX_DELAY ); + xTimerStart( xPeriodicTimer, portMAX_DELAY ); +} +/*-----------------------------------------------------------*/ + +static void prvUIPTimerCallback( xTimerHandle xTimer ) +{ +static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; +static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; + + /* This is a time callback, so calls to xQueueSend() must not attempt to + block. */ + switch( ( int ) pvTimerGetTimerID( xTimer ) ) + { + case uipARP_TIMER : xQueueSend( xEMACEventQueue, &ulARPTimerExpired, uipDONT_BLOCK ); + break; + + case uipPERIODIC_TIMER : xQueueSend( xEMACEventQueue, &ulPeriodicTimerExpired, uipDONT_BLOCK ); + break; + + default : /* Should not get here. */ + break; } } /*-----------------------------------------------------------*/ diff --git a/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c b/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c index f1eb1fe69..01ce33ecc 100644 --- a/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c +++ b/Demo/RX600_RX62N-RDK_IAR/webserver/EMAC.c @@ -152,7 +152,7 @@ static void prvResetEverything( void ); /*-----------------------------------------------------------*/ /* Points to the Rx descriptor currently in use. */ -static volatile ethfifo *pxCurrentDesc = NULL; +static volatile ethfifo *pxCurrentRxDesc = NULL; /* The buffer used by the uIP stack to both receive and send. This points to one of the Ethernet buffers when its actually in use. */ @@ -241,23 +241,29 @@ unsigned long ulBytesReceived; if( ulBytesReceived > 0 ) { - pxCurrentDesc->status &= ~( FP1 | FP0 ); - pxCurrentDesc->status |= ACT; + /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to + the buffer that contains the received data. */ + prvReturnBuffer( uip_buf ); + /* Point uip_buf to the data about ot be processed. */ + uip_buf = ( void * ) pxCurrentRxDesc->buf_p; + + /* Allocate a new buffer to the descriptor, as uip_buf is now using it's + old descriptor. */ + pxCurrentRxDesc->buf_p = ( char * ) prvGetNextBuffer(); + + /* Prepare the descriptor to go again. */ + pxCurrentRxDesc->status &= ~( FP1 | FP0 ); + pxCurrentRxDesc->status |= ACT; + + /* Move onto the next buffer in the ring. */ + pxCurrentRxDesc = pxCurrentRxDesc->next; + if( EDMAC.EDRRR.LONG == 0x00000000L ) { /* Restart Ethernet if it has stopped */ EDMAC.EDRRR.LONG = 0x00000001L; } - - /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to - the buffer that contains the received data. */ - prvReturnBuffer( uip_buf ); - - uip_buf = ( void * ) pxCurrentDesc->buf_p; - - /* Move onto the next buffer in the ring. */ - pxCurrentDesc = pxCurrentDesc->next; } return ulBytesReceived; @@ -367,7 +373,7 @@ long x; pxDescriptor->next = ( ethfifo * ) &( xTxDescriptors[ 0 ] ); /* Use the first Rx descriptor to start with. */ - pxCurrentDesc = &( xRxDescriptors[ 0 ] ); + pxCurrentRxDesc = &( xRxDescriptors[ 0 ] ); } /*-----------------------------------------------------------*/ @@ -439,17 +445,17 @@ static unsigned long prvCheckRxFifoStatus( void ) { unsigned long ulReturn = 0; - if( ( pxCurrentDesc->status & ACT ) != 0 ) + if( ( pxCurrentRxDesc->status & ACT ) != 0 ) { /* Current descriptor is still active. */ } - else if( ( pxCurrentDesc->status & FE ) != 0 ) + else if( ( pxCurrentRxDesc->status & FE ) != 0 ) { /* Frame error. Clear the error. */ - pxCurrentDesc->status &= ~( FP1 | FP0 | FE ); - pxCurrentDesc->status &= ~( RMAF | RRF | RTLF | RTSF | PRE | CERF ); - pxCurrentDesc->status |= ACT; - pxCurrentDesc = pxCurrentDesc->next; + pxCurrentRxDesc->status &= ~( FP1 | FP0 | FE ); + pxCurrentRxDesc->status &= ~( RMAF | RRF | RTLF | RTSF | PRE | CERF ); + pxCurrentRxDesc->status |= ACT; + pxCurrentRxDesc = pxCurrentRxDesc->next; if( EDMAC.EDRRR.LONG == 0x00000000UL ) { @@ -461,9 +467,9 @@ unsigned long ulReturn = 0; { /* The descriptor contains a frame. Because of the size of the buffers the frame should always be complete. */ - if( ( pxCurrentDesc->status & FP0 ) == FP0 ) + if( ( pxCurrentRxDesc->status & FP0 ) == FP0 ) { - ulReturn = pxCurrentDesc->size; + ulReturn = pxCurrentRxDesc->size; } else { @@ -510,12 +516,13 @@ static void prvConfigureEtherCAndEDMAC( void ) #if __LITTLE_ENDIAN__ == 1 EDMAC.EDMR.BIT.DE = 1; #endif - EDMAC.RDLAR = ( void * ) pxCurrentDesc; /* Initialaize Rx Descriptor List Address */ + EDMAC.RDLAR = ( void * ) pxCurrentRxDesc; /* Initialaize Rx Descriptor List Address */ EDMAC.TDLAR = ( void * ) &( xTxDescriptors[ 0 ] );/* Initialaize Tx Descriptor List Address */ EDMAC.TRSCER.LONG = 0x00000000; /* Copy-back status is RFE & TFE only */ EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */ EDMAC.FDR.LONG = 0x00000000; /* Transmit fifo & receive fifo is 256 bytes */ EDMAC.RMCR.LONG = 0x00000003; /* Receive function is normal mode(continued) */ + ETHERC.ECMR.BIT.PRM = 0; /* Ensure promiscuous mode is off. */ /* Enable the interrupt... */ _IEN( _ETHER_EINT ) = 1; @@ -527,21 +534,16 @@ __interrupt void vEMAC_ISR_Handler( void ) { unsigned long ul = EDMAC.EESR.LONG; long lHigherPriorityTaskWoken = pdFALSE; -extern xSemaphoreHandle xEMACSemaphore; -static long ulTxEndInts = 0; +extern xQueueHandle xEMACEventQueue; +const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; __enable_interrupt(); /* Has a Tx end occurred? */ if( ul & emacTX_END_INTERRUPT ) { - ++ulTxEndInts; - if( ulTxEndInts >= 2 ) - { - /* Only return the buffer to the pool once both Txes have completed. */ - prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); - ulTxEndInts = 0; - } + /* Only return the buffer to the pool once both Txes have completed. */ + prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); EDMAC.EESR.LONG = emacTX_END_INTERRUPT; } @@ -549,7 +551,7 @@ static long ulTxEndInts = 0; if( ul & emacRX_END_INTERRUPT ) { /* Make sure the Ethernet task is not blocked waiting for a packet. */ - xSemaphoreGiveFromISR( xEMACSemaphore, &lHigherPriorityTaskWoken ); + xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken ); portYIELD_FROM_ISR( lHigherPriorityTaskWoken ); EDMAC.EESR.LONG = emacRX_END_INTERRUPT; } diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws index b8156312c..4f6768707 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws @@ -10,8 +10,8 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-blinky.c" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-full.c" [WORKSPACE_FILE_STATES] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-blinky.c" -4 -23 1312 686 1 1 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-full.c" 0 0 1312 668 0 0 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-blinky.c" 0 0 1312 686 0 1 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-full.c" -4 -23 1312 668 1 0 [LOADED_PROJECTS] "RTOSDemo" [END] diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.nav b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.nav index 69eba0c02..e2d42cc62 100644 Binary files a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.nav and b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.nav differ diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf index f7155a020..e7569680a 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf @@ -89,30 +89,30 @@ "{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" "000000000000B5DC" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "000000000000B364" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "000000000000B58C" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "000000000000AD9C" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "000000000000ADC4" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000B5DC" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "00000000000130CC" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "000000000000AD9C" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "000000000000B33C" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000B58C" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000013104" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030001" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF8F563" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF92894" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF8B130" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF8B0F0" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000080000000" "{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" "1234567887650000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000012B18" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000012B18" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "000000000000AE24" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "000000000000ADC4" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "000000000000B33C" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "26" @@ -410,9 +410,11 @@ [WINDOW_POSITION_STATE_DATA_VD4] [WINDOW_Z_ORDER] "{WK_TB00000028_RTOSDEBUG} TOOLBAR 0" +"{WK_TB00000013_SYMBOL} TOOLBAR 0" +"{WK_TB00000011_CPU} TOOLBAR 0" "{WK_TB00000025_HELPSYSTEMTOOL} TOOLBAR 0" -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-blinky.c" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-full.c" +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-blinky.c" [TARGET_NAME] "RX600 Segger J-Link" "" 0 [STATUSBAR_STATEINFO_VD1] @@ -464,5 +466,5 @@ [FLASH_DETAILS] "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" [BREAKPOINTS] -"c:\e\dev\freertos\workingcopy\demo\rx600_rx62n-rdk_renesas\rtosdemo\webserver\emac.c" 413 33252624 1 "{00000000-0000-0000-C000-000000000046}" "" +"c:\e\dev\freertos\workingcopy\demo\rx600_rx62n-rdk_renesas\rtosdemo\webserver\emac.c" 413 0 1 "{00000000-0000-0000-C000-000000000046}" "" [END] diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c index 0873c9ed8..847c9cbe3 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/uIP_Task.c @@ -228,7 +228,6 @@ static void prvInitialise_uIP( void ) { xTimerHandle xARPTimer, xPeriodicTimer; uip_ipaddr_t xIPAddr; -struct timer periodic_timer, arp_timer; const unsigned long ul_uIPEventQueueLength = 10UL; /* Initialise the uIP stack. */ diff --git a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h index c1bfab0f4..9a6785052 100644 --- a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/FreeRTOSConfig.h @@ -93,6 +93,12 @@ #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY ( 3 ) +#define configTIMER_QUEUE_LENGTH 5 +#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) + /* 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 @@ -115,6 +121,8 @@ to exclude the API function. */ #define INCLUDE_uxTaskGetStackHighWaterMark 1 #define INCLUDE_xTaskGetSchedulerState 1 +#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } + extern volatile unsigned long ulHighFrequencyTickCount; #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() portNOP() /* Run time stats use the same timer as the high frequency timer test. */ #define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTickCount diff --git a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.hwp b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.hwp index 3ac639b75..67449a700 100644 --- a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.hwp +++ b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.hwp @@ -159,6 +159,7 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "User" "C source file|FreeRTOS Source|Portable Layer" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "User" "C source file|FreeRTOS Source" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "User" "C source file|FreeRTOS Source" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "User" "C source file" 2 [FOLDER] "C header file" "C header file" "C source file" "C source file" @@ -184,59 +185,60 @@ [OPTIONS_Blinky_GNU Assembler] "Assembly source file" "0f757b5b0aa5bc10" 4 [OPTIONS_Blinky_GNU Compiler] -"C source file" "00e05b5b0aa5bc10" 3 -"C++ source file" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flop.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\hwinit.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\inthandler.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\start.asm" "00e05b5b0aa5bc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\HighFrequencyTimerTest.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\IntQueueTimer.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\ParTest.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\Renesas-Files\hwsetup.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-blinky.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-full.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\uIP_Task.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\vects.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\EMAC.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\httpd-cgi.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\phy.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\GCC\RX600\port.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "00e05b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "00e05b5b0aa5bc10" 3 -"Preprocess Assembly file" "00e05b5b0aa5bc10" 2 +"C source file" "00e05b5b0aa5bc10" 2 +"C++ source file" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flop.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\hwinit.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\inthandler.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\start.asm" "00e05b5b0aa5bc10" 3 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\HighFrequencyTimerTest.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\IntQueueTimer.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\ParTest.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\Renesas-Files\hwsetup.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-blinky.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-full.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\uIP_Task.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\vects.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\EMAC.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\httpd-cgi.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\phy.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\GCC\RX600\port.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "08849e57f811cc10" 2 +"Preprocess Assembly file" "00e05b5b0aa5bc10" 3 [OPTIONS_Blinky_GNU Library Generator] "Single Shot" "00e05b5b0aa5bc10" 1 [OPTIONS_Blinky_GNU Linker] -"Single Shot" "0f757b5b0aa5bc10" 5 +"Single Shot" "04611067f811cc10" 5 [OPTIONS_Blinky] "" 0 "[V|VERSION|2] [B|DOEXTF|1] [S|INCDIR|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03^"|^"$(CONFIGDIR)^"] [B|RSARCH|1] [B|FIXUPLIBS|1] [S|ARCHIVE|lib$(PROJECTNAME).a*libgcc.a] [S|OUTFORM|BOTH] [B|MFILEGEN|1] [S|PLMFILE|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|OUTFILE|^"$(CONFIGDIR)\$(PROJECTNAME).x^"] [S|GROUPDET|.fvectors|0|0||1|0xFFFFFF80|0|1|0|.fvectors|All-files|<>|<>|<>|.text|0|0||1|0xFFF80000|0|0|0|.text|All-files|<>|0|.text.*|All-files|<>|0|P|All-files|<>|1|etext|<>|<>|<>|.rvectors|0|0||0||0|1|1|_rvectors_start|<>|0|.rvectors|All-files|<>|1|_rvectors_end|<>|<>|<>|.init|0|0||0||0|0|0|.init|All-files|<>|<>|<>|.fini|0|0||0||0|0|0|.fini|All-files|<>|<>|<>|.got|0|0||0||0|0|0|.got|All-files|<>|0|.got.plt|All-files|<>|<>|<>|.rodata|0|0||0||0|0|0|.rodata|All-files|<>|0|.rodata.*|All-files|<>|0|C_1|All-files|<>|0|C_2|All-files|<>|0|C|All-files|<>|1|_erodata|<>|<>|<>|.eh_frame_hdr|0|0||0||0|0|0|.eh_frame_hdr|All-files|<>|<>|<>|.eh_frame|0|0||0||0|0|0|.eh_frame|All-files|<>|<>|<>|.jcr|0|0||0||0|0|0|.jcr|All-files|<>|<>|<>|.tors|0|0||0||0|0|1|__CTOR_LIST__|<>|1|___ctors|<>|0|.ctors|All-files|<>|1|___ctors_end|<>|1|__CTOR_END__|<>|1|__DTOR_LIST__|<>|1|___dtors|<>|0|.dtors|All-files|<>|1|___dtors_end|<>|1|__DTOR_END__|<>|1|_mdata|<>|<>|<>|.istack|0|0||1|0x00017FFC|0|0|1|_istack|<>|<>|<>|.ustack|0|0||1|0x000179BC|0|0|1|_ustack|<>|<>|<>|.data|0|2|_mdata|1|0x00001000|0|0|1|_data|<>|0|.data|All-files|<>|0|.data.*|All-files|<>|0|D|All-files|<>|0|D_1|All-files|<>|0|D_2|All-files|<>|1|_edata|<>|<>|<>|.gcc_exc|0|0||0||0|0|0|.gcc_exc|All-files|<>|<>|<>|.bss|0|0||0||0|0|1|_bss|<>|0|.bss|All-files|<>|0|.bss.*|All-files|<>|0|COMMON|All-files|<>|0|B|All-files|<>|0|B_1|All-files|<>|0|B_2|All-files|<>|1|_ebss|<>|1|_end|<>|<>|<>|] [S|APPTXT|^"-e _start^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] [B|DOPROJBUILT|1] " 5 "[V|VERSION|2] [S|INCDIR|^"$(TCINSTALL)\rx-elf\rx-elf\optlibinc^"|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03\optlibinc^"|^"$(PROJDIR)\include^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\..\..\..\Source\portable\GCC\RX600^"|^"$(PROJDIR)^"|^"$(PROJDIR)\..\..\Common\include^"] [S|DEFINES|DEBUG] [S|OUTPUT|OBJECT] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [B|DEBUG|1] [S|DEBUGFT|Native] [I|DEBUGLV|2] [S|ALIGN4|ALL] [B|LINCSYM|1] [B|LOMITDD|1] [B|LOMITFP|1] [B|OPTIMIZE|0] [I|OPTLV|1] [B|NOSTDINC|1] [S|APPTXT|^"-Wa,-gdwarf2^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] -" 2 -"[V|VERSION|2] [S|INCDIR|^"$(TCINSTALL)\rx-elf\rx-elf\optlibinc^"|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03\optlibinc^"|^"$(PROJDIR)\include^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\..\..\..\Source\portable\GCC\RX600^"|^"$(PROJDIR)^"|^"$(PROJDIR)\..\..\Common\include^"] [S|DEFINES|DEBUG] [S|OUTPUT|OBJECT] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [B|DEBUG|1] [S|DEBUGFT|Native] [I|DEBUGLV|2] [S|ALIGN4|ALL] [B|LINCSYM|1] [B|LOMITDD|1] [B|LOMITFP|1] [B|OPTIMIZE|0] [I|OPTLV|1] [B|NOSTDINC|1] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] " 3 +"[V|VERSION|2] [S|INCDIR|^"$(TCINSTALL)\rx-elf\rx-elf\optlibinc^"|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03\optlibinc^"|^"$(PROJDIR)\include^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\..\..\..\Source\portable\GCC\RX600^"|^"$(PROJDIR)^"|^"$(PROJDIR)\..\..\Common\include^"] [S|DEFINES|DEBUG] [S|OUTPUT|OBJECT] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [B|DEBUG|1] [S|DEBUGFT|Native] [I|DEBUGLV|2] [S|ALIGN4|ALL] [B|LINCSYM|1] [B|LOMITDD|1] [B|LOMITFP|1] [B|OPTIMIZE|0] [I|OPTLV|1] [B|NOSTDINC|1] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] +" 2 "[V|VERSION|2] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [I|DEBUGLV|2] [B|LINCHLS|1] [B|LINCASS|1] [B|LINCSYM|1] [S|LFILE|^"$(CONFIGDIR)\$(FILELEAF).^"] [S|PROJECTTYPE|CAPPPROJECT] [S|INCDIR|^"$(PROJDIR)^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] " 4 "[V|VERSION|2] [S|OUTPUTPATH|^"$(CONFIGDIR)\lib$(PROJECTNAME).a^"] [B|OPTIMIZE|1] [I|OPTTYPE|1] [S|MODE|BUILD/CHANGED] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [B|DOPROJBUILT|1] [B|DOOPTLIB|1] [B|MATH|1] [B|STDIO|1] [B|STDLIB|1] [B|STRING|1] " 1 [EXCLUDED_FILES_Blinky] @@ -311,11 +313,12 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "022e4ac89aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "022e4ac89aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "022e4ac89aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "08849e57f811cc10" 2 "Preprocess Assembly file" "022e4ac89aa5bc10" 2 [OPTIONS_Debug_GNU Library Generator] "Single Shot" "00c20b5b0aa5bc10" 1 [OPTIONS_Debug_GNU Linker] -"Single Shot" "00d92b5b0aa5bc10" 4 +"Single Shot" "04611067f811cc10" 4 [OPTIONS_Debug] "" 0 "[V|VERSION|2] [B|DOEXTF|1] [S|INCDIR|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03^"|^"$(CONFIGDIR)^"] [B|RSARCH|1] [B|FIXUPLIBS|1] [S|ARCHIVE|libgcc.a*lib$(PROJECTNAME).a] [S|OUTFORM|BOTH] [B|MFILEGEN|1] [S|PLMFILE|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|OUTFILE|^"$(CONFIGDIR)\$(PROJECTNAME).x^"] [S|GROUPDET|.fvectors|0|0||1|0xFFFFFF80|0|1|0|.fvectors|All-files|<>|<>|<>|.text|0|0||1|0xFFF80000|0|0|0|.text|All-files|<>|0|.text.*|All-files|<>|0|P|All-files|<>|1|etext|<>|<>|<>|.rvectors|0|0||0||0|1|1|_rvectors_start|<>|0|.rvectors|All-files|<>|1|_rvectors_end|<>|<>|<>|.init|0|0||0||0|0|0|.init|All-files|<>|<>|<>|.fini|0|0||0||0|0|0|.fini|All-files|<>|<>|<>|.got|0|0||0||0|0|0|.got|All-files|<>|0|.got.plt|All-files|<>|<>|<>|.rodata|0|0||0||0|0|0|.rodata|All-files|<>|0|.rodata.*|All-files|<>|0|C_1|All-files|<>|0|C_2|All-files|<>|0|C|All-files|<>|1|_erodata|<>|<>|<>|.eh_frame_hdr|0|0||0||0|0|0|.eh_frame_hdr|All-files|<>|<>|<>|.eh_frame|0|0||0||0|0|0|.eh_frame|All-files|<>|<>|<>|.jcr|0|0||0||0|0|0|.jcr|All-files|<>|<>|<>|.tors|0|0||0||0|0|1|__CTOR_LIST__|<>|1|___ctors|<>|0|.ctors|All-files|<>|1|___ctors_end|<>|1|__CTOR_END__|<>|1|__DTOR_LIST__|<>|1|___dtors|<>|0|.dtors|All-files|<>|1|___dtors_end|<>|1|__DTOR_END__|<>|1|_mdata|<>|<>|<>|.istack|0|0||1|0x00017FFC|0|0|1|_istack|<>|<>|<>|.ustack|0|0||1|0x000179BC|0|0|1|_ustack|<>|<>|<>|.data|0|2|_mdata|1|0x00001000|0|0|1|_data|<>|0|.data|All-files|<>|0|.data.*|All-files|<>|0|D|All-files|<>|0|D_1|All-files|<>|0|D_2|All-files|<>|1|_edata|<>|<>|<>|.gcc_exc|0|0||0||0|0|0|.gcc_exc|All-files|<>|<>|<>|.bss|0|0||0||0|0|1|_bss|<>|0|.bss|All-files|<>|0|.bss.*|All-files|<>|0|COMMON|All-files|<>|0|B|All-files|<>|0|B_1|All-files|<>|0|B_2|All-files|<>|1|_ebss|<>|1|_end|<>|<>|<>|] [B|WONCEU|1] [B|OUTTRAD|1] [S|APPTXT|^"-e _start^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] [B|DOPROJBUILT|1] @@ -372,11 +375,12 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "00e05b5b0aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "00e05b5b0aa5bc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "00e05b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "08849e57f811cc10" 2 "Preprocess Assembly file" "00e05b5b0aa5bc10" 2 [OPTIONS_Debug_RX600_E1_E20_SYSTEM_GNU Library Generator] "Single Shot" "00e05b5b0aa5bc10" 1 [OPTIONS_Debug_RX600_E1_E20_SYSTEM_GNU Linker] -"Single Shot" "00e05b5b0aa5bc10" 4 +"Single Shot" "04611067f811cc10" 4 [OPTIONS_Debug_RX600_E1_E20_SYSTEM] "" 0 "[V|VERSION|2] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [I|DEBUGLV|2] [B|LINCHLS|1] [B|LINCASS|1] [B|LINCSYM|1] [S|LFILE|^"$(CONFIGDIR)\$(FILELEAF).^"] [S|PROJECTTYPE|CAPPPROJECT] [S|INCDIR|^"$(PROJDIR)^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] " 3 @@ -389,59 +393,60 @@ [OPTIONS_Debug_with_optimisation_GNU Assembler] "Assembly source file" "00d92b5b0aa5bc10" 4 [OPTIONS_Debug_with_optimisation_GNU Compiler] -"C source file" "00d92b5b0aa5bc10" 3 -"C++ source file" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flop.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\hwinit.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\inthandler.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\start.asm" "00d92b5b0aa5bc10" 2 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\HighFrequencyTimerTest.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\IntQueueTimer.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\ParTest.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\Renesas-Files\hwsetup.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-blinky.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-full.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\uIP_Task.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\vects.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\EMAC.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\httpd-cgi.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\phy.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\GCC\RX600\port.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "00d92b5b0aa5bc10" 3 -"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "00d92b5b0aa5bc10" 3 -"Preprocess Assembly file" "00d92b5b0aa5bc10" 2 +"C source file" "00d92b5b0aa5bc10" 2 +"C++ source file" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flop.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\http-strings.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd-fs.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\apps\httpd\httpd.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\psock.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\timer.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\ethernet\FreeTCPIP\uip_arp.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\hwinit.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\inthandler.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\GNU-Files\start.asm" "00d92b5b0aa5bc10" 3 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\HighFrequencyTimerTest.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\IntQueueTimer.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\ParTest.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\Renesas-Files\hwsetup.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-blinky.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-full.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\uIP_Task.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\vects.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\EMAC.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\httpd-cgi.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\webserver\phy.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\GCC\RX600\port.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "00d92b5b0aa5bc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "08849e57f811cc10" 2 +"Preprocess Assembly file" "00d92b5b0aa5bc10" 3 [OPTIONS_Debug_with_optimisation_GNU Library Generator] "Single Shot" "00d92b5b0aa5bc10" 1 [OPTIONS_Debug_with_optimisation_GNU Linker] -"Single Shot" "00e05b5b0aa5bc10" 5 +"Single Shot" "04611067f811cc10" 5 [OPTIONS_Debug_with_optimisation] "" 0 "[V|VERSION|2] [B|DOEXTF|1] [S|INCDIR|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03^"|^"$(CONFIGDIR)^"] [B|RSARCH|1] [B|FIXUPLIBS|1] [S|ARCHIVE|lib$(PROJECTNAME).a*libgcc.a] [S|OUTFORM|BOTH] [B|MFILEGEN|1] [S|PLMFILE|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|OUTFILE|^"$(CONFIGDIR)\$(PROJECTNAME).x^"] [S|GROUPDET|.fvectors|0|0||1|0xFFFFFF80|0|1|0|.fvectors|All-files|<>|<>|<>|.text|0|0||1|0xFFF80000|0|0|0|.text|All-files|<>|0|.text.*|All-files|<>|0|P|All-files|<>|1|etext|<>|<>|<>|.rvectors|0|0||0||0|1|1|_rvectors_start|<>|0|.rvectors|All-files|<>|1|_rvectors_end|<>|<>|<>|.init|0|0||0||0|0|0|.init|All-files|<>|<>|<>|.fini|0|0||0||0|0|0|.fini|All-files|<>|<>|<>|.got|0|0||0||0|0|0|.got|All-files|<>|0|.got.plt|All-files|<>|<>|<>|.rodata|0|0||0||0|0|0|.rodata|All-files|<>|0|.rodata.*|All-files|<>|0|C_1|All-files|<>|0|C_2|All-files|<>|0|C|All-files|<>|1|_erodata|<>|<>|<>|.eh_frame_hdr|0|0||0||0|0|0|.eh_frame_hdr|All-files|<>|<>|<>|.eh_frame|0|0||0||0|0|0|.eh_frame|All-files|<>|<>|<>|.jcr|0|0||0||0|0|0|.jcr|All-files|<>|<>|<>|.tors|0|0||0||0|0|1|__CTOR_LIST__|<>|1|___ctors|<>|0|.ctors|All-files|<>|1|___ctors_end|<>|1|__CTOR_END__|<>|1|__DTOR_LIST__|<>|1|___dtors|<>|0|.dtors|All-files|<>|1|___dtors_end|<>|1|__DTOR_END__|<>|1|_mdata|<>|<>|<>|.istack|0|0||1|0x00017FFC|0|0|1|_istack|<>|<>|<>|.ustack|0|0||1|0x000179BC|0|0|1|_ustack|<>|<>|<>|.data|0|2|_mdata|1|0x00001000|0|0|1|_data|<>|0|.data|All-files|<>|0|.data.*|All-files|<>|0|D|All-files|<>|0|D_1|All-files|<>|0|D_2|All-files|<>|1|_edata|<>|<>|<>|.gcc_exc|0|0||0||0|0|0|.gcc_exc|All-files|<>|<>|<>|.bss|0|0||0||0|0|1|_bss|<>|0|.bss|All-files|<>|0|.bss.*|All-files|<>|0|COMMON|All-files|<>|0|B|All-files|<>|0|B_1|All-files|<>|0|B_2|All-files|<>|1|_ebss|<>|1|_end|<>|<>|<>|] [S|APPTXT|^"-e _start^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] [B|DOPROJBUILT|1] " 5 "[V|VERSION|2] [S|INCDIR|^"$(TCINSTALL)\rx-elf\rx-elf\optlibinc^"|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03\optlibinc^"|^"$(PROJDIR)\include^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\..\..\..\Source\portable\GCC\RX600^"|^"$(PROJDIR)^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\..\..\Common\Ethernet\FreeTCPIP^"|^"$(PROJDIR)\webserver^"] [S|DEFINES|DEBUG|INCLUDE_HIGH_FREQUENCY_TIMER_TEST] [S|OUTPUT|OBJECT] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [B|DEBUG|1] [S|DEBUGFT|Native] [I|DEBUGLV|2] [S|ALIGN4|ALL] [B|OPTIMIZE|1] [I|OPTLV|1] [B|NOSTDINC|1] [S|APPTXT|^"-Wa,-gdwarf2^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] -" 2 -"[V|VERSION|2] [S|INCDIR|^"$(TCINSTALL)\rx-elf\rx-elf\optlibinc^"|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03\optlibinc^"|^"$(PROJDIR)\include^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\..\..\..\Source\portable\GCC\RX600^"|^"$(PROJDIR)^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\..\..\Common\Ethernet\FreeTCPIP^"|^"$(PROJDIR)\webserver^"] [S|DEFINES|DEBUG|INCLUDE_HIGH_FREQUENCY_TIMER_TEST] [S|OUTPUT|OBJECT] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [B|DEBUG|1] [S|DEBUGFT|Native] [I|DEBUGLV|2] [S|ALIGN4|ALL] [B|OPTIMIZE|1] [I|OPTLV|1] [B|NOSTDINC|1] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] " 3 +"[V|VERSION|2] [S|INCDIR|^"$(TCINSTALL)\rx-elf\rx-elf\optlibinc^"|^"$(TCINSTALL)\rx-elf\lib\gcc\rx-elf\4.5-GNURX_v10.03\optlibinc^"|^"$(PROJDIR)\include^"|^"$(PROJDIR)\..\..\..\Source\include^"|^"$(PROJDIR)\..\..\..\Source\portable\GCC\RX600^"|^"$(PROJDIR)^"|^"$(PROJDIR)\..\..\Common\include^"|^"$(PROJDIR)\..\..\Common\Ethernet\FreeTCPIP^"|^"$(PROJDIR)\webserver^"] [S|DEFINES|DEBUG|INCLUDE_HIGH_FREQUENCY_TIMER_TEST] [S|OUTPUT|OBJECT] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [B|DEBUG|1] [S|DEBUGFT|Native] [I|DEBUGLV|2] [S|ALIGN4|ALL] [B|OPTIMIZE|1] [I|OPTLV|1] [B|NOSTDINC|1] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [I|RMINTREGVAL|0] [I|RMMAXCONSTVAL|0] [I|RMMAXVARSVAL|0] [S|PROJECTTYPE|CAPPPROJECT] [B|DOOPTLIB|1] +" 2 "[V|VERSION|2] [S|OBJPATH|^"$(CONFIGDIR)\$(FILELEAF).o^"] [I|DEBUGLV|2] [B|LINCHLS|1] [B|LINCASS|1] [B|LINCSYM|1] [S|LFILE|^"$(CONFIGDIR)\$(FILELEAF).^"] [S|PROJECTTYPE|CAPPPROJECT] [S|INCDIR|^"$(PROJDIR)^"] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] " 4 "[V|VERSION|2] [S|OUTPUTPATH|^"$(CONFIGDIR)\lib$(PROJECTNAME).a^"] [B|OPTIMIZE|1] [I|OPTTYPE|1] [S|MODE|BUILD/CHANGED] [S|CPUTYPE|RX600] [S|ENDIAN|LITTLE] [S|CPU|Other] [B|DOPROJBUILT|1] [B|DOOPTLIB|1] [B|MATH|1] [B|STDIO|1] [B|STDLIB|1] [B|STRING|1] " 1 [EXCLUDED_FILES_Debug_with_optimisation] diff --git a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.nav b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.nav index 41e59e127..f3f3596f9 100644 Binary files a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.nav and b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/RTOSDemo.nav differ diff --git a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf index 9bd809919..a59993835 100644 --- a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf +++ b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf @@ -50,29 +50,29 @@ "{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" "0000000000017EF4" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000004" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000002" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "000000000000000A" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "000000000000B678" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "000000000000EB60" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "000000000000EB60" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "00000000FFFFDCDA" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000000001" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "00000000000000EA" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000BB68" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000017EF4" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000004010000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF851D9" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "000000000000311C" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF8D818" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000B678" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000017FA0" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030004" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF8B4BD" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF8E6D8" "{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" "1234567887650000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000017F34" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000003120" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000017EF4" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_24" "0000000040000100" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_25" "00008A613AE30000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "000000000000B678" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000000" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "00000000A5A5A5A5" @@ -213,6 +213,7 @@ [WINDOW_POSITION_STATE_DATA_VD4] [WINDOW_Z_ORDER] "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-full.c" +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-blinky.c" [TARGET_NAME] "RX600 E1/E20 SYSTEM" "" 0 [STATUSBAR_STATEINFO_VD1] diff --git a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c index a09782dec..847c9cbe3 100644 --- a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c +++ b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/uIP_Task.c @@ -57,7 +57,8 @@ /* Scheduler includes. */ #include "FreeRTOS.h" #include "task.h" -#include "semphr.h" +#include "timers.h" +#include "queue.h" /* uip includes. */ #include "net/uip.h" @@ -81,6 +82,15 @@ /* Standard constant. */ #define uipTOTAL_FRAME_HEADER_SIZE 54 +/* The ARP timer and the periodic timer share a callback function, so the +respective timer IDs are used to determine which timer actually expired. These +constants are assigned to the timer IDs. */ +#define uipARP_TIMER 0 +#define uipPERIODIC_TIMER 1 + +/* A block time of zero ticks simply means, "don't block". */ +#define uipDONT_BLOCK 0UL + /*-----------------------------------------------------------*/ /* @@ -88,25 +98,29 @@ */ static void prvSetMACAddress( void ); +/* + * Perform any uIP initialisation necessary. + */ +static void prvInitialise_uIP( void ); + +/* + * The callback function that is assigned to both the periodic timer and the + * ARP timer. + */ +static void prvUIPTimerCallback( xTimerHandle xTimer ); + /* * Port functions required by the uIP stack. */ -void clock_init( void ); clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ -/* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +/* The queue used to send TCP/IP events to the uIP stack. */ +xQueueHandle xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ -void clock_init(void) -{ - /* This is done when the scheduler starts. */ -} -/*-----------------------------------------------------------*/ - clock_time_t clock_time( void ) { return xTaskGetTickCount(); @@ -115,25 +129,14 @@ clock_time_t clock_time( void ) void vuIP_Task( void *pvParameters ) { -portBASE_TYPE i, xDoneSomething; -uip_ipaddr_t xIPAddr; -struct timer periodic_timer, arp_timer; +portBASE_TYPE i; +unsigned long ulNewEvent = 0UL; +unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ - timer_set( &periodic_timer, configTICK_RATE_HZ / 2 ); - timer_set( &arp_timer, configTICK_RATE_HZ * 10 ); - uip_init(); - uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - uip_sethostaddr( &xIPAddr ); - uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); - uip_setnetmask( &xIPAddr ); - prvSetMACAddress(); - httpd_init(); - - /* Create the semaphore used to wake the uIP task. */ - vSemaphoreCreateBinary( xEMACSemaphore ); + prvInitialise_uIP(); /* Initialise the MAC. */ vInitEmac(); @@ -145,49 +148,51 @@ struct timer periodic_timer, arp_timer; for( ;; ) { - xDoneSomething = pdFALSE; - - /* Is there received data ready to be processed? */ - uip_len = ( unsigned short ) ulEMACRead(); - - if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) - { - /* Standard uIP loop taken from the uIP manual. */ - if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) + if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) + { + /* Is there received data ready to be processed? */ + uip_len = ( unsigned short ) ulEMACRead(); + + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { - uip_arp_ipin(); - uip_input(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) + /* Standard uIP loop taken from the uIP manual. */ + if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) { - uip_arp_out(); - vEMACWrite(); + uip_arp_ipin(); + uip_input(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + uip_arp_out(); + vEMACWrite(); + } + } + else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + { + uip_arp_arpin(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + vEMACWrite(); + } } - - xDoneSomething = pdTRUE; } - else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + else { - uip_arp_arpin(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - vEMACWrite(); - } - - xDoneSomething = pdTRUE; + ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - - if( timer_expired( &periodic_timer ) && ( uip_buf != NULL ) ) + + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { - timer_reset( &periodic_timer ); + ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -201,25 +206,82 @@ struct timer periodic_timer, arp_timer; vEMACWrite(); } } - - /* Call the ARP timer function every 10 seconds. */ - if( timer_expired( &arp_timer ) ) - { - timer_reset( &arp_timer ); - uip_arp_timer(); - } - - xDoneSomething = pdTRUE; } - if( xDoneSomething == pdFALSE ) + /* Call the ARP timer function every 10 seconds. */ + if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { - /* We did not receive a packet, and there was no periodic - processing to perform. Block for a fixed period. If a packet - is received during this period we will be woken by the ISR - giving us the Semaphore. */ - xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 20 ); + ulUIP_Events &= ~uipARP_TIMER_EVENT; + uip_arp_timer(); } + + if( ulUIP_Events == pdFALSE ) + { + xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); + ulUIP_Events |= ulNewEvent; + } + } +} +/*-----------------------------------------------------------*/ + +static void prvInitialise_uIP( void ) +{ +xTimerHandle xARPTimer, xPeriodicTimer; +uip_ipaddr_t xIPAddr; +const unsigned long ul_uIPEventQueueLength = 10UL; + + /* Initialise the uIP stack. */ + uip_init(); + uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); + uip_sethostaddr( &xIPAddr ); + uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); + uip_setnetmask( &xIPAddr ); + prvSetMACAddress(); + httpd_init(); + + /* Create the queue used to sent TCP/IP events to the uIP stack. */ + xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); + + /* Create and start the uIP timers. */ + xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + pdTRUE, /* Autor-reload. */ + ( void * ) uipARP_TIMER, + prvUIPTimerCallback + ); + + xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + ( 500 / portTICK_RATE_MS ), + pdTRUE, /* Autor-reload. */ + ( void * ) uipPERIODIC_TIMER, + prvUIPTimerCallback + ); + + configASSERT( xARPTimer ); + configASSERT( xPeriodicTimer ); + + xTimerStart( xARPTimer, portMAX_DELAY ); + xTimerStart( xPeriodicTimer, portMAX_DELAY ); +} +/*-----------------------------------------------------------*/ + +static void prvUIPTimerCallback( xTimerHandle xTimer ) +{ +static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; +static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; + + /* This is a time callback, so calls to xQueueSend() must not attempt to + block. */ + switch( ( int ) pvTimerGetTimerID( xTimer ) ) + { + case uipARP_TIMER : xQueueSend( xEMACEventQueue, &ulARPTimerExpired, uipDONT_BLOCK ); + break; + + case uipPERIODIC_TIMER : xQueueSend( xEMACEventQueue, &ulPeriodicTimerExpired, uipDONT_BLOCK ); + break; + + default : /* Should not get here. */ + break; } } /*-----------------------------------------------------------*/ @@ -250,28 +312,34 @@ char *c; { /* Is there a command in the string? */ c = strstr( pcInputString, "?" ); - if( c ) - { + if( c ) + { /* Turn the LED's on or off in accordance with the check box status. */ if( strstr( c, "LED0=1" ) != NULL ) { - /* Turn LEDs on. */ - vParTestSetLED( 3, 1 ); - vParTestSetLED( 4, 1 ); + /* Turn the LEDs on. */ + vParTestSetLED( 7, 1 ); + vParTestSetLED( 8, 1 ); + vParTestSetLED( 9, 1 ); + vParTestSetLED( 10, 1 ); } else { - /* Turn LED 4 off. */ - vParTestSetLED( 3, 0 ); - vParTestSetLED( 4, 0 ); + /* Turn the LEDs off. */ + vParTestSetLED( 7, 0 ); + vParTestSetLED( 8, 0 ); + vParTestSetLED( 9, 0 ); + vParTestSetLED( 10, 0 ); } - } + } else { - /* Commands to turn LEDs off are not always explicit, turn LED 4 - off. */ - vParTestSetLED( 3, 0 ); - vParTestSetLED( 4, 0 ); + /* Commands to turn LEDs off are not always explicit. */ + vParTestSetLED( 7, 0 ); + vParTestSetLED( 8, 0 ); + vParTestSetLED( 9, 0 ); + vParTestSetLED( 10, 0 ); } } } + diff --git a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c index bf63bb659..945796ab5 100644 --- a/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c +++ b/Demo/RX600_RX62N-RSK_GNURX/RTOSDemo/webserver/EMAC.c @@ -242,23 +242,29 @@ unsigned long ulBytesReceived; if( ulBytesReceived > 0 ) { - pxCurrentRxDesc->status &= ~( FP1 | FP0 ); - pxCurrentRxDesc->status |= ACT; + /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to + the buffer that contains the received data. */ + prvReturnBuffer( uip_buf ); + /* Point uip_buf to the data about ot be processed. */ + uip_buf = ( void * ) pxCurrentRxDesc->buf_p; + + /* Allocate a new buffer to the descriptor, as uip_buf is now using it's + old descriptor. */ + pxCurrentRxDesc->buf_p = ( char * ) prvGetNextBuffer(); + + /* Prepare the descriptor to go again. */ + pxCurrentRxDesc->status &= ~( FP1 | FP0 ); + pxCurrentRxDesc->status |= ACT; + + /* Move onto the next buffer in the ring. */ + pxCurrentRxDesc = pxCurrentRxDesc->next; + if( EDMAC.EDRRR.LONG == 0x00000000L ) { /* Restart Ethernet if it has stopped */ EDMAC.EDRRR.LONG = 0x00000001L; } - - /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to - the buffer that contains the received data. */ - prvReturnBuffer( uip_buf ); - - uip_buf = ( void * ) pxCurrentRxDesc->buf_p; - - /* Move onto the next buffer in the ring. */ - pxCurrentRxDesc = pxCurrentRxDesc->next; } return ulBytesReceived; @@ -517,6 +523,7 @@ static void prvConfigureEtherCAndEDMAC( void ) EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */ EDMAC.FDR.LONG = 0x00000000; /* Transmit fifo & receive fifo is 256 bytes */ EDMAC.RMCR.LONG = 0x00000003; /* Receive function is normal mode(continued) */ + ETHERC.ECMR.BIT.PRM = 0; /* Ensure promiscuous mode is off. */ /* Enable the interrupt... */ _IEN( _ETHER_EINT ) = 1; @@ -527,8 +534,8 @@ void vEMAC_ISR_Handler( void ) { unsigned long ul = EDMAC.EESR.LONG; long lHigherPriorityTaskWoken = pdFALSE; -extern xSemaphoreHandle xEMACSemaphore; -static long ulTxEndInts = 0; +extern xQueueHandle xEMACEventQueue; +const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; /* Re-enabled interrupts. */ __asm volatile( "SETPSW I" ); @@ -536,13 +543,8 @@ static long ulTxEndInts = 0; /* Has a Tx end occurred? */ if( ul & emacTX_END_INTERRUPT ) { - ++ulTxEndInts; - if( ulTxEndInts >= 2 ) - { - /* Only return the buffer to the pool once both Txes have completed. */ - prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); - ulTxEndInts = 0; - } + /* Only return the buffer to the pool once both Txes have completed. */ + prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); EDMAC.EESR.LONG = emacTX_END_INTERRUPT; } @@ -550,7 +552,7 @@ static long ulTxEndInts = 0; if( ul & emacRX_END_INTERRUPT ) { /* Make sure the Ethernet task is not blocked waiting for a packet. */ - xSemaphoreGiveFromISR( xEMACSemaphore, &lHigherPriorityTaskWoken ); + xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken ); portYIELD_FROM_ISR( lHigherPriorityTaskWoken ); EDMAC.EESR.LONG = emacRX_END_INTERRUPT; } diff --git a/Demo/RX600_RX62N-RSK_GNURX/RX600_RX62N_RSK_GNURX.tws b/Demo/RX600_RX62N-RSK_GNURX/RX600_RX62N_RSK_GNURX.tws index fc4b52099..3bb59c5a0 100644 --- a/Demo/RX600_RX62N-RSK_GNURX/RX600_RX62N_RSK_GNURX.tws +++ b/Demo/RX600_RX62N-RSK_GNURX/RX600_RX62N_RSK_GNURX.tws @@ -7,8 +7,10 @@ [GENERAL_DATA] [BREAKPOINTS] [OPEN_WORKSPACE_FILES] +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-blinky.c" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-full.c" [WORKSPACE_FILE_STATES] +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-blinky.c" 88 88 1130 405 0 1 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_GNURX\RTOSDemo\main-full.c" -4 -23 1314 608 1 0 [LOADED_PROJECTS] "RTOSDemo" diff --git a/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h b/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h index 84e8b1b55..55181ca9c 100644 --- a/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N-RSK_IAR/FreeRTOSConfig.h @@ -93,13 +93,18 @@ #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY ( 3 ) +#define configTIMER_QUEUE_LENGTH 5 +#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) -/* +/* The interrupt priority used by the kernel itself for the tick interrupt and -the pended interrupt is set by configKERNEL_INTERRUPT_PRIORITY. This would -normally be the lowest priority (1 in this case). The maximum interrupt +the pended interrupt is set by configKERNEL_INTERRUPT_PRIORITY. This would +normally be the lowest priority (1 in this case). The maximum interrupt priority from which FreeRTOS API calls can be made is set by -configMAX_SYSCALL_INTERRUPT_PRIORITY. Interrupts that use a priority above this +configMAX_SYSCALL_INTERRUPT_PRIORITY. Interrupts that use a priority above this will not be effected by anything the kernel is doing. Interrupts at or below this priority can use FreeRTOS API functions - but *only* those that end in "FromISR". Both these constants are defined in 'PriorityDefinitions.h' so they @@ -126,6 +131,8 @@ to exclude the API function. */ #define INCLUDE_uxTaskGetStackHighWaterMark 1 #define INCLUDE_xTaskGetSchedulerState 1 +#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } + extern volatile unsigned long ulHighFrequencyTickCount; #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() portNOP() /* Run time stats use the same timer as the high frequency timer test. */ #define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTickCount diff --git a/Demo/RX600_RX62N-RSK_IAR/RTOSDemo.ewp b/Demo/RX600_RX62N-RSK_IAR/RTOSDemo.ewp index b8d0cbc26..6350bd8d7 100644 --- a/Demo/RX600_RX62N-RSK_IAR/RTOSDemo.ewp +++ b/Demo/RX600_RX62N-RSK_IAR/RTOSDemo.ewp @@ -12,7 +12,7 @@ General 2 - 3 + 4 1 1 + ICCRX 3 - 10 + 11 1 1 + + + ARX 2 - 3 + 5 1 1 + + @@ -581,7 +605,7 @@ ILINK 1 - 0 + 1 1 1 + @@ -846,7 +874,7 @@ General 2 - 3 + 4 1 1 + ICCRX 3 - 10 + 11 1 1 + + + ARX 2 - 3 + 5 1 1 + + @@ -1414,7 +1466,7 @@ ILINK 1 - 0 + 1 1 1 + @@ -1679,7 +1735,7 @@ General 2 - 3 + 4 1 1 + ICCRX 3 - 10 + 11 1 1 + + + ARX 2 - 3 + 5 1 1 + + @@ -2248,7 +2328,7 @@ ILINK 1 - 0 + 1 1 1 + @@ -2568,6 +2652,9 @@ $PROJ_DIR$\..\..\Source\tasks.c + + $PROJ_DIR$\..\..\Source\timers.c + FreeTCPIP (based on uIP) diff --git a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.cspy.bat b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.cspy.bat index 19c267973..c5731752e 100644 --- a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.cspy.bat +++ b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.cspy.bat @@ -1,33 +1,15 @@ -@REM This bat file has been generated by the IAR Embeddded Workbench -@REM C-SPY interactive debugger,as an aid to preparing a command -@REM line for running the cspybat command line utility with the -@REM appropriate settings. +@REM This batch file has been generated by the IAR Embedded Workbench +@REM C-SPY Debugger, as an aid to preparing a command line for running +@REM the cspybat command line utility using the appropriate settings. @REM -@REM After making some adjustments to this file, you can launch cspybat -@REM by typing the name of this file followed by the name of the debug -@REM file (usually an ubrof file). Note that this file is generated -@REM every time a new debug session is initialized, so you may want to -@REM move or rename the file before making changes. -@REM -@REM Note: some command line arguments cannot be properly generated -@REM by this process. Specifically, the plugin which is responsible -@REM for the Terminal I/O window (and other C runtime functionality) -@REM comes in a special version for cspybat, and the name of that -@REM plugin dll is not known when generating this file. It resides in -@REM the $TOOLKIT_DIR$\bin folder and is usually called XXXbat.dll or -@REM XXXlibsupportbat.dll, where XXX is the name of the corresponding -@REM tool chain. Replace the '' parameter -@REM below with the appropriate file name. Other plugins loaded by -@REM C-SPY are usually not needed by, or will not work in, cspybat -@REM but they are listed at the end of this file for reference. +@REM You can launch cspybat by typing the name of this batch file followed +@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). +@REM Note that this file is generated every time a new debug session +@REM is initialized, so you may want to move or rename the file before +@REM making changes. +@REM -"C:\devtools\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxproc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxemue20.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\" --backend -B "--core" "RX600" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\config\debugger\ior5f562n8.ddf" "--double" "32" "--endian" "l" "--int" "32" "-d" "emue20" "--emu" "e1e20" "--drv_communication" "USB" "--verify_download" "all" +"C:\devtools\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxproc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxemue20.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\bin\rxbat.dll" --backend -B "--core" "RX600" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.0\rx\config\debugger\ior5f562n8.ddf" "--double" "32" "--endian" "l" "--int" "32" "-d" "emue20" "--emu" "e1e20" "--drv_communication" "USB" "--verify_download" "all" -@REM Loaded plugins: -@REM rxLibSupport.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\CodeCoverage\CodeCoverage.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\Profiling\Profiling.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\stack\stack.dll -@REM C:\devtools\IAR Systems\Embedded Workbench 6.0\common\plugins\SymList\SymList.dll diff --git a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dbgdt b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dbgdt index 348ed9b1c..eb0814430 100644 --- a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dbgdt +++ b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dbgdt @@ -31,7 +31,7 @@ - + TabID-20000-3827 @@ -43,20 +43,20 @@ - 0TabID-2655-13188Debug LogDebug-Log0 + 0TabID-2655-13188Debug LogDebug-Log0 - TextEditor$WS_DIR$\main-full.c0245125071250700100000010000001 + TextEditor$WS_DIR$\main-full.c024512338123380TextEditor$WS_DIR$\FreeRTOSConfig.h07446864686TextEditor$WS_DIR$\webserver\EMAC.c001377613776TextEditor$WS_DIR$\main-blinky.c08647874787TextEditor$WS_DIR$\uIP_Task.c0226710671060100000010000001 - iaridepm.enu1debuggergui.enu1-2-2740238-2-212114172024143585142857755601-2-21981682-2-216842001002381203666119048203666 + iaridepm.enu1debuggergui.enu1-2-2740238-2-212114172024143585142857755601-2-21981682-2-216842001002381203666119048203666 diff --git a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dni b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dni index d7312a315..43d1a4018 100644 --- a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dni +++ b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.dni @@ -1,7 +1,7 @@ [E20] -TimeConnected=1285249114 -ComuniDllSave=101515264 -FfwnsdDllSave=303235072 +TimeConnected=1305306678 +ComuniDllSave=82903040 +FfwnsdDllSave=303890432 ChipName=R5F562N8 CpuMode=0 InputClock=12.500000 @@ -10,8 +10,18 @@ JtagClock=10 DebugFlags=0,0 EmulatorMode=0 NeedInit=1 +BlockBits=0 +B0=0,0 +B1=0,0 +B2=0,0 +B3=0,0 +TraceMode=0 +TraceOutput=2 +TraceCapacity=0 +TraceRestart=0 +OperatingFrequency=12.500000 [DebugChecksum] -Checksum=1020766678 +Checksum=-127835808 [DisAssemblyWindow] NumStates=_ 1 State 1=_ 1 @@ -31,6 +41,18 @@ UseTrigger=1 TriggerName=main LimitSize=0 ByteLimit=50 +[Stack] +FillEnabled=0 +OverflowWarningsEnabled=1 +WarningThreshold=90 +SpWarningsEnabled=1 +WarnLogOnly=1 +UseTrigger=1 +TriggerName=main +LimitSize=0 +ByteLimit=50 +[CallStack] +ShowArgs=0 [Log file] LoggingEnabled=_ 0 LogFile=_ "" @@ -38,10 +60,13 @@ Category=_ 0 [TermIOLog] LoggingEnabled=_ 0 LogFile=_ "" +[CallStackLog] +Enabled=0 [DriverProfiling] Enabled=0 -Source=2 +Mode=3 Graph=0 +Symbiont=0 [Breakpoints] Count=0 [Monitor Execution] diff --git a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.wsdt b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.wsdt index f6a5bb44c..d9a205d53 100644 --- a/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.wsdt +++ b/Demo/RX600_RX62N-RSK_IAR/settings/RTOSDemo.wsdt @@ -25,7 +25,7 @@ - + TabID-10758-3386 @@ -37,7 +37,7 @@ - 0 + 0 TabID-16801-3477 @@ -47,20 +47,20 @@ TabID-414-15843BreakpointsBreakpointsTabID-3320-15993Debug LogDebug-Log - 0 + 0 - TextEditor$WS_DIR$\main-full.c051125071250700100000010000001 + TextEditor$WS_DIR$\main-full.c024512338123380TextEditor$WS_DIR$\main-blinky.c086478747870100000010000001 - iaridepm.enu1-2-2706351-2-2331284197024289206210119720978-2-22321682-2-216842341002381238289197024289206 + iaridepm.enu1-2-2706351-2-2331284197024289206210119720978-2-22321682-2-216842341002381238289197024289206 diff --git a/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c b/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c index a09782dec..17a5925a1 100644 --- a/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c +++ b/Demo/RX600_RX62N-RSK_IAR/uIP_Task.c @@ -57,7 +57,8 @@ /* Scheduler includes. */ #include "FreeRTOS.h" #include "task.h" -#include "semphr.h" +#include "timers.h" +#include "queue.h" /* uip includes. */ #include "net/uip.h" @@ -81,6 +82,15 @@ /* Standard constant. */ #define uipTOTAL_FRAME_HEADER_SIZE 54 +/* The ARP timer and the periodic timer share a callback function, so the +respective timer IDs are used to determine which timer actually expired. These +constants are assigned to the timer IDs. */ +#define uipARP_TIMER 0 +#define uipPERIODIC_TIMER 1 + +/* A block time of zero ticks simply means, "don't block". */ +#define uipDONT_BLOCK 0UL + /*-----------------------------------------------------------*/ /* @@ -88,25 +98,29 @@ */ static void prvSetMACAddress( void ); +/* + * Perform any uIP initialisation necessary. + */ +static void prvInitialise_uIP( void ); + +/* + * The callback function that is assigned to both the periodic timer and the + * ARP timer. + */ +static void prvUIPTimerCallback( xTimerHandle xTimer ); + /* * Port functions required by the uIP stack. */ -void clock_init( void ); clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ -/* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +/* The queue used to send TCP/IP events to the uIP stack. */ +xQueueHandle xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ -void clock_init(void) -{ - /* This is done when the scheduler starts. */ -} -/*-----------------------------------------------------------*/ - clock_time_t clock_time( void ) { return xTaskGetTickCount(); @@ -115,25 +129,14 @@ clock_time_t clock_time( void ) void vuIP_Task( void *pvParameters ) { -portBASE_TYPE i, xDoneSomething; -uip_ipaddr_t xIPAddr; -struct timer periodic_timer, arp_timer; +portBASE_TYPE i; +unsigned long ulNewEvent = 0UL; +unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ - timer_set( &periodic_timer, configTICK_RATE_HZ / 2 ); - timer_set( &arp_timer, configTICK_RATE_HZ * 10 ); - uip_init(); - uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - uip_sethostaddr( &xIPAddr ); - uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); - uip_setnetmask( &xIPAddr ); - prvSetMACAddress(); - httpd_init(); - - /* Create the semaphore used to wake the uIP task. */ - vSemaphoreCreateBinary( xEMACSemaphore ); + prvInitialise_uIP(); /* Initialise the MAC. */ vInitEmac(); @@ -145,49 +148,51 @@ struct timer periodic_timer, arp_timer; for( ;; ) { - xDoneSomething = pdFALSE; - - /* Is there received data ready to be processed? */ - uip_len = ( unsigned short ) ulEMACRead(); - - if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) - { - /* Standard uIP loop taken from the uIP manual. */ - if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) + if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) + { + /* Is there received data ready to be processed? */ + uip_len = ( unsigned short ) ulEMACRead(); + + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { - uip_arp_ipin(); - uip_input(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) + /* Standard uIP loop taken from the uIP manual. */ + if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) { - uip_arp_out(); - vEMACWrite(); + uip_arp_ipin(); + uip_input(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + uip_arp_out(); + vEMACWrite(); + } + } + else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + { + uip_arp_arpin(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + vEMACWrite(); + } } - - xDoneSomething = pdTRUE; } - else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + else { - uip_arp_arpin(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - vEMACWrite(); - } - - xDoneSomething = pdTRUE; + ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - - if( timer_expired( &periodic_timer ) && ( uip_buf != NULL ) ) + + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { - timer_reset( &periodic_timer ); + ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -201,25 +206,82 @@ struct timer periodic_timer, arp_timer; vEMACWrite(); } } - - /* Call the ARP timer function every 10 seconds. */ - if( timer_expired( &arp_timer ) ) - { - timer_reset( &arp_timer ); - uip_arp_timer(); - } - - xDoneSomething = pdTRUE; } - if( xDoneSomething == pdFALSE ) + /* Call the ARP timer function every 10 seconds. */ + if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { - /* We did not receive a packet, and there was no periodic - processing to perform. Block for a fixed period. If a packet - is received during this period we will be woken by the ISR - giving us the Semaphore. */ - xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 20 ); + ulUIP_Events &= ~uipARP_TIMER_EVENT; + uip_arp_timer(); } + + if( ulUIP_Events == pdFALSE ) + { + xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); + ulUIP_Events |= ulNewEvent; + } + } +} +/*-----------------------------------------------------------*/ + +static void prvInitialise_uIP( void ) +{ +xTimerHandle xARPTimer, xPeriodicTimer; +uip_ipaddr_t xIPAddr; +const unsigned long ul_uIPEventQueueLength = 10UL; + + /* Initialise the uIP stack. */ + uip_init(); + uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); + uip_sethostaddr( &xIPAddr ); + uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); + uip_setnetmask( &xIPAddr ); + prvSetMACAddress(); + httpd_init(); + + /* Create the queue used to sent TCP/IP events to the uIP stack. */ + xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); + + /* Create and start the uIP timers. */ + xARPTimer = xTimerCreate( "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + pdTRUE, /* Autor-reload. */ + ( void * ) uipARP_TIMER, + prvUIPTimerCallback + ); + + xPeriodicTimer = xTimerCreate( "PeriodicTimer", + ( 500 / portTICK_RATE_MS ), + pdTRUE, /* Autor-reload. */ + ( void * ) uipPERIODIC_TIMER, + prvUIPTimerCallback + ); + + configASSERT( xARPTimer ); + configASSERT( xPeriodicTimer ); + + xTimerStart( xARPTimer, portMAX_DELAY ); + xTimerStart( xPeriodicTimer, portMAX_DELAY ); +} +/*-----------------------------------------------------------*/ + +static void prvUIPTimerCallback( xTimerHandle xTimer ) +{ +static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; +static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; + + /* This is a time callback, so calls to xQueueSend() must not attempt to + block. */ + switch( ( int ) pvTimerGetTimerID( xTimer ) ) + { + case uipARP_TIMER : xQueueSend( xEMACEventQueue, &ulARPTimerExpired, uipDONT_BLOCK ); + break; + + case uipPERIODIC_TIMER : xQueueSend( xEMACEventQueue, &ulPeriodicTimerExpired, uipDONT_BLOCK ); + break; + + default : /* Should not get here. */ + break; } } /*-----------------------------------------------------------*/ @@ -250,28 +312,34 @@ char *c; { /* Is there a command in the string? */ c = strstr( pcInputString, "?" ); - if( c ) - { + if( c ) + { /* Turn the LED's on or off in accordance with the check box status. */ if( strstr( c, "LED0=1" ) != NULL ) { - /* Turn LEDs on. */ - vParTestSetLED( 3, 1 ); - vParTestSetLED( 4, 1 ); + /* Turn the LEDs on. */ + vParTestSetLED( 7, 1 ); + vParTestSetLED( 8, 1 ); + vParTestSetLED( 9, 1 ); + vParTestSetLED( 10, 1 ); } else { - /* Turn LED 4 off. */ - vParTestSetLED( 3, 0 ); - vParTestSetLED( 4, 0 ); + /* Turn the LEDs off. */ + vParTestSetLED( 7, 0 ); + vParTestSetLED( 8, 0 ); + vParTestSetLED( 9, 0 ); + vParTestSetLED( 10, 0 ); } - } + } else { - /* Commands to turn LEDs off are not always explicit, turn LED 4 - off. */ - vParTestSetLED( 3, 0 ); - vParTestSetLED( 4, 0 ); + /* Commands to turn LEDs off are not always explicit. */ + vParTestSetLED( 7, 0 ); + vParTestSetLED( 8, 0 ); + vParTestSetLED( 9, 0 ); + vParTestSetLED( 10, 0 ); } } } + diff --git a/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c b/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c index f1eb1fe69..01ce33ecc 100644 --- a/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c +++ b/Demo/RX600_RX62N-RSK_IAR/webserver/EMAC.c @@ -152,7 +152,7 @@ static void prvResetEverything( void ); /*-----------------------------------------------------------*/ /* Points to the Rx descriptor currently in use. */ -static volatile ethfifo *pxCurrentDesc = NULL; +static volatile ethfifo *pxCurrentRxDesc = NULL; /* The buffer used by the uIP stack to both receive and send. This points to one of the Ethernet buffers when its actually in use. */ @@ -241,23 +241,29 @@ unsigned long ulBytesReceived; if( ulBytesReceived > 0 ) { - pxCurrentDesc->status &= ~( FP1 | FP0 ); - pxCurrentDesc->status |= ACT; + /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to + the buffer that contains the received data. */ + prvReturnBuffer( uip_buf ); + /* Point uip_buf to the data about ot be processed. */ + uip_buf = ( void * ) pxCurrentRxDesc->buf_p; + + /* Allocate a new buffer to the descriptor, as uip_buf is now using it's + old descriptor. */ + pxCurrentRxDesc->buf_p = ( char * ) prvGetNextBuffer(); + + /* Prepare the descriptor to go again. */ + pxCurrentRxDesc->status &= ~( FP1 | FP0 ); + pxCurrentRxDesc->status |= ACT; + + /* Move onto the next buffer in the ring. */ + pxCurrentRxDesc = pxCurrentRxDesc->next; + if( EDMAC.EDRRR.LONG == 0x00000000L ) { /* Restart Ethernet if it has stopped */ EDMAC.EDRRR.LONG = 0x00000001L; } - - /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to - the buffer that contains the received data. */ - prvReturnBuffer( uip_buf ); - - uip_buf = ( void * ) pxCurrentDesc->buf_p; - - /* Move onto the next buffer in the ring. */ - pxCurrentDesc = pxCurrentDesc->next; } return ulBytesReceived; @@ -367,7 +373,7 @@ long x; pxDescriptor->next = ( ethfifo * ) &( xTxDescriptors[ 0 ] ); /* Use the first Rx descriptor to start with. */ - pxCurrentDesc = &( xRxDescriptors[ 0 ] ); + pxCurrentRxDesc = &( xRxDescriptors[ 0 ] ); } /*-----------------------------------------------------------*/ @@ -439,17 +445,17 @@ static unsigned long prvCheckRxFifoStatus( void ) { unsigned long ulReturn = 0; - if( ( pxCurrentDesc->status & ACT ) != 0 ) + if( ( pxCurrentRxDesc->status & ACT ) != 0 ) { /* Current descriptor is still active. */ } - else if( ( pxCurrentDesc->status & FE ) != 0 ) + else if( ( pxCurrentRxDesc->status & FE ) != 0 ) { /* Frame error. Clear the error. */ - pxCurrentDesc->status &= ~( FP1 | FP0 | FE ); - pxCurrentDesc->status &= ~( RMAF | RRF | RTLF | RTSF | PRE | CERF ); - pxCurrentDesc->status |= ACT; - pxCurrentDesc = pxCurrentDesc->next; + pxCurrentRxDesc->status &= ~( FP1 | FP0 | FE ); + pxCurrentRxDesc->status &= ~( RMAF | RRF | RTLF | RTSF | PRE | CERF ); + pxCurrentRxDesc->status |= ACT; + pxCurrentRxDesc = pxCurrentRxDesc->next; if( EDMAC.EDRRR.LONG == 0x00000000UL ) { @@ -461,9 +467,9 @@ unsigned long ulReturn = 0; { /* The descriptor contains a frame. Because of the size of the buffers the frame should always be complete. */ - if( ( pxCurrentDesc->status & FP0 ) == FP0 ) + if( ( pxCurrentRxDesc->status & FP0 ) == FP0 ) { - ulReturn = pxCurrentDesc->size; + ulReturn = pxCurrentRxDesc->size; } else { @@ -510,12 +516,13 @@ static void prvConfigureEtherCAndEDMAC( void ) #if __LITTLE_ENDIAN__ == 1 EDMAC.EDMR.BIT.DE = 1; #endif - EDMAC.RDLAR = ( void * ) pxCurrentDesc; /* Initialaize Rx Descriptor List Address */ + EDMAC.RDLAR = ( void * ) pxCurrentRxDesc; /* Initialaize Rx Descriptor List Address */ EDMAC.TDLAR = ( void * ) &( xTxDescriptors[ 0 ] );/* Initialaize Tx Descriptor List Address */ EDMAC.TRSCER.LONG = 0x00000000; /* Copy-back status is RFE & TFE only */ EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */ EDMAC.FDR.LONG = 0x00000000; /* Transmit fifo & receive fifo is 256 bytes */ EDMAC.RMCR.LONG = 0x00000003; /* Receive function is normal mode(continued) */ + ETHERC.ECMR.BIT.PRM = 0; /* Ensure promiscuous mode is off. */ /* Enable the interrupt... */ _IEN( _ETHER_EINT ) = 1; @@ -527,21 +534,16 @@ __interrupt void vEMAC_ISR_Handler( void ) { unsigned long ul = EDMAC.EESR.LONG; long lHigherPriorityTaskWoken = pdFALSE; -extern xSemaphoreHandle xEMACSemaphore; -static long ulTxEndInts = 0; +extern xQueueHandle xEMACEventQueue; +const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; __enable_interrupt(); /* Has a Tx end occurred? */ if( ul & emacTX_END_INTERRUPT ) { - ++ulTxEndInts; - if( ulTxEndInts >= 2 ) - { - /* Only return the buffer to the pool once both Txes have completed. */ - prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); - ulTxEndInts = 0; - } + /* Only return the buffer to the pool once both Txes have completed. */ + prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); EDMAC.EESR.LONG = emacTX_END_INTERRUPT; } @@ -549,7 +551,7 @@ static long ulTxEndInts = 0; if( ul & emacRX_END_INTERRUPT ) { /* Make sure the Ethernet task is not blocked waiting for a packet. */ - xSemaphoreGiveFromISR( xEMACSemaphore, &lHigherPriorityTaskWoken ); + xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken ); portYIELD_FROM_ISR( lHigherPriorityTaskWoken ); EDMAC.EESR.LONG = emacRX_END_INTERRUPT; } diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.hws b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.hws index 8eeee1069..f77d5e6e3 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.hws +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.hws @@ -16,7 +16,8 @@ [WORKSPACE_PROPERTIES] [HELP_FILES] "c:\devtools\renesas\hew\tools\renesas\rx\1_0_0\hew\stdlib.chm" "C/C++ Standard Library Help" 0 -"c:\devtools\renesas\hew\tools\renesas\rx\1_0_1\hew\stdlib.chm" "C/C++ Standard Library Help" 1 +"c:\devtools\renesas\hew\tools\renesas\rx\1_0_1\hew\stdlib.chm" "C/C++ Standard Library Help" 0 +"c:\devtools\renesas\hew\tools\renesas\rx\1_0_2\hew\stdlib.chm" "C/C++ Standard Library Help" 1 [GENERAL_DATA_PROJECT] [USERMENUTOOLS] [CUSTOMPLACEHOLDERS] diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.tws b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.tws index dc29e21ab..6be12051e 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.tws +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo.tws @@ -10,8 +10,8 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\main-blinky.c" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\main-full.c" [WORKSPACE_FILE_STATES] -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\main-blinky.c" 88 88 1100 433 0 1 -"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\main-full.c" -4 -23 1310 662 1 0 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\main-blinky.c" 88 88 1100 433 0 0 +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\main-full.c" -4 -23 1310 680 1 1 [LOADED_PROJECTS] "RTOSDemo" [END] diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug/Debug.hdp b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug/Debug.hdp index b2e5c779c..a8fcbebfd 100644 Binary files a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug/Debug.hdp and b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug/Debug.hdp differ diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp index f17d51087..6d5a944c8 100644 Binary files a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp and b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/Debug_RX600_E1_E20_SYSTEM/Debug_RX600_E1_E20_SYSTEM.hdp differ diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h index 7dc5d501f..4c7ee4ba4 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -93,6 +93,12 @@ #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY ( 3 ) +#define configTIMER_QUEUE_LENGTH 5 +#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE ) + /* 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 @@ -120,6 +126,8 @@ to exclude the API function. */ #define INCLUDE_uxTaskGetStackHighWaterMark 1 #define INCLUDE_xTaskGetSchedulerState 1 +#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } + extern volatile unsigned long ulHighFrequencyTickCount; #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() nop() /* Run time stats use the same timer as the high frequency timer test. */ #define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTickCount diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp index e5f78d3f8..2b55a9b3d 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.hwp @@ -162,6 +162,7 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port_asm.src" "User" "C source file|FreeRTOS|Portable layer" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "User" "C source file|FreeRTOS" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "User" "C source file|FreeRTOS" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "User" "C source file" 2 [FOLDER] "Assembly source file" "Assembly source file" "C source file" "C source file" @@ -190,7 +191,7 @@ [GENERAL_DATA_SESSION_SessionRX600_E1_E20_SYSTEM] [GENERAL_DATA_SESSION_SimSessionRX600] [OPTIONS_Blinky_Renesas OptLinker] -"Single Shot" "06039a50d711cc10" 5 +"Single Shot" "095444c51911cc10" 5 [OPTIONS_Blinky_Renesas RX Assembler] "Assembly source file" "0b955de7c711cc10" 4 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\Renesas-Files\lowlvl.src" "0b955de7c711cc10" 4 @@ -240,10 +241,11 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "0b955de7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0b955de7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0b955de7c711cc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0d5972c51911cc10" 2 [OPTIONS_Blinky_Renesas RX C/C++ Library Generator] "Single Shot" "0b955de7c711cc10" 1 [OPTIONS_Blinky_Renesas RX Configurator] -"Single Shot" "0bbed540d711cc10" 6 +"Single Shot" "0d5972c51911cc10" 6 [OPTIONS_Blinky] "" 0 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0]" 6 @@ -288,7 +290,7 @@ [LINKAGE_ORDER_Blinky] [GENERAL_DATA_CONFIGURATION_Blinky] [OPTIONS_Debug_Renesas OptLinker] -"Single Shot" "06039a50d711cc10" 5 +"Single Shot" "095444c51911cc10" 5 [OPTIONS_Debug_Renesas RX Assembler] "Assembly source file" "0ce90de7c711cc10" 4 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\Renesas-Files\lowlvl.src" "0ce90de7c711cc10" 4 @@ -338,10 +340,11 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "0ce90de7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0ce90de7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0ce90de7c711cc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0d5972c51911cc10" 2 [OPTIONS_Debug_Renesas RX C/C++ Library Generator] "Single Shot" "0ce90de7c711cc10" 1 [OPTIONS_Debug_Renesas RX Configurator] -"Single Shot" "0bbed540d711cc10" 6 +"Single Shot" "0d5972c51911cc10" 6 [OPTIONS_Debug] "" 0 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0]" 6 @@ -363,7 +366,7 @@ [LINKAGE_ORDER_Debug] [GENERAL_DATA_CONFIGURATION_Debug] [OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas OptLinker] -"Single Shot" "06039a50d711cc10" 5 +"Single Shot" "095444c51911cc10" 5 [OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas RX Assembler] "Assembly source file" "0cd2ece7c711cc10" 4 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\Renesas-Files\lowlvl.src" "0cd2ece7c711cc10" 4 @@ -413,10 +416,11 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "0d3ebce7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0d3ebce7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0d3ebce7c711cc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0d5972c51911cc10" 2 [OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas RX C/C++ Library Generator] "Single Shot" "0d3ebce7c711cc10" 1 [OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas RX Configurator] -"Single Shot" "0bbed540d711cc10" 6 +"Single Shot" "0d5972c51911cc10" 6 [OPTIONS_Debug_RX600_E1_E20_SYSTEM] "" 0 "[S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [V|VERSION|1] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|ROUND|NEAREST] [S|DBL_SIZE|4] [B|SIGNED_CHAR|0] [B|SIGNED_BITFIELD|0] [S|BIT_ORDER|RIGHT] [S|FINT_REGISTER|0] [S|BRANCH|24] [S|LANG|C] [B|RUNTIME|1] [B|CTYPE|0] [B|MATH|0] [B|MATHF|0] [B|STDARG|0] [B|STDIO|0] [B|STDLIB|0] [B|STRING|0] [B|IOS|0] [B|NEW|1] [B|COMPLEX|0] [B|CPPSTRING|0] [S|MODE|BUILD/CHANGED]" 1 @@ -431,7 +435,7 @@ [LINKAGE_ORDER_Debug_RX600_E1_E20_SYSTEM] [GENERAL_DATA_CONFIGURATION_Debug_RX600_E1_E20_SYSTEM] [OPTIONS_Debug_with_optimisation_Renesas OptLinker] -"Single Shot" "06039a50d711cc10" 5 +"Single Shot" "095444c51911cc10" 5 [OPTIONS_Debug_with_optimisation_Renesas RX Assembler] "Assembly source file" "0d3ebce7c711cc10" 4 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\Renesas-Files\lowlvl.src" "0d3ebce7c711cc10" 4 @@ -481,10 +485,11 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "0d279ce7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0d279ce7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0d279ce7c711cc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0d5972c51911cc10" 2 [OPTIONS_Debug_with_optimisation_Renesas RX C/C++ Library Generator] "Single Shot" "0d279ce7c711cc10" 1 [OPTIONS_Debug_with_optimisation_Renesas RX Configurator] -"Single Shot" "0bbed540d711cc10" 6 +"Single Shot" "0d5972c51911cc10" 6 [OPTIONS_Debug_with_optimisation] "" 0 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0]" 6 @@ -504,7 +509,7 @@ [LINKAGE_ORDER_Debug_with_optimisation] [GENERAL_DATA_CONFIGURATION_Debug_with_optimisation] [OPTIONS_SimDebug_RX600_Renesas OptLinker] -"Single Shot" "06039a50d711cc10" 5 +"Single Shot" "095444c51911cc10" 5 [OPTIONS_SimDebug_RX600_Renesas RX Assembler] "Assembly source file" "0cf03de7c711cc10" 4 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RSK_Renesas\RTOSDemo\Renesas-Files\lowlvl.src" "0cf03de7c711cc10" 4 @@ -554,10 +559,11 @@ "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" "0cf03de7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "0cf03de7c711cc10" 2 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "0cf03de7c711cc10" 2 +"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" "0d5972c51911cc10" 2 [OPTIONS_SimDebug_RX600_Renesas RX C/C++ Library Generator] "Single Shot" "0cf03de7c711cc10" 1 [OPTIONS_SimDebug_RX600_Renesas RX Configurator] -"Single Shot" "0bbed540d711cc10" 6 +"Single Shot" "0d5972c51911cc10" 6 [OPTIONS_SimDebug_RX600] "" 0 "[S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [V|VERSION|1] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|ROUND|NEAREST] [S|DBL_SIZE|4] [B|SIGNED_CHAR|0] [B|SIGNED_BITFIELD|0] [S|BIT_ORDER|RIGHT] [S|FINT_REGISTER|0] [S|BRANCH|24] [S|LANG|C] [B|RUNTIME|1] [B|CTYPE|0] [B|MATH|0] [B|MATHF|0] [B|STDARG|0] [B|STDIO|0] [B|STDLIB|0] [B|STRING|0] [B|IOS|0] [B|NEW|1] [B|COMPLEX|0] [B|CPPSTRING|0] [S|MODE|BUILD/CHANGED]" 1 diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.nav b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.nav index 09bad3e21..955de740e 100644 Binary files a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.nav and b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/RTOSDemo.nav differ diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf index f16a25c67..fff7fad75 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf @@ -89,31 +89,31 @@ "{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" "000000000000BD20" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "000000000000BB8B" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "000000000000CEC4" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000012A60" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000014" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000BD20" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "00000000000130D0" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000004030004" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF9817C" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "00000000FFF8A81A" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF8B0C8" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "00000000426E0000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "000000000001097C" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "000000000000CEC4" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "00000000000130CC" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030004" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF8C73C" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF8B130" "{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" "1234567887650000" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "000000000000000E" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "00000000000000A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "00000000000000A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "00000000A5A5A5A5" -"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "00000000A5A5A5A5" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "000000000000000A" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000007" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000041380000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000004FD6" +"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "000000000000E6AC" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "00000000A5A5A5A5" "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "26" "{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" @@ -370,7 +370,7 @@ 0 [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" 228 0 0 350 200 17 0 "32771|32772|32778|<>|32773|32774|<>|32820|<>|32801|32824" "0.0" +"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 228 0 0 100 100 17 0 "32771|32772|32778|<>|32773|32774|<>" "0.0" "{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 374 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 0 0 1062 571 9 0 "" "0.0" "{WK_00000001_IO}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 2 "0.39" 228 0 0 350 200 17 0 "32817|32826|32819|32820|32821" "0.0" diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini index ae83e6023..f742d4377 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SessionRX600_E1_E20_SYSTEM.ini @@ -2,7 +2,7 @@ DebugMode=0 PowerOut=0 ResetRelease=0 -EmulatorSerial=E1:_9KM000237 +EmulatorSerial= McuGroup=RX62N Group Device=R5F562N8 McuFileDir=RX62NGr diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SimDebug_RX600/SimDebug_RX600.hdp b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SimDebug_RX600/SimDebug_RX600.hdp index 020f081fb..9b8c90ecf 100644 Binary files a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SimDebug_RX600/SimDebug_RX600.hdp and b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/SimDebug_RX600/SimDebug_RX600.hdp differ diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c index 25ed6f964..847c9cbe3 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/uIP_Task.c @@ -57,7 +57,8 @@ /* Scheduler includes. */ #include "FreeRTOS.h" #include "task.h" -#include "semphr.h" +#include "timers.h" +#include "queue.h" /* uip includes. */ #include "net/uip.h" @@ -81,6 +82,15 @@ /* Standard constant. */ #define uipTOTAL_FRAME_HEADER_SIZE 54 +/* The ARP timer and the periodic timer share a callback function, so the +respective timer IDs are used to determine which timer actually expired. These +constants are assigned to the timer IDs. */ +#define uipARP_TIMER 0 +#define uipPERIODIC_TIMER 1 + +/* A block time of zero ticks simply means, "don't block". */ +#define uipDONT_BLOCK 0UL + /*-----------------------------------------------------------*/ /* @@ -88,25 +98,29 @@ */ static void prvSetMACAddress( void ); +/* + * Perform any uIP initialisation necessary. + */ +static void prvInitialise_uIP( void ); + +/* + * The callback function that is assigned to both the periodic timer and the + * ARP timer. + */ +static void prvUIPTimerCallback( xTimerHandle xTimer ); + /* * Port functions required by the uIP stack. */ -void clock_init( void ); clock_time_t clock_time( void ); /*-----------------------------------------------------------*/ -/* The semaphore used by the ISR to wake the uIP task. */ -xSemaphoreHandle xEMACSemaphore = NULL; +/* The queue used to send TCP/IP events to the uIP stack. */ +xQueueHandle xEMACEventQueue = NULL; /*-----------------------------------------------------------*/ -void clock_init(void) -{ - /* This is done when the scheduler starts. */ -} -/*-----------------------------------------------------------*/ - clock_time_t clock_time( void ) { return xTaskGetTickCount(); @@ -115,25 +129,14 @@ clock_time_t clock_time( void ) void vuIP_Task( void *pvParameters ) { -portBASE_TYPE i, xDoneSomething; -uip_ipaddr_t xIPAddr; -struct timer periodic_timer, arp_timer; +portBASE_TYPE i; +unsigned long ulNewEvent = 0UL; +unsigned long ulUIP_Events = 0UL; ( void ) pvParameters; - + /* Initialise the uIP stack. */ - timer_set( &periodic_timer, configTICK_RATE_HZ / 2 ); - timer_set( &arp_timer, configTICK_RATE_HZ * 10 ); - uip_init(); - uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); - uip_sethostaddr( &xIPAddr ); - uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); - uip_setnetmask( &xIPAddr ); - prvSetMACAddress(); - httpd_init(); - - /* Create the semaphore used to wake the uIP task. */ - vSemaphoreCreateBinary( xEMACSemaphore ); + prvInitialise_uIP(); /* Initialise the MAC. */ vInitEmac(); @@ -145,49 +148,51 @@ struct timer periodic_timer, arp_timer; for( ;; ) { - xDoneSomething = pdFALSE; - - /* Is there received data ready to be processed? */ - uip_len = ( unsigned short ) ulEMACRead(); - - if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) - { - /* Standard uIP loop taken from the uIP manual. */ - if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) + if( ( ulUIP_Events & uipETHERNET_RX_EVENT ) != 0UL ) + { + /* Is there received data ready to be processed? */ + uip_len = ( unsigned short ) ulEMACRead(); + + if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) { - uip_arp_ipin(); - uip_input(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) + /* Standard uIP loop taken from the uIP manual. */ + if( xHeader->type == htons( UIP_ETHTYPE_IP ) ) { - uip_arp_out(); - vEMACWrite(); + uip_arp_ipin(); + uip_input(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + uip_arp_out(); + vEMACWrite(); + } + } + else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + { + uip_arp_arpin(); + + /* If the above function invocation resulted in data that + should be sent out on the network, the global variable + uip_len is set to a value > 0. */ + if( uip_len > 0 ) + { + vEMACWrite(); + } } - - xDoneSomething = pdTRUE; } - else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) ) + else { - uip_arp_arpin(); - - /* If the above function invocation resulted in data that - should be sent out on the network, the global variable - uip_len is set to a value > 0. */ - if( uip_len > 0 ) - { - vEMACWrite(); - } - - xDoneSomething = pdTRUE; + ulUIP_Events &= ~uipETHERNET_RX_EVENT; } } - - if( timer_expired( &periodic_timer ) && ( uip_buf != NULL ) ) + + if( ( ulUIP_Events & uipPERIODIC_TIMER_EVENT ) != 0UL ) { - timer_reset( &periodic_timer ); + ulUIP_Events &= ~uipPERIODIC_TIMER_EVENT; + for( i = 0; i < UIP_CONNS; i++ ) { uip_periodic( i ); @@ -201,25 +206,82 @@ struct timer periodic_timer, arp_timer; vEMACWrite(); } } - - /* Call the ARP timer function every 10 seconds. */ - if( timer_expired( &arp_timer ) ) - { - timer_reset( &arp_timer ); - uip_arp_timer(); - } - - xDoneSomething = pdTRUE; } - if( xDoneSomething == pdFALSE ) + /* Call the ARP timer function every 10 seconds. */ + if( ( ulUIP_Events & uipARP_TIMER_EVENT ) != 0 ) { - /* We did not receive a packet, and there was no periodic - processing to perform. Block for a fixed period. If a packet - is received during this period we will be woken by the ISR - giving us the Semaphore. */ - xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 20 ); + ulUIP_Events &= ~uipARP_TIMER_EVENT; + uip_arp_timer(); } + + if( ulUIP_Events == pdFALSE ) + { + xQueueReceive( xEMACEventQueue, &ulNewEvent, portMAX_DELAY ); + ulUIP_Events |= ulNewEvent; + } + } +} +/*-----------------------------------------------------------*/ + +static void prvInitialise_uIP( void ) +{ +xTimerHandle xARPTimer, xPeriodicTimer; +uip_ipaddr_t xIPAddr; +const unsigned long ul_uIPEventQueueLength = 10UL; + + /* Initialise the uIP stack. */ + uip_init(); + uip_ipaddr( &xIPAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 ); + uip_sethostaddr( &xIPAddr ); + uip_ipaddr( &xIPAddr, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 ); + uip_setnetmask( &xIPAddr ); + prvSetMACAddress(); + httpd_init(); + + /* Create the queue used to sent TCP/IP events to the uIP stack. */ + xEMACEventQueue = xQueueCreate( ul_uIPEventQueueLength, sizeof( unsigned long ) ); + + /* Create and start the uIP timers. */ + xARPTimer = xTimerCreate( ( const signed char * const ) "ARPTimer", /* Just a name that is helpful for debugging, not used by the kernel. */ + ( 10000UL / portTICK_RATE_MS ), /* Timer period. */ + pdTRUE, /* Autor-reload. */ + ( void * ) uipARP_TIMER, + prvUIPTimerCallback + ); + + xPeriodicTimer = xTimerCreate( ( const signed char * const ) "PeriodicTimer", + ( 500 / portTICK_RATE_MS ), + pdTRUE, /* Autor-reload. */ + ( void * ) uipPERIODIC_TIMER, + prvUIPTimerCallback + ); + + configASSERT( xARPTimer ); + configASSERT( xPeriodicTimer ); + + xTimerStart( xARPTimer, portMAX_DELAY ); + xTimerStart( xPeriodicTimer, portMAX_DELAY ); +} +/*-----------------------------------------------------------*/ + +static void prvUIPTimerCallback( xTimerHandle xTimer ) +{ +static const unsigned long ulARPTimerExpired = uipARP_TIMER_EVENT; +static const unsigned long ulPeriodicTimerExpired = uipPERIODIC_TIMER_EVENT; + + /* This is a time callback, so calls to xQueueSend() must not attempt to + block. */ + switch( ( int ) pvTimerGetTimerID( xTimer ) ) + { + case uipARP_TIMER : xQueueSend( xEMACEventQueue, &ulARPTimerExpired, uipDONT_BLOCK ); + break; + + case uipPERIODIC_TIMER : xQueueSend( xEMACEventQueue, &ulPeriodicTimerExpired, uipDONT_BLOCK ); + break; + + default : /* Should not get here. */ + break; } } /*-----------------------------------------------------------*/ @@ -250,28 +312,33 @@ char *c; { /* Is there a command in the string? */ c = strstr( pcInputString, "?" ); - if( c ) - { + if( c ) + { /* Turn the LED's on or off in accordance with the check box status. */ if( strstr( c, "LED0=1" ) != NULL ) { - /* Turn LEDs on. */ - vParTestSetLED( 3, 1 ); - vParTestSetLED( 4, 1 ); + /* Turn the LEDs on. */ + vParTestSetLED( 7, 1 ); + vParTestSetLED( 8, 1 ); + vParTestSetLED( 9, 1 ); + vParTestSetLED( 10, 1 ); } else { - /* Turn LED 4 off. */ - vParTestSetLED( 3, 0 ); - vParTestSetLED( 4, 0 ); + /* Turn the LEDs off. */ + vParTestSetLED( 7, 0 ); + vParTestSetLED( 8, 0 ); + vParTestSetLED( 9, 0 ); + vParTestSetLED( 10, 0 ); } - } + } else { - /* Commands to turn LEDs off are not always explicit, turn LED 4 - off. */ - vParTestSetLED( 3, 0 ); - vParTestSetLED( 4, 0 ); + /* Commands to turn LEDs off are not always explicit. */ + vParTestSetLED( 7, 0 ); + vParTestSetLED( 8, 0 ); + vParTestSetLED( 9, 0 ); + vParTestSetLED( 10, 0 ); } } } diff --git a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c index 88dd28094..8fe653326 100644 --- a/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c +++ b/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/webserver/EMAC.c @@ -246,23 +246,29 @@ unsigned long ulBytesReceived; if( ulBytesReceived > 0 ) { - pxCurrentRxDesc->status &= ~( FP1 | FP0 ); - pxCurrentRxDesc->status |= ACT; + /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to + the buffer that contains the received data. */ + prvReturnBuffer( uip_buf ); + /* Point uip_buf to the data about ot be processed. */ + uip_buf = ( void * ) pxCurrentRxDesc->buf_p; + + /* Allocate a new buffer to the descriptor, as uip_buf is now using it's + old descriptor. */ + pxCurrentRxDesc->buf_p = prvGetNextBuffer(); + + /* Prepare the descriptor to go again. */ + pxCurrentRxDesc->status &= ~( FP1 | FP0 ); + pxCurrentRxDesc->status |= ACT; + + /* Move onto the next buffer in the ring. */ + pxCurrentRxDesc = pxCurrentRxDesc->next; + if( EDMAC.EDRRR.LONG == 0x00000000L ) { /* Restart Ethernet if it has stopped */ EDMAC.EDRRR.LONG = 0x00000001L; } - - /* Mark the pxDescriptor buffer as free as uip_buf is going to be set to - the buffer that contains the received data. */ - prvReturnBuffer( uip_buf ); - - uip_buf = ( void * ) pxCurrentRxDesc->buf_p; - - /* Move onto the next buffer in the ring. */ - pxCurrentRxDesc = pxCurrentRxDesc->next; } return ulBytesReceived; @@ -521,7 +527,8 @@ static void prvConfigureEtherCAndEDMAC( void ) EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */ EDMAC.FDR.LONG = 0x00000000; /* Transmit fifo & receive fifo is 256 bytes */ EDMAC.RMCR.LONG = 0x00000003; /* Receive function is normal mode(continued) */ - + ETHERC.ECMR.BIT.PRM = 0; /* Ensure promiscuous mode is off. */ + /* Enable the interrupt... */ _IEN( _ETHER_EINT ) = 1; } @@ -532,19 +539,14 @@ void vEMAC_ISR_Handler( void ) { unsigned long ul = EDMAC.EESR.LONG; long lHigherPriorityTaskWoken = pdFALSE; -extern xSemaphoreHandle xEMACSemaphore; -static long ulTxEndInts = 0; +extern xQueueHandle xEMACEventQueue; +const unsigned long ulRxEvent = uipETHERNET_RX_EVENT; /* Has a Tx end occurred? */ if( ul & emacTX_END_INTERRUPT ) { - ++ulTxEndInts; - if( ulTxEndInts >= 2 ) - { - /* Only return the buffer to the pool once both Txes have completed. */ - prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); - ulTxEndInts = 0; - } + /* Only return the buffer to the pool once both Txes have completed. */ + prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); EDMAC.EESR.LONG = emacTX_END_INTERRUPT; } @@ -552,7 +554,7 @@ static long ulTxEndInts = 0; if( ul & emacRX_END_INTERRUPT ) { /* Make sure the Ethernet task is not blocked waiting for a packet. */ - xSemaphoreGiveFromISR( xEMACSemaphore, &lHigherPriorityTaskWoken ); + xQueueSendFromISR( xEMACEventQueue, &ulRxEvent, &lHigherPriorityTaskWoken ); portYIELD_FROM_ISR( lHigherPriorityTaskWoken ); EDMAC.EESR.LONG = emacRX_END_INTERRUPT; }