i_freertos.pas 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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. mos6502page0alloc : [];
  95. );
  96. system_arm_freertos_info : tsysteminfo =
  97. (
  98. system : system_arm_freertos;
  99. name : 'FreeRTOS';
  100. shortname : 'freertos';
  101. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  102. tf_smartlink_sections,tf_init_final_units_by_calls];
  103. cpu : cpu_arm;
  104. unit_env : '';
  105. extradefines : '';
  106. exeext : '';
  107. defext : '.def';
  108. scriptext : '.sh';
  109. smartext : '.sl';
  110. unitext : '.ppu';
  111. unitlibext : '.ppl';
  112. asmext : '.s';
  113. objext : '.o';
  114. resext : '.res';
  115. resobjext : '.or';
  116. sharedlibext : '.so';
  117. staticlibext : '.a';
  118. staticlibprefix : 'libp';
  119. sharedlibprefix : 'lib';
  120. sharedClibext : '.so';
  121. staticClibext : '.a';
  122. staticClibprefix : 'lib';
  123. sharedClibprefix : 'lib';
  124. importlibprefix : 'libimp';
  125. importlibext : '.a';
  126. Cprefix : '';
  127. newline : #10;
  128. dirsep : '/';
  129. assem : as_gas;
  130. assemextern : as_gas;
  131. link : ld_none;
  132. linkextern : ld_freertos;
  133. ar : ar_gnu_ar;
  134. res : res_none;
  135. dbg : dbg_dwarf2;
  136. script : script_unix;
  137. endian : endian_little;
  138. alignment :
  139. (
  140. procalign : 4;
  141. loopalign : 4;
  142. jumpalign : 0;
  143. jumpalignskipmax : 0;
  144. coalescealign : 0;
  145. coalescealignskipmax: 0;
  146. constalignmin : 0;
  147. constalignmax : 4;
  148. varalignmin : 0;
  149. varalignmax : 4;
  150. localalignmin : 4;
  151. localalignmax : 16;
  152. recordalignmin : 0;
  153. recordalignmax : 4;
  154. maxCrecordalign : 4
  155. );
  156. first_parm_offset : 8;
  157. stacksize : 65536;
  158. stackalign : 16;
  159. abi : abi_default;
  160. 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';
  161. mos6502page0alloc : [];
  162. );
  163. system_riscv32_freertos_info : tsysteminfo =
  164. (
  165. system : system_riscv32_freertos;
  166. name : 'FreeRTOS';
  167. shortname : 'freertos';
  168. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  169. tf_smartlink_sections,tf_init_final_units_by_calls];
  170. cpu : cpu_riscv32;
  171. unit_env : '';
  172. extradefines : '';
  173. exeext : '';
  174. defext : '.def';
  175. scriptext : '.sh';
  176. smartext : '.sl';
  177. unitext : '.ppu';
  178. unitlibext : '.ppl';
  179. asmext : '.s';
  180. objext : '.o';
  181. resext : '.res';
  182. resobjext : '.or';
  183. sharedlibext : '.so';
  184. staticlibext : '.a';
  185. staticlibprefix : 'libp';
  186. sharedlibprefix : 'lib';
  187. sharedClibext : '.so';
  188. staticClibext : '.a';
  189. staticClibprefix : 'lib';
  190. sharedClibprefix : 'lib';
  191. importlibprefix : 'libimp';
  192. importlibext : '.a';
  193. Cprefix : '';
  194. newline : #10;
  195. dirsep : '/';
  196. assem : as_gas;
  197. assemextern : as_gas;
  198. link : ld_none;
  199. linkextern : ld_freertos;
  200. ar : ar_gnu_ar;
  201. res : res_none;
  202. dbg : dbg_dwarf2;
  203. script : script_unix;
  204. endian : endian_little;
  205. alignment :
  206. (
  207. procalign : 4;
  208. loopalign : 4;
  209. jumpalign : 0;
  210. jumpalignskipmax : 0;
  211. coalescealign : 0;
  212. coalescealignskipmax: 0;
  213. constalignmin : 0;
  214. constalignmax : 4;
  215. varalignmin : 0;
  216. varalignmax : 4;
  217. localalignmin : 4;
  218. localalignmax : 16;
  219. recordalignmin : 0;
  220. recordalignmax : 8;
  221. maxCrecordalign : 8
  222. );
  223. first_parm_offset : 8;
  224. stacksize : 65536;
  225. stackalign : 16;
  226. abi : abi_riscv_ilp32;
  227. 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';
  228. mos6502page0alloc : [];
  229. );
  230. implementation
  231. initialization
  232. {$ifdef CPUARM}
  233. {$ifdef embedded}
  234. set_source_info(system_arm_freertos_info);
  235. {$endif embedded}
  236. {$endif CPUARM}
  237. {$ifdef CPUAVR}
  238. {$ifdef embedded}
  239. set_source_info(system_avr_freertosd_info);
  240. {$endif embedded}
  241. {$endif CPUAVR}
  242. {$ifdef CPUMIPSEL}
  243. {$ifdef embedded}
  244. set_source_info(system_mipsel_freertos_info);
  245. {$endif embedded}
  246. {$endif CPUMIPSEL}
  247. {$ifdef CPUI386}
  248. {$ifdef embedded}
  249. set_source_info(system_i386_freertos_info);
  250. {$endif embedded}
  251. {$endif CPUI386}
  252. {$ifdef CPUX86_64}
  253. {$ifdef embedded}
  254. set_source_info(system_x86_64_freertos_info);
  255. {$endif embedded}
  256. {$endif CPUX86_64}
  257. {$ifdef cpu8086}
  258. {$ifdef embedded}
  259. set_source_info(system_i8086_freertos_info);
  260. {$endif embedded}
  261. {$endif cpu8086}
  262. {$ifdef cpum68k}
  263. {$ifdef embedded}
  264. set_source_info(system_m68k_freertos_info);
  265. {$endif embedded}
  266. {$endif cpum68k}
  267. {$ifdef cpuriscv32}
  268. {$ifdef embedded}
  269. set_source_info(system_riscv32_freertos_info);
  270. {$endif embedded}
  271. {$endif cpuriscv32}
  272. {$ifdef cpuriscv64}
  273. {$ifdef embedded}
  274. set_source_info(system_riscv64_freertos_info);
  275. {$endif embedded}
  276. {$endif cpuriscv64}
  277. {$ifdef cpuxtensa}
  278. {$ifdef embedded}
  279. set_source_info(system_xtensa_freertos_info);
  280. {$endif embedded}
  281. {$endif cpuxtensa}
  282. end.