]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Transplant of ticket-97. refs #97
authortojo <tobias.johansson@arccore.com>
Tue, 29 Jun 2010 11:45:22 +0000 (13:45 +0200)
committertojo <tobias.johansson@arccore.com>
Tue, 29 Jun 2010 11:45:22 +0000 (13:45 +0200)
25 files changed:
arch/arm/arm_cm3/scripts/linkscript_gcc.ldf
arch/hc1x/hcs12d/scripts/linkscript_gcc.ldf
arch/ppc/mpc55xx/scripts/linkscript_gcc.ldf
boards/hcs12_elmicro_card12/board_info.txt [new file with mode: 0644]
boards/hcs12_elmicro_card12/memory.ldf [new file with mode: 0644]
boards/mpc5516it/board_info.txt
boards/mpc5516it/memory.ldf [new file with mode: 0644]
boards/mpc551xsim/board_info.txt [new file with mode: 0644]
boards/mpc551xsim/memory.ldf [new file with mode: 0644]
boards/mpc5554sim/board_info.txt [new file with mode: 0644]
boards/mpc5554sim/memory.ldf [new file with mode: 0644]
boards/mpc5567qrtech/board_info.txt [new file with mode: 0644]
boards/mpc5567qrtech/memory.ldf [new file with mode: 0644]
boards/mpc563xsim/memory.ldf [new file with mode: 0644]
boards/stm32_mcbstm32/board_info.txt [new file with mode: 0644]
boards/stm32_mcbstm32/memory.ldf [new file with mode: 0644]
boards/stm32_stm3210c/board_info.txt [new file with mode: 0644]
boards/stm32_stm3210c/memory.ldf [new file with mode: 0644]
examples/blinker_node/makefile
examples/pwm_node/makefile
examples/pwm_node2/makefile
examples/simple/makefile
examples/switch_node/makefile
examples/tiny/makefile
scripts/rules.mk

index 62d8655bf4eb5df34e16c058a8591a8d20982895..0a937c3adabda71d5bb5b9b4dd3273b879b9aba0 100644 (file)
@@ -16,8 +16,7 @@ ENTRY(Reset_Handler)
 \r
 MEMORY\r
 {\r
-    flash(R) : ORIGIN = 0x08000000, LENGTH = 128K\r
-    ram(RW)  : ORIGIN = 0x20000000, LENGTH = 20K\r
+#include "memory.ldf"\r
 }\r
 \r
 SECTIONS\r
index 9475bd1fda698136e2de60fb1af24b506c1f826f..f87b97917737650806907768449fffccede2e40e 100644 (file)
@@ -1,61 +1,13 @@
 /* Default linker script, for normal executables */\r
 /* Linker script for 68HC12 executable (PROM).  */\r
