]> rtime.felk.cvut.cz Git - arc.git/commitdiff
now possible to activate/deactivate calibration from rte config
authorNiclas <devnull@localhost>
Fri, 19 Nov 2010 13:42:35 +0000 (14:42 +0100)
committerNiclas <devnull@localhost>
Fri, 19 Nov 2010 13:42:35 +0000 (14:42 +0100)
arch/ppc/mpc55xx/scripts/linkscript_gcc.ldf
boards/mpc5516it/config/Calibration_Settings.h [new file with mode: 0644]
boards/mpc5516it/memory.ldf
boards/mpc551xsim/config/Calibration_Settings.h [new file with mode: 0644]
boards/mpc551xsim/memory.ldf
boards/mpc5554sim/config/Calibration_Settings.h [new file with mode: 0644]
boards/mpc5567qrtech/config/Calibration_Settings.h [new file with mode: 0644]
boards/mpc5567qrtech/memory.ldf
boards/mpc563xsim/config/Calibration_Settings.h [new file with mode: 0644]
boards/mpc563xsim/memory.ldf
include/CalibrationData.h

index 4ac9ce99005c02c9cc2aae586e79da237cc220ec..613fcc6c4ebffacaa9d40522da96f0d359a81d41 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2009  ArcCore AB <contact@arccore.com> \r
  */\r
 \r
+#include "Calibration_Settings.h"\r
 /* Undef sections/keywords */ \r
 #undef PPC\r
 \r
@@ -61,13 +62,14 @@ SECTIONS
                . = . + ALIGN(8);\r
                __DATA_ROM = .;\r
        } > flash\r
