File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,6 +302,8 @@ class C51Parser extends KeilParser<KeilC51Option> {
302302 cOptions [ 'asm-compiler' ] = Object . create ( null ) ;
303303 cOptions [ 'linker' ] = Object . create ( null ) ;
304304
305+ cOptions [ 'linker' ] [ 'misc-controls' ] = "" ;
306+
305307 try {
306308 if ( target51 . Target51Misc ) {
307309 switch ( target51 . Target51Misc . MemoryModel ) {
@@ -336,6 +338,17 @@ class C51Parser extends KeilParser<KeilC51Option> {
336338 cOptions [ 'c/cpp-compiler' ] [ 'optimization-type' ] = target51 . C51 . SizeSpeed === '0' ? 'SIZE' : 'SPEED' ;
337339 cOptions [ 'c/cpp-compiler' ] [ 'optimization-level' ] = 'level-' + ( target51 . C51 . Optimize || '8' ) ;
338340 }
341+
342+ // import Lx51.CClasses / UserClasses
343+ if ( target51 . Lx51 ) {
344+ if ( target51 . Lx51 . CClasses ) {
345+ cOptions [ 'linker' ] [ 'misc-controls' ] += `CLASSES (${ target51 . Lx51 . CClasses } ) ` ;
346+ }
347+ if ( target51 . Lx51 . UserClasses ) {
348+ cOptions [ 'linker' ] [ 'misc-controls' ] += `CLASSES (${ target51 . Lx51 . UserClasses } ) ` ;
349+ }
350+ }
351+
339352 } catch ( error ) {
340353 GlobalEvent . emit ( 'msg' , ExceptionToMessage ( error , 'Warning' ) ) ;
341354 GlobalEvent . emit ( 'msg' , {
You can’t perform that action at this time.
0 commit comments