Fix: length for scatter loading should be in words not in bytes

Divide by 4 the length in bytes to get length in words as expected by
the CMSIS scatter loading implementation.

Change-Id: I5d239e13739a578bd61dc0b594e3453e8dcdab4d
diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld
index 76cb29c..12cc6ee 100644
--- a/targets/corstone-300/platform.ld
+++ b/targets/corstone-300/platform.ld
@@ -189,11 +189,11 @@
     __copy_table_start__ = .;
     LONG (__etext)
     LONG (__data_start__)
-    LONG (__data_end__ - __data_start__)
+    LONG ((__data_end__ - __data_start__) / 4)
 
     LONG (__eddr_data)
     LONG (__sram_data_start__)
-    LONG (__sram_data_end__ - __sram_data_start__ )
+    LONG ((__sram_data_end__ - __sram_data_start__) / 4)
 
     __copy_table_end__ = .;
   } > ITCM :rom_exec
@@ -203,7 +203,7 @@
     . = ALIGN(4);
     __zero_table_start__ = .;
     LONG (__bss_start__)
-    LONG (__bss_end__ - __bss_start__)
+    LONG ((__bss_end__ - __bss_start__) / 4)
     __zero_table_end__ = .;
 
   /**
diff --git a/targets/corstone-310/platform.ld b/targets/corstone-310/platform.ld
index 21c46b9..9d41f8f 100644
--- a/targets/corstone-310/platform.ld
+++ b/targets/corstone-310/platform.ld
@@ -216,7 +216,7 @@
 
     LONG (LOADADDR(.sram))
     LONG (ADDR(.sram))
-    LONG (SIZEOF(.sram))
+    LONG (SIZEOF(.sram) / 4)
 
     __copy_table_end__ = .;
   } > BRAM :rom_exec
@@ -227,10 +227,10 @@
     __zero_table_start__ = .;
 
     LONG (ADDR(.bss))
-    LONG (SIZEOF(.bss))
+    LONG (SIZEOF(.bss) / 4)
 
     LONG (ADDR(.sram.bss))
-    LONG (SIZEOF(.sram.bss))
+    LONG (SIZEOF(.sram.bss) / 4)
 
     __zero_table_end__ = .;
   } > BRAM :rom_exec
diff --git a/targets/corstone-polaris/platform.ld b/targets/corstone-polaris/platform.ld
index f886283..3880da0 100644
--- a/targets/corstone-polaris/platform.ld
+++ b/targets/corstone-polaris/platform.ld
@@ -200,11 +200,11 @@
 
     LONG (LOADADDR(.sram))
     LONG (ADDR(.sram))
-    LONG (SIZEOF(.sram))
+    LONG (SIZEOF(.sram) / 4)
 
     LONG (LOADADDR(.bram))
     LONG (ADDR(.bram))
-    LONG (SIZEOF(.bram))
+    LONG (SIZEOF(.bram) / 4)
 
     __copy_table_end__ = .;
   } > ITCM :rom_exec
@@ -215,10 +215,10 @@
     __zero_table_start__ = .;
 
     LONG (ADDR(.bss))
-    LONG (SIZEOF(.bss))
+    LONG (SIZEOF(.bss) / 4)
 
     LONG (ADDR(.sram.bss))
-    LONG (SIZEOF(.sram.bss))
+    LONG (SIZEOF(.sram.bss) / 4)
 
     __zero_table_end__ = .;
   } > ITCM :rom_exec