i_embed.pas 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
  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. {$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_arm_embedded_info : tsysteminfo =
  30. (
  31. system : system_arm_embedded;
  32. name : 'Embedded';
  33. shortname : 'embedded';
  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_arm;
  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_embedded;
  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 : 4;
  85. recordalignmin : 0;
  86. recordalignmax : 4;
  87. maxCrecordalign : 4
  88. );
  89. first_parm_offset : 8;
  90. stacksize : 262144;
  91. stackalign : 4;
  92. abi : abi_default;
  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_avr_embedded_info : tsysteminfo =
  96. (
  97. system : system_avr_embedded;
  98. name : 'Embedded';
  99. shortname : 'embedded';
  100. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  101. tf_smartlink_sections,tf_init_final_units_by_calls];
  102. cpu : cpu_avr;
  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_embedded;
  132. ar : ar_gnu_ar;
  133. res : res_none;
  134. dbg : dbg_dwarf3;
  135. script : script_unix;
  136. endian : endian_little;
  137. alignment :
  138. (
  139. procalign : 1;
  140. loopalign : 1;
  141. jumpalign : 0;
  142. jumpalignskipmax : 0;
  143. coalescealign : 0;
  144. coalescealignskipmax: 0;
  145. constalignmin : 0;
  146. constalignmax : 1;
  147. varalignmin : 0;
  148. varalignmax : 1;
  149. localalignmin : 0;
  150. localalignmax : 1;
  151. recordalignmin : 0;
  152. recordalignmax : 1;
  153. maxCrecordalign : 1
  154. );
  155. first_parm_offset : 0;
  156. stacksize : 1024;
  157. stackalign : 1;
  158. abi : abi_default;
  159. llvmdatalayout : 'todo';
  160. );
  161. system_mipsel_embedded_info : tsysteminfo =
  162. (
  163. system : system_mipsel_embedded;
  164. name : 'Embedded';
  165. shortname : 'embedded';
  166. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  167. tf_smartlink_sections];
  168. cpu : cpu_mipsel;
  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_embedded;
  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 : 8;
  217. recordalignmin : 0;
  218. recordalignmax : 8;
  219. maxCrecordalign : 4
  220. );
  221. first_parm_offset : 0;
  222. stacksize : 262144;
  223. stackalign : 8;
  224. abi : abi_default;
  225. llvmdatalayout : 'todo';
  226. );
  227. system_i386_embedded_info : tsysteminfo =
  228. (
  229. system : system_i386_embedded;
  230. name : 'Embedded';
  231. shortname : 'embedded';
  232. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  233. tf_smartlink_sections];
  234. cpu : cpu_i386;
  235. unit_env : '';
  236. extradefines : '';
  237. exeext : '';
  238. defext : '.def';
  239. scriptext : '.sh';
  240. smartext : '.sl';
  241. unitext : '.ppu';
  242. unitlibext : '.ppl';
  243. asmext : '.s';
  244. objext : '.o';
  245. resext : '.res';
  246. resobjext : '.or';
  247. sharedlibext : '.so';
  248. staticlibext : '.a';
  249. staticlibprefix : 'libp';
  250. sharedlibprefix : 'lib';
  251. sharedClibext : '.so';
  252. staticClibext : '.a';
  253. staticClibprefix : 'lib';
  254. sharedClibprefix : 'lib';
  255. importlibprefix : 'libimp';
  256. importlibext : '.a';
  257. Cprefix : '';
  258. newline : #10;
  259. dirsep : '/';
  260. assem : as_i386_elf32;
  261. assemextern : as_gas;
  262. link : ld_none;
  263. linkextern : ld_embedded;
  264. ar : ar_gnu_ar;
  265. res : res_none;
  266. dbg : dbg_stabs;
  267. script : script_unix;
  268. endian : endian_little;
  269. alignment :
  270. (
  271. procalign : 16;
  272. loopalign : 4;
  273. jumpalign : 0;
  274. jumpalignskipmax : 0;
  275. coalescealign : 0;
  276. coalescealignskipmax: 0;
  277. constalignmin : 0;
  278. constalignmax : 16;
  279. varalignmin : 0;
  280. varalignmax : 16;
  281. localalignmin : 4;
  282. localalignmax : 8;
  283. recordalignmin : 0;
  284. recordalignmax : 16;
  285. maxCrecordalign : 4
  286. );
  287. first_parm_offset : 8;
  288. stacksize : 4096;
  289. stackalign : 4;
  290. abi : abi_default;
  291. 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';
  292. );
  293. system_x86_64_embedded_info : tsysteminfo =
  294. (
  295. system : system_x86_64_embedded;
  296. name : 'Embedded';
  297. shortname : 'embedded';
  298. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  299. tf_smartlink_sections];
  300. cpu : cpu_x86_64;
  301. unit_env : '';
  302. extradefines : '';
  303. exeext : '';
  304. defext : '.def';
  305. scriptext : '.sh';
  306. smartext : '.sl';
  307. unitext : '.ppu';
  308. unitlibext : '.ppl';
  309. asmext : '.s';
  310. objext : '.o';
  311. resext : '.res';
  312. resobjext : '.or';
  313. sharedlibext : '.so';
  314. staticlibext : '.a';
  315. staticlibprefix : 'libp';
  316. sharedlibprefix : 'lib';
  317. sharedClibext : '.so';
  318. staticClibext : '.a';
  319. staticClibprefix : 'lib';
  320. sharedClibprefix : 'lib';
  321. importlibprefix : 'libimp';
  322. importlibext : '.a';
  323. Cprefix : '';
  324. newline : #10;
  325. dirsep : '/';
  326. assem : as_x86_64_elf64;
  327. assemextern : as_gas;
  328. link : ld_none;
  329. linkextern : ld_embedded;
  330. ar : ar_gnu_ar;
  331. res : res_none;
  332. dbg : dbg_stabs;
  333. script : script_unix;
  334. endian : endian_little;
  335. alignment :
  336. (
  337. procalign : 16;
  338. loopalign : 8;
  339. jumpalign : 0;
  340. jumpalignskipmax : 0;
  341. coalescealign : 0;
  342. coalescealignskipmax: 0;
  343. constalignmin : 0;
  344. constalignmax : 16;
  345. varalignmin : 0;
  346. varalignmax : 16;
  347. localalignmin : 4;
  348. localalignmax : 16;
  349. recordalignmin : 0;
  350. recordalignmax : 16;
  351. maxCrecordalign : 16
  352. );
  353. first_parm_offset : 16;
  354. stacksize : 8*1024*1024;
  355. stackalign : 16;
  356. abi : abi_default;
  357. llvmdatalayout : 'e-p:64:64:64-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:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128';
  358. );
  359. system_i8086_embedded_info : tsysteminfo =
  360. (
  361. system : system_i8086_embedded;
  362. name : 'Embedded';
  363. shortname : 'embedded';
  364. flags : [tf_use_8_3,
  365. {$ifdef I8086_SMARTLINK_SECTIONS}
  366. tf_smartlink_sections,
  367. {$else I8086_SMARTLINK_SECTIONS}
  368. tf_smartlink_library,
  369. tf_no_objectfiles_when_smartlinking,
  370. {$endif I8086_SMARTLINK_SECTIONS}
  371. tf_cld,
  372. tf_no_generic_stackcheck,tf_emit_stklen];
  373. cpu : cpu_i8086;
  374. unit_env : '';
  375. extradefines : '';
  376. exeext : '.exe';
  377. defext : '.def';
  378. scriptext : '.bat';
  379. smartext : '.sl';
  380. unitext : '.ppu';
  381. unitlibext : '.ppl';
  382. asmext : '.s';
  383. objext : '.o';
  384. resext : '.res';
  385. resobjext : '.or';
  386. sharedlibext : '.dll';
  387. staticlibext : '.a';
  388. staticlibprefix : '';
  389. sharedlibprefix : '';
  390. sharedClibext : '.dll';
  391. staticClibext : '.a';
  392. staticClibprefix : 'lib';
  393. sharedClibprefix : '';
  394. importlibprefix : '';
  395. importlibext : '.al';
  396. Cprefix : '_';
  397. newline : #13#10;
  398. dirsep : '\';
  399. assem : as_i8086_omf;
  400. assemextern : as_i8086_nasmobj;
  401. link : ld_int_msdos;
  402. linkextern : ld_msdos;
  403. {$ifdef USE_SCRIPTED_WLIB}
  404. ar : ar_watcom_wlib_omf_scripted;
  405. {$else}
  406. ar : ar_watcom_wlib_omf;
  407. {$endif}
  408. res : res_none;
  409. dbg : dbg_dwarf2;
  410. script : script_dos;
  411. endian : endian_little;
  412. alignment :
  413. (
  414. procalign : 1;
  415. loopalign : 1;
  416. jumpalign : 0;
  417. jumpalignskipmax : 0;
  418. coalescealign : 0;
  419. coalescealignskipmax: 0;
  420. constalignmin : 0;
  421. constalignmax : 2;
  422. varalignmin : 0;
  423. varalignmax : 2;
  424. localalignmin : 0;
  425. localalignmax : 2;
  426. recordalignmin : 0;
  427. recordalignmax : 2;
  428. maxCrecordalign : 2
  429. );
  430. first_parm_offset : 4;
  431. stacksize : 0;
  432. stackalign : 2;
  433. abi : abi_default;
  434. llvmdatalayout : 'todo';
  435. );
  436. system_m68k_embedded_info : tsysteminfo =
  437. (
  438. system : system_m68k_embedded;
  439. name : 'Embedded';
  440. shortname : 'embedded';
  441. flags : [tf_under_development,tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  442. tf_smartlink_sections];
  443. cpu : cpu_m68k;
  444. unit_env : '';
  445. extradefines : '';
  446. exeext : '';
  447. defext : '.def';
  448. scriptext : '.sh';
  449. smartext : '.sl';
  450. unitext : '.ppu';
  451. unitlibext : '.ppl';
  452. asmext : '.s';
  453. objext : '.o';
  454. resext : '.res';
  455. resobjext : '.or';
  456. sharedlibext : '.so';
  457. staticlibext : '.a';
  458. staticlibprefix : 'libp';
  459. sharedlibprefix : 'lib';
  460. sharedClibext : '.so';
  461. staticClibext : '.a';
  462. staticClibprefix : 'lib';
  463. sharedClibprefix : 'lib';
  464. importlibprefix : 'libimp';
  465. importlibext : '.a';
  466. Cprefix : '';
  467. newline : #10;
  468. dirsep : '/';
  469. assem : as_gas;
  470. assemextern : as_gas;
  471. link : ld_none;
  472. linkextern : ld_embedded;
  473. ar : ar_gnu_ar;
  474. res : res_none;
  475. dbg : dbg_dwarf2;
  476. script : script_unix;
  477. endian : endian_big;
  478. alignment :
  479. (
  480. procalign : 4;
  481. loopalign : 4;
  482. jumpalign : 0;
  483. jumpalignskipmax : 0;
  484. coalescealign : 0;
  485. coalescealignskipmax: 0;
  486. constalignmin : 0;
  487. constalignmax : 4;
  488. varalignmin : 0;
  489. varalignmax : 4;
  490. localalignmin : 4;
  491. localalignmax : 4;
  492. recordalignmin : 0;
  493. recordalignmax : 4;
  494. maxCrecordalign : 4
  495. );
  496. first_parm_offset : 8;
  497. stacksize : 32768;
  498. stackalign : 4;
  499. abi : abi_default;
  500. llvmdatalayout : 'TODO';
  501. );
  502. system_riscv32_embedded_info : tsysteminfo =
  503. (
  504. system : system_riscv32_embedded;
  505. name : 'Embedded';
  506. shortname : 'embedded';
  507. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  508. tf_smartlink_sections];
  509. cpu : cpu_riscv32;
  510. unit_env : '';
  511. extradefines : '';
  512. exeext : '';
  513. defext : '.def';
  514. scriptext : '.sh';
  515. smartext : '.sl';
  516. unitext : '.ppu';
  517. unitlibext : '.ppl';
  518. asmext : '.s';
  519. objext : '.o';
  520. resext : '.res';
  521. resobjext : '.or';
  522. sharedlibext : '.so';
  523. staticlibext : '.a';
  524. staticlibprefix : 'libp';
  525. sharedlibprefix : 'lib';
  526. sharedClibext : '.so';
  527. staticClibext : '.a';
  528. staticClibprefix : 'lib';
  529. sharedClibprefix : 'lib';
  530. importlibprefix : 'libimp';
  531. importlibext : '.a';
  532. Cprefix : '';
  533. newline : #10;
  534. dirsep : '/';
  535. assem : as_gas;
  536. assemextern : as_gas;
  537. link : ld_none;
  538. linkextern : ld_embedded;
  539. ar : ar_gnu_ar;
  540. res : res_none;
  541. dbg : dbg_dwarf2;
  542. script : script_unix;
  543. endian : endian_little;
  544. alignment :
  545. (
  546. procalign : 4;
  547. loopalign : 4;
  548. jumpalign : 0;
  549. jumpalignskipmax : 0;
  550. coalescealign : 0;
  551. coalescealignskipmax: 0;
  552. constalignmin : 0;
  553. constalignmax : 4;
  554. varalignmin : 0;
  555. varalignmax : 4;
  556. localalignmin : 4;
  557. localalignmax : 4;
  558. recordalignmin : 0;
  559. recordalignmax : 4;
  560. maxCrecordalign : 4
  561. );
  562. first_parm_offset : 8;
  563. stacksize : 262144;
  564. stackalign : 4;
  565. abi : abi_default;
  566. 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';
  567. );
  568. system_riscv64_embedded_info : tsysteminfo =
  569. (
  570. system : system_riscv64_embedded;
  571. name : 'Embedded';
  572. shortname : 'embedded';
  573. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  574. tf_smartlink_sections];
  575. cpu : cpu_riscv64;
  576. unit_env : '';
  577. extradefines : '';
  578. exeext : '';
  579. defext : '.def';
  580. scriptext : '.sh';
  581. smartext : '.sl';
  582. unitext : '.ppu';
  583. unitlibext : '.ppl';
  584. asmext : '.s';
  585. objext : '.o';
  586. resext : '.res';
  587. resobjext : '.or';
  588. sharedlibext : '.so';
  589. staticlibext : '.a';
  590. staticlibprefix : 'libp';
  591. sharedlibprefix : 'lib';
  592. sharedClibext : '.so';
  593. staticClibext : '.a';
  594. staticClibprefix : 'lib';
  595. sharedClibprefix : 'lib';
  596. importlibprefix : 'libimp';
  597. importlibext : '.a';
  598. Cprefix : '';
  599. newline : #10;
  600. dirsep : '/';
  601. assem : as_gas;
  602. assemextern : as_gas;
  603. link : ld_none;
  604. linkextern : ld_embedded;
  605. ar : ar_gnu_ar;
  606. res : res_none;
  607. dbg : dbg_dwarf2;
  608. script : script_unix;
  609. endian : endian_little;
  610. alignment :
  611. (
  612. procalign : 4;
  613. loopalign : 4;
  614. jumpalign : 0;
  615. jumpalignskipmax : 0;
  616. coalescealign : 0;
  617. coalescealignskipmax: 0;
  618. constalignmin : 0;
  619. constalignmax : 4;
  620. varalignmin : 0;
  621. varalignmax : 4;
  622. localalignmin : 4;
  623. localalignmax : 4;
  624. recordalignmin : 0;
  625. recordalignmax : 4;
  626. maxCrecordalign : 4
  627. );
  628. first_parm_offset : 16;
  629. stacksize : 262144;
  630. stackalign : 8;
  631. abi : abi_default;
  632. 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';
  633. );
  634. system_xtensa_embedded_info : tsysteminfo =
  635. (
  636. system : system_xtensa_embedded;
  637. name : 'Embedded';
  638. shortname : 'embedded';
  639. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  640. tf_smartlink_sections,tf_init_final_units_by_calls];
  641. cpu : cpu_xtensa;
  642. unit_env : '';
  643. extradefines : '';
  644. exeext : '';
  645. defext : '.def';
  646. scriptext : '.sh';
  647. smartext : '.sl';
  648. unitext : '.ppu';
  649. unitlibext : '.ppl';
  650. asmext : '.s';
  651. objext : '.o';
  652. resext : '.res';
  653. resobjext : '.or';
  654. sharedlibext : '.so';
  655. staticlibext : '.a';
  656. staticlibprefix : 'libp';
  657. sharedlibprefix : 'lib';
  658. sharedClibext : '.so';
  659. staticClibext : '.a';
  660. staticClibprefix : 'lib';
  661. sharedClibprefix : 'lib';
  662. importlibprefix : 'libimp';
  663. importlibext : '.a';
  664. Cprefix : '';
  665. newline : #10;
  666. dirsep : '/';
  667. assem : as_gas;
  668. assemextern : as_gas;
  669. link : ld_none;
  670. linkextern : ld_embedded;
  671. ar : ar_gnu_ar;
  672. res : res_none;
  673. dbg : dbg_dwarf2;
  674. script : script_unix;
  675. endian : endian_little;
  676. alignment :
  677. (
  678. procalign : 4;
  679. loopalign : 4;
  680. jumpalign : 0;
  681. jumpalignskipmax : 0;
  682. coalescealign : 0;
  683. coalescealignskipmax: 0;
  684. constalignmin : 0;
  685. constalignmax : 4;
  686. varalignmin : 0;
  687. varalignmax : 4;
  688. localalignmin : 4;
  689. localalignmax : 16;
  690. recordalignmin : 0;
  691. recordalignmax : 4;
  692. maxCrecordalign : 4
  693. );
  694. first_parm_offset : 8;
  695. stacksize : 65536;
  696. stackalign : 16;
  697. abi : abi_xtensa_call0;
  698. 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';
  699. );
  700. system_z80_embedded_info : tsysteminfo =
  701. (
  702. system : system_z80_embedded;
  703. name : 'Embedded';
  704. shortname : 'embedded';
  705. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  706. tf_smartlink_library,
  707. tf_no_objectfiles_when_smartlinking];
  708. cpu : cpu_z80;
  709. unit_env : '';
  710. extradefines : '';
  711. exeext : '';
  712. defext : '.def';
  713. scriptext : '.sh';
  714. smartext : '.sl';
  715. unitext : '.ppu';
  716. unitlibext : '.ppl';
  717. asmext : '.s';
  718. objext : '.rel';
  719. resext : '.res';
  720. resobjext : '.or';
  721. sharedlibext : '.so';
  722. staticlibext : '.a';
  723. staticlibprefix : 'libp';
  724. sharedlibprefix : 'lib';
  725. sharedClibext : '.so';
  726. staticClibext : '.a';
  727. staticClibprefix : 'lib';
  728. sharedClibprefix : 'lib';
  729. importlibprefix : 'libimp';
  730. importlibext : '.a';
  731. Cprefix : '';
  732. newline : #10;
  733. dirsep : '/';
  734. assem : as_z80_rel;
  735. assemextern : as_sdcc_sdasz80;
  736. link : ld_none;
  737. linkextern : ld_embedded;
  738. ar : ar_sdcc_sdar;
  739. res : res_none;
  740. dbg : dbg_dwarf2;
  741. script : script_unix;
  742. endian : endian_little;
  743. alignment :
  744. (
  745. procalign : 1;
  746. loopalign : 1;
  747. jumpalign : 0;
  748. jumpalignskipmax : 0;
  749. coalescealign : 0;
  750. coalescealignskipmax : 0;
  751. constalignmin : 0;
  752. constalignmax : 1;
  753. varalignmin : 0;
  754. varalignmax : 1;
  755. localalignmin : 0;
  756. localalignmax : 1;
  757. recordalignmin : 0;
  758. recordalignmax : 1;
  759. maxCrecordalign : 1
  760. );
  761. first_parm_offset : 4;
  762. stacksize : 1024;
  763. stackalign : 1;
  764. abi : abi_default;
  765. llvmdatalayout : 'todo';
  766. );
  767. system_wasm32_embedded_info : tsysteminfo =
  768. (
  769. system : system_wasm32_embedded;
  770. name : 'Embedded';
  771. shortname : 'embedded';
  772. flags : [tf_under_development,tf_needs_symbol_size,tf_needs_symbol_type,
  773. tf_files_case_sensitive,tf_no_generic_stackcheck,
  774. tf_smartlink_sections,
  775. { avoid the creation of threadvar tables }
  776. tf_section_threadvars];
  777. cpu : cpu_wasm32;
  778. unit_env : '';
  779. extradefines : '';
  780. exeext : '.wasm';
  781. defext : '.def';
  782. scriptext : '.sh';
  783. smartext : '.sl';
  784. unitext : '.ppu';
  785. unitlibext : '.ppl';
  786. asmext : '.wat';
  787. objext : '.o';
  788. resext : '';
  789. resobjext : '.o';
  790. sharedlibext : ''; // keep it empty! The sharedlibext drives the export module name
  791. // if this is populated, then the name should be cleared when generating import
  792. staticlibext : '.a';
  793. staticlibprefix : '';
  794. sharedlibprefix : '';
  795. sharedClibext : '.wasm';
  796. staticClibext : '.wasm';
  797. staticClibprefix : '';
  798. sharedClibprefix : '';
  799. importlibprefix : '';
  800. importlibext : '.wasm';
  801. Cprefix : '';
  802. newline : #10;
  803. dirsep : '/';
  804. assem : as_wasm32_llvm_mc;
  805. assemextern : as_wasm32_llvm_mc;
  806. link : ld_none;
  807. linkextern : ld_embedded;
  808. ar : ar_none;
  809. res : res_none;
  810. dbg : dbg_dwarf2;
  811. script : script_unix;
  812. endian : endian_little;
  813. alignment :
  814. (
  815. procalign : 4;
  816. loopalign : 4;
  817. jumpalign : 0;
  818. jumpalignskipmax : 0;
  819. coalescealign : 0;
  820. coalescealignskipmax: 0;
  821. constalignmin : 0;
  822. constalignmax : 4;
  823. varalignmin : 4;
  824. varalignmax : 4;
  825. localalignmin : 4;
  826. localalignmax : 4;
  827. recordalignmin : 0;
  828. recordalignmax : 2;
  829. maxCrecordalign : 4
  830. );
  831. first_parm_offset : 0;
  832. stacksize : 262144;
  833. stackalign : 4;
  834. abi : abi_default;
  835. llvmdatalayout : 'todo';
  836. );
  837. implementation
  838. initialization
  839. {$ifdef CPUARM}
  840. {$ifdef embedded}
  841. set_source_info(system_arm_embedded_info);
  842. {$endif embedded}
  843. {$endif CPUARM}
  844. {$ifdef CPUAVR}
  845. {$ifdef embedded}
  846. set_source_info(system_avr_embedded_info);
  847. {$endif embedded}
  848. {$endif CPUAVR}
  849. {$ifdef CPUMIPSEL}
  850. {$ifdef embedded}
  851. set_source_info(system_mipsel_embedded_info);
  852. {$endif embedded}
  853. {$endif CPUMIPSEL}
  854. {$ifdef CPUI386}
  855. {$ifdef embedded}
  856. set_source_info(system_i386_embedded_info);
  857. {$endif embedded}
  858. {$endif CPUI386}
  859. {$ifdef CPUX86_64}
  860. {$ifdef embedded}
  861. set_source_info(system_x86_64_embedded_info);
  862. {$endif embedded}
  863. {$endif CPUX86_64}
  864. {$ifdef cpu8086}
  865. {$ifdef embedded}
  866. set_source_info(system_i8086_embedded_info);
  867. {$endif embedded}
  868. {$endif cpu8086}
  869. {$ifdef cpum68k}
  870. {$ifdef embedded}
  871. set_source_info(system_m68k_embedded_info);
  872. {$endif embedded}
  873. {$endif cpum68k}
  874. {$ifdef cpuriscv32}
  875. {$ifdef embedded}
  876. set_source_info(system_riscv32_embedded_info);
  877. {$endif embedded}
  878. {$endif cpuriscv32}
  879. {$ifdef cpuriscv64}
  880. {$ifdef embedded}
  881. set_source_info(system_riscv64_embedded_info);
  882. {$endif embedded}
  883. {$endif cpuriscv64}
  884. {$ifdef cpuxtensa}
  885. {$ifdef embedded}
  886. set_source_info(system_xtensa_embedded_info);
  887. {$endif embedded}
  888. {$endif cpuxtensa}
  889. {$ifdef CPUZ80}
  890. {$ifdef embedded}
  891. set_source_info(system_z80_embedded_info);
  892. {$endif embedded}
  893. {$endif CPUZ80}
  894. end.