-OUTPUT_FORMAT("elf32-m68hc12", "elf32-m68hc12",\r
-             "elf32-m68hc12")\r
+OUTPUT_FORMAT("elf32-m68hc12", "elf32-m68hc12", "elf32-m68hc12")\r
 OUTPUT_ARCH(m68hc12)\r
 ENTRY(_start)\r
 \r
 \r
 MEMORY\r
 {\r
-  page0 (rwx) : ORIGIN = 0x0, LENGTH = 256\r
-\r
-  /* RAM */\r
-  data (rwx)  : ORIGIN = 0x2000, LENGTH = 8k\r
-\r
-  eeprom (rx): ORIGIN = 0x0400, LENGTH = 3k\r
-  text (rx)  : ORIGIN = 0x4000, LENGTH = 48k\r
-  \r
-  /* high fixed bank, reserve 0x100 vectors and security. */\r
-  text_h (rx)  : ORIGIN = 0xc002, LENGTH = 16k-0x102\r
-  vectors (rx)  : ORIGIN = 0xff80, LENGTH = 0x80\r
-  \r
-  /* Flash memory banks VMA:s */\r
-  bank8  (rx)   : ORIGIN = 0x0f0000, LENGTH = 16k\r
-  bank9  (rx)   : ORIGIN = 0x0f4000, LENGTH = 16k\r
-  bank10 (rx)   : ORIGIN = 0x0f8000, LENGTH = 16k\r
-  bank11 (rx)   : ORIGIN = 0x0fc000, LENGTH = 16k\r
-  bank12 (rx)   : ORIGIN = 0x100000, LENGTH = 16k\r
-  bank13 (rx)   : ORIGIN = 0x104000, LENGTH = 16k\r
-  \r
-  bank14 (rx)   : ORIGIN = 0x108000, LENGTH = 16k\r
-  bank15 (rx)   : ORIGIN = 0x10c002, LENGTH = 16k-0x102\r
-  \r
-  /* Flash memory banks LMA:s */\r
-  /* iSystem winIDEA */\r
-  bank8_lma  (rx)   : ORIGIN = 0x0f0000, LENGTH = 16k\r
-  bank9_lma  (rx)   : ORIGIN = 0x0f4000, LENGTH = 16k\r
-  bank10_lma (rx)   : ORIGIN = 0x0f8000, LENGTH = 16k\r
-  bank11_lma (rx)   : ORIGIN = 0x0fc000, LENGTH = 16k\r
-  bank12_lma (rx)   : ORIGIN = 0x100000, LENGTH = 16k\r
-  bank13_lma (rx)   : ORIGIN = 0x104000, LENGTH = 16k\r
-\r
-  bank14_lma (rx)   : ORIGIN = 0x108000, LENGTH = 16k\r
-  bank15_lma (rx)   : ORIGIN = 0x10c002, LENGTH = 16k-0x102\r
-  vectors_lma (rx)  : ORIGIN = 0x10ff80, LENGTH = 0x80\r
-  \r
-  /* Freescale Codewarrior Hiwave (s19, TBDML)\r
-  bank8_lma  (rx)   : ORIGIN = 0x388000, LENGTH = 16k\r
-  bank9_lma  (rx)   : ORIGIN = 0x398000, LENGTH = 16k\r
-  bank10_lma (rx)   : ORIGIN = 0x3a8000, LENGTH = 16k\r
-  bank11_lma (rx)   : ORIGIN = 0x3b8000, LENGTH = 16k\r
-  bank12_lma (rx)   : ORIGIN = 0x3c8000, LENGTH = 16k\r
-  bank13_lma (rx)   : ORIGIN = 0x3d8000, LENGTH = 16k\r
-\r
-  bank14_lma (rx)   : ORIGIN = 0x3e8000, LENGTH = 16k\r
-  bank15_lma (rx)   : ORIGIN = 0x3f8002, LENGTH = 16k-0x102\r
-  vectors_lma (rx)  : ORIGIN = 0x3fff80, LENGTH = 0x80\r
-  */\r
+#include "memory.ldf"\r
 }\r
 \r
 /* Setup the stack on the top of the data memory bank.  */\r
index 6172a45a624368d0c97be4f84148b79112f1dc8d..bd42da3592962f94a96f1c9b5b1ae8e00ea347f1 100644 (file)
@@ -2,24 +2,18 @@
  * Copyright (C) 2009  ArcCore AB <contact@arccore.com> \r
  */\r
 \r
-/* For more info on sections check the E500 freescale doc: E500ABIUG.pdf\r
- *\r
- */\r
+/* Undef sections/keywords */ \r
+#undef PPC\r
+\r
 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")\r
 OUTPUT_ARCH(powerpc)\r
 ENTRY(_start)\r
 \r
 \r
+\r
 MEMORY\r
 {\r
-       /* MPC55xx Reset Control Word(RCW) */\r
-       rcw(R)   : ORIGIN = 0x00000000, LENGTH = 0x8\r
-    flash(R) : ORIGIN = 0x00000008, LENGTH = 0x100000\r
-    /* 5516S, 48K\r
-     * 5517S,5516G,5516E, 64K RAM\r
-     * 5517G,E , 80K RAM\r
-     */\r
-    ram(RW)  : ORIGIN = 0x40000000, LENGTH = 0x100000\r
+#include "memory.ldf"\r
 }\r
 \r
 SECTIONS\r
