i_freertos.pas 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. {
  2. This unit implements support information structures for the FPC FreeRTOS 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_freertos;
  18. {$i fpcdefs.inc}
  19. {$ifdef go32v2}
  20. { As wlib uses a different Dos-Extender, long-command line
  21. encoding for DJGPP does not work here.
  22. Put all inside a script file instead }
  23. {$define USE_SCRIPTED_WLIB}
  24. {$endif}
  25. interface
  26. uses
  27. systems;
  28. const
  29. system_xtensa_freertos_info : tsysteminfo =
  30. (
  31. system : system_xtensa_freertos;
  32. name : 'FreeRTOS';
  33. shortname : 'freertos';
  34. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  35. tf_smartlink_sections,tf_init_final_units_by_calls];
  36. cpu : cpu_xtensa;
  37. unit_env : '';
  38. extradefines : '';
  39. exeext : '';
  40. defext : '.def';
  41. scriptext : '.sh';
  42. smartext : '.sl';
  43. unitext : '.ppu';
  44. unitlibext : '.ppl';
  45. asmext : '.s';
  46. objext : '.o';
  47. resext : '.res';
  48. resobjext : '.or';
  49. sharedlibext : '.so';
  50. staticlibext : '.a';
  51. staticlibprefix : 'libp';
  52. sharedlibprefix : 'lib';
  53. sharedClibext : '.so';
  54. staticClibext : '.a';
  55. staticClibprefix : 'lib';
  56. sharedClibprefix : 'lib';
  57. importlibprefix : 'libimp';
  58. importlibext : '.a';
  59. Cprefix : '';
  60. newline : #10;
  61. dirsep : '/';
  62. assem : as_gas;
  63. assemextern : as_gas;
  64. link : ld_none;
  65. linkextern : ld_freertos;
  66. ar : ar_gnu_ar;
  67. res : res_none;
  68. dbg : dbg_dwarf2;
  69. script : script_unix;
  70. endian : endian_little;
  71. alignment :
  72. (
  73. procalign : 4;
  74. loopalign : 4;
  75. jumpalign : 0;
  76. jumpalignskipmax : 0;
  77. coalescealign : 0;
  78. coalescealignskipmax: 0;
  79. constalignmin : 0;
  80. constalignmax : 4;
  81. varalignmin : 0;
  82. varalignmax : 4;
  83. localalignmin : 4;
  84. localalignmax : 16;
  85. recordalignmin : 0;
  86. recordalignmax : 8;
  87. maxCrecordalign : 8
  88. );
  89. first_parm_offset : 8;
  90. stacksize : 65536;
  91. stackalign : 16;
  92. abi : abi_xtensa_windowed;
  93. 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';
  94. );
  95. system_arm_freertos_info : tsysteminfo =
  96. (
  97. system : system_arm_freertos;
  98. name : 'FreeRTOS';
  99. shortname : 'freertos';
  100. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  101. tf_smartlink_sections,tf_init_final_units_by_calls];
  102. cpu : cpu_arm;
  103. unit_env : '';
  104. extradefines : '';
  105. exeext : '';
  106. defext : '.def';
  107. scriptext : '.sh';
  108. smartext : '.sl';
  109. unitext : '.ppu';
  110. unitlibext : '.ppl';
  111. asmext : '.s';
  112. objext : '.o';
  113. resext : '.res';
  114. resobjext : '.or';
  115. sharedlibext : '.so';
  116. staticlibext : '.a';
  117. staticlibprefix : 'libp';
  118. sharedlibprefix : 'lib';
  119. sharedClibext : '.so';
  120. staticClibext : '.a';
  121. staticClibprefix : 'lib';
  122. sharedClibprefix : 'lib';
  123. importlibprefix : 'libimp';
  124. importlibext : '.a';
  125. Cprefix : '';
  126. newline : #10;
  127. dirsep : '/';
  128. assem : as_gas;
  129. assemextern : as_gas;
  130. link : ld_none;
  131. linkextern : ld_freertos;
  132. ar : ar_gnu_ar;
  133. res : res_none;
  134. dbg : dbg_dwarf2;
  135. script : script_unix;
  136. endian : endian_little;
  137. alignment :
  138. (
  139. procalign : 4;
  140. loopalign : 4;
  141. jumpalign : 0;
  142. jumpalignskipmax : 0;
  143. coalescealign : 0;
  144. coalescealignskipmax: 0;
  145. constalignmin : 0;
  146. constalignmax : 4;
  147. varalignmin : 0;
  148. varalignmax : 4;
  149. localalignmin : 4;
  150. localalignmax : 16;
  151. recordalignmin : 0;
  152. recordalignmax : 4;
  153. maxCrecordalign : 4
  154. );
  155. first_parm_offset : 8;
  156. stacksize : 65536;
  157. stackalign : 16;
  158. abi : abi_default;
  159. 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';
  160. );
  161. system_riscv32_freertos_info : tsysteminfo =
  162. (
  163. system : system_riscv32_freertos;
  164. name : 'FreeRTOS';
  165. shortname : 'freertos';
  166. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  167. tf_smartlink_sections,tf_init_final_units_by_calls];
  168. cpu : cpu_riscv32;
  169. unit_env : '';
  170. extradefines : '';
  171. exeext : '';
  172. defext : '.def';
  173. scriptext : '.sh';
  174. smartext : '.sl';
  175. unitext : '.ppu';
  176. unitlibext : '.ppl';
  177. asmext : '.s';
  178. objext : '.o';
  179. resext : '.res';
  180. resobjext : '.or';
  181. sharedlibext : '.so';
  182. staticlibext : '.a';
  183. staticlibprefix : 'libp';
  184. sharedlibprefix : 'lib';
  185. sharedClibext : '.so';
  186. staticClibext : '.a';
  187. staticClibprefix : 'lib';
  188. sharedClibprefix : 'lib';
  189. importlibprefix : 'libimp';
  190. importlibext : '.a';
  191. Cprefix : '';
  192. newline : #10;
  193. dirsep : '/';
  194. assem : as_gas;
  195. assemextern : as_gas;
  196. link : ld_none;
  197. linkextern : ld_freertos;
  198. ar : ar_gnu_ar;
  199. res : res_none;
  200. dbg : dbg_dwarf2;
  201. script : script_unix;
  202. endian : endian_little;
  203. alignment :
  204. (
  205. procalign : 4;
  206. loopalign : 4;
  207. jumpalign : 0;
  208. jumpalignskipmax : 0;
  209. coalescealign : 0;
  210. coalescealignskipmax: 0;
  211. constalignmin : 0;
  212. constalignmax : 4;
  213. varalignmin : 0;
  214. varalignmax : 4;
  215. localalignmin : 4;
  216. localalignmax : 16;
  217. recordalignmin : 0;
  218. recordalignmax : 8;
  219. maxCrecordalign : 8
  220. );
  221. first_parm_offset : 8;
  222. stacksize : 65536;
  223. stackalign : 16;
  224. abi : abi_riscv_ilp32;
  225. 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';
  226. );
  227. implementation
  228. initialization
  229. {$ifdef CPUARM}
  230. {$ifdef embedded}
  231. set_source_info(system_arm_freertos_info);
  232. {$endif embedded}
  233. {$endif CPUARM}
  234. {$ifdef CPUAVR}
  235. {$ifdef embedded}
  236. set_source_info(system_avr_freertosd_info);
  237. {$endif embedded}
  238. {$endif CPUAVR}
  239. {$ifdef CPUMIPSEL}
  240. {$ifdef embedded}
  241. set_source_info(system_mipsel_freertos_info);
  242. {$endif embedded}
  243. {$endif CPUMIPSEL}
  244. {$ifdef CPUI386}
  245. {$ifdef embedded}
  246. set_source_info(system_i386_freertos_info);
  247. {$endif embedded}
  248. {$endif CPUI386}
  249. {$ifdef CPUX86_64}
  250. {$ifdef embedded}
  251. set_source_info(system_x86_64_freertos_info);
  252. {$endif embedded}
  253. {$endif CPUX86_64}
  254. {$ifdef cpu8086}
  255. {$ifdef embedded}
  256. set_source_info(system_i8086_freertos_info);
  257. {$endif embedded}
  258. {$endif cpu8086}
  259. {$ifdef cpum68k}
  260. {$ifdef embedded}
  261. set_source_info(system_m68k_freertos_info);
  262. {$endif embedded}
  263. {$endif cpum68k}
  264. {$ifdef cpuriscv32}
  265. {$ifdef embedded}
  266. set_source_info(system_riscv32_freertos_info);
  267. {$endif embedded}
  268. {$endif cpuriscv32}
  269. {$ifdef cpuriscv64}
  270. {$ifdef embedded}
  271. set_source_info(system_riscv64_freertos_info);
  272. {$endif embedded}
  273. {$endif cpuriscv64}
  274. {$ifdef cpuxtensa}
  275. {$ifdef embedded}
  276. set_source_info(system_xtensa_freertos_info);
  277. {$endif embedded}
  278. {$endif cpuxtensa}
  279. end.