From: richardbarry Date: Wed, 6 Mar 2013 10:56:03 +0000 (+0000) Subject: RL78/GCC related: X-Git-Tag: V7.4.1~37 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a007738e265b2a258d8ae459f87417a1cabcaec9;p=freertos RL78/GCC related: + Add RL78G14 specific linker script. + Move the call to the function that sets up the clocks to before the code that sets up the .data and .bss sections. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1838 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker new file mode 100644 index 000000000..41d71b41d --- /dev/null +++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c index 0a1aaa242..57c62ed73 100644 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c +++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c @@ -217,6 +217,7 @@ short main( void ) ucTemp = RESF; ucTemp = sizeof( char* ); ucTemp = sizeof( pdTASK_CODE ); +#warning Take out all references to the P1 LED. P1 &= 0xFE; PM1 &= 0xFE; P1_bit.no0 = 1; @@ -226,7 +227,7 @@ short main( void ) /* First create the 'standard demo' tasks. These are used to demonstrate API functions being used and also to test the kernel port. More information is provided on the FreeRTOS.org WEB site. */ -// vStartDynamicPriorityTasks(); + vStartDynamicPriorityTasks(); #warning Runs if the debugger is not connected and vStartDynamicPriorityTasks() is commented out. vStartPolledQueueTasks( tskIDLE_PRIORITY ); vCreateBlockTimeTasks(); diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm index c1c5a46d0..b0ee43652 100644 --- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm +++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm @@ -8,8 +8,8 @@ /* */ /* This file is generated by e2studio. */ /* */ -/***********************************************************************/ - +/***********************************************************************/ + /*reset_program.asm*/ @@ -18,11 +18,11 @@ .global _PowerON_Reset /*! global Start routine */ .short _PowerON_Reset - -#ifdef CPPAPP + +#ifdef CPPAPP ___dso_handle: .global ___dso_handle -#endif +#endif .extern _HardwareSetup /*! external Sub-routine to initialise Hardware*/ @@ -30,9 +30,9 @@ ___dso_handle: .extern _mdata .extern _ebss .extern _bss - + .extern _edata - .extern _main + .extern _main .extern _stack .extern _exit @@ -40,7 +40,7 @@ ___dso_handle: ;; DE = end of list ;; BC = step direction (+2 or -2) */ - + .text /* call to _PowerON_Reset */ @@ -48,8 +48,11 @@ _PowerON_Reset: /* initialise user stack pointer */ movw sp,#_stack /* Set stack pointer */ +/* call the hardware initialiser */ + call !!_HardwareSetup + nop -/* load data section from ROM to RAM */ +/* load data section from ROM to RAM */ ;; block move to initialize .data ;; we're copying from 00:[_romdatastart] to 0F:[_datastart] @@ -58,7 +61,7 @@ _PowerON_Reset: sel rb0 /* ;;bank 0 */ movw de, #_mdata /* src ROM address of data section in de */ movw hl, #_data /* dest start RAM address of data section in hl */ - + sel rb1 /* bank 1 */ movw hl, #_data /* dest start RAM address of data section in hl */ movw ax, #_edata /* ;; size of romdata section in ax */ @@ -79,7 +82,7 @@ _PowerON_Reset: br $1b 1: - + /* bss initialisation : zero out bss */ sel rb0 /* bank 0 */ movw hl, #_bss /* store the start address of bss in hl */ @@ -101,10 +104,6 @@ _PowerON_Reset: 1: sel rb0 /* bank 0 */ -/* call the hardware initialiser */ - call !!_HardwareSetup - nop - /* start user program */ movw ax, #0 @@ -118,4 +117,4 @@ _PowerON_Reset: _exit: br $_exit - .end + .end