diff --git a/boards/hcs12_elmicro_card12/board_info.txt b/boards/hcs12_elmicro_card12/board_info.txt
new file mode 100644 (file)
index 0000000..2c23b87
--- /dev/null
@@ -0,0 +1,28 @@
+\r
+Elmicro Card12 HC12 Controller Module with MC912D60A / MC912DG128A\r
+\r
+  http://elmicro.com/en/card12.html\r
+\r
+MC912D60A Microcontroller Info:\r
+  MC912D60A MCU with LQFP112 package\r
+  60 KB Flash\r
+  1 KB EEPROM\r
+  2 KB RAM\r
+  SPI\r
+  2x SCI\r
+  Enhanced Capture Timer\r
+  4 Channel PWM\r
+  16 Channel 10 Bit A/D-Converter\r
+  up to 80 binary Inputs/Outputs!\r
+  \r
+Board Features:\r
+  16 MHz Quarz Clock (8 MHz System Clock)\r
+  Two RS232 Ports with Transceiver MAX232A\r
+  PCA82C250 CAN Physical Interface\r
+  Special Reset Controller\r
+  Reset Switch\r
+  Operating Mode selectable via jumpers\r
+  BDM (Background Debug Mode) connector\r
+  All controller pins are available at two double row headers\r
+  5V power supply\r
+  Credit card size: 86mm x 54mm\r
diff --git a/boards/hcs12_elmicro_card12/memory.ldf b/boards/hcs12_elmicro_card12/memory.ldf
new file mode 100644 (file)
index 0000000..5ce0278
--- /dev/null
@@ -0,0 +1,55 @@
+\r
+\r
+/* The board Elmicro Card12 comes with MC912D60A or MC912DG128A.\r
+ * This memory mapping is for MC9S12DG128 but is also compatible \r
+ * with MC912D60A (which has more memory).\r
+ */\r
\r
+page0 (rwx) : ORIGIN = 0x0, LENGTH = 256\r
+\r
+/* RAM */\r
+data (rwx)  : ORIGIN = 0x2000, LENGTH = 8k\r
+\r
+eeprom (rx): ORIGIN = 0x0400, LENGTH = 3k\r
+text (rx)  : ORIGIN = 0x4000, LENGTH = 48k\r
+  \r
+/* high fixed bank, reserve 0x100 vectors and security. */\r
+text_h (rx)  : ORIGIN = 0xc002, LENGTH = 16k-0x102\r
+vectors (rx)  : ORIGIN = 0xff80, LENGTH = 0x80\r
+  \r
+/* Flash memory banks VMA:s */\r
+bank8  (rx)   : ORIGIN = 0x0f0000, LENGTH = 16k\r
+bank9  (rx)   : ORIGIN = 0x0f4000, LENGTH = 16k\r
+bank10 (rx)   : ORIGIN = 0x0f8000, LENGTH = 16k\r
+bank11 (rx)   : ORIGIN = 0x0fc000, LENGTH = 16k\r
+bank12 (rx)   : ORIGIN = 0x100000, LENGTH = 16k\r
+bank13 (rx)   : ORIGIN = 0x104000, LENGTH = 16k\r
+  \r
+bank14 (rx)   : ORIGIN = 0x108000, LENGTH = 16k\r
+bank15 (rx)   : ORIGIN = 0x10c002, LENGTH = 16k-0x102\r
+  \r
+/* Flash memory banks LMA:s */\r
+/* iSystem winIDEA */\r
+bank8_lma  (rx)   : ORIGIN = 0x0f0000, LENGTH = 16k\r
+bank9_lma  (rx)   : ORIGIN = 0x0f4000, LENGTH = 16k\r
+bank10_lma (rx)   : ORIGIN = 0x0f8000, LENGTH = 16k\r
+bank11_lma (rx)   : ORIGIN = 0x0fc000, LENGTH = 16k\r
+bank12_lma (rx)   : ORIGIN = 0x100000, LENGTH = 16k\r
+bank13_lma (rx)   : ORIGIN = 0x104000, LENGTH = 16k\r
+\r
+bank14_lma (rx)   : ORIGIN = 0x108000, LENGTH = 16k\r
+bank15_lma (rx)   : ORIGIN = 0x10c002, LENGTH = 16k-0x102\r
+vectors_lma (rx)  : ORIGIN = 0x10ff80, LENGTH = 0x80\r
+  \r
+/* Freescale Codewarrior Hiwave (s19, TBDML)\r
+bank8_lma  (rx)   : ORIGIN = 0x388000, LENGTH = 16k\r
+bank9_lma  (rx)   : ORIGIN = 0x398000, LENGTH = 16k\r
+bank10_lma (rx)   : ORIGIN = 0x3a8000, LENGTH = 16k\r
+bank11_lma (rx)   : ORIGIN = 0x3b8000, LENGTH = 16k\r
+bank12_lma (rx)   : ORIGIN = 0x3c8000, LENGTH = 16k\r
+bank13_lma (rx)   : ORIGIN = 0x3d8000, LENGTH = 16k\r
+\r
+bank14_lma (rx)   : ORIGIN = 0x3e8000, LENGTH = 16k\r
+bank15_lma (rx)   : ORIGIN = 0x3f8002, LENGTH = 16k-0x102\r
+vectors_lma (rx)  : ORIGIN = 0x3fff80, LENGTH = 0x80\r
+*/
\ No newline at end of file
index 5714e07d7282fe408fddf1a053ff19a8a3266ebe..e38abc8db2a75d85ff1619f31dbc392972cddb29 100644 (file)
@@ -1,11 +1,26 @@
 \r
 \r