-\r
-       .calibration : AT(ORIGIN(flash_L1_CALIBRATIONPARAMS)) {\r
+#ifdef CALIBRATION_ACTIVE\r
+       .calibration : AT(ORIGIN(flash_calibration_area_0)) {\r
                __CALIB_RAM_START = .;\r
                *(.calibration)\r
                __CALIB_RAM_END = .;\r
        } > ram\r
-\r
+       __CALIB_ROM_START       = ORIGIN(flash_calibration_area_0);\r
+#endif\r
        .data : AT(ALIGN(LOADADDR(.sbss2)+SIZEOF(.sbss2),4)) {\r
                __DATA_RAM = .; *(.data .data.* .gnu.linkonce.d.* .gnu.linkonce.r.* .eh_frame)\r
                } > ram\r
@@ -152,7 +154,6 @@ __DATA_RAM                  = ADDR(.data);
 /*__DATA_END           = ADDR(.sdata)+SIZEOF(.sdata);*/\r
 /*__BSS_START          = ADDR(.sbss);*/\r
 __BSS_START            = ADDR(.sbss);\r
-__CALIB_ROM_START      = ORIGIN(flash_L1_CALIBRATIONPARAMS);\r
 \r
 /* _SDA_BASE_ and _SDA2_BASE_ is defined in e500 ABI\r
  * Some of the symbols below is used by eabi() that does interesting.\r
diff --git a/boards/mpc5516it/config/Calibration_Settings.h b/boards/mpc5516it/config/Calibration_Settings.h
new file mode 100644 (file)
index 0000000..90384a0
--- /dev/null
@@ -0,0 +1 @@
+#undef CALIBRATION_ACTIVE\r
index 3754c8a17a48019f6ca2b0228d985fd52e8863df..85d8afa67fe1b0421c89290245626530f070eb1b 100644 (file)
@@ -2,6 +2,7 @@
 \r
 /* MPC55xx Reset Control Word(RCW) */\r
 rcw      : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash_calibration_area_0(R)    :       ORIGIN = 0x00004000, LENGTH = 32K\r
 flash(R) : ORIGIN = 0x00000008, LENGTH = 1M\r
 /* 5516S, 48K\r
  * 5517S,5516G,5516E, 64K RAM\r
diff --git a/boards/mpc551xsim/config/Calibration_Settings.h b/boards/mpc551xsim/config/Calibration_Settings.h
new file mode 100644 (file)
index 0000000..90384a0
--- /dev/null
@@ -0,0 +1 @@
+#undef CALIBRATION_ACTIVE\r
index 3754c8a17a48019f6ca2b0228d985fd52e8863df..85d8afa67fe1b0421c89290245626530f070eb1b 100644 (file)
@@ -2,6 +2,7 @@
 \r
 /* MPC55xx Reset Control Word(RCW) */\r
 rcw      : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash_calibration_area_0(R)    :       ORIGIN = 0x00004000, LENGTH = 32K\r
 flash(R) : ORIGIN = 0x00000008, LENGTH = 1M\r
 /* 5516S, 48K\r
  * 5517S,5516G,5516E, 64K RAM\r
diff --git a/boards/mpc5554sim/config/Calibration_Settings.h b/boards/mpc5554sim/config/Calibration_Settings.h
new file mode 100644 (file)
index 0000000..90384a0
--- /dev/null
@@ -0,0 +1 @@
+#undef CALIBRATION_ACTIVE\r
diff --git a/boards/mpc5567qrtech/config/Calibration_Settings.h b/boards/mpc5567qrtech/config/Calibration_Settings.h
new file mode 100644 (file)
index 0000000..90384a0
--- /dev/null
@@ -0,0 +1 @@
+#undef CALIBRATION_ACTIVE\r
index 40a759f26797f281294854549531d78a6d44b7d5..098b1a29a31eafafea87d17838a0d74e437f6141 100644 (file)
@@ -2,7 +2,7 @@
 \r
 /* MPC55xx Reset Control Word(RCW) */\r
 rcw      : ORIGIN = 0x00000000, LENGTH = 0x8\r
-flash_L1_CALIBRATIONPARAMS(R)  :       ORIGIN = 0x00004000, LENGTH = 48K\r
+flash_calibration_area_0(R)    :       ORIGIN = 0x00004000, LENGTH = 48K\r
 flash(R) : ORIGIN = 0x00040000, LENGTH = 2M\r
 /* 5516S, 48K\r
  * 5517S,5516G,5516E, 64K RAM\r
diff --git a/boards/mpc563xsim/config/Calibration_Settings.h b/boards/mpc563xsim/config/Calibration_Settings.h
new file mode 100644 (file)
index 0000000..90384a0
--- /dev/null
@@ -0,0 +1 @@
+#undef CALIBRATION_ACTIVE\r
index dc83d2df3853fd9c8c6ab62fb3abef6ff5d5ef51..48ceb70010887fc7ce4dfaeee12be99314ffc243 100644 (file)
@@ -2,6 +2,7 @@
 \r
 /* MPC55xx Reset Control Word(RCW) */\r
 rcw      : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash_calibration_area_0(R)    :       ORIGIN = 0x00004000, LENGTH = 48K\r
 flash(R) : ORIGIN = 0x00000008, LENGTH = 0x100000\r
 /* 5516S, 48K\r
  * 5517S,5516G,5516E, 64K RAM\r
index 9265fdd160a363de09d7145cc8a53a70467540a9..b76f73216e4b002772a34deda91f19b82e2cfd7e 100644 (file)
@@ -1,11 +1,18 @@
 #ifndef CALIBRATIONDATA_H_\r
 #define CALIBRATIONDATA_H_\r
 \r
+#include "Calibration_Settings.h"\r
+\r
+#ifdef CALIBRATION_ACTIVE\r
 /* Section data from linker script. */\r
 extern char __CALIB_RAM_START;\r
 extern char __CALIB_RAM_END;\r
 extern char __CALIB_ROM_START;\r
-\r
 #define ARC_DECLARE_CALIB(type, name) type __attribute__((section (".calibration"))) name\r
+#else\r
+#define ARC_DECLARE_CALIB(type, name) const type name\r
+#endif /* CALIBRATION_ACTIVE */\r
+\r
+\r
 \r
 #endif /* CALIBRATIONDATA_H_ */\r