]> git.sur5r.net Git - freertos/commitdiff
RL78/GCC related:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 6 Mar 2013 10:56:03 +0000 (10:56 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 6 Mar 2013 10:56:03 +0000 (10:56 +0000)
+ 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

FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker [new file with mode: 0644]
FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c
FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm

diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker b/FreeRTOS/Demo/RL78_E2Studio_GCC/.YRDKRL78G14linker
new file mode 100644 (file)
index 0000000..41d71b4
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="ASCII"?>\r
+<com.renesas.linkersection.model:SectionContainer xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:com.renesas.linkersection.model="http:///LinkerSection.ecore" targets="GNU_RL78">\r
+  <sections name=".vec" isKeep="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".vec"/>\r
+  </sections>\r
+  <sections name=".vects" isKeep="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".vects"/>\r
+  </sections>\r
+  <sections name=".option_bytes" isKeep="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="192"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".option_bytes"/>\r
+  </sections>\r
+  <sections name=".security_id" isKeep="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="196"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".security_id"/>\r
+  </sections>\r
+  <sections name=".text">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="216"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".text"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".text.*"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="etext"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+  </sections>\r
+  <sections name=".init">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.4"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".init"/>\r
+  </sections>\r
+  <sections name=".fini">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.5"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".fini"/>\r
+  </sections>\r
+  <sections name=".got">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.6"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".got"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".got.plt"/>\r
+  </sections>\r
+  <sections name=".rodata MAX(., 0x3000)">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.7"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".rodata"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".rodata.*"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_erodata"/>\r
+  </sections>\r
+  <sections name=".eh_frame_hdr">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.8"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".eh_frame_hdr"/>\r
+  </sections>\r
+  <sections name=".eh_frame">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.9"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".eh_frame"/>\r
+  </sections>\r
+  <sections name=".jcr">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.10"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".jcr"/>\r
+  </sections>\r
+  <sections name=".tors">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.11"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__CTOR_LIST__"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="___ctors"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".ctors"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="___ctors_end"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__CTOR_END__"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__DTOR_LIST__"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="___dtors"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".dtors"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="___dtors_end"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__DTOR_END__"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_mdata"/>\r
+  </sections>\r
+  <sections name=".data_original" isKeep="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1023744"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_data_original"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".data_original"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".data_original.*"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_edata_original"/>\r
+    <reservedMemAddress xsi:type="com.renesas.linkersection.model:ReferencedLabelAddress" label="//@sections.12/@contents.12"/>\r
+  </sections>\r
+  <sections name="trace_buffer" isKeep="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1024768"/>\r
+  </sections>\r
+  <sections name=".data" isKeep="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1025792"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_data"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".data"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".data.*"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_edata"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+  </sections>\r
+  <sections name=".bss">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.15"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_bss"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".bss"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".bss.**"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name="COMMON"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_ebss"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_end"/>\r
+  </sections>\r
+  <sections name=".stack" isNoLoad="true">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1048064"/>\r
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_stack"/>\r
+  </sections>\r
+</com.renesas.linkersection.model:SectionContainer>\r
index 0a1aaa2427a60bf5af43fd42a55a115e5e21cf44..57c62ed734466352c45bb675bdfd291fdf4fd0e7 100644 (file)
@@ -217,6 +217,7 @@ short main( void )
        ucTemp = RESF;\r
        ucTemp = sizeof( char* );\r
        ucTemp = sizeof( pdTASK_CODE );\r
+#warning Take out all references to the P1 LED.\r
        P1 &= 0xFE; PM1 &= 0xFE;\r
        P1_bit.no0 = 1;\r
 \r
@@ -226,7 +227,7 @@ short main( void )
        /* First create the 'standard demo' tasks.  These are used to demonstrate\r
        API functions being used and also to test the kernel port.  More information\r
        is provided on the FreeRTOS.org WEB site. */\r
-//     vStartDynamicPriorityTasks();\r
+       vStartDynamicPriorityTasks();\r
 #warning Runs if the debugger is not connected and vStartDynamicPriorityTasks() is commented out.\r
        vStartPolledQueueTasks( tskIDLE_PRIORITY );\r
        vCreateBlockTimeTasks();\r
index c1c5a46d0259d461b01b0588621669039f5160e7..b0ee436521affedd97e032c8274f99686f3bcc46 100644 (file)
@@ -8,8 +8,8 @@
 /*                                                                                                                    */
 /*      This file is generated by e2studio.                        */
 /*                                                                                                                    */
-/***********************************************************************/                                                                       \r
-                                                                                   \r
+/***********************************************************************/\r
+\r
 \r
 \r
        /*reset_program.asm*/\r
 \r
        .global _PowerON_Reset  /*! global Start routine */\r
        .short _PowerON_Reset\r
-       \r
-#ifdef CPPAPP  \r
+\r
+#ifdef CPPAPP\r
 ___dso_handle:\r
        .global ___dso_handle\r
-#endif \r
+#endif\r
 \r
 \r
        .extern _HardwareSetup /*! external Sub-routine to initialise Hardware*/\r
@@ -30,9 +30,9 @@ ___dso_handle:
        .extern _mdata\r
        .extern _ebss\r
        .extern _bss\r
-       \r
+\r
        .extern _edata\r
-       .extern _main \r
+       .extern _main\r
        .extern _stack\r
        .extern _exit\r
 \r
@@ -40,7 +40,7 @@ ___dso_handle:
         ;; DE = end of list\r
         ;; BC = step direction (+2 or -2)\r
        */\r
-       \r
+\r
        .text\r
 \r
 /* call to _PowerON_Reset */\r
@@ -48,8 +48,11 @@ _PowerON_Reset:
 /* initialise user stack pointer */\r
        movw sp,#_stack /* Set stack pointer */\r
 \r
+/* call the hardware initialiser */
+       call    !!_HardwareSetup
+       nop
 \r
-/* load data section from ROM to RAM */        \r
+/* load data section from ROM to RAM */\r
 ;; block move to initialize .data\r
 \r
         ;; we're copying from 00:[_romdatastart] to 0F:[_datastart]\r
@@ -58,7 +61,7 @@ _PowerON_Reset:
     sel     rb0         /*  ;;bank 0 */\r
     movw    de, #_mdata        /* src ROM address of data section in de */\r
     movw    hl, #_data         /* dest start RAM address of data section in hl */\r
-               \r
+\r
     sel     rb1              /* bank 1 */\r
     movw    hl, #_data         /* dest start RAM address of data section in hl */\r
     movw    ax, #_edata   /*    ;; size of romdata section in ax */\r
@@ -79,7 +82,7 @@ _PowerON_Reset:
     br      $1b\r
 1:\r
 \r
-       \r
+\r
 /* bss initialisation : zero out bss */\r
     sel     rb0         /* bank 0 */\r
     movw    hl, #_bss          /* store the start address of bss in hl */\r
@@ -101,10 +104,6 @@ _PowerON_Reset:
 1:\r
     sel     rb0             /* bank 0 */\r
 \r
-/* call the hardware initialiser */\r
-       call    !!_HardwareSetup\r
-       nop\r
-\r
 /* start user program */\r
 \r
     movw    ax, #0\r
@@ -118,4 +117,4 @@ _PowerON_Reset:
 _exit:\r
      br        $_exit\r
 \r
-       .end             \r
+       .end\r