-Test board. \r
-=======================================================\r
 \r
-The regression test board comes in different variants.\r
+The Freescale MPC5510 is an PowerPC process with a e200Z1+e200Z0 core. \r
 \r
+Datasheets:\r
+  Eval board:\r
+    http://www.asyst.si/isystem/files/downloads/evaluation_boards/ITMPC5517_V10.pdf  \r
 \r
-This file supports:\r
-- EVB5516\r
+  MPC5516/7\r
+    http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC5510&webpageId=1067371573986721160325&nodeId=0162468rH3bTdG06C10325&fromPage=tax\r
  \r
+Board:\r
+  8Mhz external crystal\r
\r
+Info:  \r
+  MPC5516/7 (I think that the board is always equipped with a MPC5517E now)\r
+  e200Z1 + e200Z0 (VLE only)\r
+  48-66Mhz\r
+  1.5MB Flash (MPC5516 1MB)\r
+  80KB SRAM   (MPC5516 64KB)\r
+  .. \r
+  \r
+Memory Map:\r
+ 0x0000_0000 ->           Flash\r
+ 0x4000_0000 ->           SRAM\r
diff --git a/boards/mpc5516it/memory.ldf b/boards/mpc5516it/memory.ldf
new file mode 100644 (file)
index 0000000..76b7d68
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+\r
+/* MPC55xx Reset Control Word(RCW) */\r
+rcw(R)   : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash(R) : ORIGIN = 0x00000008, LENGTH = 1M\r
+/* 5516S, 48K\r
+ * 5517S,5516G,5516E, 64K RAM\r
+ * 5517G,E , 80K RAM\r
+ */\r
+ram(RW)  : ORIGIN = 0x40000000, LENGTH = 0x100000\r
diff --git a/boards/mpc551xsim/board_info.txt b/boards/mpc551xsim/board_info.txt
new file mode 100644 (file)
index 0000000..c174ede
--- /dev/null
@@ -0,0 +1,18 @@
+\r
+The Freescale MPC5510 is an PowerPC process with a e200Z1+e200Z0 core. \r
+The simulator environment ONLY supports one core.\r
+       \r
+Datasheets:\r
\r
+  MPC5516/7\r
+    http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC5510&webpageId=1067371573986721160325&nodeId=0162468rH3bTdG06C10325&fromPage=tax\r
\r
+Info:  \r
+  MPC5516\r
+  1.5MB Flash (MPC5516 1MB)\r
+  80KB SRAM   (MPC5516 64KB)\r
+  .. \r
+  \r
+Memory Map:\r
+ 0x0000_0000 ->           Flash\r
+ 0x4000_0000 ->           SRAM\r
diff --git a/boards/mpc551xsim/memory.ldf b/boards/mpc551xsim/memory.ldf
new file mode 100644 (file)
index 0000000..76b7d68
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+\r
+/* MPC55xx Reset Control Word(RCW) */\r
+rcw(R)   : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash(R) : ORIGIN = 0x00000008, LENGTH = 1M\r
+/* 5516S, 48K\r
+ * 5517S,5516G,5516E, 64K RAM\r
+ * 5517G,E , 80K RAM\r
+ */\r
+ram(RW)  : ORIGIN = 0x40000000, LENGTH = 0x100000\r
diff --git a/boards/mpc5554sim/board_info.txt b/boards/mpc5554sim/board_info.txt
new file mode 100644 (file)
index 0000000..1ab8394
--- /dev/null
@@ -0,0 +1,15 @@
+\r
+The Freescale MPC5554 is an PowerPC process with a e200Z6 core. \r
+The difference between this and the MPC551xsim is that this supports VLE.\r
+       \r
+Datasheets:\r
+  \r
+Info:  \r
+  MPC5554\r
+  2MB Flash\r
+  64KB SRAM\r
+  .. \r
+  \r
+Memory Map:\r
+ 0x0000_0000 ->           Flash\r
+ 0x4000_0000 ->           SRAM\r
diff --git a/boards/mpc5554sim/memory.ldf b/boards/mpc5554sim/memory.ldf
new file mode 100644 (file)
index 0000000..93f540c
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+\r
+/* MPC55xx Reset Control Word(RCW) */\r
+rcw(R)   : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash(R) : ORIGIN = 0x00000008, LENGTH = 2M\r
+/* 5516S, 48K\r
+ * 5517S,5516G,5516E, 64K RAM\r
+ * 5517G,E , 80K RAM\r
+ */\r
+ram(RW)  : ORIGIN = 0x40000000, LENGTH = 0x100000\r
diff --git a/boards/mpc5567qrtech/board_info.txt b/boards/mpc5567qrtech/board_info.txt
new file mode 100644 (file)
index 0000000..b6595e9
--- /dev/null
@@ -0,0 +1,30 @@
+\r
+\r
+The Freescale MPC5567 is an PowerPC process with a e200z6 core. \r
+The EVAL board used is the "ODEEP" concept. \r
+       \r
+Datasheets:\r
+  ODEEP  \r
+    http://www.odeep.se/  \r
\r
+  MPC5567\r
+    http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC5567\r
\r
+Info:  \r
+  MPC5567\r
+  80-132Mhz\r
+  2MB Flash \r
+  80kB SRAM\r
+  2 × SCI\r
+  3 × DSPI\r
+  5 × CAN\r
+  FlexRay\r
+  Ethernet\r
+  24-ch PWM\r
+  32-ch ETPU\r
+  24-ch EMIOS\r
+  2-ch × 20-ch, 12bit ADC\r
+  \r
+Memory Map:\r
+ 0x0000_0000 ->           Flash\r
+ 0x4000_0000 ->           SRAM\r
diff --git a/boards/mpc5567qrtech/memory.ldf b/boards/mpc5567qrtech/memory.ldf
new file mode 100644 (file)
index 0000000..93f540c
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+\r
+/* MPC55xx Reset Control Word(RCW) */\r
+rcw(R)   : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash(R) : ORIGIN = 0x00000008, LENGTH = 2M\r
+/* 5516S, 48K\r
+ * 5517S,5516G,5516E, 64K RAM\r
+ * 5517G,E , 80K RAM\r
+ */\r
+ram(RW)  : ORIGIN = 0x40000000, LENGTH = 0x100000\r
diff --git a/boards/mpc563xsim/memory.ldf b/boards/mpc563xsim/memory.ldf
new file mode 100644 (file)
index 0000000..dfe21ab
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+\r
+/* MPC55xx Reset Control Word(RCW) */\r
+rcw(R)   : ORIGIN = 0x00000000, LENGTH = 0x8\r
+flash(R) : ORIGIN = 0x00000008, LENGTH = 0x100000\r
+/* 5516S, 48K\r
+ * 5517S,5516G,5516E, 64K RAM\r
+ * 5517G,E , 80K RAM\r
+ */\r
+ram(RW)  : ORIGIN = 0x40000000, LENGTH = 0x100000\r
diff --git a/boards/stm32_mcbstm32/board_info.txt b/boards/stm32_mcbstm32/board_info.txt
new file mode 100644 (file)
index 0000000..cb23371
--- /dev/null
@@ -0,0 +1,22 @@
+\r
+\r
+The STMicroelectronics STM32F103RB is an ARM 32-bit Cortex-M3 Microcontroller, \r
+\r
+  72MHz\r
+  128kB Flash \r
+  20kB SRAM\r
+  16-bit Timers with Input Capture, Output Compare and PWM, 16-bit 6-ch Advanced Timer \r
+  2 16-bit Watchdog Timers \r
+  SysTick Timer \r
+  2 SPI\r
+  2 I2C \r
+  3 USART \r
+  USB 2.0 Full Speed Interface \r
+  CAN 2.0B Active\r
+  2 12-bit 16-ch A/D Converter \r
+  Fast I/O Ports\r
+  \r
+Memory Map\r
+ 0x0800_0000 ->           Flash\r
+ 0x2000_0000 ->           SRAM\r
+ 0x4000_0000 ->           Internal registers\r
diff --git a/boards/stm32_mcbstm32/memory.ldf b/boards/stm32_mcbstm32/memory.ldf
new file mode 100644 (file)
index 0000000..d471073
--- /dev/null
@@ -0,0 +1,4 @@
+\r
+\r
+flash(R) : ORIGIN = 0x08000000, LENGTH = 128K\r
+ram(RW)  : ORIGIN = 0x20000000, LENGTH = 20K\r
diff --git a/boards/stm32_stm3210c/board_info.txt b/boards/stm32_stm3210c/board_info.txt
new file mode 100644 (file)
index 0000000..a65b5aa
--- /dev/null
@@ -0,0 +1,34 @@
+\r
+\r
+The STMicroelectronics STM32F107VCT is an ARM 32-bit Cortex-M3 Microcontroller.\r
+Order info is STM3210C-EVAL.\r
+       \r
+Datasheets:\r
+  STM3210C-EVAL  \r
+    http://www.st.com/stonline/products/literature/um/15082.pdf  \r
\r
+  STM32F107VCT\r
+    http://www.st.com/stonline/products/literature/ds/15274.pdf\r
\r
+Info:  \r
+  STM32F107VC\r
+  72MHz\r
+  256kB Flash \r
+  64kB SRAM\r
+  5 × USARTs,\r
+  4 × 16-bit timers,\r
+  2 × basic timers,\r
+  3 × SPIs,\r
+  2 × I2S,\r
+  1 × I2C,\r
+  USB OTG FS,\r
+  2 × CANs,\r
+  1 × PWM timer,\r
+  2 × ADCs,\r
+  2 × DACs,\r
+  Ethernet\r
+  \r
+Memory Map:\r
+ 0x0800_0000 ->           Flash\r
+ 0x2000_0000 ->           SRAM\r
+ 0x4000_0000 ->           Internal registers\r
diff --git a/boards/stm32_stm3210c/memory.ldf b/boards/stm32_stm3210c/memory.ldf
new file mode 100644 (file)
index 0000000..571c601
--- /dev/null
@@ -0,0 +1,4 @@
+\r
+\r
+flash(R) : ORIGIN = 0x08000000, LENGTH = 256K\r
+ram(RW)  : ORIGIN = 0x20000000, LENGTH = 64K\r
index 4d348375ecd9afa092dd57ec32bee798f200acf6..0e1a672970119478dc627b83f125fad7a2ce6c88 100644 (file)
@@ -30,7 +30,8 @@ inc-y += $(ROOTDIR)/components/blinker
 libitem-y += $(ROOTDIR)/libs/libkernel_$(ARCH_MCU).a\r
 \r
 #linkfile\r
