i_embed.pas 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. {
  2. This unit implements support information structures for the FPC Embedded target
  3. Copyright (c) 1998-2006 by Peter Vreman
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit i_embed;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. systems;
  22. const
  23. system_arm_embedded_info : tsysteminfo =
  24. (
  25. system : system_arm_embedded;
  26. name : 'Embedded';
  27. shortname : 'embedded';
  28. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  29. tf_smartlink_sections];
  30. cpu : cpu_arm;
  31. unit_env : '';
  32. extradefines : '';
  33. exeext : '';
  34. defext : '.def';
  35. scriptext : '.sh';
  36. smartext : '.sl';
  37. unitext : '.ppu';
  38. unitlibext : '.ppl';
  39. asmext : '.s';
  40. objext : '.o';
  41. resext : '.res';
  42. resobjext : '.or';
  43. sharedlibext : '.so';
  44. staticlibext : '.a';
  45. staticlibprefix : 'libp';
  46. sharedlibprefix : 'lib';
  47. sharedClibext : '.so';
  48. staticClibext : '.a';
  49. staticClibprefix : 'lib';
  50. sharedClibprefix : 'lib';
  51. importlibprefix : 'libimp';
  52. importlibext : '.a';
  53. Cprefix : '';
  54. newline : #10;
  55. dirsep : '/';
  56. assem : as_gas;
  57. assemextern : as_gas;
  58. link : ld_none;
  59. linkextern : ld_embedded;
  60. ar : ar_gnu_ar;
  61. res : res_none;
  62. dbg : dbg_dwarf2;
  63. script : script_unix;
  64. endian : endian_little;
  65. alignment :
  66. (
  67. procalign : 4;
  68. loopalign : 4;
  69. jumpalign : 0;
  70. constalignmin : 0;
  71. constalignmax : 4;
  72. varalignmin : 0;
  73. varalignmax : 4;
  74. localalignmin : 4;
  75. localalignmax : 4;
  76. recordalignmin : 0;
  77. recordalignmax : 4;
  78. maxCrecordalign : 4
  79. );
  80. first_parm_offset : 8;
  81. stacksize : 262144;
  82. stackalign : 4;
  83. abi : abi_default;
  84. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S32';
  85. );
  86. system_avr_embedded_info : tsysteminfo =
  87. (
  88. system : system_avr_embedded;
  89. name : 'Embedded';
  90. shortname : 'embedded';
  91. flags : [tf_needs_symbol_size,tf_files_case_sensitive
  92. ,tf_smartlink_sections];
  93. cpu : cpu_avr;
  94. unit_env : '';
  95. extradefines : '';
  96. exeext : '';
  97. defext : '.def';
  98. scriptext : '.sh';
  99. smartext : '.sl';
  100. unitext : '.ppu';
  101. unitlibext : '.ppl';
  102. asmext : '.s';
  103. objext : '.o';
  104. resext : '.res';
  105. resobjext : '.or';
  106. sharedlibext : '.so';
  107. staticlibext : '.a';
  108. staticlibprefix : 'libp';
  109. sharedlibprefix : 'lib';
  110. sharedClibext : '.so';
  111. staticClibext : '.a';
  112. staticClibprefix : 'lib';
  113. sharedClibprefix : 'lib';
  114. importlibprefix : 'libimp';
  115. importlibext : '.a';
  116. Cprefix : '';
  117. newline : #10;
  118. dirsep : '/';
  119. assem : as_gas;
  120. assemextern : as_gas;
  121. link : ld_none;
  122. linkextern : ld_embedded;
  123. ar : ar_gnu_ar;
  124. res : res_none;
  125. dbg : dbg_dwarf2;
  126. script : script_unix;
  127. endian : endian_little;
  128. alignment :
  129. (
  130. procalign : 1;
  131. loopalign : 1;
  132. jumpalign : 0;
  133. constalignmin : 0;
  134. constalignmax : 1;
  135. varalignmin : 0;
  136. varalignmax : 1;
  137. localalignmin : 0;
  138. localalignmax : 1;
  139. recordalignmin : 0;
  140. recordalignmax : 1;
  141. maxCrecordalign : 1
  142. );
  143. first_parm_offset : 0;
  144. stacksize : 1024;
  145. stackalign : 1;
  146. abi : abi_default;
  147. llvmdatalayout : 'todo';
  148. );
  149. system_mipsel_embedded_info : tsysteminfo =
  150. (
  151. system : system_mipsel_embedded;
  152. name : 'Embedded';
  153. shortname : 'embedded';
  154. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  155. tf_smartlink_sections];
  156. cpu : cpu_mipsel;
  157. unit_env : '';
  158. extradefines : '';
  159. exeext : '';
  160. defext : '.def';
  161. scriptext : '.sh';
  162. smartext : '.sl';
  163. unitext : '.ppu';
  164. unitlibext : '.ppl';
  165. asmext : '.s';
  166. objext : '.o';
  167. resext : '.res';
  168. resobjext : '.or';
  169. sharedlibext : '.so';
  170. staticlibext : '.a';
  171. staticlibprefix : 'libp';
  172. sharedlibprefix : 'lib';
  173. sharedClibext : '.so';
  174. staticClibext : '.a';
  175. staticClibprefix : 'lib';
  176. sharedClibprefix : 'lib';
  177. importlibprefix : 'libimp';
  178. importlibext : '.a';
  179. Cprefix : '';
  180. newline : #10;
  181. dirsep : '/';
  182. assem : as_gas;
  183. assemextern : as_gas;
  184. link : ld_none;
  185. linkextern : ld_embedded;
  186. ar : ar_gnu_ar;
  187. res : res_none;
  188. dbg : dbg_dwarf2;
  189. script : script_unix;
  190. endian : endian_little;
  191. alignment :
  192. (
  193. procalign : 4;
  194. loopalign : 4;
  195. jumpalign : 0;
  196. constalignmin : 0;
  197. constalignmax : 4;
  198. varalignmin : 0;
  199. varalignmax : 4;
  200. localalignmin : 4;
  201. localalignmax : 8;
  202. recordalignmin : 0;
  203. recordalignmax : 8;
  204. maxCrecordalign : 4
  205. );
  206. first_parm_offset : 0;
  207. stacksize : 262144;
  208. stackalign : 8;
  209. abi : abi_default;
  210. llvmdatalayout : 'todo';
  211. );
  212. system_i386_embedded_info : tsysteminfo =
  213. (
  214. system : system_i386_embedded;
  215. name : 'Embedded';
  216. shortname : 'embedded';
  217. flags : [tf_needs_symbol_size,tf_files_case_sensitive
  218. ,tf_smartlink_sections];
  219. cpu : cpu_i386;
  220. unit_env : '';
  221. extradefines : '';
  222. exeext : '';
  223. defext : '.def';
  224. scriptext : '.sh';
  225. smartext : '.sl';
  226. unitext : '.ppu';
  227. unitlibext : '.ppl';
  228. asmext : '.s';
  229. objext : '.o';
  230. resext : '.res';
  231. resobjext : '.or';
  232. sharedlibext : '.so';
  233. staticlibext : '.a';
  234. staticlibprefix : 'libp';
  235. sharedlibprefix : 'lib';
  236. sharedClibext : '.so';
  237. staticClibext : '.a';
  238. staticClibprefix : 'lib';
  239. sharedClibprefix : 'lib';
  240. importlibprefix : 'libimp';
  241. importlibext : '.a';
  242. Cprefix : '';
  243. newline : #10;
  244. dirsep : '/';
  245. assem : as_i386_elf32;
  246. assemextern : as_gas;
  247. link : ld_none;
  248. linkextern : ld_embedded;
  249. ar : ar_gnu_ar;
  250. res : res_none;
  251. dbg : dbg_stabs;
  252. script : script_unix;
  253. endian : endian_little;
  254. alignment :
  255. (
  256. procalign : 16;
  257. loopalign : 4;
  258. jumpalign : 0;
  259. constalignmin : 0;
  260. constalignmax : 8;
  261. varalignmin : 0;
  262. varalignmax : 16;
  263. localalignmin : 4;
  264. localalignmax : 8;
  265. recordalignmin : 0;
  266. recordalignmax : 16;
  267. maxCrecordalign : 4
  268. );
  269. first_parm_offset : 8;
  270. stacksize : 4096;
  271. stackalign : 4;
  272. abi : abi_default;
  273. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
  274. );
  275. implementation
  276. initialization
  277. {$ifdef CPUARM}
  278. {$ifdef embedded}
  279. set_source_info(system_arm_embedded_info);
  280. {$endif embedded}
  281. {$endif CPUARM}
  282. {$ifdef CPUAVR}
  283. {$ifdef embedded}
  284. set_source_info(system_avr_embedded_info);
  285. {$endif embedded}
  286. {$endif CPUAVR}
  287. {$ifdef CPUMIPSEL}
  288. {$ifdef embedded}
  289. set_source_info(system_mipsel_embedded_info);
  290. {$endif embedded}
  291. {$endif CPUMIPSEL}
  292. {$ifdef CPUI386}
  293. {$ifdef embedded}
  294. set_source_info(system_i386_embedded_info);
  295. {$endif embedded}
  296. {$endif CPUI386}
  297. end.