Author Topic: embedXcode: Digispark and Oak on Xcode  (Read 23840 times)

avenue33

  • Jr. Member
  • **
  • Posts: 69
embedXcode: Digispark and Oak on Xcode
« on: February 24, 2013, 01:49:19 am »

Develop your sketches for Digistump boards using Xcode!


 


Direct links:
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial


Enjoy :)




I've developed embedXcode, a template for Xcode that supports Arduino 23, 1.0 and 1,5, chipKIT, Texas Instruments' LaunchPad, FraunchPad and StellarPad, Leaflabs Maple, Teensy 3.0 and Wiring boards.



Next goal is to add support for the Digispark board!

As at today, build and link work fine and I'm waiting for a Digispark board so I can proceed with the tests on upload before releasing it.

In the meantime, feel free to pay a visit to
Stay tuned :) 
« Last Edit: February 03, 2016, 04:20:43 am by avenue33 »

Bluebie

  • Sr. Member
  • ****
  • Posts: 487
Re: embedXcode: Digispark on Xcode
« Reply #1 on: February 25, 2013, 11:42:57 pm »
Super cool! I want to try using this thing ^_^


Do you think you might be able to rig up the debugger to be a digiusb terminal, so it can be used like a serial console almost for printf-style debugging, seeing as there's no way that I know of for the digispark to support gdb-style debugging over the usb connection?

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #2 on: February 28, 2013, 09:13:31 am »

Please find a new release of embedXcode:


embedXcode • Feb 28, 2013 release 29 • Support for Digispark (build and link tested)


The Digispark by Digistump is an incredibly small —0,69x0,75" or 17,5x19,0mm only— but fully featured board —with I²C, SPI, ADC or PWM!





More tests are required for the upload as the process is not standard.





As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial


Enjoy :)

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #3 on: March 05, 2013, 07:44:37 am »

Please find a new release of embedXcode:


embedXcode • Mar, 05 2013 release 30 • Full support for Digispark
embedXcode • Mar, 05 2013 release 31 • Automatic project configuration


Thanks to the Digispark boards received from  Digistump, I ran the tests for the upload. build, link and upload work fine now.


Enjoy the power of a square inch!




The automatic project configuration procedure saves a lot of time. Before, a newly created project used to require many manual procedures, like declaring the .ino or .pde sketch file as C++ code file for colour syntaxing, or defining the directories for click-to-error, ... Now, you need just a click!





This new automatic project configuration works for all the supported platforms: Arduino, chipKIT, Digispark, LaunchPad MSP430 + FRAM + Stellaris, Maple and Wiring.




As always:
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial




Enjoy :)


avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #4 on: March 10, 2013, 04:05:09 am »

I'm presently working on extending the automatic project configuration to include all the manual procedures, except for adding the user's libraries.





The major challenge is to understand how Xcode stores and structures the configuration of a project.


Stay tuned :)

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #5 on: March 14, 2013, 08:16:28 am »

Please find a new release of embedXcode:
      
embedXcode • Mar 15, 2013 release 32 • Full automatic project configuration


This new release enhances the automatic project configuration and includes:
• Declare .pde or .ino file as C++ code for code-sense, and
• Define the directory for the targets,
• Add all the cores, variants and libraries from the installed platforms under the group Resources,
• Declare all the files of the project for code-sense.





Major impact: project are much lighter, typically 2 MB instead of 16 MB!


The only remaining manual procedure is adding user's libraries.


The User Manual has been updated accordingly.


As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial


Enjoy :)

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #6 on: March 15, 2013, 09:21:23 am »

Please find a new release


embedXcode • Mar 15, 2013 release 33 • Patch for libraries Libraries in sketchbook


This release fixes an annoying bug on the the folder name for the user's libraries.


The folder with the user's libraries in the sketchbook can now be spelled with or without a capital L.


Both libraries and Libraries names are valid.


As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial


Enjoy :)

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #7 on: March 26, 2013, 12:56:04 pm »

Please find a new release of embedXcode:


embedXcode • Mar 21, 2013 release 34 • Support for Digispark release 1.04
embedXcode • Mar 26, 2013 release 35 • Support for OS X 10.7 Lion and 10.8 Mountain Lion




embedXcode now supports the new release of the IDE for Digispark, which is bundled with the Arduino 1.0.4 IDE.

The automatic project configuration tool runs now on both OS X Mountain Lion aka. 10.8 and OS X Lion aka. 10.7.


As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial


Enjoy :)

Lami

  • Newbie
  • *
  • Posts: 17
Re: embedXcode: Digispark on Xcode
« Reply #8 on: March 26, 2013, 03:13:06 pm »
Hi, I am having problems running "Automatic Procedure". I install embedXcode, create project, all following the documentation. Press "Run" and build fails with "BOARD_TAG not defined". Peeking into Step1.mk there is check it must be defined. Tried with "Arduino Uno" and "Digispark Tiny Core" boards. Just empty project, did not touch anything after creating them, just selected "Build > My Mac 32-Bit" and press "Run".


I have Arduino v 1.0.4, Digispark v 1.0.4, XCode 4.6.1, OSX 1.8.3. Standalone applications (Arduino, Digispark) work well. Any idea what I did wrong?