-ldcmdfile-y = $(ROOTDIR)/$(ARCH_PATH-y)/scripts/linkscript_gcc.ldf\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 \r
 # What I want to build\r
 build-exe-y = blinker_node.elf\r
index 1f6ce1bab392c349de17e134fecd74c80e4cb660..2d7f5a21cd74cdb8dadb0f2d7b03064ed33f1e46 100644 (file)
@@ -32,7 +32,8 @@ inc-y += $(ROOTDIR)/components/pwm_sine
 libitem-y += $(ROOTDIR)/libs/libkernel_$(ARCH_MCU).a\r
 \r
 #linkfile\r
-ldcmdfile-y = $(ROOTDIR)/$(ARCH_PATH-y)/scripts/linkscript_gcc.ldf\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 \r
 # What I want to build\r
 build-exe-y = pwm_node.elf\r
index dad0a4e04e52691c6aa0feccdaba31ab83c81282..132610d28f383d11ff2a070b2a638e429f5e275b 100644 (file)
@@ -33,7 +33,8 @@ inc-y += $(ROOTDIR)/components/fading_led
 libitem-y += $(ROOTDIR)/libs/libkernel_$(ARCH_MCU).a\r
 \r
 #linkfile\r
-ldcmdfile-y = $(ROOTDIR)/$(ARCH_PATH-y)/scripts/linkscript_gcc.ldf\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 \r
 # What I want to build\r
 build-exe-y = pwm_node2.elf\r
