Adding code to the common code space

classic Classic list List threaded Threaded
4 messages Options
Graham Henstridge Graham Henstridge
Reply | Threaded
Open this post in threaded view
|

Adding code to the common code space

 In my ongoing eLua familiarisation process, I have been looking at the build
 system with the aim of conditionally adding a C library module. I expected
 to find somewhere list of files for building the common code but could not
 find any. So, I chased down xmodem support as an example, but the process
 becomes very complex. Are there any guidelines or description of what needs
 to be done to add a static library to the build process.

Graham

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: Adding code to the common code space

Hi,

On Mon, Jun 17, 2013 at 6:26 AM, Graham Henstridge <[hidden email]> wrote:
 In my ongoing eLua familiarisation process, I have been looking at the build
 system with the aim of conditionally adding a C library module. I expected
 to find somewhere list of files for building the common code but could not
 find any. So, I chased down xmodem support as an example, but the process
 becomes very complex. Are there any guidelines or description of what needs
 to be done to add a static library to the build process.

So would you like to add a C library module or a static library module? I'm not sure I understood your question completely.

Best,
Bogdan
 

Graham

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Graham Henstridge-2 Graham Henstridge-2
Reply | Threaded
Open this post in threaded view
|

Re: Adding code to the common code space

Hi

On 18/06/2013, at 9:29 PM, Bogdan Marinescu <[hidden email]> wrote:

Hi,

On Mon, Jun 17, 2013 at 6:26 AM, Graham Henstridge <[hidden email]> wrote:
 In my ongoing eLua familiarisation process, I have been looking at the build
 system with the aim of conditionally adding a C library module. I expected
 to find somewhere list of files for building the common code but could not
 find any. So, I chased down xmodem support as an example, but the process
 becomes very complex. Are there any guidelines or description of what needs
 to be done to add a static library to the build process.

So would you like to add a C library module or a static library module? I'm not sure I understood your question completely.

To put the requirements in context, the module is for a general purpose deterministic data acquisition, that managers sensor sampling, error detection, filtering, linearisation, data fusion, feature extraction and logging. A purpose built analog system is assumed although the platform's ADC will be used for housekeeping and lower precision functions. The hardware is driven by an SPI interface and channel expansion units via CAN, both of which I would like to drive in C at the eLua "platform interface" level. The intensive work is done in C, but the setup and higher level data processing done in Lua. The work can be floating point intensive, hence the preference for Cortex M4 processors.

Since my post I have dug deeper and better understand how the build process works. I would like to add a C module as cleanly and conventionally as possible, with conditional inclusion in the "common code" area of the build. Apart from simply getting my code ported (from its linux environment) and working, it may be worthy of merging into eLua mainline at some point, so right from the start, I would like to follow the spirit of the eLua design.

Graham


Best,
Bogdan
 

Graham

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: Adding code to the common code space

Hi,


On Wed, Jun 19, 2013 at 6:42 AM, Graham Henstridge <[hidden email]> wrote:
Hi

On 18/06/2013, at 9:29 PM, Bogdan Marinescu <[hidden email]> wrote:

Hi,

On Mon, Jun 17, 2013 at 6:26 AM, Graham Henstridge <[hidden email]> wrote:
 In my ongoing eLua familiarisation process, I have been looking at the build
 system with the aim of conditionally adding a C library module. I expected
 to find somewhere list of files for building the common code but could not
 find any. So, I chased down xmodem support as an example, but the process
 becomes very complex. Are there any guidelines or description of what needs
 to be done to add a static library to the build process.

So would you like to add a C library module or a static library module? I'm not sure I understood your question completely.

To put the requirements in context, the module is for a general purpose deterministic data acquisition, that managers sensor sampling, error detection, filtering, linearisation, data fusion, feature extraction and logging. A purpose built analog system is assumed although the platform's ADC will be used for housekeeping and lower precision functions. The hardware is driven by an SPI interface and channel expansion units via CAN, both of which I would like to drive in C at the eLua "platform interface" level. The intensive work is done in C, but the setup and higher level data processing done in Lua. The work can be floating point intensive, hence the preference for Cortex M4 processors.

Since my post I have dug deeper and better understand how the build process works. I would like to add a C module as cleanly and conventionally as possible, with conditional inclusion in the "common code" area of the build. Apart from simply getting my code ported (from its linux environment) and working, it may be worthy of merging into eLua mainline at some point, so right from the start, I would like to follow the spirit of the eLua design.

Simple pointers for adding a platform independent module:

- add the code in src/modules/<module>.c. It will automatically be found and included in the build by the build system.
- guard the build with preprocessor directives like #ifdef  BUILD_<module> ... #endif.

This should be it, in its simplest incantation. If you need more help, please let me know.

Best,
Bogdan


Graham


Best,
Bogdan
 

Graham

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev