How to import arduino code into Crossworks?

Comments

6 comments

  • Avatar
    Michael Johnson

    We've not tried this - can you point me at an example?

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Michael Santiago

    Well, the 'hello world' of arduino is the blink routine

    https://www.arduino.cc/en/pmwiki.php?n=Tutorial/Blink

     

    How would you go about porting this into Crossworks? Remember that it needs to import all the Arduino libraries...

    0
    Comment actions Permalink
  • Avatar
    Airhead Bit

    How did you 'export' to Atmel? I checked and there is an Export bin feature for those of us that use products that the creators don't take the time to setup to work with Arduino properly but to generate a build list showing the libraries needed to link? 

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    Hi Michael,

    There is now an Arduino Sketch example in the Arduino M0 Pro Board Support Package that demonstrates a CrossWorks project that runs the Blink.ino example.

    To open the solution, install the board support package, click Tools > Show Installed Packages, click the Arduino M0 Pro Board Support Package link, click the M0 Pro Sketch Sample Solution link and then follow the instructions in the README.txt on how to configure the project.

    Regards,

    Jon

    0
    Comment actions Permalink
  • Avatar
    Airhead Bit

    Links are broken: https://docs.arduino.cc/retired/boards/arduino-m0-pro 

    I found the 'Package generator' in the Help, nice, that should explain some whys.

    What I didn't understand is how CrossStudio goes from *.ino to cpp but thinking about it the board manager put all the boards information in that Arduino package when it installed the board and your not 'importing' anything, just using their existing files..

     

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    What I didn't understand is how CrossStudio goes from *.ino to cpp but thinking about it the board manager put all the boards information in that Arduino package when it installed the board and your not 'importing' anything, just using their existing files.. 

    All files placed in the INO Source Files folder are compiled as C++ files with the "-include Arduino.h" compiler option which makes the compiler always include the Arduino.h header file.

    0
    Comment actions Permalink

Please sign in to leave a comment.