And other minor thing, build fails with project names containing spaces. No big deal for me, I just created new project without spaces (then ran into problem above). It fails at:
Code: [Select]
make all -C Digispark testWhere "Digispark test" is project name.

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #9 on: March 27, 2013, 02:40:37 am »
Thank you for the feed-back.

Just as I published the release 35, a new version of the IDE was released at http://sourceforge.net/projects/digistump/files/DigisparkArduino-MacOSX-1.0.4-March26.zip/download

I included fixes for those issues and updated the package soon.


The sub-folder used to be tiny-digispark and has changed for digispark.


Please note project names shouldn't include spaces, as for the official IDE.

Please download and install embedXcode again.
« Last Edit: March 27, 2013, 02:52:22 am by avenue33 »

Lami

  • Newbie
  • *
  • Posts: 17
Re: embedXcode: Digispark on Xcode
« Reply #10 on: March 27, 2013, 05:09:53 am »
Please download and install embedXcode again.
The package I can download seems to be same I have installed:
Code: [Select]
lami$ ls -l embedxcode.pkg
-rw-r--r--@ 1 lami  staff  3775307 26 bře 21:58 embedxcode.pkg
lami$ md5 embedxcode.pkg
MD5 (embedxcode.pkg) = 0a5509f66eacf192f786deb728d9d688
Tried to install it again to be sure (just downoaded again and ran installation), same results. Digging deeper, path does not seem to be problem, boards.txt file is where it is supposed to be. And I have same problems with plain Arduino projects, so Digispark is not to be blamed. Just BOARD_TAG is not defined. Makefile says it is supposed to be defined in .xconfig file, but all .xconfig files included in project are empty (0 bytes). Found them installed in ~/Library/Developer/Xcode/Templates/Project Template/embedXcode/embedXcode.xctemplate/Config/, copied all of them into the project directory, overwitting all empty .xconfig files and now build works (and at least sets syntax highligting gets set). Did not try to build and upload any code, will try when return home.

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #11 on: March 27, 2013, 11:33:40 am »
Which release of the Digispark IDE do you use?


As mentioned, the latest release changes a lot of things.

Lami

  • Newbie
  • *
  • Posts: 17
Re: embedXcode: Digispark on Xcode
« Reply #12 on: March 27, 2013, 02:13:36 pm »
Which release of the Digispark IDE do you use?

As mentioned, the latest release changes a lot of things.
Both DigisparkArduino and Arduino are 1.0.4.

I made quite few experiments with Digispark. So far it seems the first problem is that when creating new project, all .xconfig files copied into the project have 0 bytes length. Copying them over from template manually makes "automatic procedure" run successfully. Trying to build anything complains about missing boards.txt files for IDEs I don't have installed, so it ends with errors (in my case 4 of them, Mpide, Wiring, MapleIDE, Arduino/teensy is not installed). Then it tries to compile every library for every board it finds, for example SPI library from Arduino, which does not work on Digispark. Playing with EXCLUDE_LIBS in project's Makefile, excluding any library causing error had some results, but I was not able exclude everything, so build never suceeded. I was able to run Upload, Digispark was detected, but probably because the code was not built it failed afterwards.

Trying same for Arduino Uno, I had more success. I still had to copy .xconfig manually, it did not complain about missing IDE's boards.txt. It still compiles all libraries it finds, including everything in Sketchbook Library folder (even if I did not perform "Add User's Libraries"), but I was able to EXCLUDE_LIBS these which does not work. So I was able to upload default project code (LED flashes 3-times).

If you need any logs or want me to try anything, I will be happy to help.

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #13 on: March 27, 2013, 02:57:27 pm »

Thank you for the details! They helped me identifying and fixing the name of the Configurations folder.


embedXcode • Mar 27, 2013 release 36 • Configurations folder name fixed




By default, all the libraries are built. See §5.2. Manage the Libraries for Compilation


In order to speed the process up, you can specify which libraries to include by editing the makefile...


Code: [Select]
# List Arduino/chipKIT/Wiring/Energia/Maple libraries here #
APP_LIBS_LIST =


# List users libraries here #
USER_LIBS_LIST =


...as described per §5.2.1. Restrict the Libraries for Faster Compilation.


Quote
By default, both variables are empty: all libraries are considered and compiled.


This is the safest but the slowest option, as all libraries all compiled.


If some libraries are to be taken into account, just specify the name of their folder.


Only the specified libraries are compiled. If no library is required, just mention 0.


This is the fastest option but, in case a library is required, an error message will be raised


• Download: http://embedxcode.weebly.com/download







   

avenue33

  • Jr. Member
  • **
  • Posts: 69
Re: embedXcode: Digispark on Xcode
« Reply #14 on: March 28, 2013, 01:17:56 am »

Please find a new release of embedXcode


embedXcode • Mar 27, 2013 release 36 • Configurations folder name fixed


Thank you  Lami!


As always,
• Website: http://embedxcode.weebly.com
• Download: http://embedxcode.weebly.com/download
• User guide: http://embedxcode.weebly.com/tutorial
 
Enjoy