[Martenlist] Anyone using Marten for generating C code for embedded systems

Pekka Nikander pekka.nikander at iki.fi
Thu Aug 24 13:47:43 EDT 2006


Hi Luis,

Thanks, I tried.  XCode doesn't seem to be needed.  GCC is enough.  I  
have the cross-compilation environment already fine and working, so  
that is not a problem at all.

The bigger problem appears to be the Marten runtime library, /Library/ 
Frameworks/MartenStandard.framework/MartenStandard.  That seems to  
implement a runtime that implements functions such as the following:
   VPLEnvironmentCreate("CommandLine", kvpl_StackInline, kFALSE);
   load_Standard(environment);
   vpx_method_map(environment,kVPXMethod_Command_20_Line,"Command  
Line");
   VPLEnvironmentInit(gVPLCommandLine_Environment, vpl_INIT);
   VPLEnvironmentMain(gVPLCommandLine_Environment, vpl_MAIN, argc,  
argv);
   method_new("Command Line", environment);
   vpx_method_initialize 
(environment,result,vpx_method_Command_20_Line,"MAIN");
   etc etc etc

Re-implementing them for the embedded platform won't be that easy.   
In other words, the generated C code seems to be, based on its  
initial appearance, far from self-contained.

Hmm.  Is the runtime documented somewhere?

--Pekka

On Aug 24, 2006, at 16:18, Luis wrote:

> Hiya,
>
> You'd need to get XCode set up to cross-compile so that you can  
> target the ARM architecture. The latest XCode already does this for  
> Intel architectures as it's used for creating the Universal Binaries.
>
> The -b option for gcc at the terminal gives you the choice of  
> target architecture, but gcc must have been compiled with the  
> option to cross-compile for that architecture.
>
> I haven't seen the C code exported by Marten, but I'd go for  
> creating a 'console' app to lessen any possible dependencies on the  
> Mac GUI creeping into the code. I wouldn't see the need to build  
> any frameworks if you go via this route if the generated code is  
> platform agnostic (more likely if it's a console app).
>
> Don't know if having a look at crosstool will help (mentions an ARM  
> in there): http://www.kegel.com/crosstool/
>
> You could go via Fink and do: fink install avr-gcc (install Fink  
> first!).
>
> Or, and it's a big OR: You can avoid most of the brainache and much  
> gnashing of teeth by getting the toolchain from here: http:// 
> www.klingler.net/toolchain_arm.php
>
> Cheers,
>
> Luis.
>
>
> Pekka Nikander wrote:
>> I'd be interested in using Marten for generating stand-alone C  
>> code for a small ARM-based embedded system.  Does anyone have any  
>> ideas of how hard that would be?  Apparently, I would need to  
>> develop my own frameworks and libraries, but other than that are  
>> there any other foreseeable road blocks?  How about code bloat?   
>> The system I'm thinking about has only 256k of memory.
>> --Pekka Nikander
>> _______________________________________________
>> Martenlist mailing list
>> Martenlist at andescotia.com
>> http://lists.andescotia.com/mailman/listinfo/martenlist
>



More information about the Martenlist mailing list