SlideShare a Scribd company logo
1 of 4
Download to read offline
Software Development Automation with Scripting Languages                                 http://dev.emcelettronica.com/print/51795




                        Your Electronics Open Source
          (http://dev.emcelettronica.com)
          Home > Blog > allankliu's blog > Content




          Software Development Automation with
          Scripting Languages
          By allankliu
          Created 03/06/2008 - 02:46

          BLOG Microcontrollers

          The Scripting languages are deployed in many operative systems,
          either in UNIX/Linux or Windows. These languages are developed for
          general purpose process automation and web programming. But you
          can consider using them for the software development process in
          many ways. Among these languages, awk and Perl are suitable for
          automate and speed up software development for embedded
          systems, because many embedded systems only have cross tool
          chain, without powerful IDE supports for process automation. Here I
          will show you why we need them and how these tools help us.

          As a software developer, you might be involved in many trivial daily development processes, such
          as processing all source code in C files, head files, makefiles, map file, batch file and linker error
          message and all many other files in proprietary formats. Perl is similar to C, sed, shell and awk,
          and it is good at manipulating text, which is the major reason to be one of the most popular
          language in web programming. This feature makes it the good choice for text processing in your
          project.

          Perl vs. awk

          Perl is much powerful than awk with many extension modules via CPAN, an online Perl module
          inventory. But Perl is bigger than awk as well. If you only need a handy tool to complete a simple
          source file, which is demonstrated in following sample application, awk is very convenient. If you
          are planning to use the scripts to automate a big project, Perl is a better choice with more
          features.

          Benefits

          Today, more and more ICs are system ICs. That fact means every single device has hundreds or
          thousands of registers. When you, as a software developer, cut and paste all the register
          definitions from the datasheet to the source files, you will definitely find the whole process trivial,
          and it might generate many errors and takes more time to convert them into head files. Perl can
          help you to simplify this process by exporting the register tables in the PDF file to a text file, and
          then converting it into head files or other formats.

          Source Code Generator

          Assembly is very common in embedded system software. The head files for assembly and C
          source files should have same register definition in different syntax. You can use a script to
          convert definition from #define in C files/head files to equivalent assembly definition files.



1 din 4                                                                                                         03.06.2008 21:00
Software Development Automation with Scripting Languages                                 http://dev.emcelettronica.com/print/51795


          Format Conversion

          A lot of embedded system tool chain has proprietary file formats. It is possible to convert them into
          other formats with a script.

          Statistics for Project management

          It is very important and useful to have an insight of a project by displaying the statistic chart of the
          source code. These figures include line of code, comment, ROM footprint (parsed by map file)
          and other data. These files can be converted into a text database as project history.

          Port Binary Data into Project

          It is possible to convert binary application data into source code with a script. For example,
          convert a GIF file format into a C source file as embedded image data. It also works for
          embedded fonts.

          Project Porting

          To port a project to a new platform will generate a lot of errors in the beginning, because the new
          target systems might miss a lot of functions. As a result, the linker will report thousands of errors.
          It takes time to add all functions to remove the errors. With a Perl script, you can locate these
          missing functions from the linker errors, and then search the prototypes for these functions and
          add dummy function bodies for them. It is very quick to solve these linker errors. But you must
          complete the functions with real bodies by yourself.

          Project Configuration

          Since makefiles are text files as well, scripts can be used to configurate the project by updating
          rules of makefiles.If different software components are configured by these makefiles, the whole
          project can be re-configured and rebuild by this ways. The system architect should organize the
          project configuration very carefully, because the script is powerful and dangerous. It will bring
          hidden risk if the system is maintained by a not well organized script.

          Testing Automation

          Perl has many modules available on CPAN, including WIN32::SerialPort module and useful
          TCP/IP modules. A testing engineer can use this feature to test the remote system via RS232 or
          TCP/IP connection automatically and generate the test report report. And Perl can run command
          via exec() function. So even you are not using serial port, if you can access the remote device with
          Linux device file, Windows DLL or executable in command prompt which connects to your target
          hardware, you can call it in Perl. This is quite useful in testing automation, production automation.
          But it requires more knowledge in PC programming.

          Document Automation

          Perl supports Doxygen, it is very easy to generate project report with Perl script in HTML, XML
          and even Windows Word (not for all versions). You will not feel headache to synchronize the
          content of your report with your source code. The document generation could be integrated into
          your makefile as well.

          Sample Application

          This code is a part of real project from Philips Semiconductors. The register definition is written in
          C source file, but the makefile will call an awk to parse the C source, generate head files to be
          included in the C source file, and update the dependency rules in makefile. A make file can rebuild
          whole project.
          hwic.c




2 din 4                                                                                                         03.06.2008 21:00
Software Development Automation with Scripting Languages                         http://dev.emcelettronica.com/print/51795




          /*
          #I2C_MAP_BEGIN     --- begin definition of I2C-MAP
          Write registers:
          REG_CON1             0x04    0         0         0    0          ST3        ST2         ST1    ST0
          REG_CON2             0x05    0         0         0    0          SP3        SP2         SP1    SP0
          REG_CON3             0x06    SAP    ST         0     SMU   LMU          0           0           0
          #I2C_MAP_END     --- end definition of I2C-map
          */
          i2cmap.awk



          BEGIN 
          {
              open_map_file = 0
              print quot;/* Translated by AWK-script */nquot;
          }



          function print_define(string, value)
          {
              if (string != quot;0quot;)
              {
                  print quot;#define BIT_quot; string quot;tquot; value
                  print quot;#define BYTE_quot; string quot;tquot; $1
              }
          }

          #==================================
          #    Keyword #I2C_MAP_BEGIN detected
          #    Open map file
          #==================================
          #
          toupper($1) == quot;#I2C_MAP_BEGINquot; 
          {
              open_map_file = 1
          }

          #==================================
          #    Keyword #I2C_MAP_END detected
          #    Close map file
          #==================================
          toupper($1) == quot;#I2C_MAP_ENDquot; 
          {
              open_map_file = 0
          }

          #==================================
          #     Register definition detected
          #     Print register defintions
          #==================================
          (index($1,quot;REG_quot;) == 1) && (NF == 10) 
          {
              if (open_map_file == 1)
              {
                   print quot;#define quot; $1 quot;tquot; $2
                   print_define($10,quot;0x01quot;)
                   print_define($9, quot;0x02quot;)
                   print_define($8,quot;0x04quot;)
                   print_define($7,quot;0x08quot;)
                   print_define($6,quot;0x10quot;)
                   print_define($5,quot;0x20quot;)
                   print_define($4,quot;0x40quot;)
                   print_define($3,quot;0x80quot;)
                   print quot;nquot;
              }
          }

          END      
          {
                print quot;/* End translated by AWK-script */quot;
          }




3 din 4                                                                                                 03.06.2008 21:00
Software Development Automation with Scripting Languages                                http://dev.emcelettronica.com/print/51795


          makefile

          # Using awk script to generate *.h file

          %foreach X in $(MAP_INCLUDES)
          $(X): i2cmap.awk gawk.exe $[f,,$(X),c]
              %echo Generating $(X) ...
              -$(.PATH.exe)gawk -f$(.PATH.awk)i2cmap.awk $(.PATH.c)$[f,,$(X),c] > $(.PATH.h)$(X)
              -touch -f$(.PATH.c)$[f,,$(X),c] $(.PATH.h)$(X)
          %endfor

          ......

          HWIC.OBJ: HWIC.H hwic.c




          Installation

          You don't have to install these utility if you are working on UNIX/Linux. You can install Cygwin on
          Windows PC. You must enable gmake, Perl and gawk during installation.




                                                           Trademarks



          Source URL: http://dev.emcelettronica.com/software-development-automation-scripting-languages




4 din 4                                                                                                        03.06.2008 21:00

More Related Content

What's hot

PIL - A Platform Independent Language
PIL - A Platform Independent LanguagePIL - A Platform Independent Language
PIL - A Platform Independent Languagezefhemel
 
Php Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastPhp Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastBastian Feder
 
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp sessionA whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp sessionJeffrey McGuire
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To AntRajesh Kumar
 
Multilingual Improvements for Drupal 8
Multilingual Improvements for Drupal 8Multilingual Improvements for Drupal 8
Multilingual Improvements for Drupal 8Acquia
 
Wenger sf xin-barton
Wenger sf xin-bartonWenger sf xin-barton
Wenger sf xin-bartonENUG
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copyBurlacu Sergiu
 
Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Gábor Hojtsy
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Michiel Rook
 
Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Gábor Hojtsy
 
Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0Quang Ngoc
 

What's hot (13)

PIL - A Platform Independent Language
PIL - A Platform Independent LanguagePIL - A Platform Independent Language
PIL - A Platform Independent Language
 
Php Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastPhp Documentor The Beauty And The Beast
Php Documentor The Beauty And The Beast
 
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp sessionA whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session
 
Introduction To Ant
Introduction To AntIntroduction To Ant
Introduction To Ant
 
Multilingual Improvements for Drupal 8
Multilingual Improvements for Drupal 8Multilingual Improvements for Drupal 8
Multilingual Improvements for Drupal 8
 
upload test 1
upload test 1upload test 1
upload test 1
 
Wenger sf xin-barton
Wenger sf xin-bartonWenger sf xin-barton
Wenger sf xin-barton
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copy
 
Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8
 
C
CC
C
 
Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0Open Source RAD with OpenERP 7.0
Open Source RAD with OpenERP 7.0
 

Viewers also liked

Automatic 3D facial expression recognition
Automatic 3D facial expression recognitionAutomatic 3D facial expression recognition
Automatic 3D facial expression recognitionrafaelgmonteiro
 
CODE Interactive
CODE InteractiveCODE Interactive
CODE InteractiveAlya Esat
 
What's Animation and its uses?
What's Animation and its uses?What's Animation and its uses?
What's Animation and its uses?Divy Singh Rathore
 
Motion Capture Technology
Motion Capture TechnologyMotion Capture Technology
Motion Capture TechnologyAl Asheer
 
Introduction to motion capture
Introduction to motion captureIntroduction to motion capture
Introduction to motion captureHanafikktmr
 
Multimedia Presentation
Multimedia PresentationMultimedia Presentation
Multimedia PresentationRajesh R. Nair
 
MOTION CAPTURE TECHNOLOGY
MOTION CAPTURE TECHNOLOGYMOTION CAPTURE TECHNOLOGY
MOTION CAPTURE TECHNOLOGYShaik Tanveer
 
Introduction to 3D Animation
Introduction to 3D AnimationIntroduction to 3D Animation
Introduction to 3D AnimationGary Ferguson
 
Motion capture technology
Motion capture technologyMotion capture technology
Motion capture technologyAnvesh Ranga
 
Motion capture technology
Motion capture technologyMotion capture technology
Motion capture technologyAnvesh Ranga
 

Viewers also liked (17)

Sjb Presentation
Sjb PresentationSjb Presentation
Sjb Presentation
 
7 Exciting Uses of 3D Animation Today
7 Exciting Uses of 3D Animation Today7 Exciting Uses of 3D Animation Today
7 Exciting Uses of 3D Animation Today
 
Automatic 3D facial expression recognition
Automatic 3D facial expression recognitionAutomatic 3D facial expression recognition
Automatic 3D facial expression recognition
 
CODE Interactive
CODE InteractiveCODE Interactive
CODE Interactive
 
What's Animation and its uses?
What's Animation and its uses?What's Animation and its uses?
What's Animation and its uses?
 
Motion Capture Technology
Motion Capture TechnologyMotion Capture Technology
Motion Capture Technology
 
Introduction to motion capture
Introduction to motion captureIntroduction to motion capture
Introduction to motion capture
 
Multimedia Presentation
Multimedia PresentationMultimedia Presentation
Multimedia Presentation
 
MOTION CAPTURE TECHNOLOGY
MOTION CAPTURE TECHNOLOGYMOTION CAPTURE TECHNOLOGY
MOTION CAPTURE TECHNOLOGY
 
Motion Capture
Motion CaptureMotion Capture
Motion Capture
 
Introduction to 3D Animation
Introduction to 3D AnimationIntroduction to 3D Animation
Introduction to 3D Animation
 
Motion capture technology
Motion capture technologyMotion capture technology
Motion capture technology
 
Motion capture technology
Motion capture technologyMotion capture technology
Motion capture technology
 
3d internet
3d internet3d internet
3d internet
 
3d internet
3d internet3d internet
3d internet
 
3D Animation
3D Animation3D Animation
3D Animation
 
ANIMATION PPT
ANIMATION PPTANIMATION PPT
ANIMATION PPT
 

Similar to Software Development Automation With Scripting Languages

TestUpload
TestUploadTestUpload
TestUploadZarksaDS
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails DevsDiacode
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_languageNico Ludwig
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net FundamentalsLiquidHub
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Itzik Kotler
 
OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3Borni DHIFI
 
Makefile
MakefileMakefile
MakefileIonela
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchAndrew Lowe
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKonstantin Sorokin
 
Automating API Documentation
Automating API DocumentationAutomating API Documentation
Automating API DocumentationSelvakumar T S
 
Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Wei Sun
 
Aspect-oriented programming in Perl
Aspect-oriented programming in PerlAspect-oriented programming in Perl
Aspect-oriented programming in Perlmegakott
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreEsha Yadav
 

Similar to Software Development Automation With Scripting Languages (20)

TestUpload
TestUploadTestUpload
TestUpload
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language
 
C Language
C LanguageC Language
C Language
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
 
Srgoc dotnet_new
Srgoc dotnet_newSrgoc dotnet_new
Srgoc dotnet_new
 
Caerusone
CaerusoneCaerusone
Caerusone
 
OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3OpenERP Technical Memento V0.7.3
OpenERP Technical Memento V0.7.3
 
Makefile
MakefileMakefile
Makefile
 
Easy native wrappers with SWIG
Easy native wrappers with SWIGEasy native wrappers with SWIG
Easy native wrappers with SWIG
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
Visual studio
Visual studioVisual studio
Visual studio
 
Automating API Documentation
Automating API DocumentationAutomating API Documentation
Automating API Documentation
 
Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02
 
Aspect-oriented programming in Perl
Aspect-oriented programming in PerlAspect-oriented programming in Perl
Aspect-oriented programming in Perl
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya Rathore
 

More from Ionela

IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus FlyportIonela
 
Flyport wifi webserver configuration page
Flyport wifi webserver configuration pageFlyport wifi webserver configuration page
Flyport wifi webserver configuration pageIonela
 
openPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetopenPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetIonela
 
How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with Ionela
 
Openpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud servicesOpenpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud servicesIonela
 
Flyport openPicus datasheet
Flyport openPicus datasheetFlyport openPicus datasheet
Flyport openPicus datasheetIonela
 
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
Windows phone 7 è l’ultima occasione di microsoft   2010-10-18Windows phone 7 è l’ultima occasione di microsoft   2010-10-18
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18Ionela
 
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...Ionela
 
Utente premium 2010-10-17
Utente premium   2010-10-17Utente premium   2010-10-17
Utente premium 2010-10-17Ionela
 
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
Unity sostituisce gnome su ubuntu 11.04   2010-11-01Unity sostituisce gnome su ubuntu 11.04   2010-11-01
Unity sostituisce gnome su ubuntu 11.04 2010-11-01Ionela
 
Una retina artificiale per ridare la vista 2010-11-10
Una retina artificiale per ridare la vista   2010-11-10Una retina artificiale per ridare la vista   2010-11-10
Una retina artificiale per ridare la vista 2010-11-10Ionela
 
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29Ionela
 
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...Ionela
 
Ubuntu passa a wayland 2010-11-08
Ubuntu passa a wayland   2010-11-08Ubuntu passa a wayland   2010-11-08
Ubuntu passa a wayland 2010-11-08Ionela
 
Touchatag un'applicazione di internet delle cose 2010-11-10
Touchatag  un'applicazione di internet delle cose   2010-11-10Touchatag  un'applicazione di internet delle cose   2010-11-10
Touchatag un'applicazione di internet delle cose 2010-11-10Ionela
 
Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Ionela
 
Thread o processo quale usare - 2010-11-02
Thread o processo  quale usare  - 2010-11-02Thread o processo  quale usare  - 2010-11-02
Thread o processo quale usare - 2010-11-02Ionela
 
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03Ionela
 
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...Ionela
 
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...Ionela
 

More from Ionela (20)

IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus Flyport
 
Flyport wifi webserver configuration page
Flyport wifi webserver configuration pageFlyport wifi webserver configuration page
Flyport wifi webserver configuration page
 
openPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetopenPicus Proto Nest Datasheet
openPicus Proto Nest Datasheet
 
How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with
 
Openpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud servicesOpenpicus Flyport interfaces the cloud services
Openpicus Flyport interfaces the cloud services
 
Flyport openPicus datasheet
Flyport openPicus datasheetFlyport openPicus datasheet
Flyport openPicus datasheet
 
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
Windows phone 7 è l’ultima occasione di microsoft   2010-10-18Windows phone 7 è l’ultima occasione di microsoft   2010-10-18
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
 
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
 
Utente premium 2010-10-17
Utente premium   2010-10-17Utente premium   2010-10-17
Utente premium 2010-10-17
 
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
Unity sostituisce gnome su ubuntu 11.04   2010-11-01Unity sostituisce gnome su ubuntu 11.04   2010-11-01
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
 
Una retina artificiale per ridare la vista 2010-11-10
Una retina artificiale per ridare la vista   2010-11-10Una retina artificiale per ridare la vista   2010-11-10
Una retina artificiale per ridare la vista 2010-11-10
 
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
 
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
 
Ubuntu passa a wayland 2010-11-08
Ubuntu passa a wayland   2010-11-08Ubuntu passa a wayland   2010-11-08
Ubuntu passa a wayland 2010-11-08
 
Touchatag un'applicazione di internet delle cose 2010-11-10
Touchatag  un'applicazione di internet delle cose   2010-11-10Touchatag  un'applicazione di internet delle cose   2010-11-10
Touchatag un'applicazione di internet delle cose 2010-11-10
 
Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05
 
Thread o processo quale usare - 2010-11-02
Thread o processo  quale usare  - 2010-11-02Thread o processo  quale usare  - 2010-11-02
Thread o processo quale usare - 2010-11-02
 
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
 
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
 
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Software Development Automation With Scripting Languages

  • 1. Software Development Automation with Scripting Languages http://dev.emcelettronica.com/print/51795 Your Electronics Open Source (http://dev.emcelettronica.com) Home > Blog > allankliu's blog > Content Software Development Automation with Scripting Languages By allankliu Created 03/06/2008 - 02:46 BLOG Microcontrollers The Scripting languages are deployed in many operative systems, either in UNIX/Linux or Windows. These languages are developed for general purpose process automation and web programming. But you can consider using them for the software development process in many ways. Among these languages, awk and Perl are suitable for automate and speed up software development for embedded systems, because many embedded systems only have cross tool chain, without powerful IDE supports for process automation. Here I will show you why we need them and how these tools help us. As a software developer, you might be involved in many trivial daily development processes, such as processing all source code in C files, head files, makefiles, map file, batch file and linker error message and all many other files in proprietary formats. Perl is similar to C, sed, shell and awk, and it is good at manipulating text, which is the major reason to be one of the most popular language in web programming. This feature makes it the good choice for text processing in your project. Perl vs. awk Perl is much powerful than awk with many extension modules via CPAN, an online Perl module inventory. But Perl is bigger than awk as well. If you only need a handy tool to complete a simple source file, which is demonstrated in following sample application, awk is very convenient. If you are planning to use the scripts to automate a big project, Perl is a better choice with more features. Benefits Today, more and more ICs are system ICs. That fact means every single device has hundreds or thousands of registers. When you, as a software developer, cut and paste all the register definitions from the datasheet to the source files, you will definitely find the whole process trivial, and it might generate many errors and takes more time to convert them into head files. Perl can help you to simplify this process by exporting the register tables in the PDF file to a text file, and then converting it into head files or other formats. Source Code Generator Assembly is very common in embedded system software. The head files for assembly and C source files should have same register definition in different syntax. You can use a script to convert definition from #define in C files/head files to equivalent assembly definition files. 1 din 4 03.06.2008 21:00
  • 2. Software Development Automation with Scripting Languages http://dev.emcelettronica.com/print/51795 Format Conversion A lot of embedded system tool chain has proprietary file formats. It is possible to convert them into other formats with a script. Statistics for Project management It is very important and useful to have an insight of a project by displaying the statistic chart of the source code. These figures include line of code, comment, ROM footprint (parsed by map file) and other data. These files can be converted into a text database as project history. Port Binary Data into Project It is possible to convert binary application data into source code with a script. For example, convert a GIF file format into a C source file as embedded image data. It also works for embedded fonts. Project Porting To port a project to a new platform will generate a lot of errors in the beginning, because the new target systems might miss a lot of functions. As a result, the linker will report thousands of errors. It takes time to add all functions to remove the errors. With a Perl script, you can locate these missing functions from the linker errors, and then search the prototypes for these functions and add dummy function bodies for them. It is very quick to solve these linker errors. But you must complete the functions with real bodies by yourself. Project Configuration Since makefiles are text files as well, scripts can be used to configurate the project by updating rules of makefiles.If different software components are configured by these makefiles, the whole project can be re-configured and rebuild by this ways. The system architect should organize the project configuration very carefully, because the script is powerful and dangerous. It will bring hidden risk if the system is maintained by a not well organized script. Testing Automation Perl has many modules available on CPAN, including WIN32::SerialPort module and useful TCP/IP modules. A testing engineer can use this feature to test the remote system via RS232 or TCP/IP connection automatically and generate the test report report. And Perl can run command via exec() function. So even you are not using serial port, if you can access the remote device with Linux device file, Windows DLL or executable in command prompt which connects to your target hardware, you can call it in Perl. This is quite useful in testing automation, production automation. But it requires more knowledge in PC programming. Document Automation Perl supports Doxygen, it is very easy to generate project report with Perl script in HTML, XML and even Windows Word (not for all versions). You will not feel headache to synchronize the content of your report with your source code. The document generation could be integrated into your makefile as well. Sample Application This code is a part of real project from Philips Semiconductors. The register definition is written in C source file, but the makefile will call an awk to parse the C source, generate head files to be included in the C source file, and update the dependency rules in makefile. A make file can rebuild whole project. hwic.c 2 din 4 03.06.2008 21:00
  • 3. Software Development Automation with Scripting Languages http://dev.emcelettronica.com/print/51795 /* #I2C_MAP_BEGIN --- begin definition of I2C-MAP Write registers: REG_CON1 0x04 0 0 0 0 ST3 ST2 ST1 ST0 REG_CON2 0x05 0 0 0 0 SP3 SP2 SP1 SP0 REG_CON3 0x06 SAP ST 0 SMU LMU 0 0 0 #I2C_MAP_END --- end definition of I2C-map */ i2cmap.awk BEGIN { open_map_file = 0 print quot;/* Translated by AWK-script */nquot; } function print_define(string, value) { if (string != quot;0quot;) { print quot;#define BIT_quot; string quot;tquot; value print quot;#define BYTE_quot; string quot;tquot; $1 } } #================================== # Keyword #I2C_MAP_BEGIN detected # Open map file #================================== # toupper($1) == quot;#I2C_MAP_BEGINquot; { open_map_file = 1 } #================================== # Keyword #I2C_MAP_END detected # Close map file #================================== toupper($1) == quot;#I2C_MAP_ENDquot; { open_map_file = 0 } #================================== # Register definition detected # Print register defintions #================================== (index($1,quot;REG_quot;) == 1) && (NF == 10) { if (open_map_file == 1) { print quot;#define quot; $1 quot;tquot; $2 print_define($10,quot;0x01quot;) print_define($9, quot;0x02quot;) print_define($8,quot;0x04quot;) print_define($7,quot;0x08quot;) print_define($6,quot;0x10quot;) print_define($5,quot;0x20quot;) print_define($4,quot;0x40quot;) print_define($3,quot;0x80quot;) print quot;nquot; } } END { print quot;/* End translated by AWK-script */quot; } 3 din 4 03.06.2008 21:00
  • 4. Software Development Automation with Scripting Languages http://dev.emcelettronica.com/print/51795 makefile # Using awk script to generate *.h file %foreach X in $(MAP_INCLUDES) $(X): i2cmap.awk gawk.exe $[f,,$(X),c] %echo Generating $(X) ... -$(.PATH.exe)gawk -f$(.PATH.awk)i2cmap.awk $(.PATH.c)$[f,,$(X),c] > $(.PATH.h)$(X) -touch -f$(.PATH.c)$[f,,$(X),c] $(.PATH.h)$(X) %endfor ...... HWIC.OBJ: HWIC.H hwic.c Installation You don't have to install these utility if you are working on UNIX/Linux. You can install Cygwin on Windows PC. You must enable gmake, Perl and gawk during installation. Trademarks Source URL: http://dev.emcelettronica.com/software-development-automation-scripting-languages 4 din 4 03.06.2008 21:00