index ebfd14f6920c494820f697bfeea12b28d73fe791..7cd0b812e71a79149c3a1f75db18d534971c8c5c 100644 (file)
@@ -22,7 +22,8 @@ include $(ROOTDIR)/boards/board_common.mk
 libitem-y += $(ROOTDIR)/libs/libkernel_$(ARCH_MCU).a\r
 \r
 #linkfile\r
-ldcmdfile-y = $(ROOTDIR)/$(ARCH_PATH-y)/scripts/linkscript_gcc.ldf\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 \r
 # What I want to build\r
 build-exe-y = simple.elf\r
index 4b10549b9546ac51cf12182e9f7466cc180094cd..66e2743fcc3c6730a733e9396dd2bdb15fb8a0b6 100644 (file)
@@ -33,7 +33,8 @@ inc-y += $(ROOTDIR)/components/switch
 libitem-y += $(ROOTDIR)/libs/libkernel_$(ARCH_MCU).a\r
 \r
 #linkfile\r
-ldcmdfile-y = $(ROOTDIR)/$(ARCH_PATH-y)/scripts/linkscript_gcc.ldf\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 \r
 # What I want to build\r
 build-exe-y = switch_node.elf\r
index 2db3ecfb7b02f65d879ba562d9923be636e8576f..eb8e43cbd0e3eed6ca62e6d5f5afbaef8115f68d 100644 (file)
@@ -24,7 +24,8 @@ obj-y += tiny.o
 libitem-y += $(ROOTDIR)/libs/libkernel_$(ARCH_MCU).a\r
 \r
 #linkfile\r
-ldcmdfile-y = $(ROOTDIR)/$(ARCH_PATH-y)/scripts/linkscript_gcc.ldf\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 \r
 # What I want to build\r
 #build-lib-y = tiny.a\r
index 15904a5a91f0ccd2be7a589b900d20a196b8a56a..d41a19680466da7ef41d21bf57126a3ca0422460 100644 (file)
@@ -123,6 +123,14 @@ inc-y += ../include
        $(Q)$(CPP) -x assembler-with-cpp -E -o $@ $(addprefix -I ,$(inc-y)) $(addprefix -D,$(def-y)) $<\r
 \r
 \r
+# Board linker files are in the board directory \r
+inc-y += $(ROOTDIR)/boards/$(BOARDDIR)\r
+\r
+# Preprocess linker files..\r
+%.ldp: %.ldf\r
+       @echo "  >> CPP $<"\r
+       $(Q)$(CPP) -E -P -x assembler-with-cpp -o $@ $(addprefix -I ,$(inc-y)) $<\r
+\r
 #      @cat $@ \r
        \r
 .PHONY $(ROOTDIR)/libs:\r
@@ -153,7 +161,9 @@ else
                                                                /^\.bss/ { print "  bss :"  $$3+0 " bytes"; ram+=$$3}; \\r
                                                                END { print "  ROM: ~" rom " bytes"; print "  RAM: ~" ram " bytes"}' $(subst .elf,.map,$@)\r
 endif\r
+       @echo\r
        @echo "  >>>>>>>  DONE  <<<<<<<<<"\r
+       @echo\r
        \r
 \r
 $(size-exe-y): $(build-exe-y)\r
@@ -161,4 +171,4 @@ $(size-exe-y): $(build-exe-y)
        @echo TODO: Parse the file....\r
 \r
 .PHONY clean:\r
-       @-rm -f *.o *.d *.h *.elf *.a\r
+       @-rm -f *.o *.d *.h *.elf *.a *.ldp\r